Skip to content

Commit c7dded5

Browse files
Sven Van Asbroeckdtor
authored andcommitted
Input: ili210x - do not retrieve/print chip firmware version
The driver's method to retrieve the firmware version on ili2117/ ili2118 chip flavours is incorrect. The firmware version register address and layout are wrong. The firmware version is not actually used anywhere inside or outside this driver. There is a dev_dbg() print, but that is only visible when the developer explicitly compiles in debug support. Don't make the code more complicated to preserve a feature that no-one is using. Remove all code associated with chip firmware version. Signed-off-by: Sven Van Asbroeck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 8d13c76 commit c7dded5

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

drivers/input/touchscreen/ili210x.c

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,8 @@
2121
/* Touchscreen commands */
2222
#define REG_TOUCHDATA 0x10
2323
#define REG_PANEL_INFO 0x20
24-
#define REG_FIRMWARE_VERSION 0x40
2524
#define REG_CALIBRATE 0xcc
2625

27-
struct firmware_version {
28-
u8 id;
29-
u8 major;
30-
u8 minor;
31-
} __packed;
32-
3326
struct ili2xxx_chip {
3427
int (*read_reg)(struct i2c_client *client, u8 reg,
3528
void *buf, size_t len);
@@ -342,7 +335,6 @@ static int ili210x_i2c_probe(struct i2c_client *client,
342335
struct ili210x *priv;
343336
struct gpio_desc *reset_gpio;
344337
struct input_dev *input;
345-
struct firmware_version firmware;
346338
int error;
347339

348340
dev_dbg(dev, "Probing for ILI210X I2C Touschreen driver");
@@ -389,15 +381,6 @@ static int ili210x_i2c_probe(struct i2c_client *client,
389381
priv->chip = chip;
390382
i2c_set_clientdata(client, priv);
391383

392-
/* Get firmware version */
393-
error = chip->read_reg(client, REG_FIRMWARE_VERSION,
394-
&firmware, sizeof(firmware));
395-
if (error) {
396-
dev_err(dev, "Failed to get firmware version, err: %d\n",
397-
error);
398-
return error;
399-
}
400-
401384
/* Setup input device */
402385
input->name = "ILI210x Touchscreen";
403386
input->id.bustype = BUS_I2C;
@@ -439,10 +422,6 @@ static int ili210x_i2c_probe(struct i2c_client *client,
439422
return error;
440423
}
441424

442-
dev_dbg(dev,
443-
"ILI210x initialized (IRQ: %d), firmware version %d.%d.%d",
444-
client->irq, firmware.id, firmware.major, firmware.minor);
445-
446425
return 0;
447426
}
448427

0 commit comments

Comments
 (0)