Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull second round of input updates from Dmitry Torokhov:
"An update to Elantech driver to support hardware v7, fix to the new
cyttsp4 driver to use proper addressing, ads7846 device tree support
and nspire-keypad got a small cleanup."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: nspire-keypad - replace magic offset with define
Input: elantech - fix for newer hardware versions (v7)
Input: cyttsp4 - use 16bit address for I2C/SPI communication
Input: ads7846 - add device tree bindings
Input: ads7846 - make sure we do not change platform data

+253 -56
+91
Documentation/devicetree/bindings/input/ads7846.txt
··· 1 + Device tree bindings for TI's ADS7843, ADS7845, ADS7846, ADS7873, TSC2046 2 + SPI driven touch screen controllers. 3 + 4 + The node for this driver must be a child node of a SPI controller, hence 5 + all mandatory properties described in 6 + 7 + Documentation/devicetree/bindings/spi/spi-bus.txt 8 + 9 + must be specified. 10 + 11 + Additional required properties: 12 + 13 + compatible Must be one of the following, depending on the 14 + model: 15 + "ti,tsc2046" 16 + "ti,ads7843" 17 + "ti,ads7845" 18 + "ti,ads7846" 19 + "ti,ads7873" 20 + 21 + interrupt-parent 22 + interrupts An interrupt node describing the IRQ line the chip's 23 + !PENIRQ pin is connected to. 24 + vcc-supply A regulator node for the supply voltage. 25 + 26 + 27 + Optional properties: 28 + 29 + ti,vref-delay-usecs vref supply delay in usecs, 0 for 30 + external vref (u16). 31 + ti,vref-mv The VREF voltage, in millivolts (u16). 32 + ti,keep-vref-on set to keep vref on for differential 33 + measurements as well 34 + ti,swap-xy swap x and y axis 35 + ti,settle-delay-usec Settling time of the analog signals; 36 + a function of Vcc and the capacitance 37 + on the X/Y drivers. If set to non-zero, 38 + two samples are taken with settle_delay 39 + us apart, and the second one is used. 40 + ~150 uSec with 0.01uF caps (u16). 41 + ti,penirq-recheck-delay-usecs If set to non-zero, after samples are 42 + taken this delay is applied and penirq 43 + is rechecked, to help avoid false 44 + events. This value is affected by the 45 + material used to build the touch layer 46 + (u16). 47 + ti,x-plate-ohms Resistance of the X-plate, 48 + in Ohms (u16). 49 + ti,y-plate-ohms Resistance of the Y-plate, 50 + in Ohms (u16). 51 + ti,x-min Minimum value on the X axis (u16). 52 + ti,y-min Minimum value on the Y axis (u16). 53 + ti,x-max Maximum value on the X axis (u16). 54 + ti,y-max Minimum value on the Y axis (u16). 55 + ti,pressure-min Minimum reported pressure value 56 + (threshold) - u16. 57 + ti,pressure-max Maximum reported pressure value (u16). 58 + ti,debounce-max Max number of additional readings per 59 + sample (u16). 60 + ti,debounce-tol Tolerance used for filtering (u16). 61 + ti,debounce-rep Additional consecutive good readings 62 + required after the first two (u16). 63 + ti,pendown-gpio-debounce Platform specific debounce time for the 64 + pendown-gpio (u32). 65 + pendown-gpio GPIO handle describing the pin the !PENIRQ 66 + line is connected to. 67 + linux,wakeup use any event on touchscreen as wakeup event. 68 + 69 + 70 + Example for a TSC2046 chip connected to an McSPI controller of an OMAP SoC:: 71 + 72 + spi_controller { 73 + tsc2046@0 { 74 + reg = <0>; /* CS0 */ 75 + compatible = "ti,tsc2046"; 76 + interrupt-parent = <&gpio1>; 77 + interrupts = <8 0>; /* BOOT6 / GPIO 8 */ 78 + spi-max-frequency = <1000000>; 79 + pendown-gpio = <&gpio1 8 0>; 80 + vcc-supply = <&reg_vcc3>; 81 + 82 + ti,x-min = /bits/ 16 <0>; 83 + ti,x-max = /bits/ 16 <8000>; 84 + ti,y-min = /bits/ 16 <0>; 85 + ti,y-max = /bits/ 16 <4800>; 86 + ti,x-plate-ohms = /bits/ 16 <40>; 87 + ti,pressure-max = /bits/ 16 <255>; 88 + 89 + linux,wakeup; 90 + }; 91 + };
+1 -1
drivers/input/keyboard/nspire-keypad.c
··· 122 122 123 123 /* Enable interrupts */ 124 124 keypad->int_mask = 1 << 1; 125 - writel(keypad->int_mask, keypad->reg_base + 0xc); 125 + writel(keypad->int_mask, keypad->reg_base + KEYPAD_INTMSK); 126 126 127 127 /* Disable GPIO interrupts to prevent hanging on touchpad */ 128 128 /* Possibly used to detect touchpad events */
+9 -8
drivers/input/mouse/elantech.c
··· 694 694 static int elantech_packet_check_v4(struct psmouse *psmouse) 695 695 { 696 696 unsigned char *packet = psmouse->packet; 697 + unsigned char packet_type = packet[3] & 0x03; 697 698 698 - if ((packet[0] & 0x0c) == 0x04 && 699 - (packet[3] & 0x1f) == 0x11) 699 + switch (packet_type) { 700 + case 0: 701 + return PACKET_V4_STATUS; 702 + 703 + case 1: 700 704 return PACKET_V4_HEAD; 701 705 702 - if ((packet[0] & 0x0c) == 0x04 && 703 - (packet[3] & 0x1f) == 0x12) 706 + case 2: 704 707 return PACKET_V4_MOTION; 705 - 706 - if ((packet[0] & 0x0c) == 0x04 && 707 - (packet[3] & 0x1f) == 0x10) 708 - return PACKET_V4_STATUS; 708 + } 709 709 710 710 return PACKET_UNKNOWN; 711 711 } ··· 1282 1282 etd->hw_version = 3; 1283 1283 break; 1284 1284 case 6: 1285 + case 7: 1285 1286 etd->hw_version = 4; 1286 1287 break; 1287 1288 default:
+108 -15
drivers/input/touchscreen/ads7846.c
··· 27 27 #include <linux/interrupt.h> 28 28 #include <linux/slab.h> 29 29 #include <linux/pm.h> 30 + #include <linux/of.h> 31 + #include <linux/of_gpio.h> 32 + #include <linux/of_device.h> 30 33 #include <linux/gpio.h> 31 34 #include <linux/spi/spi.h> 32 35 #include <linux/spi/ads7846.h> ··· 964 961 static SIMPLE_DEV_PM_OPS(ads7846_pm, ads7846_suspend, ads7846_resume); 965 962 966 963 static int ads7846_setup_pendown(struct spi_device *spi, 967 - struct ads7846 *ts) 964 + struct ads7846 *ts, 965 + const struct ads7846_platform_data *pdata) 968 966 { 969 - struct ads7846_platform_data *pdata = spi->dev.platform_data; 970 967 int err; 971 968 972 969 /* ··· 1006 1003 * use formula #2 for pressure, not #3. 1007 1004 */ 1008 1005 static void ads7846_setup_spi_msg(struct ads7846 *ts, 1009 - const struct ads7846_platform_data *pdata) 1006 + const struct ads7846_platform_data *pdata) 1010 1007 { 1011 1008 struct spi_message *m = &ts->msg[0]; 1012 1009 struct spi_transfer *x = ts->xfer; ··· 1204 1201 spi_message_add_tail(x, m); 1205 1202 } 1206 1203 1204 + #ifdef CONFIG_OF 1205 + static const struct of_device_id ads7846_dt_ids[] = { 1206 + { .compatible = "ti,tsc2046", .data = (void *) 7846 }, 1207 + { .compatible = "ti,ads7843", .data = (void *) 7843 }, 1208 + { .compatible = "ti,ads7845", .data = (void *) 7845 }, 1209 + { .compatible = "ti,ads7846", .data = (void *) 7846 }, 1210 + { .compatible = "ti,ads7873", .data = (void *) 7873 }, 1211 + { } 1212 + }; 1213 + MODULE_DEVICE_TABLE(of, ads7846_dt_ids); 1214 + 1215 + static const struct ads7846_platform_data *ads7846_probe_dt(struct device *dev) 1216 + { 1217 + struct ads7846_platform_data *pdata; 1218 + struct device_node *node = dev->of_node; 1219 + const struct of_device_id *match; 1220 + 1221 + if (!node) { 1222 + dev_err(dev, "Device does not have associated DT data\n"); 1223 + return ERR_PTR(-EINVAL); 1224 + } 1225 + 1226 + match = of_match_device(ads7846_dt_ids, dev); 1227 + if (!match) { 1228 + dev_err(dev, "Unknown device model\n"); 1229 + return ERR_PTR(-EINVAL); 1230 + } 1231 + 1232 + pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); 1233 + if (!pdata) 1234 + return ERR_PTR(-ENOMEM); 1235 + 1236 + pdata->model = (unsigned long)match->data; 1237 + 1238 + of_property_read_u16(node, "ti,vref-delay-usecs", 1239 + &pdata->vref_delay_usecs); 1240 + of_property_read_u16(node, "ti,vref-mv", &pdata->vref_mv); 1241 + pdata->keep_vref_on = of_property_read_bool(node, "ti,keep-vref-on"); 1242 + 1243 + pdata->swap_xy = of_property_read_bool(node, "ti,swap-xy"); 1244 + 1245 + of_property_read_u16(node, "ti,settle-delay-usec", 1246 + &pdata->settle_delay_usecs); 1247 + of_property_read_u16(node, "ti,penirq-recheck-delay-usecs", 1248 + &pdata->penirq_recheck_delay_usecs); 1249 + 1250 + of_property_read_u16(node, "ti,x-plate-ohms", &pdata->x_plate_ohms); 1251 + of_property_read_u16(node, "ti,y-plate-ohms", &pdata->y_plate_ohms); 1252 + 1253 + of_property_read_u16(node, "ti,x-min", &pdata->x_min); 1254 + of_property_read_u16(node, "ti,y-min", &pdata->y_min); 1255 + of_property_read_u16(node, "ti,x-max", &pdata->x_max); 1256 + of_property_read_u16(node, "ti,y-max", &pdata->y_max); 1257 + 1258 + of_property_read_u16(node, "ti,pressure-min", &pdata->pressure_min); 1259 + of_property_read_u16(node, "ti,pressure-max", &pdata->pressure_max); 1260 + 1261 + of_property_read_u16(node, "ti,debounce-max", &pdata->debounce_max); 1262 + of_property_read_u16(node, "ti,debounce-tol", &pdata->debounce_tol); 1263 + of_property_read_u16(node, "ti,debounce-rep", &pdata->debounce_rep); 1264 + 1265 + of_property_read_u32(node, "ti,pendown-gpio-debounce", 1266 + &pdata->gpio_pendown_debounce); 1267 + 1268 + pdata->wakeup = of_property_read_bool(node, "linux,wakeup"); 1269 + 1270 + pdata->gpio_pendown = of_get_named_gpio(dev->of_node, "pendown-gpio", 0); 1271 + 1272 + return pdata; 1273 + } 1274 + #else 1275 + static const struct ads7846_platform_data *ads7846_probe_dt(struct device *dev) 1276 + { 1277 + dev_err(dev, "no platform data defined\n"); 1278 + return ERR_PTR(-EINVAL); 1279 + } 1280 + #endif 1281 + 1207 1282 static int ads7846_probe(struct spi_device *spi) 1208 1283 { 1284 + const struct ads7846_platform_data *pdata; 1209 1285 struct ads7846 *ts; 1210 1286 struct ads7846_packet *packet; 1211 1287 struct input_dev *input_dev; 1212 - struct ads7846_platform_data *pdata = spi->dev.platform_data; 1213 1288 unsigned long irq_flags; 1214 1289 int err; 1215 1290 1216 1291 if (!spi->irq) { 1217 1292 dev_dbg(&spi->dev, "no IRQ?\n"); 1218 - return -ENODEV; 1219 - } 1220 - 1221 - if (!pdata) { 1222 - dev_dbg(&spi->dev, "no platform data?\n"); 1223 - return -ENODEV; 1293 + return -EINVAL; 1224 1294 } 1225 1295 1226 1296 /* don't exceed max specified sample rate */ 1227 1297 if (spi->max_speed_hz > (125000 * SAMPLE_BITS)) { 1228 - dev_dbg(&spi->dev, "f(sample) %d KHz?\n", 1298 + dev_err(&spi->dev, "f(sample) %d KHz?\n", 1229 1299 (spi->max_speed_hz/SAMPLE_BITS)/1000); 1230 1300 return -EINVAL; 1231 1301 } 1232 1302 1233 - /* We'd set TX word size 8 bits and RX word size to 13 bits ... except 1303 + /* 1304 + * We'd set TX word size 8 bits and RX word size to 13 bits ... except 1234 1305 * that even if the hardware can do that, the SPI controller driver 1235 1306 * may not. So we stick to very-portable 8 bit words, both RX and TX. 1236 1307 */ ··· 1327 1250 ts->packet = packet; 1328 1251 ts->spi = spi; 1329 1252 ts->input = input_dev; 1330 - ts->vref_mv = pdata->vref_mv; 1331 - ts->swap_xy = pdata->swap_xy; 1332 1253 1333 1254 mutex_init(&ts->lock); 1334 1255 init_waitqueue_head(&ts->wait); 1256 + 1257 + pdata = dev_get_platdata(&spi->dev); 1258 + if (!pdata) { 1259 + pdata = ads7846_probe_dt(&spi->dev); 1260 + if (IS_ERR(pdata)) 1261 + return PTR_ERR(pdata); 1262 + } 1335 1263 1336 1264 ts->model = pdata->model ? : 7846; 1337 1265 ts->vref_delay_usecs = pdata->vref_delay_usecs ? : 100; 1338 1266 ts->x_plate_ohms = pdata->x_plate_ohms ? : 400; 1339 1267 ts->pressure_max = pdata->pressure_max ? : ~0; 1268 + 1269 + ts->vref_mv = pdata->vref_mv; 1270 + ts->swap_xy = pdata->swap_xy; 1340 1271 1341 1272 if (pdata->filter != NULL) { 1342 1273 if (pdata->filter_init != NULL) { ··· 1366 1281 ts->filter = ads7846_no_filter; 1367 1282 } 1368 1283 1369 - err = ads7846_setup_pendown(spi, ts); 1284 + err = ads7846_setup_pendown(spi, ts, pdata); 1370 1285 if (err) 1371 1286 goto err_cleanup_filter; 1372 1287 ··· 1455 1370 1456 1371 device_init_wakeup(&spi->dev, pdata->wakeup); 1457 1372 1373 + /* 1374 + * If device does not carry platform data we must have allocated it 1375 + * when parsing DT data. 1376 + */ 1377 + if (!dev_get_platdata(&spi->dev)) 1378 + devm_kfree(&spi->dev, (void *)pdata); 1379 + 1458 1380 return 0; 1459 1381 1460 1382 err_remove_attr_group: ··· 1529 1437 .name = "ads7846", 1530 1438 .owner = THIS_MODULE, 1531 1439 .pm = &ads7846_pm, 1440 + .of_match_table = of_match_ptr(ads7846_dt_ids), 1532 1441 }, 1533 1442 .probe = ads7846_probe, 1534 1443 .remove = ads7846_remove,
+6 -6
drivers/input/touchscreen/cyttsp4_core.h
··· 369 369 370 370 struct cyttsp4_bus_ops { 371 371 u16 bustype; 372 - int (*write)(struct device *dev, u8 *xfer_buf, u8 addr, u8 length, 372 + int (*write)(struct device *dev, u8 *xfer_buf, u16 addr, u8 length, 373 373 const void *values); 374 - int (*read)(struct device *dev, u8 *xfer_buf, u8 addr, u8 length, 374 + int (*read)(struct device *dev, u8 *xfer_buf, u16 addr, u8 length, 375 375 void *values); 376 376 }; 377 377 ··· 448 448 /* y-axis, 0:origin is on top side of panel, 1: bottom */ 449 449 #define CY_PCFG_ORIGIN_Y_MASK 0x80 450 450 451 - static inline int cyttsp4_adap_read(struct cyttsp4 *ts, u8 addr, int size, 451 + static inline int cyttsp4_adap_read(struct cyttsp4 *ts, u16 addr, int size, 452 452 void *buf) 453 453 { 454 454 return ts->bus_ops->read(ts->dev, ts->xfer_buf, addr, size, buf); 455 455 } 456 456 457 - static inline int cyttsp4_adap_write(struct cyttsp4 *ts, u8 addr, int size, 457 + static inline int cyttsp4_adap_write(struct cyttsp4 *ts, u16 addr, int size, 458 458 const void *buf) 459 459 { 460 460 return ts->bus_ops->write(ts->dev, ts->xfer_buf, addr, size, buf); ··· 463 463 extern struct cyttsp4 *cyttsp4_probe(const struct cyttsp4_bus_ops *ops, 464 464 struct device *dev, u16 irq, size_t xfer_buf_size); 465 465 extern int cyttsp4_remove(struct cyttsp4 *ts); 466 - int cyttsp_i2c_write_block_data(struct device *dev, u8 *xfer_buf, u8 addr, 466 + int cyttsp_i2c_write_block_data(struct device *dev, u8 *xfer_buf, u16 addr, 467 467 u8 length, const void *values); 468 - int cyttsp_i2c_read_block_data(struct device *dev, u8 *xfer_buf, u8 addr, 468 + int cyttsp_i2c_read_block_data(struct device *dev, u8 *xfer_buf, u16 addr, 469 469 u8 length, void *values); 470 470 extern const struct dev_pm_ops cyttsp4_pm_ops; 471 471
+9 -11
drivers/input/touchscreen/cyttsp4_spi.c
··· 44 44 #define CY_SPI_DATA_BUF_SIZE (CY_SPI_CMD_BYTES + CY_SPI_DATA_SIZE) 45 45 46 46 static int cyttsp_spi_xfer(struct device *dev, u8 *xfer_buf, 47 - u8 op, u8 reg, u8 *buf, int length) 47 + u8 op, u16 reg, u8 *buf, int length) 48 48 { 49 49 struct spi_device *spi = to_spi_device(dev); 50 50 struct spi_message msg; ··· 63 63 memset(wr_buf, 0, CY_SPI_DATA_BUF_SIZE); 64 64 memset(rd_buf, 0, CY_SPI_CMD_BYTES); 65 65 66 - if (reg > 255) 67 - wr_buf[0] = op + CY_SPI_A8_BIT; 68 - else 69 - wr_buf[0] = op; 70 - if (op == CY_SPI_WR_OP) 71 - wr_buf[1] = reg % 256; 72 - if (op == CY_SPI_WR_OP && length > 0) 73 - memcpy(wr_buf + CY_SPI_CMD_BYTES, buf, length); 66 + wr_buf[0] = op + (((reg >> 8) & 0x1) ? CY_SPI_A8_BIT : 0); 67 + if (op == CY_SPI_WR_OP) { 68 + wr_buf[1] = reg & 0xFF; 69 + if (length > 0) 70 + memcpy(wr_buf + CY_SPI_CMD_BYTES, buf, length); 71 + } 74 72 75 73 memset(xfer, 0, sizeof(xfer)); 76 74 spi_message_init(&msg); ··· 128 130 } 129 131 130 132 static int cyttsp_spi_read_block_data(struct device *dev, u8 *xfer_buf, 131 - u8 addr, u8 length, void *data) 133 + u16 addr, u8 length, void *data) 132 134 { 133 135 int rc; 134 136 ··· 141 143 } 142 144 143 145 static int cyttsp_spi_write_block_data(struct device *dev, u8 *xfer_buf, 144 - u8 addr, u8 length, const void *data) 146 + u16 addr, u8 length, const void *data) 145 147 { 146 148 return cyttsp_spi_xfer(dev, xfer_buf, CY_SPI_WR_OP, addr, (void *)data, 147 149 length);
+4 -4
drivers/input/touchscreen/cyttsp_core.h
··· 112 112 113 113 struct cyttsp_bus_ops { 114 114 u16 bustype; 115 - int (*write)(struct device *dev, u8 *xfer_buf, u8 addr, u8 length, 115 + int (*write)(struct device *dev, u8 *xfer_buf, u16 addr, u8 length, 116 116 const void *values); 117 - int (*read)(struct device *dev, u8 *xfer_buf, u8 addr, u8 length, 117 + int (*read)(struct device *dev, u8 *xfer_buf, u16 addr, u8 length, 118 118 void *values); 119 119 }; 120 120 ··· 145 145 struct device *dev, int irq, size_t xfer_buf_size); 146 146 void cyttsp_remove(struct cyttsp *ts); 147 147 148 - int cyttsp_i2c_write_block_data(struct device *dev, u8 *xfer_buf, u8 addr, 148 + int cyttsp_i2c_write_block_data(struct device *dev, u8 *xfer_buf, u16 addr, 149 149 u8 length, const void *values); 150 - int cyttsp_i2c_read_block_data(struct device *dev, u8 *xfer_buf, u8 addr, 150 + int cyttsp_i2c_read_block_data(struct device *dev, u8 *xfer_buf, u16 addr, 151 151 u8 length, void *values); 152 152 extern const struct dev_pm_ops cyttsp_pm_ops; 153 153
+22 -8
drivers/input/touchscreen/cyttsp_i2c_common.c
··· 32 32 #include <linux/types.h> 33 33 34 34 int cyttsp_i2c_read_block_data(struct device *dev, u8 *xfer_buf, 35 - u8 addr, u8 length, void *values) 35 + u16 addr, u8 length, void *values) 36 36 { 37 37 struct i2c_client *client = to_i2c_client(dev); 38 + u8 client_addr = client->addr | ((addr >> 8) & 0x1); 39 + u8 addr_lo = addr & 0xFF; 38 40 struct i2c_msg msgs[] = { 39 41 { 40 - .addr = client->addr, 42 + .addr = client_addr, 41 43 .flags = 0, 42 44 .len = 1, 43 - .buf = &addr, 45 + .buf = &addr_lo, 44 46 }, 45 47 { 46 - .addr = client->addr, 48 + .addr = client_addr, 47 49 .flags = I2C_M_RD, 48 50 .len = length, 49 51 .buf = values, ··· 62 60 EXPORT_SYMBOL_GPL(cyttsp_i2c_read_block_data); 63 61 64 62 int cyttsp_i2c_write_block_data(struct device *dev, u8 *xfer_buf, 65 - u8 addr, u8 length, const void *values) 63 + u16 addr, u8 length, const void *values) 66 64 { 67 65 struct i2c_client *client = to_i2c_client(dev); 66 + u8 client_addr = client->addr | ((addr >> 8) & 0x1); 67 + u8 addr_lo = addr & 0xFF; 68 + struct i2c_msg msgs[] = { 69 + { 70 + .addr = client_addr, 71 + .flags = 0, 72 + .len = length + 1, 73 + .buf = xfer_buf, 74 + }, 75 + }; 68 76 int retval; 69 77 70 - xfer_buf[0] = addr; 78 + xfer_buf[0] = addr_lo; 71 79 memcpy(&xfer_buf[1], values, length); 72 80 73 - retval = i2c_master_send(client, xfer_buf, length + 1); 81 + retval = i2c_transfer(client->adapter, msgs, ARRAY_SIZE(msgs)); 82 + if (retval < 0) 83 + return retval; 74 84 75 - return retval < 0 ? retval : 0; 85 + return retval != ARRAY_SIZE(msgs) ? -EIO : 0; 76 86 } 77 87 EXPORT_SYMBOL_GPL(cyttsp_i2c_write_block_data); 78 88
+3 -3
drivers/input/touchscreen/cyttsp_spi.c
··· 41 41 #define CY_SPI_BITS_PER_WORD 8 42 42 43 43 static int cyttsp_spi_xfer(struct device *dev, u8 *xfer_buf, 44 - u8 op, u8 reg, u8 *buf, int length) 44 + u8 op, u16 reg, u8 *buf, int length) 45 45 { 46 46 struct spi_device *spi = to_spi_device(dev); 47 47 struct spi_message msg; ··· 126 126 } 127 127 128 128 static int cyttsp_spi_read_block_data(struct device *dev, u8 *xfer_buf, 129 - u8 addr, u8 length, void *data) 129 + u16 addr, u8 length, void *data) 130 130 { 131 131 return cyttsp_spi_xfer(dev, xfer_buf, CY_SPI_RD_OP, addr, data, 132 132 length); 133 133 } 134 134 135 135 static int cyttsp_spi_write_block_data(struct device *dev, u8 *xfer_buf, 136 - u8 addr, u8 length, const void *data) 136 + u16 addr, u8 length, const void *data) 137 137 { 138 138 return cyttsp_spi_xfer(dev, xfer_buf, CY_SPI_WR_OP, addr, (void *)data, 139 139 length);