Bug 11613

Summary: Setting asus::mail led brightness to value >1 turn the led off
Product: Drivers Reporter: Kamil Neczaj (kneczaj)
Component: PlatformAssignee: Corentin Chary (corentin.chary)
Status: CLOSED PATCH_ALREADY_AVAILABLE    
Severity: normal CC: acpi-bugzilla, corentin.chary, rui.zhang
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.26 Subsystem:
Regression: --- Bisected commit-id:
Bug Depends on:    
Bug Blocks: 56331    
Attachments: asus-laptop: make the led interface respect the documentation
asus-laptop: make the led interface respect the documentation

Description Kamil Neczaj 2008-09-21 13:33:26 UTC
Distribution: Archlinux

Description:
The asus::mail led is a led without brightness control
When you type in terminal:
echo $value > /sys/class/leds/asus\:\:mail/brightness
and $value is a number greater than 1 the led is turned off, but it shouldn't.
Comment 1 Zhang Rui 2008-09-22 00:48:02 UTC
apparently /sys/class/led/... offers the I/F for led control.
why do you think the mail led should not be lit?
BTW, I don't think it's brightness control, we can only turn on/off it. :)
Comment 2 Zhang Rui 2008-09-22 00:50:23 UTC
cc Corentin, who is the author of the asus-laptop driver. :)
Comment 3 Corentin Chary 2008-09-22 01:18:32 UTC
Hum, in asus-laptop:
echo 0 turn off
echo 1 turn on

What should it do ?
Comment 4 Kamil Neczaj 2008-09-22 03:30:02 UTC
Brightness parameter can have value 0-255, when the led has brightness control the led should light brighter and brighter when you inresing this value from 0 to 255. When led hasn't brightness control it should be turned of when brightness has value 0, and be turned on when it has value 1-255.

I based my bug report on this document: http://www.mjmwired.net/kernel/Documentation/leds-class.txt
Comment 5 Zhang Rui 2008-09-22 22:39:57 UTC
hmm, seems that we need a tiny patch to fix it, right?

re-assign to corentin. :)
Comment 6 Corentin Chary 2008-09-23 00:45:49 UTC
Created attachment 17967 [details]
asus-laptop: make the led interface respect the documentation

Here is a patch, please test it as I have no asus for the moment (I have 3 at home, but not here ^^).
If it work, i'm not realy familiar with bugzilla, should I send the patch to linux-acpi ?

ps: the patch is based on linux-acpi-2.6
Comment 7 Zhang Rui 2008-09-23 19:06:15 UTC
Kamil, will you please test this patch?

Corentin, you don't need to re-post it to linux-acpi mail list, but you should refresh the patch in comment #6, with a full change log including "From", "Subject:", "Signed-off-by" and a link to this bugzilla entry. :) 

this bug is resolved as patch is already available.
Comment 8 Corentin Chary 2008-09-24 01:46:24 UTC
Created attachment 17999 [details]
asus-laptop: make the led interface respect the documentation

Here is a new patch, done with git-format-patch. It should be better =).
Comment 9 Kamil Neczaj 2008-09-24 04:26:16 UTC
I have tested the first patch and it works fine, so the second should work too, because it's the same.
Comment 10 Len Brown 2008-10-16 12:58:39 UTC
patch in comment #8 applied to acpi tree
Comment 11 Len Brown 2008-10-24 23:01:12 UTC
shipped in linux-2.6.28-rc1
closed

commit e3deda9c87ac5eef2b5d18cd0b5511370979ca26
Author: Corentin Chary <corentincj@iksaif.net>
Date:   Wed Sep 24 10:35:55 2008 +0200

    asus-laptop: Fix the led behavior with value > 1