1# configuration
2
3## Description
4Configuration changes that should be applied to a device or regulator rail.
5These changes usually override hardware default settings.
6
7The most common configuration change is setting the output voltage for a
8regulator rail.  Other examples include modifying pgood thresholds and
9overcurrent settings.
10
11The configuration changes are applied during the boot before regulators are
12enabled.
13
14The configuration changes are applied by executing one or more actions.  The
15actions can be specified in two ways:
16* Use the "rule_id" property to specify a standard rule to run.
17* Use the "actions" property to specify an array of actions that are unique to
18  this device.
19
20## Properties
21| Name | Required | Type | Description |
22| :--- | :------: | :--- | :---------- |
23| comments | no | array of strings | One or more comment lines describing the configuration changes. |
24| volts | no | number | Output voltage expressed as a decimal number.  Applied using the [pmbus_write_vout_command](pmbus_write_vout_command.md) action. |
25| rule_id | see [notes](#notes) | string | Unique ID of the [rule](rule.md) to execute. |
26| actions | see [notes](#notes) | array of [actions](action.md) | One or more actions to execute. |
27
28### Notes
29* You must specify either "rule_id" or "actions".
30
31## Examples
32```
33{
34  "comments": [ "Set rail to 1.25V using standard rule" ],
35  "volts": 1.25,
36  "rule_id": "set_voltage_rule"
37}
38
39{
40  "comments": [ "If version register 0x75 contains 1, device is downlevel",
41                "and registers 0x31/0x34 need to be updated." ],
42  "actions": [
43    {
44      "if": {
45        "condition": {
46          "i2c_compare_byte": { "register": "0x75", "value": "0x01" }
47        },
48        "then": [
49          { "i2c_write_byte": { "register": "0x31", "value": "0xDB" } },
50          { "i2c_write_byte": { "register": "0x34", "value": "0x1B" } }
51        ]
52      }
53    }
54  ]
55}
56```
57