Commit graph

13 commits

Author SHA1 Message Date
Richard Purdie 599a52d126 backlight: Separate backlight properties from backlight ops pointers
Per device data such as brightness belongs to the indivdual device
and should therefore be separate from the the backlight operation
function pointers. This patch splits the two types of data and
allows simplifcation of some code.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2007-02-20 09:26:53 +00:00
Richard Purdie 28ee086d5b backlight: Fix external uses of backlight internal semaphore
backlight_device->sem has a very specific use as documented in the
header file. The external users of this are using it for a different
reason, to serialise access to the update_status() method.

backlight users were supposed to implement their own internal
serialisation of update_status() if needed but everyone is doing
things differently and incorrectly. Therefore add a global mutex to
take care of serialisation for everyone, once and for all.

Locking for get_brightness remains optional since most users don't
need it.

Also update the lcd class in a similar way.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2007-02-20 08:38:45 +00:00
Richard Purdie dfcba20067 backlight: Remove unneeded owner field
Remove uneeded owner field from backlight_properties structure.

Nothing uses it and it is unlikely that it will ever be used. The
backlight class uses other means to ensure that nothing references
unloaded code.

Based on a patch from Dmitry Torokhov <dtor@insightbb.com>

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2007-02-20 08:37:40 +00:00
Len Brown 5ee6edbcde ACPI: hotkey: remove driver, per feature-removal-schedule.txt
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-16 21:45:57 -05:00
Len Brown 894d79bedd asus-laptop: merge with ACPICA table update
No longer need a buffer for a copy of the DSDT,
just a pointer to the mapped table.

Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-03 02:13:53 -05:00
Len Brown 8def05fa82 asus-laptop: Lindent
Signed-off-by: Len Brown <len.brown@intel.com>
2007-01-30 01:46:43 -05:00
Corentin Chary 8b85735323 asus-laptop: add light sensor support
/proc/acpi/asus/lslvl is now /sys/.../asus-laptop/ls_level
/proc/acpi/asus/lssw is now /sys/.../asus-laptop/ls_switch nothing
else ..

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-01-30 01:45:00 -05:00
Corentin Chary 722ad97153 asus-laptop: add ledd support
Ledd is a special led ... /sys/.../asus-laptop/ledd works like
/proc/acpi/asus/ledd

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-01-30 01:37:09 -05:00
Corentin Chary 78127b4a90 asus-laptop: add display switching support
/sys/.../asus-laptop/display can now be used to switch displays
like the old /proc/acpi/asus/disp does

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-01-30 01:37:06 -05:00
Corentin Chary 6b7091e74f asus-laptop: add backlight support
Adds backlight support using backlight class. We now
change the brightness *and toggle the backlight !* via
/sys/class/backlight/asus-laptop/.

If the user switchs the backlight using the keyboard,
asus_hotk_notify looks for ATKD_LCD_OFF and ATKD_LCD_ON events,
and stores the right state into hotk->status and bd->props->power .

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-01-30 01:37:04 -05:00
Corentin Chary 4564de172d asus-laptop: add bluetooth and wlan support
WLED and BLED are not handled like other leds (MLED, etc ..),
because sometime they also control the wlan/bluetooth device.
If the method for wireless_status is found, it's used to get the
status, otherwise hotk->status is used.  We also use the HWRS
method, which tell if the bluetooth/wlan device is present or not.
This patch show why we need a ASUS_SET_DEVICE_ATTR macro : if
there is a bluetooth device, /sys/dev.../asus-laptop/bluetooth
is usable, else it's not but it's clean.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-01-30 01:37:02 -05:00
Corentin Chary be18cdabb8 asus-laptop: add led support
Add led support, using generic led class.  Thomas Tuttle's patch
<http://lkml.org/lkml/2006/7/6/247> was very usefull.  We use
hotk->status to store led status because it's very hard to find
acpi method to get the right status...  To reduce the code,
I use a lot of macro (ASUS_LED, ASUS_LED_REGISTER, etc ...),
because the code is the same for all leds ...

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-01-30 01:37:00 -05:00
Corentin Chary 85091b7189 asus-laptop: add base driver
Adds the new driver and make ASUS_LAPTOP and ACPI_ASUS
incompatible.  It may be strange to use ASUS_CREATE_DEVICE_ATTR
and ASUS_SET_DEVICE_ATTR now, but these macro will be very
usefull in next patchs.  ASUS_HANDLE and ASUS_HANDLE_INIT comes
from IBM_HANDLE and IBM_HANDLE_INIT, with some modification,
and will also be used in next patchs.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-01-30 01:36:57 -05:00