aboutsummaryrefslogtreecommitdiff
path: root/drivers/misc
AgeCommit message (Collapse)AuthorFilesLines
2013-05-01proc: Supply a function to remove a proc entry by PDEDavid Howells1-1/+1
Supply a function (proc_remove()) to remove a proc entry (and any subtree rooted there) by proc_dir_entry pointer rather than by name and (optionally) root dir entry pointer. This allows us to eliminate all remaining pde->name accesses outside of procfs. Signed-off-by: David Howells <[email protected]> Acked-by: Grant Likely <[email protected]> cc: [email protected] cc: [email protected] cc: [email protected] cc: [email protected] cc: [email protected] cc: [email protected] cc: [email protected] Signed-off-by: Al Viro <[email protected]>
2013-04-30Merge branch 'for-linus' of ↵Linus Torvalds7-25/+28
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull trivial tree updates from Jiri Kosina: "Usual stuff, mostly comment fixes, typo fixes, printk fixes and small code cleanups" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (45 commits) mm: Convert print_symbol to %pSR gfs2: Convert print_symbol to %pSR m32r: Convert print_symbol to %pSR iostats.txt: add easy-to-find description for field 6 x86 cmpxchg.h: fix wrong comment treewide: Fix typo in printk and comments doc: devicetree: Fix various typos docbook: fix 8250 naming in device-drivers pata_pdc2027x: Fix compiler warning treewide: Fix typo in printks mei: Fix comments in drivers/misc/mei treewide: Fix typos in kernel messages pm44xx: Fix comment for "CONFIG_CPU_IDLE" doc: Fix typo "CONFIG_CGROUP_CGROUP_MEMCG_SWAP" mmzone: correct "pags" to "pages" in comment. kernel-parameters: remove outdated 'noresidual' parameter Remove spurious _H suffixes from ifdef comments sound: Remove stray pluses from Kconfig file radio-shark: Fix printk "CONFIG_LED_CLASS" doc: put proper reference to CONFIG_MODULE_SIG_ENFORCE ...
2013-04-30Merge branch 'x86-paravirt-for-linus' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 paravirt update from Ingo Molnar: "Various paravirtualization related changes - the biggest one makes guest support optional via CONFIG_HYPERVISOR_GUEST" * 'x86-paravirt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86, wakeup, sleep: Use pvops functions for changing GDT entries x86, xen, gdt: Remove the pvops variant of store_gdt. x86-32, gdt: Store/load GDT for ACPI S3 or hibernation/resume path is not needed x86-64, gdt: Store/load GDT for ACPI S3 or hibernate/resume path is not needed. x86: Make Linux guest support optional x86, Kconfig: Move PARAVIRT_DEBUG into the paravirt menu
2013-04-29misc: generic on-chip SRAM allocation driverPhilipp Zabel3-0/+131
This driver requests and remaps a memory region as configured in the device tree. It serves memory from this region via the genalloc API. It optionally enables the SRAM clock. Other drivers can retrieve the genalloc pool from a phandle pointing to this drivers' device node in the device tree. The allocation granularity is hard-coded to 32 bytes for now, to make the SRAM driver useful for the 6502 remoteproc driver. There is overhead for bigger SRAMs, where only a much coarser allocation granularity is needed: At 32 bytes minimum allocation size, a 256 KiB SRAM needs a 1 KiB bitmap to track allocations. [[email protected]: fix Kconfig text, make sram_init static] Signed-off-by: Philipp Zabel <[email protected]> Reviewed-by: Shawn Guo <[email protected]> Acked-by: Grant Likely <[email protected]> Tested-by: Michal Simek <[email protected]> Cc: Dong Aisheng <[email protected]> Cc: Fabio Estevam <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Huang Shijie <[email protected]> Cc: Javier Martin <[email protected]> Cc: Matt Porter <[email protected]> Cc: Michal Simek <[email protected]> Cc: Paul Gortmaker <[email protected]> Cc: Rob Herring <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-04-29lis3lv02d: don't wank with fasync() on ->release()Al Viro1-1/+0
Signed-off-by: Al Viro <[email protected]>
2013-04-23misc: mark spear13xx-pcie-gadget as brokenArnd Bergmann1-1/+1
This driver was merged in 2.6.38 but never actually compiled because it depends on the <mach/pcie.h> header that has not made it into the kernel. Starting with Linux-3.10, this results in "allyesconfig" build errors, since spear13xx can now be enabled with the default "multiplatform" platform on ARM. Let's mark it as broken for now. If it doesn't get fixed, we can drop it completely. Cc: Pratyush Anand <[email protected]> Cc: Randy Dunlap <[email protected]> Cc: Jesse Barnes <[email protected]> Cc: Viresh Kumar <[email protected]> Cc: Shiraz Hashim <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-23mei: fix krealloc() misuse in in mei_cl_irq_read_msg()Wei Yongjun1-5/+5
If krealloc() returns NULL, it doesn't free the original. So any code of the form 'foo = krealloc(foo, ...);' is almost certainly a bug. Introduced by commit fcb136e1ac5774909e0d85189f721b8dfa800e0f(mei: fix reading large reposnes) Signed-off-by: Wei Yongjun <[email protected]> Acked-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-23mei: reduce flow control only for completed messagesTomas Winkler1-3/+4
This fixes bug when only first chunk of a large message split by hbuf_max_len is written to the hardware. All the consequent chunks will not get a new credit. A regression introduced by the commit 0ef319c93cebff9f82bdd0cdbb298f2dd00acda8 mei: streamline write complete flow function Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-19mei: reseting -> resettingBill Nottingham4-8/+8
This enum leaks out to userspace via error messages, so fix the spelling. Signed-off-by: Bill Nottingham <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-19mei: fix reading large reposnesTomas Winkler5-15/+27
While writting to device is limitted to max_msg_length advertized in client properites the read can be much longer delivered consequiting chunks. We use krealloc to enlarge the buffer when needed. Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-19mei: revamp mei_irq_read_client_message functionTomas Winkler1-58/+66
1. Rename the function and change parameters order, so that first parameter is mei_device 2. Simplify the function code flow 3. Rename helper functions to more self descriptive names 4. Use helpers common functions where possible Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-19mei: revamp mei_amthif_irq_read_messageTomas Winkler3-6/+15
Rename the function to mei_amthif_irq_read_msg and change parameters order Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-19mei: revamp hbm state machineTomas Winkler7-59/+72
1. Rename init_clients_state to hbm_state and use MEI_HBM_ prefix for HBM states 2. Remove recvd_msg and use hbm state for synchronizing hbm protocol has successful start. We can wake up the hbm event from start response handler and remove the hack from the interrupt thread 3. mei_hbm_start_wait function encapsulate start completion waiting Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-15mei: wd: fix line over 80 charactersTomas Winkler1-1/+2
Fix checkpatch warning: WARNING: line over 80 characters Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-11misc: tsl2550: Use dev_pm_opsLars-Peter Clausen1-10/+11
Use dev_pm_ops instead of the deprecated legacy suspend/resume callbacks. Signed-off-by: Lars-Peter Clausen <[email protected]> Cc: Rodolfo Giometti <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-11misc: isl29003: Use dev_pm_opsLars-Peter Clausen1-8/+11
Use dev_pm_ops instead of the deprecated legacy suspend/resume callbacks. Signed-off-by: Lars-Peter Clausen <[email protected]> Cc: Daniel Mack <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-11misc: fsa8480: Use dev_pm_opsLars-Peter Clausen1-8/+11
Use dev_pm_ops instead of the deprecated legacy suspend/resume callbacks. Signed-off-by: Lars-Peter Clausen <[email protected]> Cc: Donggeun Kim <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-11misc: apds9802als: Fix suspend/resumeLars-Peter Clausen1-21/+4
The apds9802als driver implements runtime pm and at the same time uses the legacy pm callbacks for suspend and resume. This does not work since the i2c core wont look at the legacy pm callbacks if a driver has the 'pm' field set. This patch fixes it by moving over to dev_pm_ops for suspend/resume as well. Since both runtime pm and suspend/resume behave the same way this can easily be done using the UNIVERSAL_DEV_PM_OPS macro. Signed-off-by: Lars-Peter Clausen <[email protected]> Cc: Hong Liu <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-11mei: convert to use simple_open()Wei Yongjun1-8/+2
This removes an open coded simple_open() function and replaces file operations references to the function with simple_open() instead. Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-10mei: nfc: Implement MEI bus opsSamuel Ortiz1-1/+169
The send ops for NFC builds the command header, updates the request id and then waits for an ACK. The recv ops check if it receives data or an ACK and in the latter case wakes the send ops up. The enable ops sends the NFC HECI connect command. Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-10mei: nfc: Add NFC device to the MEI busSamuel Ortiz1-0/+75
After building its bus name as a string based on its vendor id and radio type, we can add it to the bus. Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-10mei: nfc: Initial nfc implementationSamuel Ortiz5-0/+327
NFC ME device is exported through the MEI bus to be consumed by the NFC subsystem. NFC is represented by two mei clients: An info one and the actual NFC one. In order to properly build the ME id we first need to retrieve the firmware information from the info client and then disconnect from it. Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-08mei: bus: Add device enabling and disabling APISamuel Ortiz2-12/+115
It should be left to the drivers to enable and disable the device on the MEI bus when e.g getting probed. For drivers to be able to safely call the enable and disable hooks, the mei_cl_ops must be set before it's probed and thus this should happen before registering the device on the MEI bus. Hence the mei_cl_add_device() prototype change. Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-08mei: notify about the reset in error levelTomas Winkler2-15/+12
Display errors causing device reset using dev_err and not dev_dbg also change messages text to something more concise Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-08mei: add mei_cl_write functionTomas Winkler5-158/+146
consolidate write code to a specific me client in mei_cl_write function the function is called from mei device write handler and from mei_cl bus send function Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-05mei: add debugfs hooksTomas Winkler5-8/+185
debugfs exposes device state and list of me clients and their properties Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-05misc: lattice-ecp3-config: use spi_get_drvdata()Jingoo Han1-1/+1
Use the wrapper functions for getting and setting the driver data using spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we can directly pass a struct spi_device. Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-05misc: eeprom_93xx46: use spi_get_drvdata() and spi_set_drvdata()Jingoo Han1-3/+3
Use the wrapper functions for getting and setting the driver data using spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we can directly pass a struct spi_device. Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-05misc: at25: use spi_get_drvdata() and spi_set_drvdata()Jingoo Han1-2/+2
Use the wrapper functions for getting and setting the driver data using spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we can directly pass a struct spi_device. Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-05mei: Fix comments in drivers/misc/meiMasanari Iida7-26/+29
Correct typos and fix stray comments. Signed-off-by: Masanari Iida <[email protected]> Acked-by: Winkler, Tomas <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2013-04-03cs5535-mfgpt: Fix quotation marksRichard Weinberger1-2/+2
Commit "cs5535-mfgpt: Add another reset method" introduced an unterminated string and broke the build. Reported-by: Stephen Rothwell <[email protected]> Reported-by: kbuild test robot <[email protected]> Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-01cs5535-mfgpt: Add another reset methodRichard Weinberger1-4/+37
The CS5535/CS5536 MFGPT has no support to reset the device. The current method uses an undocumented bit but does not work on all devices. At least on my ALIX board it completely freezes the board. This new method tries to soft reset all timers by unconfiguring them. But this does not clear the RO setup register and therefore it has to be ignored while probing. Resetting the timers is not only needed on broken BIOSes also when kexec is used. Otherwise the new kernel will find preconfigured timers and odd things will happen. Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-29misc: apds990x: add CONFIG_PM_SLEEP to suspend/resume functionsJingoo Han1-5/+1
Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following build warning when CONFIG_PM_SLEEP is not selected. This is because sleep PM callbacks defined by SET_SYSTEM_SLEEP_PM_OPS are only used when the CONFIG_PM_SLEEP is enabled. drivers/misc/apds990x.c:1205:12: warning: 'apds990x_suspend' defined but not used [-Wunused-function] drivers/misc/apds990x.c:1214:12: warning: 'apds990x_resume' defined but not used [-Wunused-function] Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-29misc: bh1770glc: add CONFIG_PM_SLEEP to suspend/resume functionsJingoo Han1-6/+1
Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following build warning when CONFIG_PM_SLEEP is not selected. This is because sleep PM callbacks defined by SET_SYSTEM_SLEEP_PM_OPS are only used when the CONFIG_PM_SLEEP is enabled. drivers/misc/bh1770glc.c:1314:12: warning: 'bh1770_suspend' defined but not used [-Wunused-function] drivers/misc/bh1770glc.c:1324:12: warning: 'bh1770_resume' defined but not used [-Wunused-function] Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-29misc: bh1780gli: add CONFIG_PM_SLEEP to suspend/resume functionsJingoo Han1-6/+4
Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following build warning when CONFIG_PM_SLEEP is not selected. This is because sleep PM callbacks defined by SIMPLE_DEV_PM_OPS are only used when the CONFIG_PM_SLEEP is enabled. drivers/misc/bh1780gli.c:200:12: warning: 'bh1780_suspend' defined but not used [-Wunused-function] drivers/misc/bh1780gli.c:222:12: warning: 'bh1780_resume' defined but not used [-Wunused-function] Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-29mei: bus: Implement bus driver data setter/getterSamuel Ortiz1-0/+12
MEI drivers should be able to carry their private data around. Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-29mei: bus: Synchronous API for the data transmissionSamuel Ortiz2-10/+30
Define a truly synchronous API for the bus Tx path by putting all pending request to the write list and wait for the interrupt tx handler to wake us up. The ___mei_cl_send() out path is also slightly reworked to make it look more like main.c:mei_write(). Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-29mei: bus: Call bus routines from the core codeSamuel Ortiz5-2/+42
Register the MEI bus type against the kernel core bus APIs and call the bus Rx handler from interrupt.c Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-29mei: bus: Add bus related structures to mei_clSamuel Ortiz4-15/+44
We keep track of all MEI devices on the bus through a specific linked list. We also have a mei_device instance in the mei_cl structure. Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-29mei: bus: Initial implementation for I/O routinesSamuel Ortiz2-0/+256
Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-29mei: bus: Implement driver registrationSamuel Ortiz1-0/+26
Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-29mei: bus: Initial MEI Client bus type implementationSamuel Ortiz3-0/+199
mei client bus will present some of the mei clients as devices for other standard subsystems Implement the probe, remove, match, device addtion routines, along with the sysfs and uevent ones. mei_cl_device_id is also added to mod_devicetable.h A mei-cleint-bus.txt document describing the rationale and the API usage is also added while ABI/testing/sysfs-bus-mei describeis the modalias ABI. Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-29mei: move mei-me to separate moduleTomas Winkler5-7/+19
mei layer provides host bus message layer, client management, and os interface mei-me - provides access to ME hardware through the pci bus Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-29mei: prefix me hardware specific functions with mei_me_Tomas Winkler2-36/+36
Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-29mei: rename function mei_hw_init to mei_startTomas Winkler3-4/+4
The hw initialization is now done as part of hw specific code this makes the name mei_hw_init little misleading. We rename it to mei_start in spirit of already existing functions mei_stop and mei_reset. Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-29mei: ME structures should be initialized in mei_device_initTomas Winkler2-8/+9
mei_timer and mei_host_client_init belongs to mei framework and are not ME hw specific. AMTHIF and WD are available only for ME but are above the hardware layer so move the initialization back from mei_me_dev_init to mei_device_init. Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-29mei: unregister watchdog from mei_stop functionTomas Winkler2-2/+3
we need to unregister watchdog device both in suspend and remove as the registration is recreated on reset Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-29mei: drop RECOVERING_FROM_RESET device stateTomas Winkler2-5/+0
ECOVERING_FROM_RESET device state is never set we can remove it Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-26Merge branch 'char-misc-linus' into char-misc-nextGreg Kroah-Hartman5-55/+49
This picks up the MEI fixes that we need in this branch now. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-25dummy-irq: introduce a dummy IRQ handler driverJiri Kosina3-0/+68
This module accepts a single 'irq' parameter, which it should register for. Its sole purpose is to help with debugging of IRQ sharing problems, by force-enabling IRQ that would otherwise be disabled. Suggested-by: Alan Stern <[email protected]> Signed-off-by: Jiri Kosina <[email protected]> Acked-by: Daniel Vetter <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>