]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: adv7180: Remove the s_power callback
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Thu, 28 Aug 2025 16:06:51 +0000 (18:06 +0200)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Thu, 4 Sep 2025 08:06:13 +0000 (10:06 +0200)
commita67e0eed501d155b6ceace6b605cdb184b4b6c90
treea78f4aa2f20963077b8440b209b02b7981cb4dae
parentb918cbcb1f430f345ddcd83b014bfb3ba7a55811
media: adv7180: Remove the s_power callback

The s_power callback is used a bit oddly in adv7180, the callback
adv7180_set_power() do not control power to the chip itself, but
rather the power to the chips decoder.

When the decoder is powered the chip process video data, or if no video
source is available freeruns. When the decoder is off the device i2c
registers are still powered and the device can be configured.

In the current s_power implementation the device starts to transmit
video data as soon as it's powered, and the s_stream operation only
tracks if s_stream have been called or not.

The actual configuration of the device happens when the configuration
IOCTLs are called. Sometimes with very odd implementations where the
decoder have to first be power off, the device configured, and then
unconditionally power on, see adv7180_set_pad_format() for an example.

As a first step to remedy this remove the s_power callback altogether
and instead completely initialize the device from s_stream. Future work
will clean up the IOCTL callbacks that directly configures the device
that is also done by init_device().

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/i2c/adv7180.c