aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/sony-laptop.c
Commit message (Collapse)AuthorAge
* create drivers/platform/x86/ from drivers/misc/Len Brown2008-12-19
| | | | | | | | | | | | | | | | | | Move x86 platform specific drivers from drivers/misc/ to a new home under drivers/platform/x86/. The community has been maintaining x86 vendor-specific platform specific drivers under /drivers/misc/ for a few years. The oldest ones started life under drivers/acpi. They moved out of drivers/acpi/ because they don't actually implement the ACPI specification, but either simply use ACPI, or implement vendor-specific ACPI extensions. In the future we anticipate... drivers/misc/ will go away. other architectures will create drivers/platform/<arch> Signed-off-by: Len Brown <len.brown@intel.com>
* sony-laptop: printk tweakAlessandro Guido2008-11-26
| | | | | | | There's no need to print "Sony: " just after "sony-laptop: " (DRV_PFX). Signed-off-by: Alessandro Guido <ag@alessandroguido.name> Signed-off-by: Len Brown <len.brown@intel.com>
* sony-laptop: brightness regression fixAlessandro Guido2008-11-26
| | | | | | | | | | | | | | | | | | After commit 540b8bb9c33935183ceb5bed466a42ad72b2af56: sony-laptop: fingers off backlight if video.ko is serving this functionality I can't set brightness on my sony laptop (nothing in /sys/class/backlight). dmesg says "sony-laptop: Sony: Brightness ignored, must be controlled by ACPI video driver". The function acpi_video_backlight_support returns 0 if we should use the vendor-specific backlight support, while non-0 if the ACPI generic should be used. Because of this, the check introduced by the said commit appears reversed. Signed-off-by: Alessandro Guido <ag@alessandroguido.name> Signed-off-by: Len Brown <len.brown@intel.com>
* sony-laptop: fingers off backlight if video.ko is serving this functionalityThomas Renninger2008-11-08
| | | | | | | Signed-off-by: Thomas Renninger <trenn@suse.de> Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* saner FASYNC handling on file closeAl Viro2008-11-01
| | | | | | | | | | | | | | As it is, all instances of ->release() for files that have ->fasync() need to remember to evict file from fasync lists; forgetting that creates a hole and we actually have a bunch that *does* forget. So let's keep our lives simple - let __fput() check FASYNC in file->f_flags and call ->fasync() there if it's been set. And lose that crap in ->release() instances - leaving it there is still valid, but we don't have to bother anymore. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* sony-laptop: ignore missing _DIS method on pic deviceMatthew Garrett2008-10-30
| | | | | | | | | | | At least the Vaio VGN-Z540N doesn't have this method, so let's not fail to suspend just because it doesn't exist. Signed-off-by: Adam Jackson <ajax@redhat.com> Acked-by: Mattia Dongili <malattia@linux.it> Cc: Len Brown <lenb@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* sony-laptop: newline-terminate the printk for backlight change failureAdam Jackson2008-10-16
| | | | | Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Len Brown <len.brown@intel.com>
* sony-laptop: BKL pushdownArnd Bergmann2008-07-02
| | | | Signed-off-by: Arnd Bergmann <arnd@arndb.de>
* drivers/misc: replace remaining __FUNCTION__ occurrencesHarvey Harrison2008-04-29
| | | | | | | | __FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* sony-laptop.c: fix off-by-oneAdrian Bunk2008-02-21
| | | | | | | | This patch fixes an off-by-one spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@kernel.org> Acked-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Len Brown <len.brown@intel.com>
* sony-laptop: fix scancode decodeMattia Dongili2008-01-24
| | | | | | | | compare against the sony_laptop specific event list index to decode the input scancode to send. Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Len Brown <len.brown@intel.com>
* sony-laptop: add Type4 modelMattia Dongili2008-01-24
| | | | | | | | | Recent Vaio models (UX, SZ and presumably TZ and others) add more events and a slightly different handling of Fn key events for additional hotkeys (s1, s2, zoom-in/out, etc.). Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Len Brown <len.brown@intel.com>
* sony-laptop: bump version to 0.6Mattia Dongili2008-01-24
| | | | | Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Len Brown <len.brown@intel.com>
* sony-laptop: refactor model typesMattia Dongili2008-01-24
| | | | | | | | | | | Create mini drivers and allow callbacks for each model to be specified. Following patches will make use of this feature to handle specific cases instead of just executing code and hope not to break other models. Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Len Brown <len.brown@intel.com>
* sony-laptop: Add Vaio N series to the special init sequence to enable Fn keysMattia Dongili2008-01-24
| | | | | | | | Also the recent Vaio N series need some more calls into the DSDT to enable reporting of FN key events to be delivered to the SNC device. Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Len Brown <len.brown@intel.com>
* sony-laptop: printk more info in sony_pic_call[123]Mattia Dongili2008-01-24
| | | | | Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Len Brown <len.brown@intel.com>
* sony-laptop: fit input devices into sysfs treeDmitry Torokhov2007-11-21
| | | | | | | Properly set up parent on input devices registered by sony-laptop. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Acked-by: Mattia Dongili <malattia@linux.it>
* more UTF-8 conversionsMarcin Garski2007-10-19
| | | | Signed-off-by: Adrian Bunk <bunk@kernel.org>
* Fix misspellings of "system", "controller", "interrupt" and "necessary".Robert P. J. Day2007-10-19
| | | | | | | | Fix the various misspellings of "system", controller", "interrupt" and "[un]necessary". Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
* Merge branch 'release' of ↵Linus Torvalds2007-10-19
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (41 commits) ACPICA: hw: Don't carry spinlock over suspend ACPICA: hw: remove use_lock flag from acpi_hw_register_{read, write} ACPI: cpuidle: port idle timer suspend/resume workaround to cpuidle ACPI: clean up acpi_enter_sleep_state_prep Hibernation: Make sure that ACPI is enabled in acpi_hibernation_finish ACPI: suppress uninitialized var warning cpuidle: consolidate 2.6.22 cpuidle branch into one patch ACPI: thinkpad-acpi: skip blanks before the data when parsing sysfs ACPI: AC: Add sysfs interface ACPI: SBS: Add sysfs alarm ACPI: SBS: Add ACPI_PROCFS around procfs handling code. ACPI: SBS: Add support for power_supply class (and sysfs) ACPI: SBS: Make SBS reads table-driven. ACPI: SBS: Simplify data structures in SBS ACPI: SBS: Split host controller (ACPI0001) from SBS driver (ACPI0002) ACPI: EC: Add new query handler to list head. ACPI: Add acpi_bus_generate_event4() function ACPI: Battery: add sysfs alarm ACPI: Battery: Add sysfs support ACPI: Battery: Misc clean-ups, no functional changes ... Fix up conflicts in drivers/misc/thinkpad_acpi.[ch] manually
| * Pull sony-2.6.24 into release branchLen Brown2007-10-10
| |\
| | * sony-laptop: old Vaio models contain 2 IO port entriesMattia Dongili2007-08-24
| | | | | | | | | | | | | | | | | | | | | | | | Make the driver aware of this case and manage the existence of a second separate IO port. Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Len Brown <len.brown@intel.com>
* | | get rid of input BIT* duplicate definesJiri Slaby2007-10-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | get rid of input BIT* duplicate defines use newly global defined macros for input layer. Also remove includes of input.h from non-input sources only for BIT macro definiton. Define the macro temporarily in local manner, all those local definitons will be removed further in this patchset (to not break bisecting). BIT macro will be globally defined (1<<x) Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: <dtor@mail.ru> Acked-by: Jiri Kosina <jkosina@suse.cz> Cc: <lenb@kernel.org> Acked-by: Marcel Holtmann <marcel@holtmann.org> Cc: <perex@suse.cz> Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: <vernux@us.ibm.com> Cc: <malattia@linux.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | drivers/firmware: const-ify DMI API and internalsJeff Garzik2007-10-09
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Three main sets of changes: 1) dmi_get_system_info() return value should have been marked const, since callers should not be changing that data. 2) const-ify DMI internals, since DMI firmware tables should, whenever possible, be marked const to ensure we never ever write to that data area. 3) const-ify DMI API, to enable marking tables const where possible in low-level drivers. And if we're really lucky, this might enable some additional optimizations on the part of the compiler. The bulk of the changes are #2 and #3, which are interrelated. #1 could have been a separate patch, but it was so small compared to the others, it was easier to roll it into this changeset. Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | Pull events into release branchLen Brown2007-08-25
|\ \ | |/ |/| | | | | | | | | | | Conflicts: drivers/acpi/video.c Signed-off-by: Len Brown <len.brown@intel.com>
| * ACPI: Schedule /proc/acpi/event for removalLen Brown2007-08-23
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | sony-laptop: call sonypi_compat_init earlierMattia Dongili2007-08-24
| | | | | | | | | | | | | | | | | | 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>
* | sony-laptop: enable Vaio FZ eventsMattia Dongili2007-08-24
|/ | | | | Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Len Brown <len.brown@intel.com>
* sony-laptop: sony_nc_ids[] can become static.Adrian Bunk2007-08-03
| | | | | | 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>
* sony-laptop: restore the last user requested brightness level on resume.Mattia Dongili2007-08-03
| | | | | Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: autoload modules - Create __mod_acpi_device_table symbol for all ACPI ↵Thomas Renninger2007-07-23
| | | | | | | | | | 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>
* sony-laptop: Fix event reading in sony-laptopMattia Dongili2007-07-22
| | | | | | | | | 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>
* sony-laptop: Add Vaio FE to the special init sequenceMattia Dongili2007-07-22
| | | | | | | 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>
* sony-laptop: Make the driver use MSC_SCAN and a setkeycode and getkeycode ↵Mattia Dongili2007-07-22
| | | | | | | | | | | | | | | 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>
* sony-laptop: Invoke _INI for SNC devices that provide itMattia Dongili2007-07-22
| | | | | Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Len Brown <len.brown@intel.com>
* sony-laptop: Add support for recent Vaios Fn keys (C series for now)Mattia Dongili2007-07-22
| | | | | | | | | | | | | 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>
* sony-laptop: map wireless switch events to KEY_WLANMattia Dongili2007-07-22
| | | | | Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Len Brown <len.brown@intel.com>
* sony-laptop: add new SNC handlersMattia Dongili2007-07-22
| | | | | | | | | - 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>
* sony-laptop: use NULL for pointerRandy Dunlap2007-07-16
| | | | | | | | | | 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>
* sony-laptop: rename SONY_LAPTOP_OLD to a more meaningful SONYPI_COMPATMattia Dongili2007-05-10
| | | | | Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Len Brown <len.brown@intel.com>
* sony-laptop: remove user visible camera controls as platform attributesmalattia@linux.it2007-04-28
| | | | | | | | 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>
* sony-laptop: add a meye-usable include file for camera opsmalattia@linux.it2007-04-28
| | | | | | | 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>
* sony-laptop: complete the motion eye camera support in sony-laptopmalattia@linux.it2007-04-28
| | | | | | | | 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>
* sonypi: try to detect if sony-laptop has already taken one of the known ioportsmalattia@linux.it2007-04-28
| | | | | | | | | | 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>
* sony-laptop: add edge modem support (also called WWAN)malattia@linux.it2007-04-28
| | | | | | | | 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>
* sony-laptop: add locking on accesses to the ioport and global varsmalattia@linux.it2007-04-28
| | | | | | | 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>
* sony-laptop: add camera enable/disable parameter, better handle possible ↵malattia@linux.it2007-04-28
| | | | | | | | | | | 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>
* sony-laptop: sonypi backward compatibility codemalattia@linux.it2007-04-10
| | | | | | | 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>
* sony-laptop: sanitize printksmalattia@linux.it2007-04-10
| | | | | | | Unify printks to resemble a unique driver. Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Len Brown <len.brown@intel.com>
* sony-laptop: additional platform attributes coming from SNY6001malattia@linux.it2007-04-10
| | | | | | | 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>