1# eeprom
2
3## Description
4
5Some fans have EEPROMs on them. In these cases, the `eeprom` JSON stanza can be
6used to have the application re-bind the EEPROM driver to the EEPROM instance
7after a new fan is detected. This will trigger the EEPROM to be read by the
8appropriate code if the platform is configured to do so.
9
10This is optional and only required if the above behavior is desired.
11
12## Keys
13
14- ["bus_address"](#bus_address)
15- ["driver_name"](#driver_name)
16- ["bind_delay_ms"](#bind_delay_ms)
17
18### "bus_address"
19
20The I2C bus and address string of the form BB-AAAA that is used by the I2C
21subsystem in sysfs.
22
23```text
24"bus_address": "3-0050"
25```
26
27### "driver_name"
28
29The name of the eeprom driver in sysfs.
30
31```text
32"driver_name": "at24"
33```
34
35### "bind_delay_ms"
36
37The number of milliseconds to wait after a fan is detected before binding the
38driver to the device in case the device takes some time to initialize after
39being plugged into power. If no delay is required, a value of zero can be used.
40
41```text
42"bind_delay_ms": 1000
43```
44
45## Example
46
47```json
48[
49  {
50    "name": "fan0",
51    "path": "/system/chassis/motherboard/fan0",
52    "methods": [
53      {
54        "type": "tach",
55        "sensors": ["fan0_0"]
56      }
57    ],
58    "rpolicy": {
59      "type": "anyof"
60    },
61    "eeprom": {
62      "bus_address": "30-0050",
63      "driver_name": "at24",
64      "bind_delay_ms": 1000
65    }
66  }
67]
68```
69