platform/x86: int3472: Add get_sensor_adev_and_name() helper
authorHans de Goede <hdegoede@redhat.com>
Fri, 3 Dec 2021 10:28:51 +0000 (11:28 +0100)
committerHans de Goede <hdegoede@redhat.com>
Mon, 13 Dec 2021 10:44:48 +0000 (11:44 +0100)
commit71102bc7964342f0aaf1faf7aa384678b1207848
tree29a0b3d0c479b82aedffeb19e10d847392de64ab
parenta2f9fbc247eea0ad1b0b59bc29bec144c5ead03c
platform/x86: int3472: Add get_sensor_adev_and_name() helper

The discrete.c code is not the only code which needs to lookup the
acpi_device and device-name for the sensor for which the INT3472
ACPI-device is a GPIO/clk/regulator provider.

The tps68470.c code also needs this functionality, so factor this
out into a new get_sensor_adev_and_name() helper.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20211203102857.44539-9-hdegoede@redhat.com
drivers/platform/x86/intel/int3472/common.c
drivers/platform/x86/intel/int3472/common.h
drivers/platform/x86/intel/int3472/discrete.c