media: ccs: Ensure control handlers have been set up after probe
authorSakari Ailus <sakari.ailus@linux.intel.com>
Sat, 14 Oct 2023 17:56:00 +0000 (20:56 +0300)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Wed, 22 Nov 2023 09:56:34 +0000 (10:56 +0100)
commita274f4d1e5af404fcc7b5554521913590c9d7b08
treed5a183fcb88fbcf457410efd87673782388eb8e9
parent1865913dd590ca6d5e3207b15099a1210dd62f29
media: ccs: Ensure control handlers have been set up after probe

If the sensor remains powered on after probe when it is needed again and
the runtime PM usage_count is incremented, the control handler setup for
neither control handler is run.

As this is, in most cases, a needless operation in probe, track the status
of sensor power handling after probe and set up control handlers even if
the device was already active right after probe.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/i2c/ccs/ccs-core.c
drivers/media/i2c/ccs/ccs.h