schemas: legacy: extract ADC

This allows to remove some properties from 'Aggregate' schema which are
no longer needed, since there is now a more specific schema to use.

Tested: Schema Validator Pass

Change-Id: Ib20f35361650b0765e5a8ee7f176d2523857e6c0
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
diff --git a/configurations/tyan/tyan_s8047_baseboard.json b/configurations/tyan/tyan_s8047_baseboard.json
index 44f80b6..4e09839 100644
--- a/configurations/tyan/tyan_s8047_baseboard.json
+++ b/configurations/tyan/tyan_s8047_baseboard.json
@@ -429,7 +429,6 @@
             "Name2": "MB_AIR_INLET",
             "Name3": "MB_AIR_OUTLET",
             "PowerState": "Always",
-            "ScaleFactor": 1,
             "Thresholds": [
                 {
                     "Direction": "greater than",
diff --git a/schemas/global.json b/schemas/global.json
index c3da46a..273dcbc 100644
--- a/schemas/global.json
+++ b/schemas/global.json
@@ -106,6 +106,9 @@
                             "$ref": "legacy.json#/$defs/IpmbPowerMonitor"
                         },
                         {
+                            "$ref": "legacy.json#/$defs/ADC"
+                        },
+                        {
                             "$ref": "virtual_sensor.json#/$defs/VirtualSensor"
                         },
                         {
diff --git a/schemas/legacy.json b/schemas/legacy.json
index b4e2f4e..5b63616 100644
--- a/schemas/legacy.json
+++ b/schemas/legacy.json
@@ -594,6 +594,62 @@
             "required": ["Name", "Type", "Bus", "Address", "Class"],
             "type": "object"
         },
+        "ADC": {
+            "description": "implemented in dbus-sensors: ADCSensor",
+            "additionalProperties": false,
+            "properties": {
+                "Name": {
+                    "$ref": "#/$defs/Types/Name"
+                },
+                "Address": {
+                    "$ref": "#/$defs/Types/Address"
+                },
+                "Bus": {
+                    "$ref": "#/$defs/Types/Bus"
+                },
+                "BridgeGpio": {
+                    "$ref": "#/$defs/Types/BridgeGpio"
+                },
+                "PowerState": {
+                    "$ref": "#/$defs/Types/PowerState"
+                },
+                "EntityId": {
+                    "$ref": "#/$defs/Types/EntityId"
+                },
+                "EntityInstance": {
+                    "$ref": "#/$defs/Types/EntityInstance"
+                },
+                "Index": {
+                    "$ref": "#/$defs/Types/Index"
+                },
+                "PollRate": {
+                    "$ref": "#/$defs/Types/PollRate"
+                },
+                "CPURequired": {
+                    "$ref": "#/$defs/Types/CPURequired"
+                },
+                "PresenceGpio": {
+                    "$ref": "#/$defs/Types/PresenceGpio"
+                },
+                "MaxValue": {
+                    "$ref": "#/$defs/Types/MaxValue"
+                },
+                "MinValue": {
+                    "$ref": "#/$defs/Types/MinValue"
+                },
+                "ScaleFactor": {
+                    "$ref": "#/$defs/Types/ScaleFactor"
+                },
+                "Thresholds": {
+                    "$ref": "#/$defs/Types/Thresholds"
+                },
+                "Type": {
+                    "const": "ADC"
+                }
+            },
+            "required": ["Name", "Type", "Index"],
+            "type": "object"
+        },
         "Aggregate": {
             "description": "Don't add additional properties to this schema. Consult README.schema for instructions on adding new Exposes element sub-schema.",
             "additionalProperties": false,
@@ -657,9 +713,6 @@
                 "EntityInstance": {
                     "$ref": "#/$defs/Types/EntityInstance"
                 },
-                "Index": {
-                    "$ref": "#/$defs/Types/Index"
-                },
                 "InScaleFactor": {
                     "$ref": "#/$defs/Types/InScaleFactor"
                 },
@@ -693,12 +746,6 @@
                 "PowerState": {
                     "$ref": "#/$defs/Types/PowerState"
                 },
-                "PresenceGpio": {
-                    "$ref": "#/$defs/Types/PresenceGpio"
-                },
-                "ScaleFactor": {
-                    "$ref": "#/$defs/Types/ScaleFactor"
-                },
                 "SlotId": {
                     "$ref": "#/$defs/Types/SlotId"
                 },
@@ -1008,7 +1055,6 @@
                     "TMP421",
                     "TMP432",
                     "TMP464",
-                    "ADC",
                     "NCT7802",
                     "NCT6779",
                     "SBRMI",