]> www.infradead.org Git - users/jedix/linux-maple.git/commit
platform/x86: int3472: Stop using devm_gpiod_get()
authorHans de Goede <hdegoede@redhat.com>
Wed, 7 May 2025 18:47:33 +0000 (20:47 +0200)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Thu, 8 May 2025 14:36:00 +0000 (17:36 +0300)
commit1e5d088a52c207bcef6a43a6f6ffe162c514ed64
treee0310dbe57b00721eff0d5345aba8e02a80c9199
parent53eddae9af0c0b46f9c77a02d23c21c1aa824739
platform/x86: int3472: Stop using devm_gpiod_get()

The intent is to re-use the INT3472 code for parsing Intel camera sensor
GPIOs and mapping them to the sensor for the atomisp driver, which
currently has duplicate code.

On atomisp devices there is no special INT3472 ACPI device, instead
the Intel _DSM to get the GPIO type is part of the ACPI device for
the sensor itself.

To deal with this the mapping is done from ipu_bridge_init() instead of
from a platform-device probe() function, there is no device to tie
the lifetime of the gpiod_get() calls done by the INT3472 code to.

Switch from devm_gpiod_get() to plain gpiod_get() + explicit gpiod_put()
calls, to prepare for the code being re-used in the atomisp driver.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20250507184737.154747-3-hdegoede@redhat.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/intel/int3472/clk_and_regulator.c
drivers/platform/x86/intel/int3472/discrete.c
drivers/platform/x86/intel/int3472/led.c
include/linux/platform_data/x86/int3472.h