]> www.infradead.org Git - users/jedix/linux-maple.git/commit
media: ov08x40: Get reset GPIO and regulators on ACPI platforms too
authorHans de Goede <hdegoede@redhat.com>
Fri, 20 Dec 2024 14:41:23 +0000 (15:41 +0100)
committerHans Verkuil <hverkuil@xs4all.nl>
Sat, 15 Feb 2025 14:22:38 +0000 (15:22 +0100)
commit6cdde1bbefa0b66d2e2cfe06ff520cf80eaa1f3a
tree20fd7a3cd8e176d868eb94b0551e00986851a976
parenta7966ed7a6a2d15c50b6fddb39e5e3b620e8393b
media: ov08x40: Get reset GPIO and regulators on ACPI platforms too

ACPI platforms might also have a reset GPIO and regulators, move the code
to get these outside of the if (!is_acpi_node(fwnode)) check.

This also removes the is_acpi_node(fwnode) checks from ov08x40_power_on() /
ov08x40_power_off() both the GPIO hand the clk frameworks functions used
there will happily accept the NULL pointer returned from the optional get()
functions when there is no reset GPIO / no clk.

While moving the code around also at error logging to the error exit
path for getting the reset GPIO.

Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/i2c/ov08x40.c