aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/dell-laptop.c
Commit message (Collapse)AuthorAge
* dell-laptop: Fix errors on failure and exit pathsMatthew Garrett2010-03-01
| | | | | | | | Make sure that work is cancelled after removing the i8042 filter, and unregister the platform device rather than deleting it. Signed-off-by: Matthew Garrett <mjg@redhat.com> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* dell-laptop: Fix build error by making buffer_mutex staticIngo Molnar2010-03-01
| | | | | | | | | | | | | | | The following build bug (x86, allyesconfig): arch/x86/oprofile/built-in.o:(.data+0x250): multiple definition of `buffer_mutex' Was triggered in -tip testing, caused by this upstream commit: 116ee77: dell-laptop: Use buffer with 32-bit physical address There's multiple buffer_mutex's in the kernel. Make this new one static. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* dell-laptop: Add another Dell laptop to the DMI whitelistErik Andren2010-02-25
| | | | | | | | The Latitude C640 has another variation of dell in its DMI vendor entry. Add it to the whitelist in order to enjoy the sweet fruits of software backlight toggling. Signed-off-by: Erik Andren <erik.andren@gmail.com>
* dell-laptop: Pay attention to which devices the hardware switch controlsMatthew Garrett2010-02-25
| | | | | | | | | | Right now, we assume that the hardware rfkill switch on Dells toggles all radio devices. In fact, this can be configured in the BIOS and so right now we may mark a device as hardware killed even when it isn't. Add code to query the devices controlled by the switch, and use this when determining the hardware kill state of a radio. Signed-off-by: Matthew Garrett <mjg@redhat.com>
* dell-laptop: Use buffer with 32-bit physical addressStuart Hayes2010-02-25
| | | | | | | | | | | Calls to communicate with system firmware via a SMI (using dcdbas) need to use a buffer that has a physical address of 4GB or less. Currently the dell-laptop driver does not guarantee this, and when the buffer address is higher than 4GB, the address is truncated to 32 bits and the SMI handler writes to the wrong memory address. Signed-off-by: Stuart Hayes <stuart_hayes@dell.com> Acked-by: Matthew Garrett <mjg@redhat.com>
* dell-laptop: Blacklist machines not supporting dell-laptopMario Limonciello2010-02-25
| | | | | | | The Mini family doesn't support smbios 17,11 although it reports it does. Signed-off-by: Mario Limonciello <superm1@ubuntu.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
* dell-laptop: Block software state changes when rfkill hard blockedMario Limonciello2010-02-25
| | | | | | | | | | | The "hardware" switch is tied directly to a BIOS interface that will connect and disconnect the hardware from the bus. If you use the software interface to request the BIOS to make these changes, the HW switch will be in an inconsistent state and LEDs may not reflect the state of the HW. Signed-off-by: Mario Limonciello <Mario_Limonciello@Dell.com>
* dell-laptop: Fix small memory leakMatthew Garrett2010-02-25
| | | | | | da_tokens was not being freed by dell-laptop on unload. Fix that. Signed-off-by: Matthew Garrett <mjg@redhat.com>
* dell-laptop: Fix platform device unregistrationMatthew Garrett2010-02-25
| | | | | | | dell-laptop currently fails to clean up its platform device correctly. Make sure that it's unregistered. Signed-off-by: Matthew Garrett <mjg@redhat.com>
* dell-laptop: Update rfkill state on kill switchMatthew Garrett2010-02-25
| | | | | | | | The rfkill interface on Dells only sends a notification that the switch has been changed via the keyboard controller. Add a filter so we can pick these notifications up and update the rfkill state appropriately. Signed-off-by: Matthew Garrett <mjg@redhat.com>
* dell-laptop: add __init to init functionsAlan Jenkins2009-12-10
| | | | | | Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Acked-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Len Brown <len.brown@intel.com>
* dell-laptop: create a platform device as a parent for the rfkill devices etc.Alan Jenkins2009-12-10
| | | | | | | | | | | | | | dell-laptop may not need to export any sysfs files, but it should still create a platform device as a parent for the rfkill and backlight devices. Otherwise sysfs will display these as "virtual" devices, with no connection to either physical hardware or the dell-laptop module. Apparently this is useful for hardware detection. Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Acked-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Len Brown <len.brown@intel.com>
* dell-laptop: fix rfkill memory leak on unload and failure pathsAlan Jenkins2009-12-10
| | | | | | | | rfkill_unregister() should always be followed by rfkill_destroy(). Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Acked-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Len Brown <len.brown@intel.com>
* dell-laptop: fix a use-after-free error on the failure pathAlan Jenkins2009-12-09
| | | | | | | | | | dell_setup_rfkill() already cleans up the rfkill devices on failure. So if it returns an error, we should not try to unregister the rfkill devices. Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Acked-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Len Brown <len.brown@intel.com>
* dell-laptop: Fix rfkill state queriesMatthew Garrett2009-12-09
| | | | | | | | | The current code in dell-laptop is confused about the hardware rfkill state. Fix it up such that it's always reported correctly. Signed-off-by: Matthew Garrett <mjg@redhat.com> Tested-by: Tim Gardner <tim.gardner@canonical.com> Signed-off-by: Len Brown <len.brown@intel.com>
* dell-laptop: fix rfkill conversionJohannes Berg2009-06-15
| | | | | | | | | A polarity error snuck into the rfkill rewrite's dell-laptop conversion, fix it. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Tested-by: Oliver Hartkopp <oliver@hartkopp.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rfkill: rewriteJohannes Berg2009-06-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch completely rewrites the rfkill core to address the following deficiencies: * all rfkill drivers need to implement polling where necessary rather than having one central implementation * updating the rfkill state cannot be done from arbitrary contexts, forcing drivers to use schedule_work and requiring lots of code * rfkill drivers need to keep track of soft/hard blocked internally -- the core should do this * the rfkill API has many unexpected quirks, for example being asymmetric wrt. alloc/free and register/unregister * rfkill can call back into a driver from within a function the driver called -- this is prone to deadlocks and generally should be avoided * rfkill-input pointlessly is a separate module * drivers need to #ifdef rfkill functions (unless they want to depend on or select RFKILL) -- rfkill should provide inlines that do nothing if it isn't compiled in * the rfkill structure is not opaque -- drivers need to initialise it correctly (lots of sanity checking code required) -- instead force drivers to pass the right variables to rfkill_alloc() * the documentation is hard to read because it always assumes the reader is completely clueless and contains way TOO MANY CAPS * the rfkill code needlessly uses a lot of locks and atomic operations in locked sections * fix LED trigger to actually change the LED when the radio state changes -- this wasn't done before Tested-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> [thinkpad] Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* dmi: Let dmi_walk() users pass private dataJean Delvare2009-03-30
| | | | | | | | | | | At the moment, dmi_walk() lacks flexibility, users can't pass data to the callback function. Add a pointer for private data to make this function more flexible. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Matthew Garrett <mjg@redhat.com> Cc: Roland Dreier <rolandd@cisco.com>
* dell-laptop: move to drivers/platform/x86/ from drivers/misc/Len Brown2009-01-16
Signed-off-by: Len Brown <len.brown@intel.com>