On Mon, May 6, 2024 at 12:48 AM Andreas Kemnade <andreas@xxxxxxxxxxxx> wrote: > > The chip is similar, but has status bits at different positions, > so use the correct bits. ... > @@ -46,6 +47,11 @@ struct ektf2127_ts { > struct input_dev *input; > struct gpio_desc *power_gpios; > struct touchscreen_properties prop; > + int status_shift; > +}; > + > +struct ektf2127_i2c_chip_data { > + int status_shift; > }; > > static void ektf2127_parse_coordinates(const u8 *buf, unsigned int touch_count, I'm wondering if you are using --histogram diff algo when preparing the patches. ... > + chip_data = device_get_match_data(&client->dev); > + if (!chip_data) > + chip_data = (const struct ektf2127_i2c_chip_data *)id->driver_data; > + if (!chip_data) { > + dev_err(&client->dev, "missing chip data\n"); > + return -EINVAL; First of all, there is a special combined API for this, please use it instead. Second, use dev_err_probe(). > + } ... > #ifdef CONFIG_OF Side note: Ideally we should kill this ugliness. But it can be done later on. -- With Best Regards, Andy Shevchenko