summaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/resolver
Commit message (Collapse)AuthorAgeFilesLines
* staging: iio: ad2s1200: Move driver out of stagingDavid Veenstra2018-05-203-223/+0
| | | | | | | | Move the iio driver for the ad2s1200 and ad2s1205 resolver-to-digital converter out of staging, into mainline iio subsystems. Signed-off-by: David Veenstra <davidjulianveenstra@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* staging: iio: ad2s1200: Add copyrightDavid Veenstra2018-05-201-0/+2
| | | | | | | | Add David Veenstra as a copyright holders and as an author, for all of the staging clean ups of the ad2s1200 driver. Signed-off-by: David Veenstra <davidjulianveenstra@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* staging: iio: ad2s1200: Add scaling factor for angle channelDavid Veenstra2018-05-201-0/+6
| | | | | | | | | | | | A scaling factor of approximately 2 * Pi / (2^12 -1) is added, to scale the 12-bits angular position to radians. A return type of IIO_VAL_INT_PLUS_NANO is used, so that the scale of both the angle channel and angular velocity channel has 7 significant digits. Signed-off-by: David Veenstra <davidjulianveenstra@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* staging: iio: ad2s1200: Add scaling factor for angular velocity channelDavid Veenstra2018-05-201-26/+45
| | | | | | | | | | The sysfs iio ABI states radians per second is expected as the unit for angular velocity, but the 12-bit angular velocity register has revolution per seconds as its unit. So a scaling factor of approximately 2 * Pi is added to the angular velocity channel. Signed-off-by: David Veenstra <davidjulianveenstra@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* staging: iio: ad2s1200: Add dt tableDavid Veenstra2018-05-201-0/+8
| | | | | | | Add device tree table for matching with the vendor ID. Signed-off-by: David Veenstra <davidjulianveenstra@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* staging: iio: ad2s1200: Replace platform data with dt bindingsDavid Veenstra2018-05-201-17/+15
| | | | | | | | Remove usage of platform data, and replace it with device tree facilities. Signed-off-by: David Veenstra <davidjulianveenstra@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* staging: iio: ad2s1200: Replace legacy gpio API with modern APIDavid Veenstra2018-05-201-7/+8
| | | | | | | | The legacy, integer based gpio API is replaced with the modern descriptor based API. Signed-off-by: David Veenstra <davidjulianveenstra@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* staging: iio: ad2s1200: Setup spi before iio device registerDavid Veenstra2018-05-201-6/+7
| | | | | | | | | | The spi should be set up before the device is registered as an iio device. This patch moves the setup to before the device registration. Signed-off-by: David Veenstra <davidjulianveenstra@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* staging: iio: ad2s1200: Add kernel docs to driver stateDavid Veenstra2018-05-201-0/+8
| | | | | | | Add missing kernel docs to the ad2s1200 driver state. Signed-off-by: David Veenstra <davidjulianveenstra@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* staging: iio: ad2s1200: Remove unneeded initializationsDavid Veenstra2018-05-201-2/+2
| | | | | | | | Remove 2 initializations which are unneeded, because the initialized values are never used. Signed-off-by: David Veenstra <davidjulianveenstra@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* staging: iio: ad2s1200: Remove unneeded newline in licenseDavid Veenstra2018-05-201-1/+0
| | | | | | | Remove unneeded newline in license, as it does not improve readability. Signed-off-by: David Veenstra <davidjulianveenstra@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* staging: iio: ad2s1200: Improve readability with be16_to_cpupDavid Veenstra2018-04-281-7/+4
| | | | | | | | | | | | | The manual states that the data is contained in the upper 12 bits of the 16 bits read by spi. The code that extracts these 12 bits is correct for both be and le machines, but this is not clear from a first glance. To improve readability the relevant expressions are replaced with equivalent expressions that use be16_to_cpup. Signed-off-by: David Veenstra <davidjulianveenstra@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* staging: iio: ad2s1200: Add blank linesDavid Veenstra2018-04-281-0/+7
| | | | | | | Add blank lines to improve readability. Signed-off-by: David Veenstra <davidjulianveenstra@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* staging: iio: ad2s1200: Reverse Christmas tree orderingDavid Veenstra2018-04-281-2/+2
| | | | | | | | Reorders the variable declarations to prefer a reverse Christmas tree order to improve readability. Signed-off-by: David Veenstra <davidjulianveenstra@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* staging: iio: ad2s1200: Sort includes alphabeticallyDavid Veenstra2018-04-281-6/+6
| | | | | | | This patches sorts all the includes in alphabetic order. Signed-off-by: David Veenstra <davidjulianveenstra@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* staging: iio: ad2s1200: Remove unneeded includeDavid Veenstra2018-04-281-1/+0
| | | | | | | This patches removes unneeded slab.h header. Signed-off-by: David Veenstra <davidjulianveenstra@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* staging:iio:ad2s1210: Remove old_data from ad2s1210_stateRodrigo Siqueira2018-03-101-3/+0
| | | | | | | | | | The variable old_data is a bool type, which only receives the value 'true' in the function ad2s1210_config_write and ad2s1210_config_read. There is no other use for this variable. This patch removes old_data from the ad2s1210_state and from all the function that use it. Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* staging:iio:ad2s1210: Remove unused #define directiveRodrigo Siqueira2018-03-101-10/+0
| | | | | | | This patch removes some #define directives not used in the code. Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* staging:iio:ad2s1210: Remove end of line with '['Rodrigo Siqueira2018-03-101-3/+4
| | | | | | | | | This patch fixes the checkpatch.pl check: iio/resolver/ad2s1210.c:202: CHECK: Lines should not end with a '[' Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* iio:resolver: drop assignment of iio_info.driver_moduleJonathan Cameron2017-08-223-3/+0
| | | | | | | | | The equivalent is now done via macro magic when the relevant register call is made. The actual structure elements will shortly go away. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
* staging:iio:resolver:ad2s1210 fix negative IIO_ANGL_VEL readArnd Bergmann2017-07-151-1/+1
| | | | | | | | | | | | | | | | gcc-7 points out an older regression: drivers/staging/iio/resolver/ad2s1210.c: In function 'ad2s1210_read_raw': drivers/staging/iio/resolver/ad2s1210.c:515:42: error: '<<' in boolean context, did you mean '<' ? [-Werror=int-in-bool-context] The original code had 'unsigned short' here, but incorrectly got converted to 'bool'. This reverts the regression and uses a normal type instead. Fixes: 29148543c521 ("staging:iio:resolver:ad2s1210 minimal chan spec conversion.") Cc: stable@vger.kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
* Staging: iio: resolver: ad2s1210: Fix warning, statements should start on a ↵Miguel Robles2017-03-191-2/+2
| | | | | | | | | | tabstop Fix checkpatch warning: Statements should start on a tabstop. Signed-off-by: Miguel Robles <miguel.robles@farole.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: resolver: Remove & on function name to align with other IIO ↵simran singhal2017-03-132-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | drivers. Remove & from function pointers to conform to the style found in the wider subsystem. Done using the following semantic patch // <smpl> @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - &f + f // </smpl> Signed-off-by: simran singhal <singhalsimran0@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* Staging: iio: resolver: ad2s1210.c - style fixDerek Robson2017-02-041-12/+12
| | | | | | | | Changed symbolic permissions to octal permissions. Found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: convert bare unsigned usage to unsigned intAlison Schofield2016-03-281-4/+4
| | | | | | | | | | | | | Use kernel preferred unsigned int declaration style. Patch created using: git ls-files drivers/staging/iio | \ xargs ./scripts/checkpatch.pl -f --fix-inplace --types=unspecified_int Hand edits restored columns in structure definitions. Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: iio: resolver: fix comparison to NULLEva Rachel Retuya2016-02-201-1/+1
| | | | | | | | | | Remove comparison of spi->dev.platform_data to NULL by replacing it with '!spi->dev.platform_data' as checkpatch suggested: CHECK: Comparison to NULL could be written "!spi->dev.platform_data" Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: iio: resolver: remove unnecessary blank lineEva Rachel Retuya2016-02-201-1/+0
| | | | | | | | | Delete the excess newline. Issue found by checkpatch. CHECK: Please don't use multiple blank lines Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: iio: resolver: delete space after a castEva Rachel Retuya2016-02-201-2/+2
| | | | | | | | Delete unwanted whitespace after casting. Issue pointed out by checkpatch. Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: iio: resolver: add missing braces on if-else statementsEva Rachel Retuya2016-02-201-3/+4
| | | | | | | | | | Add braces around the else clause to adhere to kernel coding style. This clears the following checkpatch issue: CHECK: braces {} should be used on all arms of this statement Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: iio: resolver: use blank line after array declarationEva Rachel Retuya2016-02-201-0/+1
| | | | | | | | | | | Add a blank line after array declaration. This clears the checkpatch check: CHECK: Please use a blank line after function/struct/union/enum declarations Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: iio: resolver: add spaces around operatorsEva Rachel Retuya2016-02-202-4/+4
| | | | | | | | | | Add spaces around operators to improve readability and to address the checkpatch issue: CHECK: spaces preferred around that '/' (ctx:VxV) Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: iio: resolver: align to match open parenthesisEva Rachel Retuya2016-02-202-13/+15
| | | | | | | | Use a combination of tabs and spaces to align parameters to its corresponding open parenthesis. Checkpatch found this issue. Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge tag 'spi-v4.4' of ↵Linus Torvalds2015-11-053-3/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "Quite a lot of activity in SPI this cycle, almost all of it in drivers with a few minor improvements and tweaks in the core. - Updates to pxa2xx to support Intel Broxton and multiple chip selects. - Support for big endian in the bcm63xx driver. - Multiple slave support for the mt8173 - New driver for the auxiliary SPI controller in bcm2835 SoCs. - Support for Layerscale SoCs in the Freescale DSPI driver" * tag 'spi-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (87 commits) spi: pxa2xx: Rework self-initiated platform data creation for non-ACPI spi: pxa2xx: Add support for Intel Broxton spi: pxa2xx: Detect number of enabled Intel LPSS SPI chip select signals spi: pxa2xx: Add output control for multiple Intel LPSS chip selects spi: pxa2xx: Use LPSS prefix for defines that are Intel LPSS specific spi: Add DSPI support for layerscape family spi: ti-qspi: improve ->remove() callback spi/spi-xilinx: Fix race condition on last word read spi: Drop owner assignment from spi_drivers spi: Add THIS_MODULE to spi_driver in SPI core spi: Setup the master controller driver before setting the chipselect spi: dw: replace magic constant by DW_SPI_DR spi: mediatek: mt8173 spi multiple devices support spi: mediatek: handle controller_data in mtk_spi_setup spi: mediatek: remove mtk_spi_config spi: mediatek: Update document devicetree bindings to support multiple devices spi: fix kernel-doc warnings about missing return desc in spi.c spi: fix kernel-doc warnings about missing return desc in spi.h spi: pxa2xx: Align a few defines spi: pxa2xx: Save other reg_cs_ctrl bits when configuring chip select ...
| * spi: Drop owner assignment from spi_driversAndrew F. Davis2015-10-283-3/+0
| | | | | | | | | | | | | | | | | | An spi_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Andrew F. Davis <afd@ti.com> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* | Staging: iio: Remove exceptional & on function nameShraddha Barke2015-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this file, function names are otherwise used as pointers without &. A simplified version of the Coccinelle semantic patch that makes this change is as follows: // <smpl> @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - &f + f // </smpl> Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: iio: resolver: replace iio_device_register by devm_iio_device_registerIoana Ciornei2015-10-041-9/+1
|/ | | | | | | | | | Use devm_iio_device_register instead of iio_device_register when the remove function is only used to call iio_device_unregister in order to ease the error path. Since resource managed functions implicitly call unregister at driver detach also remove iio_device_unregister Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: iio: Allow compile test of GPIO consumers if !GPIOLIBGeert Uytterhoeven2015-05-101-2/+2
| | | | | | | | | | | | | | | The GPIO subsystem provides dummy GPIO consumer functions if GPIOLIB is not enabled. Hence drivers that depend on GPIOLIB, but use GPIO consumer functionality only, can still be compiled if GPIOLIB is not enabled. Relax the dependency on GPIOLIB if COMPILE_TEST is enabled, where appropriate. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Jonathan Cameron <jic23@kernel.org> Cc: linux-iio@vger.kernel.org Cc: devel@driverdev.osuosl.org Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* Merge tag 'iio-for-4.1a' of ↵Greg Kroah-Hartman2015-03-241-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: First set of new drivers, cleanups and functionality for IIO in the 4.1 cycle. New drivers * CM3323 color sensor. * MS5611 pressure and temperature sensor. New functionality * mup6050 - create mux clients for devices described via ACPI. The reasoning and approach taken in this patch are complex. Basically there is no otherway of finding out what is there than by some esoteric look ups in the ACPI data. * cm3232 - PM support * itg3200 - suspend/resume support * mcp320x - add more ADCs to the kconfig to reflect what the driver supports (this patch and the bindings got left behind when the support was added a while back). Docs / utils * ti-adc128s052 - DT bindings. * mcp3422 - DT bindings. * mcp320x - DT bindings * ABI docs for event threshold scale attributes, in_magn_offset, proximity scan_element and thresh falling/rising values for accelerometers. All elements long in use that have slipped by being explicitly documented. * Tidy up the tools previously in drivers/staging/iio/Documentation and move them out to /tools/iio. Yet another move that should have happened long ago. This time Roberta Dobrescu did the leg work. Thanks! Core Cleanups * Export userspace IIO headers. We should have done the appropriate header splitting a long time ago. Thanks to Daniel for sorting this out. * Refactor the registring of attributes for buffers to move all non-custom ones to a vector allowing easier additions to the current set in the future. Driver Cleanups * gpiod related cleanups. Make use of the additional parameter to specify initial direciton to avoid extra code. * bmc150 - Various refactorings to reduce code repitition and prepare for hardware buffer support. Some of these cleanups are good even without the new functionality. * kmx61 - direct use of index to an array avoiding a structure element which was always the index to an element in an array of that structure. * vf610 - avoid incorrect type for return from wait_for_completion_timeout. * gp2ap020a00f - use put_unaligned_le32 for slight code simplification. * ade7754 - improve error handling including suppressing some build warnings. * ade7759 - improve error handling including suppressing some build warnings. * hmc5843 - Long line and indentation fixes. Also some constifying of various constant data. * ade7854 - 80+ character line splitting. * ad2s1210 - fix wrong printf format string. * mxs-lradc - fix wrong printf format string. * ade7954-i2c - code alignment fixes and other trivial but worthwhile bits. * periodic rtc trigger - make the frequency type an unsigned int as it is always treated as such. * jsa1212 - constify struct regmap_config as it is constant. * ad7793 - typo in the MODULE_DESCRIPTION * mma9551 - check gpiod_to_irq errors. Note that this doesn't actually cause any trouble but is worth tidying up as obviously incorrect. * mlx90614 - refactor the register symbols to make it clear which reads are to RAM not PROM.
| * staging: iio: resolver: ad2s1210: Change type in printf format stringRickard Strandqvist2015-02-081-2/+2
| | | | | | | | | | | | | | | | | | | | 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>
* | Staging: iio: replace pr_* with dev_*Haneen Mohammed2015-03-181-3/+3
| | | | | | | | | | | | | | | | dev_* is prefered over pr_* when appropriate device stuct is present. This patch replace pr_err and pr_warn with its dev_ counterpart. Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: iio: replace pr_err with dev_errHaneen Mohammed2015-03-181-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch replace pr_err with dev_err, when appropriate device structre is found. Issue found using the following Coccinelle script: @r exists@ identifier f, s, i; position p; @@ f(...,struct s *i,...) { <+... when != i == NULL pr_err@p(...); ...+> } @rr@ identifier r.s, fld; @@ struct s { ... struct device *fld; ... }; @@ identifier r.i, rr.fld; position r.p; @@ -pr_err@p +dev_err ( + i->fld, ...) Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Merge 4.0-rc3 into staging-nextGreg Kroah-Hartman2015-03-091-1/+2
|\ \ | | | | | | | | | | | | | | | We want the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | staging: iio: ad2s1200: Fix sign extensionRasmus Villemoes2015-01-261-1/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | The line above makes vel a 12-bit quantity (st->rx[] is u8). The intention is to sign-extend vel using bit 11 as the sign bit. But because of C's promotion rules "vel = (vel << 4) >> 4;" is actually a no-op, since vel is promoted to int before the inner shift. sign_extend32 works equally well for 8 and 16 bits types, so use that. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | Staging: iio: Added define guards where neededCristina Opriceana2015-03-061-0/+3
|/ | | | | | | | The following files were added define guards to prevent multiple inclusion. Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: iio: resolver: Annotate Kconfig entries with module name informationRoberta Dobrescu2014-10-021-0/+9
| | | | | | | | | This fixes the following checkpatch.pl warning: WARNING: please write a paragraph that describes the config symbol fully Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com> Acked-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: iio: resolver: Missing a blank line after declarationsAybuke Ozdemir2014-09-191-0/+4
| | | | | | | | This patch fixes these warning messages found by checkpatch.pl: WARNING : Missing a blank line after declarations Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: iio: adis16240: fix sparse warnings regarding incorrect argument typeTeodora Baluta2014-08-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | Silence the following sparse warnings by changing cast from u16 to __be16: CHECK drivers/staging/iio/accel/adis16240_core.c drivers/staging/iio/accel/adis16240_core.c:128:51: warning: incorrect type in argument 3 (different signedness) drivers/staging/iio/accel/adis16240_core.c:128:51: expected unsigned short [usertype] *val drivers/staging/iio/accel/adis16240_core.c:128:51: got signed short *<noident> drivers/staging/iio/accel/adis16240_core.c:142:51: warning: incorrect type in argument 3 (different signedness) drivers/staging/iio/accel/adis16240_core.c:142:51: expected unsigned short [usertype] *val drivers/staging/iio/accel/adis16240_core.c:142:51: got signed short *<noident> Signed-off-by: Teodora Baluta <teodora.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging:iio:ad2s1200 fix missing parenthesis in a for statment.Jimmy Li2014-04-261-1/+2
| | | | | Signed-off-by: Jimmy Li <coder.liss@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* Merge tag 'iio-fixes-for-3.15a' of ↵Greg Kroah-Hartman2014-04-221-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: First found of IIO fixes for the 3.15 cycle. * Fix the platform data support for the at91 adc driver. * A couple of related follow up patches get the support working again for at91sam9260 and at91sam9g45 as the earlier patch results in a device name change. * A default timer value in the at91 adc driver was bonkers. Make it sane. * Fix incorrect reporting of the integration time for the cm32181 light sensor * Fix a missing break in the ad2s1200 driver which would have give a false error return. * Make sure buffer scan mask queries from userspace return 0/1 rather than a fairly random value depending on their implementation of test_bit * Fix leak of the i2c client and a null pointer dereference in the cm36651 driver. * Fix a build warning on avr32 for the mxs-lradc (not exactly a critical combination - but the issue was real).
| * staging:iio:ad2s1200 fix a missing breakJimmy Li2014-03-221-0/+1
| | | | | | | | | | Signed-off-by: Jimmy Li <coder.liss@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
OpenPOWER on IntegriCloud