gpio: pcf857x: Extend match data support for OF tables
authorBiju Das <biju.das.jz@bp.renesas.com>
Sat, 19 Aug 2023 18:04:43 +0000 (19:04 +0100)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tue, 22 Aug 2023 09:41:17 +0000 (11:41 +0200)
commitdb3b16dcc7e4f5bfbe35806a54fb15dc858d19f8
tree11059ae8d427284dd9bc3b4f0b019846e5b5ed1b
parentbb5ad5ef7493ed21abc2c8b890204c8f79df86a8
gpio: pcf857x: Extend match data support for OF tables

The driver has OF match table, but still it uses an ID lookup table for
retrieving match data. Currently, the driver is working on the
assumption that an I2C device registered via OF will always match a
legacy I2C device ID. Extend match data support for OF tables by using
i2c_get_match_data() instead of the ID lookup for both OF/ID matches by
making similar OF/ID tables.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/gpio-pcf857x.c