On Tue, Oct 01, 2024 at 03:41:34PM +0200, Nuno Sa wrote: > Add a more natural chip_info structure and add it to the i2c id table > driver data so that we do not need an enum a switch() to get the > specific bits of each device. > > Signed-off-by: Nuno Sa <nuno.sa@xxxxxxxxxx> > --- > drivers/input/keyboard/adp5589-keys.c | 181 ++++++++++++++++++---------------- > 1 file changed, 95 insertions(+), 86 deletions(-) > > diff --git a/drivers/input/keyboard/adp5589-keys.c b/drivers/input/keyboard/adp5589-keys.c > index 922d3ab998f3a5dfbaf277f10eb19e5cd1b35415..eaa5440d4f9e14352409dd880cd254354612bf3e 100644 > --- a/drivers/input/keyboard/adp5589-keys.c > +++ b/drivers/input/keyboard/adp5589-keys.c > @@ -228,16 +228,20 @@ struct adp_constants { > u8 (*reg) (u8 reg); > }; > > +struct adp5589_info { > + const struct adp_constants *var; > + bool support_row5; Is it possible to derive "row5" data from keymap information to avoid having this fake "adp5585-02-keys" device? Thanks. -- Dmitry