summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2015-03-09iio: accel: mma9551: Check gpiod_to_irq return valueRoberta Dobrescu
The return value of gpiod_to_irq should be checked before giving it to devm_request_threaded_irq in order to not pass an error code in case it fails. Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com> Reviewed-by: Vlad Dogaru <vlad.dogaru@intel.com> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-03-08iio: light: Added PM support for Capella CM3232 ambient light sensor driver.Kevin Tsai
Added Power Management Support. Signed-off-by: Kevin Tsai <ktsai@capellamicro.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-03-08Staging: iio: meter: ade7854-i2c: code style improvementsTolga Ceylan
Code reformatting based on checkpatch.pl with --strict: Comparison to NULL rewritten as !indio_dev Signed-off-by: Tolga Ceylan <tolga.ceylan@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-03-08Staging: iio: meter: ade7854-i2c: code style improvementsTolga Ceylan
Code reformatting based on checkpatch.pl with --strict: Alignment should match open paranthesis cases corrected Signed-off-by: Tolga Ceylan <tolga.ceylan@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-03-07iio:adc: Fix typo in MODULE_DESCRIPTION in ad7793.cMasanari Iida
This patch fix spelling typo in MODULE_DESCRIPTION Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-02-25iio: imu: inv_mpu6050: Create mux clients for ACPISrinivas Pandruvada
This is a follow up patches after adding i2c mux adapter for bypass mode. Potentially many different types of sensor can be attached to INVMPU6XXX device, which can be connected to main cpu i2c bus in bypass mode. Why do we need this? The system ACPI table entry will consist of only one device for INV6XXX, assuming that this driver will handle all connected sensors. That is not true for the Linux driver. There are bunch of IIO drivers for each sensors, hence we created a mux on this device. So to load these additional drivers, we need to create i2c devices for them in this driver using this mux adapter. There are multiple options: 1. Use the auto detect feature, this needs a new i2c class for the adapter as the existing HWMON class is not acceptable. Also the autodetect has overhead of executing detect method for each matching class of adapters. This is a simple implementation. This option was previously submitted with not a happy feedback. 2. Option is use ACPI magic and parse the configuration data. What we need to create a i2c device at a minimum is address and a name. Address can be obtained for secondary device in more or less in a standard way from using _CRS element. But there is no name. To get name we need to process proprietary vendor data. Not having name is not fun, as you have to create device using the device name of INVN6XXXX, respecting driver duplicate name space restriction. Also each client driver needs to have this name in the id table. Since multiple driver can be loaded, the driver should be able to detect its presence and gracefully exit for the other client driver to take it over. So we use two step process: - Use DMI to id platform and parse propritery data. This is not uncommon for many x86 platform specific driver. We will get both name and address. The change created necessary infrastructure to add more properitery vendor data parsing. - If DMI match fails, then create device on INV6XXX-client (we can't create with same name as INV6XXX as it will cause duplicate name and driver model will reject.) With this each client sensor driver which needs to get attached via INV6XXXX, need this name in the id table and detect the physical presence of sensor in probe and exit if not found. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-02-25iio: jsa1212: Constify struct regmap_configKrzysztof Kozlowski
The regmap_config struct may be const because it is not modified by the driver and regmap_init() accepts pointer to const. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-02-25staging:iio:hmc5843: Constify register tables and struct regmap_configKrzysztof Kozlowski
The regmap_access_table and regmap_config structures may be const because they are not modified by the driver and regmap_init() accepts pointer to const. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-02-22iio: improve usage of gpiod APIUwe Kleine-König
Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions) which appeared in v3.17-rc1, the gpiod_get* functions take an additional parameter that allows to specify direction and initial value for outputs. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Reviewed-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-02-21staging: iio: trigger: iio-trig-periodic-rtc: Change frequency type to ↵Rickard Strandqvist
unsigned int Change struct iio_prtc_trigger_info frequency type from int to unsigned int. Since it is always treated as such in the driver so they type should probably reflect this. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-02-14iio: gp2ap020a00f: Use put_unaligned_le32Vaishali Thakkar
This patch introduces the use of function put_unaligned_le32. This is done using Coccinelle and semantic patch used is as follows: @@ identifier tmp; expression ptr; expression y,e; type T; @@ - tmp = cpu_to_le32(y); <+... when != tmp - memcpy(ptr, (T)&tmp, ...); + put_unaligned_le32(y,ptr); ...+> ? tmp = e @@ type T; identifier tmp; @@ - T tmp; ...when != tmp Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-02-08staging: iio: adc: mxs-lradc: Change type in printf format stringRickard Strandqvist
Wrong type in printf format string, requires 'int' but the argument type is 'unsigned int' This was found using a static code analysis program called cppcheck Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Reviewed-by: Marek Vasut <marex@denx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-02-08staging: iio: resolver: ad2s1210: Change type in printf format stringRickard Strandqvist
Wrong type in printf format string, requires 'int' but the argument type is 'unsigned int' This was found using a static code analysis program called cppcheck Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-02-08Staging:iio:ade7854 Coding style correctionTolga Ceylan
Line over 80 characters corrected Signed-off-by: Tolga Ceylan <tolga.ceylan@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-02-08Staging:iio:hmc5843:Coding Style CorrectionTolga Ceylan
Indentation corrections in struct initializations and one line over 80 characters split into two lines Signed-off-by: Tolga Ceylan <tolga.ceylan@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-02-08iio: bmc150: exit early if event / trigger state is not changedOctavian Purdila
Previous of this patch the check was only done if we enabled the event and it was already enabled. We can do the same if the event is disabled and we want to disable it. The patch also adds the same check on the trigger code. Signed-off-by: Octavian Purdila <octavian.purdila@intel.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-02-08iio: bmc150: refactor interrupt enablingOctavian Purdila
This patch combines the any motion and new data interrupts function into a single, generic, interrupt enable function. On top of this, we can later refactor triggers to make it easier to add new triggers. Signed-off-by: Octavian Purdila <octavian.purdila@intel.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-02-08iio: bmc150: refactor slope duration and threshold updateOctavian Purdila
Move the slope duration and threshold update in a separate function to reduce code duplicate between chip init and motion interrupt setup. Also move the slope update code from the interrupt setup function to the trigger set state function so that we can later refactor the interrupt code. Signed-off-by: Octavian Purdila <octavian.purdila@intel.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-02-04iio: buffer: refactor buffer attributes setupOctavian Purdila
Move all core (non-custom) buffer attributes to a vector to make it easier to add more of them in the future. Signed-off-by: Octavian Purdila <octavian.purdila@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-02-04iio: vf610_adc: cleanup wait_for_completion return handlingNicholas Mc Guire
return type of wait_for_completion_timeout is unsigned long not int, this patch only fixes up the return handling. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-02-03iio: imu: kmx61: Drop odr_bits from kmx61_samp_freq_tableDaniel Baluta
odr_bits values are between 0 and 11, so we can use the index in kmx61_samp_freq_table instead of odr_bits structure member. Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Reviewed-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-02-03iio: meter: ade7759: add error handling in _reset and _stop_deviceDevendra Naga
This patch adds the error handling for the value returned from ade7759_spi_read_reg_16. With this patch, the following randconfig warnings get fixed automatically. drivers/staging/iio/meter/ade7759.c:224:6: warning: ‘val’ may be used uninitialized in this function [-Wmaybe-uninitialized] drivers/staging/iio/meter/ade7759.c:309:6: warning: ‘val’ may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-02-03iio: meter: ade7754: add error handling in _reset and _stop_deviceDevendra Naga
This patch adds the error handling for the value returned from ade7754_spi_read_reg_8. With this patch, the following randconfig warnings get fixed automatically. drivers/staging/iio/meter/ade7754.c:222:6: warning: ‘val’ may be used uninitialized in this function [-Wmaybe-uninitialized] drivers/staging/iio/meter/ade7754.c:368:6: warning: ‘val’ may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-02-02Merge 3.19-rc7 into staging-nextGreg Kroah-Hartman
We want those fixes in here for testing. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-01Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input layer updates from Dmitry Torokhov: "Just a few quirks for PS/2 this time" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: elantech - add more Fujtisu notebooks to force crc_enabled Input: i8042 - add noloop quirk for Medion Akoya E7225 (MD98857) Input: synaptics - adjust min/max for Lenovo ThinkPad X1 Carbon 2nd
2015-02-01Input: elantech - add more Fujtisu notebooks to force crc_enabledRainer Koenig
Add two more Fujitsu LIFEBOOK models that also ship with the Elantech touchpad and don't work with crc_disabled to the quirk list. Signed-off-by: Rainer Koenig <Rainer.Koenig@ts.fujitsu.com> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-01-31Merge branch 'i2c/for-current' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "i2c driver bugfixes (s3c2410, slave-eeprom, sh_mobile), size regression "bugfix" (i2c slave), documentation bugfix (st). Also, one documentation update (da9063), so some devicetrees can now be verified" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: sh_mobile: terminate DMA reads properly i2c: Only include slave support if selected i2c: s3c2410: fix ABBA deadlock by keeping clock prepared i2c: slave-eeprom: fix boundary check when using sysfs i2c: st: Rename clock reference to something that exists DT: i2c: Add devices handled by the da9063 MFD driver
2015-01-31Merge tag 'iio-for-3.20b' of ↵Greg Kroah-Hartman
git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-testing Jonathan writes: Second round of IIO new drivers, functionality and cleanups for the 3.20 cycle. New drivers and device support: * Capella cm3232 ambient light sensor driver. * Freescale MMA9553 pedometer and activity monitor. Note this involved a refactor of the mma9551 driver to pull out shared elements. * Samsung sensor hub (as used in the galaxy gear 2 watch) Core support and initial drivers (gyro and accelerometer) more to follow. An additional fix was applied on top of this for a build issue thrown up by the autobuilders on some platforms. * Cosmic Circuits 10001 ADC driver * Qualcomm SPMI PMIC voltage ADC driver (current adc merged a while back). * Add binding for AK8963 (in capitals) as unfortunately there are bios' out there not using lower case. New functionality * Add newe operating mode to the core to allow for non triggered software buffers. This is mostly semantics as previously drivers just claimed they had a hardware buffer (when they didn't). * Add distance channel type. * Add energy channel type. * Add velocity channel type and IIO_MOD_ROOT_SUM_SQUARED (i.e. speed when our channel type is velocity). * Add _debounce_count and _debounce_time filter attributes. Only really make sense for counting types of measurements. First use is for avoiding miss detection of steps prior to walking. * Add change event type. This replaces the briefly present INSTANCE type (which hadn't gained any users). It is more generic as it allows for events say every 10 steps rather than every step. * Add _calibweight attributes to the ABI (and core support). Used by activity monitors to estimate energy use. Can imagine there will be other uses for this one. Driver new functionality * mma9551 gains runtime pm support. * hid-sensors gain PM support. Cleanup * Change calibheight unit to m from cm. As there are no prior users and this was inconsistent with other distance units, it makes sense to fix it before hte mma9553 driver which uses it. * mpu6050 cleanups and devm_ use. * as3935 switch over to PM ops. * Fix a few format strings for signed vs unsigned. * Fix tcs3414 missindentation * Typo in industrialio-event * Stop requiring IIO_TRIGGER for IIO_KFIFO_BUF as we have drivers that don't need it. No one is quite sure why that dependency was there and it seems to not matter.
2015-01-31iio:common:ssp_sensors fix warnings due to 32 bit instead of 64 bit passed ↵Jonathan Cameron
to do_div Also change to div64_u64 in one place to avoid loss of precision (was dividing a 32 bit number by a 64 bit number, but casting this to 64 bit divided by 32 bit) Those divide functions certainly have esoteric naming! Fixes warnings with asm-generic/div64.h do_div such as: In file included from drivers/iio/common/ssp_sensors/ssp_iio.c:20:0: drivers/iio/common/ssp_sensors/ssp_iio_sensor.h: In function 'ssp_convert_to_freq': >> drivers/iio/common/ssp_sensors/ssp_iio_sensor.h:56:16: warning: comparison of distinct pointer types lacks a cast [enabled by default] drivers/iio/common/ssp_sensors/ssp_iio_sensor.h:56:2: warning: right shift count >= width of type [enabled by default] >> drivers/iio/common/ssp_sensors/ssp_iio_sensor.h:56:2: warning: passing argument 1 of '__div64_32' from incompatible pointer type [enabled by default] include/asm-generic/div64.h:35:17: note: expected 'uint64_t *' but argument is of type 'int *' drivers/iio/common/ssp_sensors/ssp_iio.c: In function 'ssp_common_process_data': include/linux/iio/buffer.h:142:32: warning: 'calculated_time' may be used uninitialized in this function [-Wuninitialized] drivers/iio/common/ssp_sensors/ssp_iio.c:83:10: note: 'calculated_time' was declared here Fixed by using straight coded version as per the description in the div64.h header, thus ensuring no issue with 32 bit integers. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-30Merge tag 'char-misc-3.19-rc7' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are two tiny patches, one fixing up the drivers/Kconfig file, and one adding a MAINTAINERS entry for the UIO git tree" * tag 'char-misc-3.19-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: drivers/Kconfig: remove duplicate entry for soc MAINTAINERS: add git url entry for UIO
2015-01-30Merge tag 'staging-3.19-rc7' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging tree fixes from Greg KH: "Here are two tiny staging tree fixes. One for the nvec driver to resolve a reported problem, and one to add a MAINTAINERS entry for the Android drivers" * tag 'staging-3.19-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: MAINTAINERS: add Android driver entries staging: nvec: specify a platform-device base id
2015-01-30Merge tag 'usb-3.19-rc7' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some small USB fixes and quirk additions for 3.19-rc7. All have been in linux-next for a while with no reported problems" * tag 'usb-3.19-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: USB: Add OTG PET device to TPL usb-storage/SCSI: blacklist FUA on JMicron 152d:2566 USB-SATA controller uas: Add no-report-opcodes quirk for Simpletech devices with id 4971:8017 storage: Revise/fix quirk for 04E6:000F SCM USB-SCSI converter usb: phy: never defer probe in non-OF case usb: dwc2: call dwc2_is_controller_alive() under spinlock
2015-01-30iio: add driver for Freescale MMA9553Irina Tirdea
Add support for Freescale MMA9553L Intelligent Pedometer Platform. The following functionalities are supported: - step counter (counts the number of steps using a HW register) - step detector (generates an iio event at every step the user takes) - activity recognition (rest, walking, jogging, running) - speed - calories - distance To get accurate pedometer results, the user's height, weight and gender need to be configured. The specifications can be downloaded from: http://www.freescale.com/files/sensors/doc/ref_manual/MMA955xLSWRM.pdf http://www.freescale.com/files/sensors/doc/ref_manual/MMA9553LSWRM.pdf Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-30Merge tag 'iommu-fixes-v3.19-rc6' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU fixes from Joerg Roedel: "Two small fixes for the Tegra GART IOMMU driver: - provide a .map_sg function for iommu_ops - do not register Tegra GART driver as a workaround because of issues with it when used from DRM code" * tag 'iommu-fixes-v3.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/tegra: gart: Provide default ->map_sg() callback iommu/tegra: gart: Do not register with bus
2015-01-30i2c: sh_mobile: terminate DMA reads properlyWolfram Sang
DMA read requests could miss proper termination, so two more bytes would have been read via PIO overwriting the end of the buffer with wrong data. Make DMA stop handling more readable while we are here. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2015-01-30Merge tag 'drm-intel-fixes-2015-01-29' of ↵Dave Airlie
git://anongit.freedesktop.org/drm-intel into drm-fixes misc i915 fixes, mostly all stable material as well. * tag 'drm-intel-fixes-2015-01-29' of git://anongit.freedesktop.org/drm-intel: drm/i915: BDW Fix Halo PCI IDs marked as ULT. drm/i915: Fix and clean BDW PCH identification drm/i915: Only fence tiled region of object. drm/i915: fix inconsistent brightness after resume drm/i915: Init PPGTT before context enable
2015-01-30drm: fix fb-helper vs MST dangling connector ptrs (v2)Rob Clark
VT switch back/forth from console to xserver (for example) has potential to go horribly wrong if a dynamic DP MST connector ends up in the saved modeset that is restored when switching back to fbcon. When removing a dynamic connector, don't forget to clean up the saved state. v1: original v2: null out set->fb if no more connectors to avoid making i915 cranky Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1184968 Cc: stable@vger.kernel.org #v3.17+ Signed-off-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-01-29Merge tag 'dm-3.19-fixes-3' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: "One stable fix for a dm-cache 3.19-rc6 regression and one stable fix for dm-thin: - fix DM cache metadata open/lookup error paths to properly use ERR_PTR and IS_ERR (fixes: 3.19-rc6 "stable" commit 9b1cc9f251) - fix DM thin-provisioning to disallow userspace from sending messages to the thin-pool if the pool is in READ_ONLY or FAIL mode since no metadata changes are allowed in these modes" * tag 'dm-3.19-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm thin: don't allow messages to be sent to a pool target in READ_ONLY or FAIL mode dm cache: fix missing ERR_PTR returns and handling
2015-01-29Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client Pull Ceph fixes from Sage Weil: "These paches from Ilya finally squash a race condition with layered images that he's been chasing for a while" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: rbd: drop parent_ref in rbd_dev_unprobe() unconditionally rbd: fix rbd_dev_parent_get() when parent_overlap == 0
2015-01-29Merge tag 'pinctrl-v3.19-4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull final pin control fix from Linus Walleij: "A late pin control fix for the v3.19 series: The AT91 gpio controller would miss wakeup events, this single fix make it work properly" [ "Final"? Yeah, I'll believe that once I've actually released 3.19 ;) - Linus ] * tag 'pinctrl-v3.19-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: at91: allow to have disabled gpio bank
2015-01-29vm: add VM_FAULT_SIGSEGV handling supportLinus Torvalds
The core VM already knows about VM_FAULT_SIGBUS, but cannot return a "you should SIGSEGV" error, because the SIGSEGV case was generally handled by the caller - usually the architecture fault handler. That results in lots of duplication - all the architecture fault handlers end up doing very similar "look up vma, check permissions, do retries etc" - but it generally works. However, there are cases where the VM actually wants to SIGSEGV, and applications _expect_ SIGSEGV. In particular, when accessing the stack guard page, libsigsegv expects a SIGSEGV. And it usually got one, because the stack growth is handled by that duplicated architecture fault handler. However, when the generic VM layer started propagating the error return from the stack expansion in commit fee7e49d4514 ("mm: propagate error from stack expansion even for guard page"), that now exposed the existing VM_FAULT_SIGBUS result to user space. And user space really expected SIGSEGV, not SIGBUS. To fix that case, we need to add a VM_FAULT_SIGSEGV, and teach all those duplicate architecture fault handlers about it. They all already have the code to handle SIGSEGV, so it's about just tying that new return value to the existing code, but it's all a bit annoying. This is the mindless minimal patch to do this. A more extensive patch would be to try to gather up the mostly shared fault handling logic into one generic helper routine, and long-term we really should do that cleanup. Just from this patch, you can generally see that most architectures just copied (directly or indirectly) the old x86 way of doing things, but in the meantime that original x86 model has been improved to hold the VM semaphore for shorter times etc and to handle VM_FAULT_RETRY and other "newer" things, so it would be a good idea to bring all those improvements to the generic case and teach other architectures about them too. Reported-and-tested-by: Takashi Iwai <tiwai@suse.de> Tested-by: Jan Engelhardt <jengelh@inai.de> Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com> # "s390 still compiles and boots" Cc: linux-arch@vger.kernel.org Cc: stable@vger.kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-01-29iio: core: Introduce IIO_CHAN_INFO_DEBOUNCE_COUNT and _TIMEIrina Tirdea
The pedometer needs to filter out false steps that might be generated by tapping the foot, sitting, etc. To do that it computes the number of steps that occur in a given time and decides the user is moving only if this value is over a threshold. E.g.: the user starts moving only if he takes 4 steps in 3 seconds. This filter is applied only when the user starts moving. A device that has such pedometer functionality is Freescale's MMA9553L: http://www.freescale.com/files/sensors/doc/ref_manual/MMA9553LSWRM.pdf. To export this feature, this patch introduces IIO_CHAN_INFO_DEBOUNCE_COUNT and IIO_CHAN_INFO_DEBOUNCE_TIME. For the pedometer, in_steps_debounce_count will specify the number of steps that need to occur in in_steps_debounce_time seconds so that the pedometer decides the user is moving. Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-29iio: common: ssp_sensors: Add sensorhub gyroscope sensorKarol Wrona
This patch adds gyroscope iio driver which uses sensorhub as data provider. Signed-off-by: Karol Wrona <k.wrona@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-29iio: common: ssp_sensors: Add sensorhub accelerometer sensorKarol Wrona
This patch adds accelerometer iio driver which uses sensorhub as data provider. Signed-off-by: Karol Wrona <k.wrona@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-29iio: common: ssp_sensors: Add sensorhub iio commonsKarol Wrona
This patch adds common library for sensorhub iio drivers. Signed-off-by: Karol Wrona <k.wrona@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-29iio: common: ssp_sensors: Add sensorhub driverKarol Wrona
Sensorhub is MCU dedicated to collect data and manage several sensors. Sensorhub is a spi device which provides a layer for IIO devices. It provides some data parsing and common mechanism for sensorhub sensors. Adds common sensorhub library for sensorhub driver and iio drivers which uses sensorhub MCU to communicate with sensors. Signed-off-by: Karol Wrona <k.wrona@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-29iio: adc: Cosmic Circuits 10001 ADC driverPhani Movva
This commit adds support for Cosmic Circuits 10001 10-bit ADC device. Reviewed-by: Andrew Bresticker <abrestic@chromium.org> Signed-off-by: Phani Movva <Phani.Movva@imgtec.com> Signed-off-by: Naidu Tellapati <Naidu.Tellapati@imgtec.com> [ezequiel: code style cleaning] Signed-off-by: Ezequiel Garcia <ezequiel.garcia@imgtec.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-28staging: Remove logger and alarm-dev from android MakefileJohn Stultz
My previous patches deleting logger and alarm-dev from staging missed the android Makefile. This patch cleans up the Makefile to remove the now non-existent files. Cc: Rom Lemarchand <romlem@google.com>, Cc: Mark Salyzyn <salyzyn@google.com>, Cc: Kees Cook <keescook@chromium.org>, Cc: Android Kernel Team <kernel-team@android.com>, Cc: Valentin Rothberg <valentinrothberg@gmail.com>, Cc: Greg Hackmann <ghackmann@google.com>, Cc: Elliott Hughes <enh@google.com>, Cc: Todd Poynor <toddpoynor@google.com>, Reported-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: John Stultz <john.stultz@linaro.org> Acked-by: Kees Cook <keescook@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: Remove the Android logger driverJohn Stultz
With the relase of Lollipop, Android no longer requires the logger driver. There are three patches which the android dev's still need before they drop logger on all their devices: [PATCH v4 1/5] pstores: use scnprintf [PATCH v2 2/5] pstore: remove superfluous memory size check [PATCH 3/5] pstore: handle zero-sized prz in series [PATCH v4 4/5] pstore: add pmsg [PATCH 5/5] pstore: selinux: add security in-core xattr support for pstore and debugfs But these seem to have been acked and are hopefully queued for upstream. So this patch removes the logger driver from staging. Cc: Rom Lemarchand <romlem@google.com>, Cc: Mark Salyzyn <salyzyn@google.com> Cc: Kees Cook <keescook@chromium.org> Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: fbtft: remove redundant .ownerHeba Aamer
This patch fixes the following coccicheck warning: No need to set .owner here. The core will do it. Signed-off-by: Heba Aamer <heba93aamer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>