chromeos-config: Add has-privacy-switch field to camera

Some devices have support for a switch that can disable the output from
the camera when the user enable it.

This field is used to tell the system about the existence of such field.

BUG=b:174165571
TEST=Run the unit tests ./run_tests.sh . All the tests passes.
TEST=cros_config_host/cros_config_schema_unittest.py

Change-Id: I088622e847fcfba7d04463f9f4bd126ad98de801
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2626656
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Ren-Pei Zeng <kamesan@chromium.org>
Reviewed-by: Shik Chen <shik@chromium.org>
Tested-by: Ricardo Ribalda <ribalda@chromium.org>
Commit-Queue: Ricardo Ribalda <ribalda@chromium.org>
(cherry picked from commit 2c76bc6be44516fbd80490adb0724803db9185fc)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2717335
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
Reviewed-by: Andrew Lamb <andrewlamb@chromium.org>
Tested-by: YH Lin <yueherngl@chromium.org>
Auto-Submit: YH Lin <yueherngl@chromium.org>
Commit-Queue: Andrew Lamb <andrewlamb@chromium.org>
diff --git a/chromeos-config/README.md b/chromeos-config/README.md
index ee1dd71..ad37cf9 100644
--- a/chromeos-config/README.md
+++ b/chromeos-config/README.md
@@ -433,6 +433,7 @@
 | --------- | ------ | --------- | -------- | ----------- | ---------- | ----------- |
 | facing | string |  | True |  | False | Direction the camera faces relative to device screen. |
 | flags | [flags](#flags) |  | True |  | False | Bit flags representing camera capabilities of this device. A camera module can be mounted on this slot only if all the flags match. |
+| has-privacy-switch | boolean |  | False |  | False | The camera has a privacy switch that can disable the output when enabled. |
 | ids | array - string |  | False |  | False | An identifier string of camera module. For USB cameras this must be 4-digit hexadecimal VID and PID separated by a colon, e.g. 0123:abcd. For MIPI cameras it depends on vendor software usage. |
 | interface | string |  | True |  | False | The interface type of the camera device. |
 | orientation | integer |  | True |  | False | Clockwise angle through which the output image needs to be rotated to be upright on the device screen in its native orientation. |
diff --git a/chromeos-config/cros_config_host/cros_config_schema.yaml b/chromeos-config/cros_config_host/cros_config_schema.yaml
index f978cb0..ed1e84a 100644
--- a/chromeos-config/cros_config_host/cros_config_schema.yaml
+++ b/chromeos-config/cros_config_host/cros_config_schema.yaml
@@ -400,6 +400,10 @@
                   items:
                     type: object
                     properties:
+                      has-privacy-switch:
+                        type: boolean
+                        description: The camera has a privacy switch that
+                          can disable the output when enabled.
                       interface:
                         type: string
                         description: The interface type of the camera device.