Skip to contentSkip to conversation

hwmon and GPIO fan

lm-sensors Simon Guinot 2 participants 3 messages Oct 11, 2010 – Oct 12, 2010

lore
Share & tools
lore
#0 lore raw

Hello,

I am currently looking to add hwmon support for the fan device found on Network Space Max v2 boards (ARM Kirkwood SoC).

The fan speed can be configured trough GPIOs. The GPIO settings allow to change the fan input voltage (via some resistors).
After a quick look at the hwmon sysfs interface, I have failed to find the appropriate way to expose a non-pwm fan. If any, what is the dedicated sysfs entry to set speed for a non-pwm fan ?
Maybe that a fake pwm interface is needed ?

Thanks in advance.

Simon

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#1 lore raw

Salut Simon,

Quoted 9 lines · Simon Guinot

I am currently looking to add hwmon support for the fan device found on Network Space Max v2 boards (ARM Kirkwood SoC).

The fan speed can be configured trough GPIOs. The GPIO settings allow to change the fan input voltage (via some resistors).
After a quick look at the hwmon sysfs interface, I have failed to find the appropriate way to expose a non-pwm fan. If any, what is the dedicated sysfs entry to set speed for a non-pwm fan ?
Maybe that a fake pwm interface is needed ?

Don't let yourself be fooled by the "pwm[1-n]" and "pwm[1_n]_enable" files names. These are valid for all fan control outputs, be they PWM or DC. As a matter of fact, "pwm[1-n]_mode" lets you advertise whether the controller is using PWM or DC.

All that really matters is that you use 0-255 as the pwm[1-n] range matching 0-100%.

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#2 lore raw
In reply to Simon Guinot
Quoted 13 lines · Jean Delvare

Salut Simon,

Quoted 9 lines · Simon Guinot

I am currently looking to add hwmon support for the fan device found on Network Space Max v2 boards (ARM Kirkwood SoC).

The fan speed can be configured trough GPIOs. The GPIO settings allow to change the fan input voltage (via some resistors).
After a quick look at the hwmon sysfs interface, I have failed to find the appropriate way to expose a non-pwm fan. If any, what is the dedicated sysfs entry to set speed for a non-pwm fan ?
Maybe that a fake pwm interface is needed ?

Quoted 7 lines

Don't let yourself be fooled by the "pwm[1-n]" and "pwm[1_n]_enable" files names. These are valid for all fan control outputs, be they PWM or DC. As a matter of fact, "pwm[1-n]_mode" lets you advertise whether the controller is using PWM or DC.

All that really matters is that you use 0-255 as the pwm[1-n] range matching 0-100%.

Thank you.

Simon

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors