Fix MD040 warnings
The following warnings are generated by using markdownlint analysis:
```
MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
```
Refer to markdown-lint [1] to fix MD040
[1]: https://github.com/updownpress/markdown-lint/blob/master/rules/040-fenced-code-language.md
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: I456b41fe5f368798cd1d1e78cd83d29b5bb7e236
diff --git a/README.md b/README.md
index dda53c5..52a9755 100644
--- a/README.md
+++ b/README.md
@@ -25,14 +25,14 @@
To build all applications in this repository:
-```
+```sh
meson setup build
ninja -C build
```
To clean the repository and remove all build output:
-```
+```sh
rm -rf build
```
@@ -70,7 +70,8 @@
that the service will read `part_number` attribute file from a directory
specified by the above pmbus access type, and assign to `PartNumber` property
in `xyz.openbmc_project.Inventory.Decorator.Asset` interface.
- ```
+
+ ```json
"fruConfigs": [
{
"propertyName": "PartNumber",
@@ -79,10 +80,12 @@
}
]
```
+
- `psuDevices` defines the kernel device dir for each PSU in inventory. The
configuration example below indicates that `powersupply0`'s device is located
in `/sys/bus/i2c/devices/3-0069`.
- ```
+
+ ```json
"psuDevices": {
"/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0" : "/sys/bus/i2c/devices/3-0069",
}
diff --git a/phosphor-power-sequencer/docs/config_file/config_file.md b/phosphor-power-sequencer/docs/config_file/config_file.md
index ebfa28f..611e899 100644
--- a/phosphor-power-sequencer/docs/config_file/config_file.md
+++ b/phosphor-power-sequencer/docs/config_file/config_file.md
@@ -12,19 +12,19 @@
## Example
-```
+```json
{
- "rails": [
- {
- "name": "VDD_CPU0",
- "page": 11,
- "check_status_vout": true
- },
- {
- "name": "VCS_CPU1",
- "presence": "/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1",
- "gpio": { "line": 60 }
- }
- ]
+ "rails": [
+ {
+ "name": "VDD_CPU0",
+ "page": 11,
+ "check_status_vout": true
+ },
+ {
+ "name": "VCS_CPU1",
+ "presence": "/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1",
+ "gpio": { "line": 60 }
+ }
+ ]
}
```
diff --git a/phosphor-power-sequencer/docs/config_file/gpio.md b/phosphor-power-sequencer/docs/config_file/gpio.md
index a7fd737..0832e0f 100644
--- a/phosphor-power-sequencer/docs/config_file/gpio.md
+++ b/phosphor-power-sequencer/docs/config_file/gpio.md
@@ -16,8 +16,8 @@
## Example
-```
+```json
{
- "line": 60
+ "line": 60
}
```
diff --git a/phosphor-power-sequencer/docs/config_file/rail.md b/phosphor-power-sequencer/docs/config_file/rail.md
index 0cddd7c..3130697 100644
--- a/phosphor-power-sequencer/docs/config_file/rail.md
+++ b/phosphor-power-sequencer/docs/config_file/rail.md
@@ -41,18 +41,18 @@
## Examples
-```
+```json
{
- "name": "VDD_CPU0",
- "page": 11,
- "check_status_vout": true
+ "name": "VDD_CPU0",
+ "page": 11,
+ "check_status_vout": true
}
```
-```
+```json
{
- "name": "VCS_CPU1",
- "presence": "/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1",
- "gpio": { "line": 60 }
+ "name": "VCS_CPU1",
+ "presence": "/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1",
+ "gpio": { "line": 60 }
}
```
diff --git a/phosphor-regulators/docs/config_file/README.md b/phosphor-regulators/docs/config_file/README.md
index 53c9a78..3809ec4 100644
--- a/phosphor-regulators/docs/config_file/README.md
+++ b/phosphor-regulators/docs/config_file/README.md
@@ -157,9 +157,11 @@
Examples:
-```
+```json
"comments": [ "IR35221 regulator producing the Vdd rail" ]
+```
+```json
"comments": [ "Check if register 0x82 contains 0x7302",
"Device returns bytes in little-endian order",
"Ignore most significant bit in each byte" ]
@@ -172,7 +174,7 @@
Example:
-```
+```json
"address": "0x70"
```
@@ -196,7 +198,7 @@
The tool has the following command line syntax:
-```
+```sh
validate-regulators-config.py -c <config file> -s config_schema.json
```
diff --git a/phosphor-regulators/docs/config_file/action.md b/phosphor-regulators/docs/config_file/action.md
index 2afa09a..f673c63 100644
--- a/phosphor-regulators/docs/config_file/action.md
+++ b/phosphor-regulators/docs/config_file/action.md
@@ -51,15 +51,17 @@
## Examples
-```
+```json
{
- "comments": [ "Set frequency to 800kHz" ],
+ "comments": ["Set frequency to 800kHz"],
"i2c_write_byte": {
"register": "0x2C",
"value": "0x0F"
}
}
+```
+```json
{
"run_rule": "set_voltage_rule"
}
diff --git a/phosphor-regulators/docs/config_file/and.md b/phosphor-regulators/docs/config_file/and.md
index 303a5d6..b5f1add 100644
--- a/phosphor-regulators/docs/config_file/and.md
+++ b/phosphor-regulators/docs/config_file/and.md
@@ -19,9 +19,9 @@
## Example
-```
+```json
{
- "comments": [ "Check whether registers 0xA0 and 0xA1 both contain 0x00" ],
+ "comments": ["Check whether registers 0xA0 and 0xA1 both contain 0x00"],
"and": [
{ "i2c_compare_byte": { "register": "0xA0", "value": "0x00" } },
{ "i2c_compare_byte": { "register": "0xA1", "value": "0x00" } }
diff --git a/phosphor-regulators/docs/config_file/chassis.md b/phosphor-regulators/docs/config_file/chassis.md
index 9296649..a995377 100644
--- a/phosphor-regulators/docs/config_file/chassis.md
+++ b/phosphor-regulators/docs/config_file/chassis.md
@@ -22,7 +22,7 @@
## Example
-```
+```json
{
"comments": [ "Chassis number 1 containing CPUs and memory" ],
"number": 1,
diff --git a/phosphor-regulators/docs/config_file/compare_presence.md b/phosphor-regulators/docs/config_file/compare_presence.md
index 42e46f2..1456ba9 100644
--- a/phosphor-regulators/docs/config_file/compare_presence.md
+++ b/phosphor-regulators/docs/config_file/compare_presence.md
@@ -23,9 +23,9 @@
## Example
-```
+```json
{
- "comments": [ "Check if CPU3 is present" ],
+ "comments": ["Check if CPU3 is present"],
"compare_presence": {
"fru": "system/chassis/motherboard/cpu3",
"value": true
diff --git a/phosphor-regulators/docs/config_file/compare_vpd.md b/phosphor-regulators/docs/config_file/compare_vpd.md
index 3c76b46..1bdae40 100644
--- a/phosphor-regulators/docs/config_file/compare_vpd.md
+++ b/phosphor-regulators/docs/config_file/compare_vpd.md
@@ -62,9 +62,9 @@
## Examples
-```
+```json
{
- "comments": [ "Check if disk backplane has CCIN value 2D35" ],
+ "comments": ["Check if disk backplane has CCIN value 2D35"],
"compare_vpd": {
"fru": "system/chassis/disk_backplane",
"keyword": "CCIN",
@@ -73,13 +73,13 @@
}
```
-```
+```json
{
- "comments": [ "Check if disk backplane has CCIN value 0x32, 0x44, 0x33, 0x35" ],
+ "comments": ["Check if disk backplane has CCIN value 0x32, 0x44, 0x33, 0x35"],
"compare_vpd": {
"fru": "system/chassis/disk_backplane",
"keyword": "CCIN",
- "byte_values": [ "0x32", "0x44", "0x33", "0x35" ]
+ "byte_values": ["0x32", "0x44", "0x33", "0x35"]
}
}
```
diff --git a/phosphor-regulators/docs/config_file/config_file.md b/phosphor-regulators/docs/config_file/config_file.md
index b5643b6..188ddfa 100644
--- a/phosphor-regulators/docs/config_file/config_file.md
+++ b/phosphor-regulators/docs/config_file/config_file.md
@@ -14,7 +14,7 @@
## Example
-```
+```json
{
"comments": [ "Config file for a FooBar one-chassis system" ],
"rules": [
diff --git a/phosphor-regulators/docs/config_file/configuration.md b/phosphor-regulators/docs/config_file/configuration.md
index e13234f..19575f3 100644
--- a/phosphor-regulators/docs/config_file/configuration.md
+++ b/phosphor-regulators/docs/config_file/configuration.md
@@ -34,16 +34,20 @@
## Examples
-```
+```json
{
- "comments": [ "Set rail to 1.25V using standard rule" ],
+ "comments": ["Set rail to 1.25V using standard rule"],
"volts": 1.25,
"rule_id": "set_voltage_rule"
}
+```
+```json
{
- "comments": [ "If version register 0x75 contains 1, device is downlevel",
- "and registers 0x31/0x34 need to be updated." ],
+ "comments": [
+ "If version register 0x75 contains 1, device is downlevel",
+ "and registers 0x31/0x34 need to be updated."
+ ],
"actions": [
{
"if": {
diff --git a/phosphor-regulators/docs/config_file/device.md b/phosphor-regulators/docs/config_file/device.md
index 3db5483..1bfe4b3 100644
--- a/phosphor-regulators/docs/config_file/device.md
+++ b/phosphor-regulators/docs/config_file/device.md
@@ -26,7 +26,7 @@
## Example
-```
+```json
{
"comments": [ "IR35221 regulator producing the Vdd rail" ],
"id": "vdd_regulator",
diff --git a/phosphor-regulators/docs/config_file/i2c_capture_bytes.md b/phosphor-regulators/docs/config_file/i2c_capture_bytes.md
index ba50e2f..b161011 100644
--- a/phosphor-regulators/docs/config_file/i2c_capture_bytes.md
+++ b/phosphor-regulators/docs/config_file/i2c_capture_bytes.md
@@ -36,9 +36,9 @@
## Example
-```
+```json
{
- "comments": [ "Capture 2 bytes from register 0xA0 to store in error log" ],
+ "comments": ["Capture 2 bytes from register 0xA0 to store in error log"],
"i2c_capture_bytes": {
"register": "0xA0",
"count": 2
diff --git a/phosphor-regulators/docs/config_file/i2c_compare_bit.md b/phosphor-regulators/docs/config_file/i2c_compare_bit.md
index 9f19ebf..5f37ab0 100644
--- a/phosphor-regulators/docs/config_file/i2c_compare_bit.md
+++ b/phosphor-regulators/docs/config_file/i2c_compare_bit.md
@@ -20,9 +20,9 @@
## Example
-```
+```json
{
- "comments": [ "Check if bit 3 is on in register 0xA0" ],
+ "comments": ["Check if bit 3 is on in register 0xA0"],
"i2c_compare_bit": {
"register": "0xA0",
"position": 3,
diff --git a/phosphor-regulators/docs/config_file/i2c_compare_byte.md b/phosphor-regulators/docs/config_file/i2c_compare_byte.md
index cb1c9c3..e930512 100644
--- a/phosphor-regulators/docs/config_file/i2c_compare_byte.md
+++ b/phosphor-regulators/docs/config_file/i2c_compare_byte.md
@@ -20,18 +20,22 @@
## Examples
-```
+```json
{
- "comments": [ "Check if register 0xA0 contains 0xFF" ],
+ "comments": ["Check if register 0xA0 contains 0xFF"],
"i2c_compare_byte": {
"register": "0xA0",
"value": "0xFF"
}
}
+```
+```json
{
- "comments": [ "Check if register 0x82 contains 0x40.",
- "Ignore the most significant bit." ],
+ "comments": [
+ "Check if register 0x82 contains 0x40.",
+ "Ignore the most significant bit."
+ ],
"i2c_compare_byte": {
"register": "0x82",
"value": "0x40",
diff --git a/phosphor-regulators/docs/config_file/i2c_compare_bytes.md b/phosphor-regulators/docs/config_file/i2c_compare_bytes.md
index c5fb728..eeceb50 100644
--- a/phosphor-regulators/docs/config_file/i2c_compare_bytes.md
+++ b/phosphor-regulators/docs/config_file/i2c_compare_bytes.md
@@ -26,24 +26,30 @@
## Examples
-```
+```json
{
- "comments": [ "Check if register 0xA0 contains 0xFF01.",
- "Device returns bytes in big-endian order." ],
+ "comments": [
+ "Check if register 0xA0 contains 0xFF01.",
+ "Device returns bytes in big-endian order."
+ ],
"i2c_compare_bytes": {
"register": "0xA0",
- "values": [ "0xFF", "0x01" ]
+ "values": ["0xFF", "0x01"]
}
}
+```
+```json
{
- "comments": [ "Check if register 0x82 contains 0x7302.",
- "Device returns bytes in little-endian order.",
- "Ignore the most significant bit in each byte." ],
+ "comments": [
+ "Check if register 0x82 contains 0x7302.",
+ "Device returns bytes in little-endian order.",
+ "Ignore the most significant bit in each byte."
+ ],
"i2c_compare_bytes": {
"register": "0x82",
- "values": [ "0x02", "0x73" ],
- "masks": [ "0x7F", "0x7F" ]
+ "values": ["0x02", "0x73"],
+ "masks": ["0x7F", "0x7F"]
}
}
```
diff --git a/phosphor-regulators/docs/config_file/i2c_interface.md b/phosphor-regulators/docs/config_file/i2c_interface.md
index d9f7061..7e1124f 100644
--- a/phosphor-regulators/docs/config_file/i2c_interface.md
+++ b/phosphor-regulators/docs/config_file/i2c_interface.md
@@ -19,7 +19,7 @@
## Example
-```
+```json
{
"bus": 1,
"address": "0x70"
diff --git a/phosphor-regulators/docs/config_file/i2c_write_bit.md b/phosphor-regulators/docs/config_file/i2c_write_bit.md
index a634886..def9df0 100644
--- a/phosphor-regulators/docs/config_file/i2c_write_bit.md
+++ b/phosphor-regulators/docs/config_file/i2c_write_bit.md
@@ -19,7 +19,7 @@
## Example
-```
+```json
{
"i2c_write_bit": {
"register": "0xA0",
diff --git a/phosphor-regulators/docs/config_file/i2c_write_byte.md b/phosphor-regulators/docs/config_file/i2c_write_byte.md
index 0c1ae78..0f82476 100644
--- a/phosphor-regulators/docs/config_file/i2c_write_byte.md
+++ b/phosphor-regulators/docs/config_file/i2c_write_byte.md
@@ -19,7 +19,7 @@
## Example
-```
+```json
{
"i2c_write_byte": {
"register": "0x0A",
diff --git a/phosphor-regulators/docs/config_file/i2c_write_bytes.md b/phosphor-regulators/docs/config_file/i2c_write_bytes.md
index 07d4df3..94868cf 100644
--- a/phosphor-regulators/docs/config_file/i2c_write_bytes.md
+++ b/phosphor-regulators/docs/config_file/i2c_write_bytes.md
@@ -25,24 +25,30 @@
## Examples
-```
+```json
{
- "comments": [ "Write 0xFF01 to register 0xA0. Device requires bytes to be",
- "written in big-endian order." ],
+ "comments": [
+ "Write 0xFF01 to register 0xA0. Device requires bytes to be",
+ "written in big-endian order."
+ ],
"i2c_write_bytes": {
"register": "0xA0",
- "values": [ "0xFF", "0x01" ]
+ "values": ["0xFF", "0x01"]
}
}
+```
+```json
{
- "comments": [ "Write 0x7302 to register 0x82. Device requires bytes to be",
- "written in little-endian order. Do not write the most",
- "significant bit in each byte because the bit is reserved." ],
+ "comments": [
+ "Write 0x7302 to register 0x82. Device requires bytes to be",
+ "written in little-endian order. Do not write the most",
+ "significant bit in each byte because the bit is reserved."
+ ],
"i2c_write_bytes": {
"register": "0x82",
- "values": [ "0x02", "0x73" ],
- "masks": [ "0x7F", "0x7F" ]
+ "values": ["0x02", "0x73"],
+ "masks": ["0x7F", "0x7F"]
}
}
```
diff --git a/phosphor-regulators/docs/config_file/if.md b/phosphor-regulators/docs/config_file/if.md
index ff9e134..aa4848d 100644
--- a/phosphor-regulators/docs/config_file/if.md
+++ b/phosphor-regulators/docs/config_file/if.md
@@ -30,19 +30,15 @@
## Example
-```
+```json
{
- "comments": [ "If regulator is downlevel use different configuration rule" ],
+ "comments": ["If regulator is downlevel use different configuration rule"],
"if": {
"condition": {
"run_rule": "is_downlevel_regulator"
},
- "then": [
- { "run_rule": "configure_downlevel_regulator" }
- ],
- "else": [
- { "run_rule": "configure_standard_regulator" }
- ]
+ "then": [{ "run_rule": "configure_downlevel_regulator" }],
+ "else": [{ "run_rule": "configure_standard_regulator" }]
}
}
```
diff --git a/phosphor-regulators/docs/config_file/log_phase_fault.md b/phosphor-regulators/docs/config_file/log_phase_fault.md
index beff006..4d5db81 100644
--- a/phosphor-regulators/docs/config_file/log_phase_fault.md
+++ b/phosphor-regulators/docs/config_file/log_phase_fault.md
@@ -38,7 +38,7 @@
## Example
-```
+```json
{
"log_phase_fault": {
"type": "n+1"
diff --git a/phosphor-regulators/docs/config_file/not.md b/phosphor-regulators/docs/config_file/not.md
index 73e4694..b51f75d 100644
--- a/phosphor-regulators/docs/config_file/not.md
+++ b/phosphor-regulators/docs/config_file/not.md
@@ -15,9 +15,9 @@
## Example
-```
+```json
{
- "comments": [ "Check if register 0xA0 is not equal to 0xFF" ],
+ "comments": ["Check if register 0xA0 is not equal to 0xFF"],
"not": {
"i2c_compare_byte": { "register": "0xA0", "value": "0xFF" }
}
diff --git a/phosphor-regulators/docs/config_file/or.md b/phosphor-regulators/docs/config_file/or.md
index cf7c4f8..09fc9d1 100644
--- a/phosphor-regulators/docs/config_file/or.md
+++ b/phosphor-regulators/docs/config_file/or.md
@@ -19,9 +19,9 @@
## Example
-```
+```json
{
- "comments": [ "Check whether register 0xA0 or 0xA1 contains 0x00" ],
+ "comments": ["Check whether register 0xA0 or 0xA1 contains 0x00"],
"or": [
{ "i2c_compare_byte": { "register": "0xA0", "value": "0x00" } },
{ "i2c_compare_byte": { "register": "0xA1", "value": "0x00" } }
diff --git a/phosphor-regulators/docs/config_file/phase_fault_detection.md b/phosphor-regulators/docs/config_file/phase_fault_detection.md
index e03c717..6401c7a 100644
--- a/phosphor-regulators/docs/config_file/phase_fault_detection.md
+++ b/phosphor-regulators/docs/config_file/phase_fault_detection.md
@@ -58,17 +58,21 @@
## Examples
-```
+```json
{
- "comments": [ "Detect phase fault using I/O expander" ],
+ "comments": ["Detect phase fault using I/O expander"],
"device_id": "io_expander",
"rule_id": "detect_phase_fault_rule"
}
+```
+```json
{
- "comments": [ "Detect N phase fault using I/O expander.",
- "A fault occurred if bit 3 is ON in register 0x02.",
- "Capture value of registers 0x02 and 0x04 in error log." ],
+ "comments": [
+ "Detect N phase fault using I/O expander.",
+ "A fault occurred if bit 3 is ON in register 0x02.",
+ "Capture value of registers 0x02 and 0x04 in error log."
+ ],
"device_id": "io_expander",
"actions": [
{
diff --git a/phosphor-regulators/docs/config_file/pmbus_read_sensor.md b/phosphor-regulators/docs/config_file/pmbus_read_sensor.md
index f593b0a..8b1aad8 100644
--- a/phosphor-regulators/docs/config_file/pmbus_read_sensor.md
+++ b/phosphor-regulators/docs/config_file/pmbus_read_sensor.md
@@ -59,7 +59,7 @@
D-Bus sensors have an object path with the following format:
-```
+```text
/xyz/openbmc_project/sensors/<namespace>/<sensor_name>
```
@@ -82,7 +82,7 @@
The D-Bus `<sensor_name>` must be unique across the entire system. It will be
set to the following:
-```
+```text
<rail_id>_<sensor_type>
```
@@ -112,18 +112,20 @@
## Examples
-```
+```json
{
- "comments": [ "Read output current from READ_IOUT." ],
+ "comments": ["Read output current from READ_IOUT."],
"pmbus_read_sensor": {
"type": "iout",
"command": "0x8C",
"format": "linear_11"
}
}
+```
+```json
{
- "comments": [ "Read output voltage from READ_VOUT. Specify exponent." ],
+ "comments": ["Read output voltage from READ_VOUT. Specify exponent."],
"pmbus_read_sensor": {
"type": "vout",
"command": "0x8B",
diff --git a/phosphor-regulators/docs/config_file/pmbus_write_vout_command.md b/phosphor-regulators/docs/config_file/pmbus_write_vout_command.md
index 4e27314..fc107fd 100644
--- a/phosphor-regulators/docs/config_file/pmbus_write_vout_command.md
+++ b/phosphor-regulators/docs/config_file/pmbus_write_vout_command.md
@@ -64,18 +64,24 @@
## Examples
-```
+```json
{
- "comments": [ "Set output voltage. Get volts value from configuration.",
- "Get exponent from VOUT_MODE." ],
+ "comments": [
+ "Set output voltage. Get volts value from configuration.",
+ "Get exponent from VOUT_MODE."
+ ],
"pmbus_write_vout_command": {
"format": "linear"
}
}
+```
+```json
{
- "comments": [ "Set output voltage. Explicitly specify volts and exponent.",
- "Verify value was successfully written to VOUT_COMMAND." ],
+ "comments": [
+ "Set output voltage. Explicitly specify volts and exponent.",
+ "Verify value was successfully written to VOUT_COMMAND."
+ ],
"pmbus_write_vout_command": {
"volts": 1.03,
"format": "linear",
diff --git a/phosphor-regulators/docs/config_file/presence_detection.md b/phosphor-regulators/docs/config_file/presence_detection.md
index 8150ea9..fc1c759 100644
--- a/phosphor-regulators/docs/config_file/presence_detection.md
+++ b/phosphor-regulators/docs/config_file/presence_detection.md
@@ -49,14 +49,16 @@
## Examples
-```
+```json
{
- "comments": [ "Regulator is only present on the FooBar backplane" ],
+ "comments": ["Regulator is only present on the FooBar backplane"],
"rule_id": "is_foobar_backplane_installed_rule"
}
+```
+```json
{
- "comments": [ "Regulator is only present when CPU 3 is present" ],
+ "comments": ["Regulator is only present when CPU 3 is present"],
"actions": [
{
"compare_presence": {
diff --git a/phosphor-regulators/docs/config_file/rail.md b/phosphor-regulators/docs/config_file/rail.md
index 393f333..f90061b 100644
--- a/phosphor-regulators/docs/config_file/rail.md
+++ b/phosphor-regulators/docs/config_file/rail.md
@@ -21,9 +21,9 @@
## Example
-```
+```json
{
- "comments": [ "Vdd rail on PAGE 0 of the Vdd/Vio regulator" ],
+ "comments": ["Vdd rail on PAGE 0 of the Vdd/Vio regulator"],
"id": "vdd",
"configuration": {
"volts": 1.1,
diff --git a/phosphor-regulators/docs/config_file/rule.md b/phosphor-regulators/docs/config_file/rule.md
index 872045d..594e96b 100644
--- a/phosphor-regulators/docs/config_file/rule.md
+++ b/phosphor-regulators/docs/config_file/rule.md
@@ -27,18 +27,20 @@
## Example
-```
+```json
{
- "comments": [ "Sets output voltage of PAGE 0 of a PMBus regulator" ],
+ "comments": ["Sets output voltage of PAGE 0 of a PMBus regulator"],
"id": "set_page0_voltage_rule",
"actions": [
{ "i2c_write_byte": { "register": "0x00", "value": "0x00" } },
{ "pmbus_write_vout_command": { "format": "linear" } }
]
}
+```
... later in the config file ...
+```json
"configuration": {
"volts": 1.03,
"rule_id": "set_page0_voltage_rule"
diff --git a/phosphor-regulators/docs/config_file/run_rule.md b/phosphor-regulators/docs/config_file/run_rule.md
index abf4b4c..65f4630 100644
--- a/phosphor-regulators/docs/config_file/run_rule.md
+++ b/phosphor-regulators/docs/config_file/run_rule.md
@@ -17,7 +17,7 @@
## Example
-```
+```json
{
"run_rule": "set_voltage_rule"
}
diff --git a/phosphor-regulators/docs/config_file/sensor_monitoring.md b/phosphor-regulators/docs/config_file/sensor_monitoring.md
index 075b9f7..7780a53 100644
--- a/phosphor-regulators/docs/config_file/sensor_monitoring.md
+++ b/phosphor-regulators/docs/config_file/sensor_monitoring.md
@@ -33,24 +33,26 @@
## Examples
-```
+```json
{
- "comments": [ "Read all sensors supported by the IR35221 regulator" ],
+ "comments": ["Read all sensors supported by the IR35221 regulator"],
"rule_id": "read_ir35221_sensors_rule"
}
+```
+```json
{
- "comments": [ "Only read sensors if version register 0x75 contains 2.",
- "Earlier versions produced invalid sensor values." ],
+ "comments": [
+ "Only read sensors if version register 0x75 contains 2.",
+ "Earlier versions produced invalid sensor values."
+ ],
"actions": [
{
"if": {
"condition": {
"i2c_compare_byte": { "register": "0x75", "value": "0x02" }
},
- "then": [
- { "run_rule": "read_sensors_rule" }
- ]
+ "then": [{ "run_rule": "read_sensors_rule" }]
}
}
]
diff --git a/phosphor-regulators/docs/config_file/set_device.md b/phosphor-regulators/docs/config_file/set_device.md
index 2c63c77..0f7eed6 100644
--- a/phosphor-regulators/docs/config_file/set_device.md
+++ b/phosphor-regulators/docs/config_file/set_device.md
@@ -23,7 +23,7 @@
## Example
-```
+```json
{
"set_device": "io_expander2"
}