regulator: ltc3589: Convert enum->pointer for data in the match tables
authorBiju Das <biju.das.jz@bp.renesas.com>
Mon, 28 Aug 2023 16:28:30 +0000 (17:28 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 11 Sep 2023 00:31:25 +0000 (01:31 +0100)
commit7169654ce0f754679c60a6e2f904f6f19e54bad1
tree62dc6fede3a09750e66f2ba2909b334a27be891f
parent24d95bb0460aeccfa008faf12721474336d4e0c3
regulator: ltc3589: Convert enum->pointer for data in the match tables

Convert enum->pointer for data in the match tables, so that the hw
differences can be stored in pointer and there by simpily the code.

Add struct ltc3589_info for hw differences between the devices and replace
ltc3589_variant->ltc3589_info for data in the match table. Simplify the
probe() by replacing of_device_get_match_data() and ID lookup for
retrieving data by i2c_get_match_data(). Drop enum ltc3589_variant and
variant from struct ltc3589_info as there are no users.

While at it, dropped trailing comma in the terminator entries for ID
table.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20230828162830.97881-1-biju.das.jz@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/ltc3589.c