aboutsummaryrefslogtreecommitdiff
path: root/drivers/misc
AgeCommit message (Collapse)Author
2007-07-16sony-laptop: use NULL for pointerRandy Dunlap
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-16kconfig: no STRANGE misc. devicesRandy Dunlap
This config symbol name is confusing and unneeded/unwanted, so just change it to MISC_DEVICES. * * Misc devices * Misc devices (MISC_STRANGE_DEV) [Y/n] (NEW) Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-16Use menuconfig objects II - misc strange devJan Engelhardt
Make a "menuconfig" out of the Kconfig objects "menu, ..., endmenu", so that the user can disable all the options in that menu at once instead of having to disable each option separately. Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-11sysfs: kill unnecessary attribute->ownerTejun Heo
sysfs is now completely out of driver/module lifetime game. After deletion, a sysfs node doesn't access anything outside sysfs proper, so there's no reason to hold onto the attribute owners. Note that often the wrong modules were accounted for as owners leading to accessing removed modules. This patch kills now unnecessary attribute->owner. Note that with this change, userland holding a sysfs node does not prevent the backing module from being unloaded. For more info regarding lifetime rule cleanup, please read the following message. http://article.gmane.org/gmane.linux.kernel/510293 (tweaked by Greg to not delete the field just yet, to make it easier to merge things properly.) Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-11DMI-based module autoloadingLennart Poettering
The patch below adds DMI/SMBIOS based module autoloading to the Linux kernel. The idea is to load laptop drivers automatically (and other drivers which cannot be autoloaded otherwise), based on the DMI system identification information of the BIOS. Right now most distros manually try to load all available laptop drivers on bootup in the hope that at least one of them loads successfully. This patch does away with all that, and uses udev to automatically load matching drivers on the right machines. Basically the patch just exports the DMI information that has been parsed by the kernel anyway to userspace via a sysfs device /sys/class/dmi/id and makes sure that proper modalias attributes are available. Besides adding the "modalias" attribute it also adds attributes for a few other DMI fields which might be useful for writing udev rules. This patch is not an attempt to export the entire DMI/SMBIOS data to userspace. We already have "dmidecode" which parses the complete DMI info from userspace. The purpose of this patch is machine model identification and good udev integration. To take advantage of DMI based module autoloading, a driver should export one or more MODULE_ALIAS fields similar to these: MODULE_ALIAS("dmi:*:svnMICRO-STARINT'LCO.,LTD:pnMS-1013:pvr0131*:cvnMICRO-STARINT'LCO.,LTD:ct10:*"); MODULE_ALIAS("dmi:*:svnMicro-StarInternational:pnMS-1058:pvr0581:rvnMSI:rnMS-1058:*:ct10:*"); MODULE_ALIAS("dmi:*:svnMicro-StarInternational:pnMS-1412:*:rvnMSI:rnMS-1412:*:cvnMICRO-STARINT'LCO.,LTD:ct10:*"); MODULE_ALIAS("dmi:*:svnNOTEBOOK:pnSAM2000:pvr0131*:cvnMICRO-STARINT'LCO.,LTD:ct10:*"); These lines are specific to my msi-laptop.c driver. They are basically just a concatenation of a few carefully selected DMI fields with all potentially bad characters stripped. Besides laptop drivers, modules like "hdaps", the i2c modules and the hwmon modules are good candidates for "dmi:" MODULE_ALIAS lines. Besides merely exporting the DMI data via sysfs the patch adds support for a few more DMI fields. Especially the CHASSIS fields are very useful to identify different laptop modules. The patch also adds working MODULE_ALIAS lines to my msi-laptop.c driver. I'd like to thank Kay Sievers for helping me to clean up this patch for posting it on lkml. Patch is against Linus' current GIT HEAD. Should probably apply to older kernels as well without modification. Signed-off-by: Lennart Poettering <mzxreary@0pointer.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-10eeprom_93cx6: shorten pulse timing to match spec (bis)Francois Romieu
Based on an original idea by John W. Linville. It is the missing part of 42d45ccd60636c28e35c2016f091783bc14ad99c Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-08[PATCH] eeprom_93cx6: shorten pulse timing to match specJohn W. Linville
93cx6 datasheet available here: http://ww1.microchip.com/downloads/en/DeviceDoc/21749F.pdf Figure 1-1 and Table 1-2 on pages 4-5 indicate that both Clock High Time and Clock Low Time have largest minimum times of 450ns. Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-07-08[PATCH] eeprom_93cx6: Add comment for 1us delay after pulseIvo van Doorn
This will add a comment for the 1us delay which is taken after the pulse has been switched. The 1us delay is based on the specifications so that should be made clear. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-07-08[PATCH] Add 93cx6 eeprom libraryIvo van Doorn
This patch adds a library for reading from 93cx6 eeproms. Signed-off-by: Michael Wu <flamingice@sourmilk.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-07-04Remove the blink driverLinus Torvalds
Yeah, we could have just disabled it, but there's work on a new one that isn't as fundamentally broken, so there really doesn't seem to be any point in keeping it around. The recent timer cleanup broke the only valid use, and when I say "valid", I obviously mean "totally broken". So it's not like it works, or really even can work in the current format that uses the unsafe "panic" LED blinking routines.. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-01blink driver power savingStephen Hemminger
The blink driver wakes up every jiffies which wastes power unnecessarily. Using a notifier gives same effect. Also add ability to unload module. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> [ We should really just delete the whole thing. The blink driver is broken in many other ways too -Linus ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-02Pull now into release branchLen Brown
2007-06-01misc/tifm_7xx1: replace deprecated irq flagJeff Garzik
Signed-off-by: Jeff Garzik <jeff@garzik.org> Cc: Alex Dubov <oakad@yahoo.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-31ACPI: thinkpad-acpi: do not use named sysfs groupsHenrique de Moraes Holschuh
The initial version of the thinkpad-acpi sysfs interface (not yet released in any stable mainline kernel) made liberal use of named sysfs groups, in order to get the attributes more organized. This proved to be a really bad design decision. Maybe if attribute groups were as flexible as a real directory, and if binary attributes were not second-class citizens, the idea of subdirs and named groups would not have been so bad. This patch makes all the thinkpad-acpi sysfs groups anonymous (thus removing the subdirs), adds the former group names as a prefix (so that hotkey/enable becomes hotkey_enable for example), and updates the documentation. These changes will make the thinkpad-acpi sysfs ABI a lot easier to maintain. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-05-23Misc: phantom, take care of pci postingJiri Slaby
phantom, take care of pci posting thanks to akpm for pointing this out Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-23phantom: move to unlocked_ioctlJiri Slaby
phantom's ioctl is often (4000 times a sec or so) invoked, don't acquire BKL and block other processes. Signed-off-by: Jiri Slaby <xslaby@phantom.fi.muni.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-10Pull misc-for-upstream into release branchLen Brown
2007-05-10acpi,msi-laptop: Fall back to EC polling mode for MSI laptop specific EC ↵Lennart Poettering
commands The ACPI EC that is used in MSI laptops knows some non-standard commands for changing the screen brighntess and a few other things, which are used by the msi-laptop.c driver. Unfortunately for these commands no GPE events for IBF and OBF are triggered. Since nowadays the EC code uses the ec_intr=1 mode by default, this causes these operations to timeout, although they don't fail. In result, all operations that you can do with the msi-laptop.c driver take more or less 1s to complete, which is awfully slow. In one of the more recent kernels (2.6.20?) the EC subsystem has been revamped. With that change the EC timeout has been increased. before that increase the MSI EC accesses were slow -- but not *that* slow, hence I took notice of this limitation of the MSI EC hardware only very recently. The standard EC operations on the MSI EC as defined in the ACPI spec support GPE events properly. The following patch adds a new argument "force_poll" to the ec_transaction() function (and friends). If set to 1, the function will poll for IBF/OBF even if ec_intr=1 is enabled. If set to 0 the current behaviour is used. The msi-laptop driver is modified to make use of this new flag, so that OBF/IBF is polled for the special MSI EC transactions -- but only for them. Signed-off-by: Lennart Poettering <mzxreary@0pointer.de> Acked-by: Alexey Starikovskiy <aystarik@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-05-10Pull misc-for-upstream into release branchLen Brown
2007-05-10sony-laptop: rename SONY_LAPTOP_OLD to a more meaningful SONYPI_COMPATMattia Dongili
Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Len Brown <len.brown@intel.com>
2007-05-10asus-laptop: version bump and lindentCorentin Chary
Version bump, lindent, etc .. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Len Brown <len.brown@intel.com>
2007-05-10asus-laptop: fix light sens initCorentin Chary
Fix a stupid light sens detection bug. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Len Brown <len.brown@intel.com>
2007-05-10asus-laptop: add GPS supportCorentin Chary
Just adds GPS support found in R2H thanks to Sam Lin. It will make a "gps" file in /sys/devices/platform/asus-laptop/. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Len Brown <len.brown@intel.com>
2007-05-10asus-laptop: notify ALL eventsCorentin Chary
We need to handle all events, because some dsdt use events >= 0x80 Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Len Brown <len.brown@intel.com>
2007-05-08disable socket power in adapter driver instead of media oneAlex Dubov
Socket power must be fully controlled by adapter driver. This also prevents unnecessary power-off of the socket when media driver is unloaded, yet media remains in the socket. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-08Misc: add sensable phantom driverJiri Slaby
Add sensable phantom driver Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08Add keyboard blink driverAndi Kleen
Simple driver that blinks the keyboard LEDs when loaded. Useful for checking that the kernel is still alive or for crashdumping Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-04Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc: (46 commits) mmc-omap: Clean up omap set_ios and make MMC_POWER_ON work mmc-omap: Fix omap to use MMC_POWER_ON mmc-omap: add missing '\n' mmc: make tifm_sd_set_dma_data() static mmc: remove old card states mmc: support unsafe resume of cards mmc: separate out reading EXT_CSD mmc: break apart switch function MMC: Fix handling of low-voltage cards MMC: Consolidate voltage definitions mmc: add bus handler wbsd: check for data opcode earlier mmc: Separate out protocol ops mmc: Move core functions to subdir mmc: deprecate mmc bus topology mmc: remove card upon suspend mmc: allow suspended block driver to be removed mmc: Flush pending detects on host removal mmc: Move host and card drivers to subdirs mmc: Move queue functions to mmc_block ...
2007-05-02PCI: Cleanup the includes of <linux/pci.h>Jean Delvare
I noticed that many source files include <linux/pci.h> while they do not appear to need it. Here is an attempt to clean it all up. In order to find all possibly affected files, I searched for all files including <linux/pci.h> but without any other occurence of "pci" or "PCI". I removed the include statement from all of these, then I compiled an allmodconfig kernel on both i386 and x86_64 and fixed the false positives manually. My tests covered 66% of the affected files, so there could be false positives remaining. Untested files are: arch/alpha/kernel/err_common.c arch/alpha/kernel/err_ev6.c arch/alpha/kernel/err_ev7.c arch/ia64/sn/kernel/huberror.c arch/ia64/sn/kernel/xpnet.c arch/m68knommu/kernel/dma.c arch/mips/lib/iomap.c arch/powerpc/platforms/pseries/ras.c arch/ppc/8260_io/enet.c arch/ppc/8260_io/fcc_enet.c arch/ppc/8xx_io/enet.c arch/ppc/syslib/ppc4xx_sgdma.c arch/sh64/mach-cayman/iomap.c arch/xtensa/kernel/xtensa_ksyms.c arch/xtensa/platform-iss/setup.c drivers/i2c/busses/i2c-at91.c drivers/i2c/busses/i2c-mpc.c drivers/media/video/saa711x.c drivers/misc/hdpuftrs/hdpu_cpustate.c drivers/misc/hdpuftrs/hdpu_nexus.c drivers/net/au1000_eth.c drivers/net/fec_8xx/fec_main.c drivers/net/fec_8xx/fec_mii.c drivers/net/fs_enet/fs_enet-main.c drivers/net/fs_enet/mac-fcc.c drivers/net/fs_enet/mac-fec.c drivers/net/fs_enet/mac-scc.c drivers/net/fs_enet/mii-bitbang.c drivers/net/fs_enet/mii-fec.c drivers/net/ibm_emac/ibm_emac_core.c drivers/net/lasi_82596.c drivers/parisc/hppb.c drivers/sbus/sbus.c drivers/video/g364fb.c drivers/video/platinumfb.c drivers/video/stifb.c drivers/video/valkyriefb.c include/asm-arm/arch-ixp4xx/dma.h sound/oss/au1550_ac97.c I would welcome test reports for these files. I am fine with removing the untested files from the patch if the general opinion is that these changes aren't safe. The tested part would still be nice to have. Note that this patch depends on another header fixup patch I submitted to LKML yesterday: [PATCH] scatterlist.h needs types.h http://lkml.org/lkml/2007/3/01/141 Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Badari Pulavarty <pbadari@us.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-01tifm: add missing include for DMA_32BIT_MASKAndrew Morton
sparc64: drivers/misc/tifm_7xx1.c: In function `tifm_7xx1_probe': drivers/misc/tifm_7xx1.c:294: error: `DMA_32BIT_MASK' undeclared Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-01tifm: layout fixes, small changes to comments and printfsAlex Dubov
Cosmetic changes to the code. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-01tifm: add sysfs attribute for tifm devicesAlex Dubov
A sysfs attribute reflecting current media type is added. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-01tifm_7xx1: fix adapter resume functionAlex Dubov
Fixes to the adapter resume function to correctly handle all possible cases: 1. Card is removed during suspend 2. Card is inserted during suspend into previously empty socket 3. Card is replaced during suspend by same or different media type card. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-01tifm: move common device management tasks from tifm_7xx1 to tifm_coreAlex Dubov
Some details of the device management (create, add, remove) are really belong to the tifm_core, as they are not hardware specific. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-01tifm: move common adapter management tasks from tifm_7xx1 to tifm_coreAlex Dubov
Some details of the adapter management (create, add, remove) are really belong to the tifm_core, as they are not hardware specific. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-01tifm_7xx1: improve card detection routineAlex Dubov
Remove unneeded conditions and change a sleeping regime a little in the card type detection routine. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-01tifm: replace per-adapter kthread with freezeable workqueueAlex Dubov
Freezeable workqueue makes sure that adapter work items (device insertions and removals) would be handled after the system is fully resumed. Previously this was achieved by explicit freezing of the kthread. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-01tifm: simplify bus match and uevent handlersAlex Dubov
Remove code duplicating the kernel functionality and clean up data structures involved in driver matching. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-01tifm: use bus methods to handle probe/remove instead of driver ones.Alex Dubov
Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-01tifm: hide details of interrupt processing from socket driversAlex Dubov
Instead of passing transformed value of adapter interrupt status to socket drivers, implement two separate callbacks - one for card events and another for dma events. Signed-off-by: Alex Dubov <oakad@yahoo.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-04-28Pull thinkpad into release branchLen Brown
Conflicts: drivers/misc/Kconfig Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28Pull sony into release branchLen Brown
2007-04-28sony-laptop: remove user visible camera controls as platform attributesmalattia@linux.it
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-28sony-laptop: add a meye-usable include file for camera opsmalattia@linux.it
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-28sony-laptop: complete the motion eye camera support in sony-laptopmalattia@linux.it
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-28sonypi: try to detect if sony-laptop has already taken one of the known ioportsmalattia@linux.it
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-28sony-laptop: add edge modem support (also called WWAN)malattia@linux.it
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-28sony-laptop: add locking on accesses to the ioport and global varsmalattia@linux.it
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-28sony-laptop: add camera enable/disable parameter, better handle possible ↵malattia@linux.it
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-28thinkpad-acpi: make drivers/misc/thinkpad_acpi:fan_mutex staticAdrian Bunk
This patch makes the needlessly global fan_mutex static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>