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 input updates from Dmitry Torokhov:

- a few drivers have been updated to use flexible-array syntax instead
of GCC extension

- ili210x touchscreen driver now supports the 2120 protocol flavor

- a couple more of Synaptics devices have been switched over to RMI4

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: cyapa - replace zero-length array with flexible-array member
Input: tca6416-keypad - replace zero-length array with flexible-array member
Input: gpio_keys_polled - replace zero-length array with flexible-array member
Input: synaptics - remove the LEN0049 dmi id from topbuttonpad list
Input: synaptics - enable SMBus on ThinkPad L470
Input: synaptics - switch T470s to RMI4 by default
Input: gpio_keys - replace zero-length array with flexible-array member
Input: goldfish_events - replace zero-length array with flexible-array member
Input: psmouse - switch to using i2c_new_scanned_device()
Input: ili210x - add ili2120 support
Input: ili210x - fix return value of is_visible function

+52 -15
+2 -1
Documentation/devicetree/bindings/input/ilitek,ili2xxx.txt
··· 1 - Ilitek ILI210x/ILI2117/ILI251x touchscreen controller 1 + Ilitek ILI210x/ILI2117/ILI2120/ILI251x touchscreen controller 2 2 3 3 Required properties: 4 4 - compatible: 5 5 ilitek,ili210x for ILI210x 6 6 ilitek,ili2117 for ILI2117 7 + ilitek,ili2120 for ILI2120 7 8 ilitek,ili251x for ILI251x 8 9 9 10 - reg: The I2C address of the device
+1 -1
drivers/input/keyboard/goldfish_events.c
··· 30 30 struct input_dev *input; 31 31 int irq; 32 32 void __iomem *addr; 33 - char name[0]; 33 + char name[]; 34 34 }; 35 35 36 36 static irqreturn_t events_interrupt(int irq, void *dev_id)
+1 -1
drivers/input/keyboard/gpio_keys.c
··· 55 55 struct input_dev *input; 56 56 struct mutex disable_lock; 57 57 unsigned short *keymap; 58 - struct gpio_button_data data[0]; 58 + struct gpio_button_data data[]; 59 59 }; 60 60 61 61 /*
+1 -1
drivers/input/keyboard/gpio_keys_polled.c
··· 38 38 const struct gpio_keys_platform_data *pdata; 39 39 unsigned long rel_axis_seen[BITS_TO_LONGS(REL_CNT)]; 40 40 unsigned long abs_axis_seen[BITS_TO_LONGS(ABS_CNT)]; 41 - struct gpio_keys_button_data data[0]; 41 + struct gpio_keys_button_data data[]; 42 42 }; 43 43 44 44 static void gpio_keys_button_event(struct input_dev *input,
+2 -2
drivers/input/keyboard/tca6416-keypad.c
··· 33 33 34 34 struct tca6416_drv_data { 35 35 struct input_dev *input; 36 - struct tca6416_button data[0]; 36 + struct tca6416_button data[]; 37 37 }; 38 38 39 39 struct tca6416_keypad_chip { ··· 48 48 int irqnum; 49 49 u16 pinmask; 50 50 bool use_polling; 51 - struct tca6416_button buttons[0]; 51 + struct tca6416_button buttons[]; 52 52 }; 53 53 54 54 static int tca6416_write_reg(struct tca6416_keypad_chip *chip, int reg, u16 val)
+4 -4
drivers/input/mouse/cyapa_gen5.c
··· 250 250 251 251 struct cyapa_tsg_bin_image { 252 252 struct cyapa_tsg_bin_image_head image_head; 253 - struct cyapa_tsg_bin_image_data_record records[0]; 253 + struct cyapa_tsg_bin_image_data_record records[]; 254 254 } __packed; 255 255 256 256 struct pip_bl_packet_start { ··· 271 271 u8 report_id; /* Bootloader output report id, must be 40h */ 272 272 u8 rsvd; /* Reserved, must be 0 */ 273 273 struct pip_bl_packet_start packet_start; 274 - u8 data[0]; /* Command data variable based on commands */ 274 + u8 data[]; /* Command data variable based on commands */ 275 275 } __packed; 276 276 277 277 /* Initiate bootload command data structure. */ ··· 300 300 struct tsg_bl_flash_row_head { 301 301 u8 flash_array_id; 302 302 __le16 flash_row_id; 303 - u8 flash_data[0]; 303 + u8 flash_data[]; 304 304 } __packed; 305 305 306 306 struct pip_app_cmd_head { ··· 314 314 * Bit 6-0: command code. 315 315 */ 316 316 u8 cmd_code; 317 - u8 parameter_data[0]; /* Parameter data variable based on cmd_code */ 317 + u8 parameter_data[]; /* Parameter data variable based on cmd_code */ 318 318 } __packed; 319 319 320 320 /* Application get/set parameter command data structure */
+5 -3
drivers/input/mouse/psmouse-smbus.c
··· 190 190 struct psmouse_smbus_dev *smbdev = data; 191 191 unsigned short addr_list[] = { smbdev->board.addr, I2C_CLIENT_END }; 192 192 struct i2c_adapter *adapter; 193 + struct i2c_client *client; 193 194 194 195 adapter = i2c_verify_adapter(dev); 195 196 if (!adapter) ··· 199 198 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_HOST_NOTIFY)) 200 199 return 0; 201 200 202 - smbdev->client = i2c_new_probed_device(adapter, &smbdev->board, 203 - addr_list, NULL); 204 - if (!smbdev->client) 201 + client = i2c_new_scanned_device(adapter, &smbdev->board, 202 + addr_list, NULL); 203 + if (IS_ERR(client)) 205 204 return 0; 206 205 207 206 /* We have our(?) device, stop iterating i2c bus. */ 207 + smbdev->client = client; 208 208 return 1; 209 209 } 210 210
+3 -1
drivers/input/mouse/synaptics.c
··· 146 146 "LEN0042", /* Yoga */ 147 147 "LEN0045", 148 148 "LEN0047", 149 - "LEN0049", 150 149 "LEN2000", /* S540 */ 151 150 "LEN2001", /* Edge E431 */ 152 151 "LEN2002", /* Edge E531 */ ··· 165 166 /* all of the topbuttonpad_pnp_ids are valid, we just add some extras */ 166 167 "LEN0048", /* X1 Carbon 3 */ 167 168 "LEN0046", /* X250 */ 169 + "LEN0049", /* Yoga 11e */ 168 170 "LEN004a", /* W541 */ 169 171 "LEN005b", /* P50 */ 170 172 "LEN005e", /* T560 */ 173 + "LEN006c", /* T470s */ 171 174 "LEN0071", /* T480 */ 172 175 "LEN0072", /* X1 Carbon Gen 5 (2017) - Elan/ALPS trackpoint */ 173 176 "LEN0073", /* X1 Carbon G5 (Elantech) */ ··· 180 179 "LEN0097", /* X280 -> ALPS trackpoint */ 181 180 "LEN009b", /* T580 */ 182 181 "LEN200f", /* T450s */ 182 + "LEN2044", /* L470 */ 183 183 "LEN2054", /* E480 */ 184 184 "LEN2055", /* E580 */ 185 185 "SYN3052", /* HP EliteBook 840 G4 */
+33 -1
drivers/input/touchscreen/ili210x.c
··· 167 167 .resolution = 2048, 168 168 }; 169 169 170 + static bool ili212x_touchdata_to_coords(const u8 *touchdata, 171 + unsigned int finger, 172 + unsigned int *x, unsigned int *y) 173 + { 174 + u16 val; 175 + 176 + val = get_unaligned_be16(touchdata + 3 + (finger * 5) + 0); 177 + if (!(val & BIT(15))) /* Touch indication */ 178 + return false; 179 + 180 + *x = val & 0x3fff; 181 + *y = get_unaligned_be16(touchdata + 3 + (finger * 5) + 2); 182 + 183 + return true; 184 + } 185 + 186 + static bool ili212x_check_continue_polling(const u8 *data, bool touch) 187 + { 188 + return touch; 189 + } 190 + 191 + static const struct ili2xxx_chip ili212x_chip = { 192 + .read_reg = ili210x_read_reg, 193 + .get_touch_data = ili210x_read_touch_data, 194 + .parse_touch_data = ili212x_touchdata_to_coords, 195 + .continue_polling = ili212x_check_continue_polling, 196 + .max_touches = 10, 197 + .has_calibrate_reg = true, 198 + }; 199 + 170 200 static int ili251x_read_reg(struct i2c_client *client, 171 201 u8 reg, void *buf, size_t len) 172 202 { ··· 351 321 struct i2c_client *client = to_i2c_client(dev); 352 322 struct ili210x *priv = i2c_get_clientdata(client); 353 323 354 - return priv->chip->has_calibrate_reg; 324 + return priv->chip->has_calibrate_reg ? attr->mode : 0; 355 325 } 356 326 357 327 static const struct attribute_group ili210x_attr_group = { ··· 477 447 static const struct i2c_device_id ili210x_i2c_id[] = { 478 448 { "ili210x", (long)&ili210x_chip }, 479 449 { "ili2117", (long)&ili211x_chip }, 450 + { "ili2120", (long)&ili212x_chip }, 480 451 { "ili251x", (long)&ili251x_chip }, 481 452 { } 482 453 }; ··· 486 455 static const struct of_device_id ili210x_dt_ids[] = { 487 456 { .compatible = "ilitek,ili210x", .data = &ili210x_chip }, 488 457 { .compatible = "ilitek,ili2117", .data = &ili211x_chip }, 458 + { .compatible = "ilitek,ili2120", .data = &ili212x_chip }, 489 459 { .compatible = "ilitek,ili251x", .data = &ili251x_chip }, 490 460 { } 491 461 };