platform/x86: int3472: Support multiple gpio lookups in board data
authorDaniel Scally <djrscally@gmail.com>
Wed, 21 Sep 2022 23:04:38 +0000 (00:04 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 24 Sep 2022 17:12:32 +0000 (19:12 +0200)
commit06a659d1f0a0ae3d104155655397e593296a65fa
tree9ade1b1a08c9c7506683ef82e427e9946b668186
parent43cf36974d760a3d1c705a83de89ac58059e5f0b
platform/x86: int3472: Support multiple gpio lookups in board data

Currently, we only support passing a single gpiod_lookup_table as part
of the board data for the tps68470 driver. This carries the implicit
assumption that each TPS68470 device will only support a single
sensor, which does not hold true.

Extend the code to support the possibility of multiple sensors each
having a gpiod_lookup_table, and opportunistically add the lookup
table for the Surface Go line's IR camera.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Daniel Scally <djrscally@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/platform/x86/intel/int3472/tps68470.c
drivers/platform/x86/intel/int3472/tps68470.h
drivers/platform/x86/intel/int3472/tps68470_board_data.c