Commit graph

39 commits

Author SHA1 Message Date
Len Brown
25c87f7f2a Pull events into release branch
Conflicts:

	drivers/acpi/video.c

Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-25 01:44:01 -04:00
Mattia Dongili
015a916fbb sony-laptop: call sonypi_compat_init earlier
sonypi_compat uses a kfifo that needs to be present before _SRS is
called to be able to cope with the IRQs triggered when setting
resources.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-24 00:57:20 -04:00
Mattia Dongili
f46d1604ed sony-laptop: enable Vaio FZ events
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-24 00:56:59 -04:00
Len Brown
14e04fb34f ACPI: Schedule /proc/acpi/event for removal
Schedule /proc/acpi/event for removal in 6 months.

Re-name acpi_bus_generate_event() to acpi_bus_generate_proc_event()
to make sure there is no confusion that it is for /proc/acpi/event only.

Add CONFIG_ACPI_PROC_EVENT to allow removal of /proc/acpi/event.
There is no functional change if CONFIG_ACPI_PROC_EVENT=y

Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-23 15:20:26 -04:00
Adrian Bunk
11604ecf6f sony-laptop: sony_nc_ids[] can become static.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-03 15:25:44 -04:00
Mattia Dongili
e84a02ba0b sony-laptop: restore the last user requested brightness level on resume.
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-03 15:25:00 -04:00
Thomas Renninger
1ba90e3a87 ACPI: autoload modules - Create __mod_acpi_device_table symbol for all ACPI drivers
modpost is going to use these to create e.g. acpi:ACPI0001
in modules.alias.

Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-23 13:56:42 -04:00
Mattia Dongili
22a1778058 sony-laptop: Fix event reading in sony-laptop
The rewritten event reading code from sonypi was absolutely wrong,
this patche makes things functional for type2 and type1 models.

Cc: Andrei Paskevich <andrei@capet.iut-fbleau.fr>
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-22 00:34:58 -04:00
Mattia Dongili
89892d153d sony-laptop: Add Vaio FE to the special init sequence
The Vaio FE series uses the same sequence as Vaio C series

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-22 00:34:58 -04:00
Mattia Dongili
bc57f865fa sony-laptop: Make the driver use MSC_SCAN and a setkeycode and getkeycode key table.
The following is the only way I could think of to hide some events as
per Dmitry suggestions while still using the default {set,get}keycode
implementation.

