media: hi556: Add support for avdd regulator
authorHans de Goede <hdegoede@redhat.com>
Mon, 15 Apr 2024 13:10:38 +0000 (15:10 +0200)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Mon, 22 Apr 2024 09:41:06 +0000 (11:41 +0200)
commit901c9229172392a119f34aa94b95247a2574173e
treeb761aa417e053b677d2352ebb68f142457138043
parentf9fc706352fd08c42b54bb318cab43d0c7d9369d
media: hi556: Add support for avdd regulator

On some ACPI platforms, such as Chromebooks the ACPI methods to
change the power-state (_PS0 and _PS3) fully take care of powering
on/off the sensor.

On other ACPI platforms, such as e.g. various HP models with IPU6 +
hi556 sensor, the sensor driver must control the avdd regulator itself.

Add support for having the driver control the sensor's avdd regulator.
Note this relies on the regulator-core providing a dummy regulator
(which it does by default) on platforms where Linux is not aware of
the avdd regulator.

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-cisco@xs4all.nl>
drivers/media/i2c/hi556.c