Instead of suspending/resume the USB device at open()/close(), do it when the device is actually used. This way we can reduce the power consumption when a service is holding the video device and leaving it in an idle state. To: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx> Cc: linux-media@xxxxxxxxxxxxxxx Cc: linux-kernel@xxxxxxxxxxxxxxx Cc: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx> Cc: Tomasz Figa <tfiga@xxxxxxxxxxxx> Signed-off-by: Ricardo Ribalda <ribalda@xxxxxxxxxxxx> --- Ricardo Ribalda (3): media: uvcvideo: Only create input devs if hw supports it media: uvcvideo: Refactor streamon/streamoff media: uvcvideo: Do power management granularly drivers/media/usb/uvc/uvc_status.c | 23 +++++ drivers/media/usb/uvc/uvc_v4l2.c | 193 ++++++++++++++++++++++++++++++------- drivers/media/usb/uvc/uvcvideo.h | 1 + 3 files changed, 182 insertions(+), 35 deletions(-) --- base-commit: 521a547ced6477c54b4b0cc206000406c221b4d6 change-id: 20220920-resend-powersave-5981719ed267 Best regards, -- Ricardo Ribalda <ribalda@xxxxxxxxxxxx>