Make the driver use MSC_SCAN and a setkeycode and getkeycode key table.

Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Richard Hughes <richard@hughsie.com>
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-22 00:34:58 -04:00
Mattia Dongili
b25b732a16 sony-laptop: Invoke _INI for SNC devices that provide it
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-22 00:34:58 -04:00
Mattia Dongili
6315fd1c9c sony-laptop: Add support for recent Vaios Fn keys (C series for now)
Recent Vaios (C, AR, N, FE) need some special initialization
sequence to enable Fn keys interrupts through the Embedded
Controller. Moreover Fn keys have to be decoded internally
using ACPI methods to get the key code.
Thus a new DMI table to add SNC init time callbacks and new
mappings for model-specific key code to generic sony-laptop
code have been added.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-22 00:34:58 -04:00
Mattia Dongili
8538c3686c sony-laptop: map wireless switch events to KEY_WLAN
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-22 00:34:58 -04:00
Mattia Dongili
044847e02d sony-laptop: add new SNC handlers
- lid state: GLID
- indicator lamp: GILS/SILS
- multimedia bass gain: GMGB/CMGB

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-22 00:34:58 -04:00
Randy Dunlap
f3a740c5fb sony-laptop: use NULL for pointer
Use NULL instead of 0 for pointer:
drivers/misc/sony-laptop.c:1920:6: warning: Using plain integer as NULL pointer

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-16 09:05:46 -07:00
Mattia Dongili
a64e62a070 sony-laptop: rename SONY_LAPTOP_OLD to a more meaningful SONYPI_COMPAT
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-05-10 02:42:45 -04:00
malattia@linux.it
1b20d34406 sony-laptop: remove user visible camera controls as platform attributes
Avoid giving the user the possibility to shoot his own foot and let
the meye driver enable/disable the camera wisely (PCI_ID based).

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28 22:06:03 -04:00
malattia@linux.it
1ce82c14d0 sony-laptop: add a meye-usable include file for camera ops
Copy and rename (for easier co-existence) the MEYE-wise exported interface.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28 22:06:01 -04:00
malattia@linux.it
e364632e74 sony-laptop: complete the motion eye camera support in sony-laptop
Add the exported sony_pic_camera_command() function to make the MEYE
driver happy.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28 22:06:00 -04:00
malattia@linux.it
1a3e323907 sonypi: try to detect if sony-laptop has already taken one of the known ioports
Get the IO resources list in sony-laptop in the same order as listed
in sonypi and make sonypi check if one of those is already busy.
The sonypi check can be disabled by a module parameter in case the user
thinks we are plainly wrong (check_ioport=0).

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28 22:05:59 -04:00
malattia@linux.it
9476cdfae6 sony-laptop: add edge modem support (also called WWAN)
Some SZ Vaios have a gsm built-in modem. Allow powering on/off this device.
Thanks to Joshua Wise for the base code.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28 22:05:55 -04:00
malattia@linux.it
9f9f076171 sony-laptop: add locking on accesses to the ioport and global vars
Better avoid having ioport commands mixing and global variables reading/writing.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28 22:05:53 -04:00
malattia@linux.it
5f3d2898d7 sony-laptop: add camera enable/disable parameter, better handle possible infinite loop
Use a parameter to enable/disable motion eye camera (for C1VE/C1VN models)
controls and avoid entering an infinite loop if the camera is not present
and the HW doesn't answer as we expect on io commands.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28 22:05:48 -04:00
malattia@linux.it
7b153f3668 sony-laptop: sonypi backward compatibility code
Compatibility code to allow old sonypi bound userspace apps to still work.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-10 16:05:22 -04:00
malattia@linux.it
f6119b0275 sony-laptop: sanitize printks
Unify printks to resemble a unique driver.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-10 16:01:19 -04:00
malattia@linux.it
49a11deade sony-laptop: additional platform attributes coming from SNY6001
Register additional platform attributes coming from the SPIC (sonypi) driver.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-10 16:01:19 -04:00
malattia@linux.it
1549ee6fb1 sony-laptop: Unify the input subsystem event forwarding
SNC and SPIC events are forwarded to the same input devices
and are thus handled together.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-10 16:01:19 -04:00
malattia@linux.it
33a0445452 sony-laptop: Add SNY6001 device handling (sonypi reimplementation)
Reimplement sonypi using ACPI only functions.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-10 16:01:19 -04:00
malattia@linux.it
b9a218b738 sony-laptop: Add debug macros also used by the sonypi reimplementation
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-10 16:01:18 -04:00
malattia@linux.it
56b8756b3b sony-laptop: Prepare the platform driver for multiple users.
Both the SNC and SPIC device drivers will create attributes and thus
there's the need to have an internal usage count to avoid
re-registering or de-registering at the wrong time.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-10 16:01:18 -04:00
malattia@linux.it
59b19106f3 sony-laptop: Remove ACPI references from variable and function names.
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-10 16:01:18 -04:00
Andrew Morton
8607c673bd sony-laptop: fix uninitialised variable
drivers/misc/sony-laptop.c: In function 'sony_acpi_add':
drivers/misc/sony-laptop.c:456: warning: 'result' may be used uninitialized in this function

The compiler seems to actually be telling the truth this time.

Cc: Mattia Dongili <malattia@linux.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-07 03:05:13 -05:00
Richard Purdie
321709c599 backlight: Clean up pmac_backlight handling
Move the setting/unsetting of pmac_backlight into the
backlight core instead of doing it in each driver.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2007-02-20 09:26:40 +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
Mattia Dongili
156c221b72 sony-laptop: allow complex per-value input/output validation
Replace sony_acpi_value.{min,max} with a callback function that allows
more complex reasoning in accepting input and presenting output.

This allows consistency between the sony-laptop specific 'brightness_default'
and the backlight subsystem 0-based 'brightness'.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-13 03:08:04 -05:00
Len Brown
a02d1c1d2a sony-laptop: Lindent
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-13 03:07:20 -05:00
Mattia Dongili
d78865cdb0 sony-laptop: Group functions and structures to better draw subsytems usage
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-13 03:07:13 -05:00
Mattia Dongili
ed3aa4b729 sony-laptop: Remove /proc/acpi/sony interface and implement platform_device.
Rework method names list to allow an easier management of multiple
values.
Add myself as author/maintainer and bump the version number.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-13 03:07:00 -05:00
Mattia Dongili
91fbc1d311 sony-laptop: create from sony_acpi
Move drivers/acpi/sony_acpi.c to drivers/misc/sony-laptop.c with all the
necessary configuration.
The SONY_LAPTOP config option substitutes the old ACPI_SONY and is 'default n'
now.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-13 03:06:53 -05:00
Renamed from drivers/acpi/sony_acpi.c (Browse further)