mirror of
https://github.com/Fred78290/nct6687d
synced 2024-12-25 09:58:25 +01:00
Explain how to find module's directory in sysfs
This commit is contained in:
parent
f04739ef6c
commit
76b5717ced
1 changed files with 26 additions and 0 deletions
26
README.md
26
README.md
|
@ -198,6 +198,32 @@ chip "nct6687-*"
|
||||||
|
|
||||||
## CONFIGURATION VIA SYSFS
|
## CONFIGURATION VIA SYSFS
|
||||||
|
|
||||||
|
In order to be able to use this interface you need to know the path as which
|
||||||
|
it's published. The path isn't fixed and depends on the order in which chips are
|
||||||
|
registered by the kernel. One way to find it is by device class (`hwmon`) via a
|
||||||
|
simple command like this:
|
||||||
|
```
|
||||||
|
for d in /sys/class/hwmon/*; do echo "$d: $(cat "$d/name")"; done | grep nct6687
|
||||||
|
```
|
||||||
|
|
||||||
|
Possible output:
|
||||||
|
```
|
||||||
|
/sys/class/hwmon/hwmon5: nct6687
|
||||||
|
```
|
||||||
|
|
||||||
|
This means that your base path for examples below is `/sys/class/hwmon/hwmon5`
|
||||||
|
(note that adding/removing hardware can change the path, drop `grep` from the
|
||||||
|
command above to see all sensors and their relative ordering).
|
||||||
|
|
||||||
|
Another way to look it up is by a device (class path actually just points to
|
||||||
|
device path) like in:
|
||||||
|
|
||||||
|
`cd /sys/devices/platform/nct6687.*/hwmon/hwmon*`
|
||||||
|
|
||||||
|
The first asterisk will be expanded to an address (`2592` which is `0xa20` that
|
||||||
|
you can see in `sensors` output) and the second one to a number like `5` from
|
||||||
|
above.
|
||||||
|
|
||||||
### `pwm[1-8]`
|
### `pwm[1-8]`
|
||||||
|
|
||||||
Gets/sets PWM duty cycle or DC value that defines fan speed. Which unit is used
|
Gets/sets PWM duty cycle or DC value that defines fan speed. Which unit is used
|
||||||
|
|
Loading…
Reference in a new issue