aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/v4l2-core/v4l2-subdev-priv.h
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2023-01-27 21:37:25 +0100
committerHans de Goede <hdegoede@redhat.com>2023-02-03 10:22:34 +0100
commitb6e10ff6c23deb7f01d342875f7a69bae067c3c8 (patch)
treee667cbb632bf0562f14b9d0ef795223749bac20e /drivers/media/v4l2-core/v4l2-subdev-priv.h
parentMerge tag 'ib-leds-led_get-v6.3' into HEAD (diff)
downloadlinux-b6e10ff6c23deb7f01d342875f7a69bae067c3c8.tar.gz
linux-b6e10ff6c23deb7f01d342875f7a69bae067c3c8.zip
media: v4l2-core: Make the v4l2-core code enable/disable the privacy LED if present
Make v4l2_async_register_subdev_sensor() try to get a privacy LED associated with the sensor and extend the call_s_stream() wrapper to enable/disable the privacy LED if found. This makes the core handle privacy LED control, rather then having to duplicate this code in all the sensor drivers. Suggested-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Link: https://lore.kernel.org/r/20230127203729.10205-2-hdegoede@redhat.com
Diffstat (limited to 'drivers/media/v4l2-core/v4l2-subdev-priv.h')
-rw-r--r--drivers/media/v4l2-core/v4l2-subdev-priv.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/media/v4l2-core/v4l2-subdev-priv.h b/drivers/media/v4l2-core/v4l2-subdev-priv.h
new file mode 100644
index 000000000000..52391d6d8ab7
--- /dev/null
+++ b/drivers/media/v4l2-core/v4l2-subdev-priv.h
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * V4L2 sub-device pivate header.
+ *
+ * Copyright (C) 2023 Hans de Goede <hdegoede@redhat.com>
+ */
+
+#ifndef _V4L2_SUBDEV_PRIV_H_
+#define _V4L2_SUBDEV_PRIV_H_
+
+int v4l2_subdev_get_privacy_led(struct v4l2_subdev *sd);
+void v4l2_subdev_put_privacy_led(struct v4l2_subdev *sd);
+
+#endif