iio: proximity: sx9310: Convert enum->pointer for match data table
authorBiju Das <biju.das.jz@bp.renesas.com>
Fri, 18 Aug 2023 17:58:19 +0000 (18:58 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 11 Sep 2023 19:12:41 +0000 (20:12 +0100)
commit21fd3b1373f65c6a9d910642ecef194a077d1624
tree9053e8d250078a5600b16c533bdd9a34fdf29d6c
parent7f8643aa5e0fbf540eeba412fc2a7d4dfc2f22f8
iio: proximity: sx9310: Convert enum->pointer for match data table

Convert enum->pointer for data in match data table, so that
device_get_match_data() can do match against OF/ACPI/I2C tables, once i2c
bus type match support added to it.

Add struct sx931x_info and replace enum->sx931x_info in the match table
and simplify sx9310_check_whoami().

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/20230818175819.325663-1-biju.das.jz@bp.renesas.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/proximity/sx9310.c