Skip to content

Show privacy_gpio as a v4l2_ctrl

Ricardo Ribalda linux-media lkml 7 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest12 patches 6 repliesIn review
  2. v611 patches 4 repliesSuperseded
  3. v512 patches 14 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v49 patches15 repliesSuperseded
v38 patches0 repliesSuperseded
v27 patches13 repliesSuperseded
v16 patches10 repliesSuperseded

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12media: uvcvideo: Move guid to entitydrivers/media/usb/uvc/uvc_ctrl.c drivers/media/usb/uvc/uvc_driver.c drivers/media/usb/uvc/uvcvideo.h+28 -290 replies
2/12media: uvcvideo: Allow extra entitiesdrivers/media/usb/uvc/uvc_driver.c drivers/media/usb/uvc/uvcvideo.h+7 -20 replies
3/12media: uvcvideo: Allow entities with no padsdrivers/media/usb/uvc/uvc_driver.c+5 -20 replies
4/12media: uvcvideo: Provide sync and async uvc_ctrl_status_eventdrivers/media/usb/uvc/uvc_ctrl.c drivers/media/usb/uvc/uvc_status.c drivers/media/usb/uvc/uvcvideo.h+20 -121 reply
5/12media: uvcvideo: Allow entity-defined get_info and get_curdrivers/media/usb/uvc/uvc_ctrl.c drivers/media/usb/uvc/uvcvideo.h+23 -40 replies
6/12media: uvcvideo: Implement UVC_EXT_GPIO_UNITdrivers/media/usb/uvc/uvc_ctrl.c drivers/media/usb/uvc/uvc_driver.c drivers/media/usb/uvc/uvc_entity.c +1 more+147 -02 replies
7/12media: uvcvideo: Add Privacy control based on EXT_GPIOdrivers/media/usb/uvc/uvc_ctrl.c+18 -00 replies
8/12media: uvcvideo: Use dev_ printk aliasesdrivers/media/usb/uvc/uvc_ctrl.c drivers/media/usb/uvc/uvc_driver.c drivers/media/usb/uvc/uvc_entity.c +3 more+81 -772 replies
9/12media: uvcvideo: New macro uvc_trace_contdrivers/media/usb/uvc/uvc_driver.c drivers/media/usb/uvc/uvcvideo.h+27 -360 replies
10/12media: uvcvideo: use dev_printk() for uvc_trace()drivers/media/usb/uvc/uvc_ctrl.c drivers/media/usb/uvc/uvc_driver.c drivers/media/usb/uvc/uvc_isight.c +5 more+291 -2530 replies
11/12media: uvcvideo: Rename debug functionsdrivers/media/usb/uvc/uvc_ctrl.c drivers/media/usb/uvc/uvc_driver.c drivers/media/usb/uvc/uvc_isight.c +5 more+331 -3521 reply
12/12media: uvcvideo: Implement UVC_QUIRK_PRIVACY_DURING_STREAMdrivers/media/usb/uvc/uvc_driver.c drivers/media/usb/uvc/uvc_video.c drivers/media/usb/uvc/uvcvideo.h+84 -50 replies

Reviews trailers per patch

11 of 12 patches have a Reviewed-by or Acked-by.

PatchLaurent Pinchart
1/12R-b
2/12R-b
3/12R-b
4/12R-b
5/12R-b
6/12R-b
7/12R-b
8/12R-b
9/12R-b
10/12R-b
11/12R-b
12/12

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v7 thread

Cover letter [PATCH v7 00/12] Show privacy_gpio as a v4l2_ctrl

Some devices can implement a physical switch to disable the input of the camera on demand. Think of it like an elegant privacy sticker.

The system can read the status of the privacy switch via a GPIO.

The ACPI table maps this GPIO to the USB device via _CRS and _DSD descriptors, so the kernel can find it.

The userspace applications need to know if the privacy pin is enabled or not.

The obvious way to show it to userspace is via the V4L2_CID_PRIVACY control.

This patchset implement this functionality.

v7: Thanks to all the comments from Laurent, Sakari and Joe
- New patch from Joe: Rename debug functions
- Rename direct handler to sync/async handler
- Only launch events with IRQ
- Use mutex on the stream_quirk
- CodeStyle, spaces are my friends

v6: Thanks to all the comments from Laurent!
- Remove multiple async_ctrls from v5, it is not needed
- Split event handling in two parts, so it can be triggered without wq
- Save pointer to the privacy entity in the main structure
- Handle the quirk in a different location to avoid races
- CodeStyle

v5: Thanks to all the comments from Laurent!
- Allow multiple async_ctrls
- Use dev_dbg() for uvc_trace
- Major redesing of "Implement UVC_EXT_GPIO_UNIT"
- Major redesing of "Implement UVC_QUIRK_PRIVACY_DURING_STREAM"

v4: Implement UVC_QUIRK_PRIVACY_DURING_STREAM

v3: Thanks to all the comments from Joe Perches
- Rework of printk macros

v2: Thanks to all the comments from Laurent!
- move guid to unit
- support entities with no pads
- CodeStyle
- Irq handling
- pr_cont
- new ids

Joe Perches (1):
media: uvcvideo: Rename debug functions

Ricardo Ribalda (11):
media: uvcvideo: Move guid to entity
media: uvcvideo: Allow extra entities
media: uvcvideo: Allow entities with no pads
media: uvcvideo: Provide sync and async uvc_ctrl_status_event
media: uvcvideo: Allow entity-defined get_info and get_cur
media: uvcvideo: Implement UVC_EXT_GPIO_UNIT
media: uvcvideo: Add Privacy control based on EXT_GPIO
media: uvcvideo: Use dev_ printk aliases
media: uvcvideo: New macro uvc_trace_cont
media: uvcvideo: use dev_printk() for uvc_trace()
media: uvcvideo: Implement UVC_QUIRK_PRIVACY_DURING_STREAM

 drivers/media/usb/uvc/uvc_ctrl.c   | 179 +++++----
 drivers/media/usb/uvc/uvc_driver.c | 580 +++++++++++++++++++----------
 drivers/media/usb/uvc/uvc_entity.c |  11 +-
 drivers/media/usb/uvc/uvc_isight.c |  17 +-
 drivers/media/usb/uvc/uvc_queue.c  |   9 +-
 drivers/media/usb/uvc/uvc_status.c |  44 +--
 drivers/media/usb/uvc/uvc_v4l2.c   |  48 +--
 drivers/media/usb/uvc/uvc_video.c  | 189 ++++++----
 drivers/media/usb/uvc/uvcvideo.h   | 105 ++++--
 9 files changed, 736 insertions(+), 446 deletions(-)
Signature · 1 line
2.29.2.729.g45daf8777d-goog