On 10/10/2023 01:09, Sakari Ailus wrote:
Hi folks, This set includes a helper for working with V4L2 sub-device active state as well as a fix for the CCS driver sub-device state patch. since v1: - There were other drivers using __v4l2_subdev_state_alloc(). Ouch. Change those users as well. Note that this function should not be used in drivers, hence API niceness is not a high priority. Sakari Ailus (4): media: v4l: subdev: Set sub-device active state earlier media: v4l: subdev: Add a helper to tell if a sub-device state is active media: ccs: Rework initialising sub-device state media: ccs: Fix a (harmless) lockdep warning drivers/media/i2c/ccs/ccs-core.c | 64 ++++++++++++------- .../platform/renesas/rcar-vin/rcar-v4l2.c | 3 +- .../media/platform/renesas/vsp1/vsp1_entity.c | 3 +- drivers/media/v4l2-core/v4l2-subdev.c | 14 ++-- drivers/staging/media/tegra-video/vi.c | 2 +- include/media/v4l2-subdev.h | 11 +++- 6 files changed, 66 insertions(+), 31 deletions(-)
I'm not familiar with the CCS driver, and you don't explain much why you are doing this, so it's a bit unclear to me. But I don't like it.
The idea with the subdev state was that the driver doesn't need to know whether it's active-state or try-state. It should behave the same way in both cases. This series goes against that.
Can you explain a bit what the issue is and what you are doing in this series?
Tomi