Skip to contentSkip to conversation

Questions about sysfs

lm-sensors dave jones 2 participants 4 messages Aug 17, 2007 – Aug 21, 2007

lore
Share & tools
lore

dave jones

author
#0 lore raw

Hi,

I'm trying to use pwmconfig to verify whether my porting driver is working or not.
While running pwmconfig, I got the following result:

Found the following PWM controls:
0-002e/pwm1
/usr/sbin/pwmconfig: line 102: echo: write error: Invalid argument

Found the following fan sensors:
0-002e/fan1_input current speed: 6683 RPM
0-002e/fan2_input current speed: 6192 RPM

My question is why it displays 0-002e instead of hwmon0/devices ? The second question is why pwmconfig cannot write value ? In line 102 with pwmconfig is:

# $1 = pwm file name
function pwmdisable()

{
        if [ "$SYSFS" = "1" ]
        then
                echo $MAX > $1
                ENABLE=${1}_enable
                if [ -w $ENABLE ]
                then
                        echo 0 > $ENABLE          ---- line 102
                fi
        else
                echo $MAX 0 > $1
        fi
}

Would you tell me how to fix my driver? Thank you.

BR,
Dave.

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

#1 lore raw

Hi Dave,

Quoted 7 lines · dave jones

I'm trying to use pwmconfig to verify whether my porting driver is working or not.
While running pwmconfig, I got the following result:

Found the following PWM controls:

   0-002e/pwm1

/usr/sbin/pwmconfig: line 102: echo: write error: Invalid argument

What are the permissions on that file? The error message suggests that your driver returned -EINVAL to the write request.

Quoted 5 lines

Found the following fan sensors:

   0-002e/fan1_input     current speed: 6683 RPM
   0-002e/fan2_input     current speed: 6192 RPM

My question is why it displays 0-002e instead of hwmon0/devices ?

Which version of lm-sensors are you running? Support for the hwmon class was added relatively recently (2.10.2).

Quoted 19 lines

The second question is why pwmconfig cannot write value ? In line 102 with pwmconfig is:

# $1 = pwm file name
function pwmdisable()

{
        if [ "$SYSFS" = "1" ]
        then
                echo $MAX > $1
                ENABLE=${1}_enable
                if [ -w $ENABLE ]
                then
                        echo 0 > $ENABLE          ---- line 102
                fi
        else
                echo $MAX 0 > $1
        fi
}
Quoted 1 line

Would you tell me how to fix my driver? Thank you.

Without seeing your code? I don't think so.

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
author
#2 lore raw
In reply to dave jones
Quoted 1 line · Jean Delvare

Hi Dave,

Hi Jean,

Quoted 12 lines · dave jones
Quoted 7 lines

I'm trying to use pwmconfig to verify whether my porting driver is working or not.
While running pwmconfig, I got the following result:

Found the following PWM controls:

   0-002e/pwm1

/usr/sbin/pwmconfig: line 102: echo: write error: Invalid argument

What are the permissions on that file? The error message suggests that your driver returned -EINVAL to the write request.

Quoted 8 lines
Quoted 5 lines

Found the following fan sensors:

   0-002e/fan1_input     current speed: 6683 RPM
   0-002e/fan2_input     current speed: 6192 RPM

My question is why it displays 0-002e instead of hwmon0/devices ?

Which version of lm-sensors are you running? Support for the hwmon class was added relatively recently (2.10.2).

Thanks. I used 2.10.0. After installing lm-sensors 2.10.4 without modifying my driver, run pwmconfig, the result is:

Found the following devices:
hwmon0/device is w83l786ng

Found the following PWM controls:
hwmon0/device/pwm1
hwmon0/device/pwm1_enable stuck to 1
Failed to set pwmhwmon0/device/pwm1 to full speed
Something's wrong, check your fans!

Did I miss something? Why it can't detect my fans? Thank you.

Quoted 3 lines

--
Jean Delvare

BR,
Dave.

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

#3 lore raw
In reply to dave jones
Quoted 6 lines · dave jones

Thanks. I used 2.10.0. After installing lm-sensors 2.10.4 without modifying my driver, run pwmconfig, the result is:

Found the following devices:

   hwmon0/device is w83l786ng
Quoted 7 lines

Found the following PWM controls:
hwmon0/device/pwm1
hwmon0/device/pwm1_enable stuck to 1
Failed to set pwmhwmon0/device/pwm1 to full speed
Something's wrong, check your fans!

Did I miss something? Why it can't detect my fans? Thank you.

This is a driver issue. The script attempted to set the fan to full speed, but failed. As I said before, we can't help you with this without seeing the source code.

Signature · 6 lines
Jean Delvare

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