summaryrefslogtreecommitdiff
path: root/drivers/staging
AgeCommit message (Collapse)Author
2014-01-22Check null pointers for sysfs callsStefan Agner
When grepping through sysfs, grep tries to read all sysfs files which are available. Some of them lead to error due to null pointers. Therefor check for null pointers before using them.
2013-12-09iio: adc: add STMPE ADC driver using IIO frameworkStefan Agner
This adds an ADC driver for the STMPE device using the industrial input/output interface. The driver supports raw reading of values. The driver depends on the MFD stmpe driver. If the touchscreen block is enabled too, only for of the 8 ADC channels are available.
2013-01-31staging: iio: light: isl29028: appropriately set interrupt flagPreetham Chandru R
set is_int_enable to true only if we register for a irq. Bug 1211260 Change-Id: I603efe721796db70d504da7999e5d7939d45d13a Signed-off-by: Preetham Chandru R <pchandru@nvidia.com> Reviewed-on: http://git-master/r/193047 (cherry picked from commit 8b89b2b64c67d80fcfc29cd4f6a92d4527e70df9) Reviewed-on: http://git-master/r/195844 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Winnie Hsu <whsu@nvidia.com> Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
2012-08-03staging: nvec: get rid of tegra_gpio_enable()Laxman Dewangan
The gpio mode of pin is configured when setting direction and hence this call is no more required. Change-Id: I7107ea81a69d035b966c6fb8cebe4944edad6098 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/120850 Reviewed-by: Automatic_Commit_Validation_User
2012-07-24android: logger: Allow a UID to read it's own log entriesNick Kralevich
Modify the kernel logger to record the UID associated with the log entries. Always allow the same UID which generated a log message to read the log message. Allow anyone in the logs group, or anyone with CAP_SYSLOG, to read all log entries. In addition, allow the client to upgrade log formats, so they can get additional information from the kernel. (cherry picked from android common tree commit d993be54c164ea473816f04745ae4f0504dbccfb) NV Bug 1019928 Change-Id: Ie48fb614b43c9302a07ad2673b78dd8749b492b6 Signed-off-by: Nick Kralevich <nnk@google.com> Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com> Reviewed-on: http://git-master/r/117175 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2012-07-17drivers: brcmfmac: update to stable versionRhyland Klein
Update the driver to the stable version. Based on 33252fe66aa42cc1c217b9fd632b5df6c77932c6 from branch: dev/amartin/chromeos-3.0-t30 Change-Id: I53db887749b8781d90667a07de71abbea390ac5c Signed-off-by: Rhyland Klein <rklein@nvidia.com> Reviewed-on: http://git-master/r/111334 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Narayan Reddy <narayanr@nvidia.com> Reviewed-by: Wei Ni <wni@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2012-06-18iio: light: fix error handling for LTR558Shridhar Rasal
Change-Id: I34748241728bb0bab1861f8abacffdfe2939740f Signed-off-by: Shridhar Rasal <srasal@nvidia.com> Reviewed-on: http://git-master/r/109158 Reviewed-by: Sachin Nikam <snikam@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User
2012-03-13iio: light: ALS driver for LTR558Sachin Nikam
Adding driver for Ambient Light and Proximity sensor from Lite On Technology. This driver has sysfs interface to get the als and proximity values and enable/disable als and proximity. Bug 901133 Change-Id: Iafa0346d74825a67d94143181922de7a16cc7718 Signed-off-by: Sachin Nikam <snikam@nvidia.com> Reviewed-on: http://git-master/r/83837 Reviewed-by: Darrell Hunt <dhunt@nvidia.com>
2012-03-09staging: iio: magnetometer: ak8975: Retrieve the correct i2c client dataPreetham Chandru
i2c_get_clientdata() returns an object of type struct indio_dev and not of type struct ak8975_data. Bug 946328 Signed-off-by: Preetham Chandru R <pchandru@nvidia.com> Change-Id: I5803306d6a7829cdf822d22f51fdcdb769fbea1d Reviewed-on: http://git-master/r/88329 Reviewed-by: Mursalin Akon <makon@nvidia.com> Reviewed-by: Shashank Sharma <shashanks@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2012-02-18staging:iio:magnetometer:ak8975: Fix probe() error-handlingStephen Warren
Fix ak8975_probe() to jump to the appropriate exit labels when an error occurs. With the previous code, some cleanup actions were being skipped for some error conditions. Upstream v3.2 commit ad31d250bf60c8e4c990e8b0daeedbaa2d6884a9 Change-Id: Ib0ef38f154fbcf18604ad283f51f040b5e038c65 Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Andrew Chew <achew@nvidia.com> Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com> Reviewed-on: http://git-master/r/83532 Reviewed-by: Andrew Chew <achew@nvidia.com> Reviewed-by: Allen Martin <amartin@nvidia.com>
2012-02-18staging:iio:magnetometer:ak8975: Don't assume 0 is an invalid GPIOStephen Warren
gpio_is_valid() is the defined mechanism to determine whether a GPIO is valid. Use this instead of assuming that 0 is an invalid GPIO. Upstream v3.2 commit 7c6c936832a46e86b0fac654923ce5015bdc80ee Change-Id: Ica81b9fa8379db07ca7d23a6c43c6ab742ef09b6 Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Andrew Chew <achew@nvidia.com> Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com> Reviewed-on: http://git-master/r/83531 Reviewed-by: Andrew Chew <achew@nvidia.com> Reviewed-by: Allen Martin <amartin@nvidia.com>
2012-02-18staging:iio:magnetometer:ak8975 use platform_data to pass the gpio number.Jonathan Cameron
Tegra doesn't have irq_to_gpio() any more, and ak8975 is included in tegra_defconfig. This causes a build failure. Instead, pass the GPIO name through platform data. [swarren: Rewrote commit description when I squashed this with my patch to remove the irq_to_gpio() call] Upstream v3.2 commit f6d838d7fecfd4e59a4ce7bdfb16165add36d26e Change-Id: I6bd269aa8c0ff8165078ff67e4cbcfdde936c20d Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com> Reviewed-on: http://git-master/r/83530 Reviewed-by: Andrew Chew <achew@nvidia.com> Reviewed-by: Allen Martin <amartin@nvidia.com>
2012-01-19ram_console: set CON_ANYTIME console flagVarun Wadekar
We want to ensure that we get all the console messages, even ones that occur while the printing CPU is not yet online. cherry-pick a65e28a0149261776678977962cfa0f90973e1d4 from https://android.googlesource.com/kernel/common.git Change-Id: I8b83014a95fade7200e5201c29fb6624e1140aaf Signed-off-by: Dima Zavin <dima@android.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/75460 Reviewed-by: Automatic_Commit_Validation_User
2012-01-05Linux 3.1.7Varun Wadekar
Change-Id: I99507d7cfdcee064f808856dc2ce99d806fd864f
2011-12-22staging: iio: magnetometer: ak8975: set I2c client dataPreetham Chandru
Set i2c client data before we call ak8975_setup() in the probe function because ak8975_setup() is making a call to ak8975_write_data() which in turn calls i2c_get_clientdata(). If this is not done then i2c_get_clientdata() returns NULL pointer. Bug: 918820 Signed-off-by: Preetham Chandru <pchandru@nvidia.com> Change-Id: I36316fb508d196a32b26853c377921175f94dde6 Reviewed-on: http://git-master/r/71775 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Sachin Nikam <snikam@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2011-12-21staging: r8712u: Add new USB IDLarry Finger
commit c7caf4d4c56aee40b995f5858ccf1c814f3d2da2 upstream. Add USB ID for Sitecom WLA-2000 v1.001 WLAN. Reported-and-tested-by: Roland Gruber <post@rolandgruber.de> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-14Merge branch 'linux-3.1.5' into android-tegra-nv-3.1Varun Wadekar
Conflicts: arch/arm/Kconfig Change-Id: If8aaaf3efcbbf6c9017b38efb6d76ef933f147fa Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2011-12-09Staging: comedi: fix signal handling in read and writeFederico Vaga
commit 6a9ce6b654e491981f6ef7e214cbd4f63e033848 upstream. After sleeping on a wait queue, signal_pending(current) should be checked (not before sleeping). Acked-by: Alessandro Rubini <rubini@gnudd.com> Signed-off-by: Federico Vaga <federico.vaga@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-09Staging: comedi: fix mmap_countFederico Vaga
commit df30b21cb0eed5ba8a8e0cdfeebc66ba8cde821d upstream. In comedi_fops, mmap_count is decremented at comedi_vm_ops->close but it is not incremented at comedi_vm_ops->open. This may result in a negative counter. The patch introduces the open method to keep the counter consistent. The bug was triggerd by this sample code: mmap(0, ...., comedi_fd); fork(); exit(0); Acked-by: Alessandro Rubini <rubini@gnudd.com> Signed-off-by: Federico Vaga <federico.vaga@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-09staging: comedi: fix oops for USB DAQ devices.Bernd Porr
commit 3ffab428f40849ed5f21bcfd7285bdef7902f9ca upstream. This fixes kernel oops when an USB DAQ device is plugged out while it's communicating with the userspace software. Signed-off-by: Bernd Porr <berndporr@f2s.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-09staging: usbip: bugfix for deadlockBart Westgeest
commit 438957f8d4a84daa7fa5be6978ad5897a2e9e5e5 upstream. Interrupts must be disabled prior to calling usb_hcd_unlink_urb_from_ep. If interrupts are not disabled, it can potentially lead to a deadlock. The deadlock is readily reproduceable on a slower (ARM based) device such as the TI Pandaboard. Signed-off-by: Bart Westgeest <bart@elbrys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-09staging:rts_pstor:Complete scanning_done variablewwang
commit f7364ba04b0961f3a1f978bbe77102606801e35f upstream. Complete scanning_done variable if rtsx-scan thread created failed. Signed-off-by: wwang <wei_wang@realsil.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-303.0: update isl29028 with iio changesDan Willemsen
Rebase-Id: R5de165b205927a47ac2d3e1c8cfa916105682e0d
2011-11-30Merge branch 'korg-android-tegra-3.1' into after-upstream-androidDan Willemsen
Conflicts: arch/arm/mach-tegra/Kconfig arch/arm/mach-tegra/board-ventana.c drivers/misc/Kconfig drivers/video/tegra/dc/hdmi.c Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
2011-11-30gcov-kernel: Add GCOV_KERNEL := y to MakefilesJuha Tukkinen
These changes have no effect if CONFIG_GCOV_KERNEL is not set in defconfig. It is easier to trigger GCOV for kernel if this patch is in by only setting the before mentioned flag. Change-Id: I8aade309da2da62c4b3889bd84e4123ba8f182da Signed-off-by: Juha Tukkinen <jtukkinen@nvidia.com> Reviewed-on: http://git-master/r/62999 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Rebase-Id: R4c238f707f1db600f188ae83426336753992b7be
2011-11-30isl29028: Convert als data to lux unitsKrishna Yarlagadda
Convert als data units from count to lux before reporting Bug 876339 Change-Id: Ie08b38bc1f4dbd22103cdf921435c5cf1fd21ded Reviewed-on: http://git-master/r/39501 (cherry picked from commit 85f6bcb9497b52a1f1b58e6d30ac0387fbfdeaee) Reviewed-on: http://git-master/r/52862 Tested-by: Sachin Nikam <snikam@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: Joseph Lehrer <jlehrer@nvidia.com> Tested-by: Joseph Lehrer <jlehrer@nvidia.com> Rebase-Id: Re0d20d362e55df910caf15b3873e7743dbee132d
2011-11-30iio:isl29028: Adding driver for ISL29028Laxman Dewangan
Adding the complete driver for the ISL29028 to get the proximity, ALS and IR sensing. The reading of these data is provided through sysfs interface. Bug 876339 Original-Change-Id: I25661d0ef54e1053ccf47a716c89607ca51a9862 Reviewed-on: http://git-master/r/23155 Change-Id: I14114e30937fb2e5d308b77a76f2c6f634bf907c (cherry picked from commit b441479716b41ac91cc398c803692e5eb005a704) Reviewed-on: http://git-master/r/52594 Tested-by: Sachin Nikam <snikam@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: Joseph Lehrer <jlehrer@nvidia.com> Tested-by: Joseph Lehrer <jlehrer@nvidia.com> Rebase-Id: Re9322c535586f4190c8bd24c2135b0487bef8083
2011-11-30ram_console: pass in a boot info stringColin Cross
Allow the board file to pass a boot info string through the platform data that is appended to the /proc/last_kmsg file. Change-Id: I37065fafb09676085465c93384d8e176fdd942d6 Signed-off-by: Colin Cross <ccross@android.com>
2011-11-30android: logger: bump up the logger buffer sizesJP Abgrall
(port from common android-2.6.39 commit: 11430f16545205c614dd5bd58e4a7ee630fc0f9f) events: (no change, 256) main: 64 -> 256 radio: 64 -> 256 system: 64 -> 256 Change-Id: I42c0d4cc9fa89735d2f05010236070e1e4737ffc Signed-off-by: JP Abgrall <jpa@google.com>
2011-11-30android: lowmemorykiller: Fix arguments to lowmem_shrinkColin Cross
The arguments to shrink functions have changed, update lowmem_shrink to match. Change-Id: I48f436e0509c416dc0b18db500234f7b1d6d42e1 Signed-off-by: Colin Cross <ccross@android.com>
2011-11-30staging: android: lowmemorykiller: Ignore shmem pages in page-cacheArve Hjønnevåg
Change-Id: Ia54fc50b7dcabfeb71eb487c652803f83e2f3d8e Signed-off-by: Arve Hjønnevåg <arve@android.com>
2011-11-30staging: android: lowmemorykiller: Don't wait more than one second for a ↵Arve Hjønnevåg
process to die If a process forked and the child process was killed by the lowmemorykiller, the lowmemory killer would be disabled until the parent process reaped the child or it died itself. Change-Id: I709b1a4e1b1a1970e51d26a39fcbee57977bbc7f Signed-off-by: Arve Hjønnevåg <arve@android.com>
2011-11-30lowmemorykiller: don't unregister notifier from atomic contextRabin Vincent
The lowmemorykiller registers an atomic notifier for notfication of when the task is freed. From this atomic notifier callback, it removes the atomic notifier via task_free_unregister(). This is incorrect because atomic_notifier_chain_unregister() calls syncronize_rcu(), which can sleep, which shouldn't be done from an atomic notifier. Fix this by registering the notifier during init, and only unregister it if the lowmemorykiller is unloaded. Change-Id: I1577b04e617bc2b2e39dcb490fcfc9ce660eb7ec Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Christian Bejram <christian.bejram@stericsson.com>
2011-11-30staging: remove Greg's TODO, now obsolete.Brian Swetland
Signed-off-by: Brian Swetland <swetland@google.com>
2011-11-30lowmemorykiller: Update arguments of shrinker for 2.6.35Colin Cross
Change-Id: I6bb09b36639527f91c48704118acad5e50c4163f Signed-off-by: Colin Cross <ccross@google.com>
2011-11-30staging: android: lowmemorykiller: Remove bitrotted codepathSan Mehat
Now that we're murder-synchronous, this code path will never be called (and if it does, it doesn't tell us anything useful other than we killed a task that was already being killed by somebody else but hadn't gotten its' signal yet) Signed-off-by: San Mehat <san@google.com>
2011-11-30staging: android: lowmemorykiller: Fix task_struct leakSan Mehat
As it turns out, the CONFIG_PROFILING interfaces leak a task struct if the notifier chain returns NOTIFY_OK.. doh. This patch reworks lowmemkiller to use the new generic task free notifier chain. Signed-off-by: San Mehat <san@google.com>
2011-11-30binder: Fix memory corruption via page aliasingChristopher Lais
binder_deferred_release was not unmapping the page from the buffer before freeing it, causing memory corruption. This only happened when page(s) had not been freed by binder_update_page_range, which properly unmaps the pages. This only happens on architectures with VIPT aliasing. To reproduce, create a program which opens, mmaps, munmaps, then closes the binder very quickly. This should leave a page allocated when the binder is released. When binder_deferrred_release is called on the close, the page will remain mapped to the address in the linear proc->buffer. Later, we may map the same physical page to a different virtual address that has different coloring, and this may cause aliasing to occur. PAGE_POISONING will greatly increase your chances of noticing any problems. Change-Id: I6941bf212881b8bf846bdfda43d3609c7ae4892e Signed-off-by: Christopher Lais <chris+android@zenthought.org>
2011-11-30staging: android: lowmemkiller: Substantially reduce overhead during reclaimSan Mehat
This patch optimizes lowmemkiller to not do any work when it has an outstanding kill-request. This greatly reduces the pressure on the task_list lock (improving interactivity), as well as improving the vmscan performance when under heavy memory pressure (by up to 20x in tests). Note: For this enhancement to work, you need CONFIG_PROFILING Signed-off-by: San Mehat <san@google.com>
2011-11-30lowmemorykiller: Don't try to kill the same pid over and overSan Mehat
Under certain circumstances, a process can take awhile to handle a sig-kill (especially if it's in a scheduler group with a very low share ratio). When this occurs, lowmemkiller returns to vmscan indicating the process memory has been freed - even though the process is still waiting to die. Since the memory hasn't actually freed, lowmemkiller is called again shortly after, and picks the same process to die; regardless of the fact that it has already been 'scheduled' to die and the memory has already been reported to vmscan as having been freed. Solution is to check fatal_signal_pending() on the selected task, and if it's already pending destruction return; indicating to vmscan that no resources were freed on this pass. Signed-off-by: San Mehat <san@google.com>
2011-11-30Staging: android: binder: Create dedicated workqueue for binder deferred workArve Hjønnevåg
Some drivers flush the global workqueue when closed. This would deadlock if the last reference to the file was released from the binder. Change-Id: Ifdabc0b383fecb20836d1bbb9786c632402a14e1 Signed-off-by: Arve Hjønnevåg <arve@android.com>
2011-11-30Staging: android: timed_gpio: Properly discard invalid timeout values.Mike Lockwood
The timed output device never previously checked the return value of sscanf, resulting in an uninitialized int being passed to enable() if input value was invalid. Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-11-30android-common: include linux/slab.hArve Hjønnevåg
Change-Id: Ib9655177bfaf00bd5682e1ac0d7e813e16a47eea
2011-11-30android-common: Fix slab.h includes for 2.6.34-rc4Colin Cross
2011-11-30binder: Move debugging information from procfs to debugfsArve Hjønnevåg
Change-Id: Ia0f9c8cec68054c6600a799ef864ebf1185c93ab Signed-off-by: Arve Hjønnevåg <arve@android.com>
2011-11-30binder: Use seq_file for debug interface.Arve Hjønnevåg
Change-Id: I6e9c064ba024329099cb833b2ae9ab43c2ad8c6d Signed-off-by: Arve Hjønnevåg <arve@android.com>
2011-11-30android: logger: Add new system log for framework/system log messagesSan Mehat
Signed-off-by: San Mehat <san@google.com>
2011-11-30Staging: android: timed_gpio: Request gpios.Arve Hjønnevåg
Change-Id: I9e98250a04e5505ce2db2edd355e8fdf8391cabd Signed-off-by: Arve Hjønnevåg <arve@android.com>
2011-11-30Staging: android: ram_console: Start ram console earlierArve Hjønnevåg
Change-Id: I15d809d8c3002e5bf397a2b154e3803ea0e73642 Signed-off-by: Arve Hjønnevåg <arve@android.com>
2011-11-30ramconsole/apanic: Ensure ramconsole does not get cluttered by apanic threadsSan Mehat
Signed-off-by: San Mehat <san@google.com>