aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-03-19staging: adc: mxs-lradc.c Fix line over 80 characters.Aybuke Ozdemir1-3/+6
Fix checkpatch.pl issues with line over 80 characters in mxs-lradc.c Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18staging: addac: adt7316.c: Fix line over 80 charactersAybuke Ozdemir1-7/+14
Fix checkpatch.pl issues with line over 80 characters in adt7316.c Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18staging: iio: light: Checkpatch fixes tsl2x7x_core.cAybuke Ozdemir1-4/+4
This patch fixes these errors and warning messages found by checkpatch.pl: ERROR: return is not a function, parentheses are not required. WARNING: space prohibited before semicolon. Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18staging: iio: addac: adt7316.h Fix Unnecessary space after function pointer nameAybuke Ozdemir1-4/+4
The patch fixes the following checkpatch.pl warnings: WARNING: Unnecessary space after function pointer name. Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18Staging: iio/light: Fix return values in tsl2583.cMonam Agarwal1-3/+3
This patch fixes following smatch warnings: /drivers/staging/iio/light/tsl2583.c:436 taos_chip_on() info: why not propagate 'ret' from i2c_smbus_write_byte_data() instead of (-1)? /drivers/staging/iio/light/tsl2583.c:448 taos_chip_on() info: why not propagate 'ret' from i2c_smbus_write_byte_data() instead of (-1)? /drivers/staging/iio/light/tsl2583.c:461 taos_chip_on() info: why not propagate 'ret' from i2c_smbus_write_byte_data() instead of (-1)? Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-07Staging: iio/accel: Fix Prefer netdev_warn(netdev, ...then dev_warn(dev, ... then pr_warn(... to printk(KERN_INFO ... in sca3000_ring.cMonam Agarwal1-1/+1
This patch fixes the following checkpatch.pl warning in sca3000_ring.c WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-07Staging: iio/resolver: Fix prefer pr_warn over pr_warning in ad2s1210.cMonam Agarwal1-2/+2
This patch fixes following checkpatch.pl warning WARNING: Prefer pr_warn(... to pr_warning(... Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-02Merge 3.14-rc5 into staging-nextGreg Kroah-Hartman1-0/+1
We want those fixes in here
2014-02-24staging:iio:adc:MXS:LRADC: fix touchscreen statemachineJuergen Beisert1-0/+1
Releasing the touchscreen lets the internal statemachine left in a wrong state. Due to this the release coordinate will be reported again by accident when the next touchscreen event happens. This change sets up the correct state when waiting for the next touchscreen event. This has led to reported issues with calibrating the touchscreen. Bug was introduced somewhere in the series that began with 18da755de59b406ce2371a55fb15ed676eb08ed2 Staging/iio/adc/touchscreen/MXS: add proper clock handling in which the way this driver worked was substantially changed to be interrupt driven rather than relying on a busy loop. This was a regression in the 3.13 kernel. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Tested-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Cc: stable@vger.kernel.org Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-02-18staging:iio:ad799x use regulator for vrefHartmut Knaack2-20/+22
Switch the ad799x driver to use the regulator framework and add binding for reference voltage. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-02-18staging:iio:ad799x fix typo in copyright messageHartmut Knaack1-1/+1
Fix a typo in the copyright message. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-02-15iio: mxs-lradc: Propagate the real error code on platform_get_irq() failureFabio Estevam1-1/+1
No need to return a 'fake' return value on platform_get_irq() failure. Just return the error code itself instead. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Marek Vasut <marex@denx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-02-15staging: iio: Add tool to list IIO devices and triggersManuel Stahl2-0/+179
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-02-15staging:iio:ad799x Move to devm_request_threaded_irq to make device-removal simpler.Hartmut Knaack1-13/+9
Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-02-11Merge tag 'iio-for-3.15a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-nextGreg Kroah-Hartman3-112/+90
Jonathan writes: First set of new drivers and cleanups for IIO in the 3.15 cycle. New drivers: * si7005 relative humidity and temperature sensor * Lite-on ltr501 ambient light and proximity sensor Cleanups * Clean up some dead comments in max1363 * Drop some obsolete variables in adjd_s311 and tcs3472 left over from the introduction of iio_push_to_buffers_with_timestamp. * Drop some unneeded linux/init.h includes * Squish a sparse warning in mpl3115 by correctly specifying a be32 variable. * A number of cleanups and fixes for sca3000 * Drop an unneed checks in mxs-lradc, ad7303 and adis16400. * Drop a platform_set_drvdata in viperboard after the only use of it was removed during a devm conversion. * Add a missing device name for ak8975 to comply with the ABI. * Put mpu6050 into the IMU menu as it slipped out into the main menu. * Fix a typo and some comment formatting in mpu6050. * Document at91 ADC clock properties.
2014-02-08staging:iio:ad799x fix typo in ad799x_events[]Hartmut Knaack1-1/+1
This patch fixes a typo in ad799x_events[], which caused the error "Failed to register event set". Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Cc: stable@vger.kernel.org Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-02-08iio: mxs-lradc: remove useless scale_available filesAlexandre Belloni1-4/+0
in_voltage8_scale_available and in_voltage9_scale_available are exposed to userspace but useless as in_voltage8_raw and in_voltage9_raw are not available. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-02-08iio: mxs-lradc: fix buffer overflowAlexandre Belloni1-1/+1
Fixes: drivers/staging/iio/adc/mxs-lradc.c:1556 mxs_lradc_probe() error: buffer overflow 'iio->channels' 15 <= 15 The reported available scales for in_voltage15 were also wrong. The realbits lookup is not necessary as all the channels of the LRADC have the same resolution, use LRADC_RESOLUTION instead. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-02-07Merge tag 'iio-fixes-for-3.14a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linusGreg Kroah-Hartman3-6/+13
Jonathan writes: First set of IIO fixes for the 3.14 cycle. Included is the patch previously set as the fourth round for 3.13 which was to late to be appropriate. * Another endian fix (ad799x adc) due to missuse of the IIO_ST macro (which is going away very shortly) * A reversed error check in ad5933 which will make the probe fail. * A buffer overflow in the example code in the documentation. * ad799x was freeing an irq that might or might not have been requested. * tsl2563 was checking the wrong element of chan_spec for modifiers. Thus some sysfs reads would give the wrong values. * A missing dependency on HAS_IOMEM in spear_adc and lpc32xx was causing some test build failures (on s390 and perhaps elsewhere). I also have a few fixes queued up for things that went in during the 3.14 merge window which will follow as a separate pull request (to avoid rebasing my tree).
2014-02-03iio: mxs-lradc: remove useless checkAlexandre Belloni1-4/+0
Checking the channel number is useless since mxs_lradc_read_raw() is called from a controlled environment and the driver is responsible for filing the struct iio_chan_spec. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Marek Vasut <marex@denx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-01-25Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-nextLinus Torvalds1-0/+2
Pull networking updates from David Miller: 1) BPF debugger and asm tool by Daniel Borkmann. 2) Speed up create/bind in AF_PACKET, also from Daniel Borkmann. 3) Correct reciprocal_divide and update users, from Hannes Frederic Sowa and Daniel Borkmann. 4) Currently we only have a "set" operation for the hw timestamp socket ioctl, add a "get" operation to match. From Ben Hutchings. 5) Add better trace events for debugging driver datapath problems, also from Ben Hutchings. 6) Implement auto corking in TCP, from Eric Dumazet. Basically, if we have a small send and a previous packet is already in the qdisc or device queue, defer until TX completion or we get more data. 7) Allow userspace to manage ipv6 temporary addresses, from Jiri Pirko. 8) Add a qdisc bypass option for AF_PACKET sockets, from Daniel Borkmann. 9) Share IP header compression code between Bluetooth and IEEE802154 layers, from Jukka Rissanen. 10) Fix ipv6 router reachability probing, from Jiri Benc. 11) Allow packets to be captured on macvtap devices, from Vlad Yasevich. 12) Support tunneling in GRO layer, from Jerry Chu. 13) Allow bonding to be configured fully using netlink, from Scott Feldman. 14) Allow AF_PACKET users to obtain the VLAN TPID, just like they can already get the TCI. From Atzm Watanabe. 15) New "Heavy Hitter" qdisc, from Terry Lam. 16) Significantly improve the IPSEC support in pktgen, from Fan Du. 17) Allow ipv4 tunnels to cache routes, just like sockets. From Tom Herbert. 18) Add Proportional Integral Enhanced packet scheduler, from Vijay Subramanian. 19) Allow openvswitch to mmap'd netlink, from Thomas Graf. 20) Key TCP metrics blobs also by source address, not just destination address. From Christoph Paasch. 21) Support 10G in generic phylib. From Andy Fleming. 22) Try to short-circuit GRO flow compares using device provided RX hash, if provided. From Tom Herbert. The wireless and netfilter folks have been busy little bees too. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (2064 commits) net/cxgb4: Fix referencing freed adapter ipv6: reallocate addrconf router for ipv6 address when lo device up fib_frontend: fix possible NULL pointer dereference rtnetlink: remove IFLA_BOND_SLAVE definition rtnetlink: remove check for fill_slave_info in rtnl_have_link_slave_info qlcnic: update version to 5.3.55 qlcnic: Enhance logic to calculate msix vectors. qlcnic: Refactor interrupt coalescing code for all adapters. qlcnic: Update poll controller code path qlcnic: Interrupt code cleanup qlcnic: Enhance Tx timeout debugging. qlcnic: Use bool for rx_mac_learn. bonding: fix u64 division rtnetlink: add missing IFLA_BOND_AD_INFO_UNSPEC sfc: Use the correct maximum TX DMA ring size for SFC9100 Add Shradha Shah as the sfc driver maintainer. net/vxlan: Share RX skb de-marking and checksum checks with ovs tulip: cleanup by using ARRAY_SIZE() ip_tunnel: clear IPCB in ip_tunnel_xmit() in case dst_link_failure() is called net/cxgb4: Don't retrieve stats during recovery ...
2014-01-18staging:iio:lpc32xx_adc: Add dependency on HAS_IOMEMRichard Weinberger1-0/+1
On archs like S390 or um this driver cannot build nor work. Make it depend on HAS_IOMEM to bypass build failures. drivers/built-in.o: In function `lpc32xx_adc_probe': drivers/staging/iio/adc/lpc32xx_adc.c:149: undefined reference to `devm_ioremap' Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-01-18staging:iio:spear_adc: Add dependency on HAS_IOMEMRichard Weinberger1-0/+1
On archs like S390 or um this driver cannot build nor work. Make it depend on HAS_IOMEM to bypass build failures. drivers/staging/iio/adc/spear_adc.c: In function ‘spear_adc_probe’: drivers/staging/iio/adc/spear_adc.c:393:2: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-01-18staging:iio:accel:sca3000: Cleanup sca3000.hPeter Meerwald1-10/+16
kerneldoc and comment formating, typos Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-01-18staging:iio:accel:sca3000: Move temperature attribute to channelsPeter Meerwald1-77/+48
differantiate between channels with_temp and without Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-01-18staging:iio:accel:sca3000: Channels missing in temp_output casePeter Meerwald1-4/+3
issues introduced here 25888dc5, staging:iio:sca3000 extract old event handling and move to poll for events Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-01-18staging:iio:accel:sca3000: Event_attribute_group seems to be missing for _info_with_tempPeter Meerwald1-0/+1
issue introduced here 6fe8135f: staging:iio: implement an iio_info structure to take some of the constant elements out of iio_dev Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-01-18staging:iio:accel:sca3000: Fix format of commentsPeter Meerwald1-23/+29
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-01-18staging:iio:accel:sca3000: Fix kerneldocPeter Meerwald1-5/+4
match function names with kerneldoc Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-01-15staging,lpc32xx_adc: Add dependency on HAS_IOMEMRichard Weinberger1-0/+1
On archs like S390 or um this driver cannot build nor work. Make it depend on HAS_IOMEM to bypass build failures. drivers/built-in.o: In function `lpc32xx_adc_probe': drivers/staging/iio/adc/lpc32xx_adc.c:149: undefined reference to `devm_ioremap' Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-15staging,spear_adc: Add dependency on HAS_IOMEMRichard Weinberger1-0/+1
On archs like S390 or um this driver cannot build nor work. Make it depend on HAS_IOMEM to bypass build failures. drivers/staging/iio/adc/spear_adc.c: In function ‘spear_adc_probe’: drivers/staging/iio/adc/spear_adc.c:393:2: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-11staging:iio:ad799x fix error_free_irq which was freeing an irq that may not have been requestedHartmut Knaack1-1/+2
Only free an IRQ in error_free_irq, if it has been requested previously. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org> Cc: stable@vger.kernel.org
2014-01-01iio: Fix a buffer overflow in iio_utils.h example codeCraig Markwardt1-3/+3
This was originally reported by Craig Markwardt on Zubair Lutfullah's blog and Zubair forwarded it to linux-iio@vger.kernel.org. No email address known. The code first counted the number of enabled channels, then created an array to hold information about them. The code that filled this array then stored whether a given element was enabled inside the array. Curriously this element was never used. Craig's patch added a local temporary variable to avoid the buffer overrun. Jonathan then removed the original enabled element of the structure as it was not needed at all. Signed-off-by: Zubair Lutfullah <zubair.lutfullah@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-01-01iio: mxs-lradc: convert is_divided to a bitmapAlexandre Belloni1-4/+4
mxs_lradc.is_divided was an unsigned long array. Convert it to a bitmap to save some memory. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-01-01iio: mxs-lradc: add write_raw function to modify scaleHector Palacios1-1/+61
Added write_raw function to manipulate the optional divider_by_two through the scaling attribute out of the available scales. Signed-off-by: Hector Palacios <hector.palacios@digi.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Marek Vasut <marex@denx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-01-01iio: mxs-lradc: add scale_available file to channelsHector Palacios1-1/+105
Adds in_voltageX_scale_available file for every channel to read the different available scales. There are two scales per channel: [0] = divider_by_two disabled (default) [1] = divider_by_two enabled The scale is a struct made of integer and nano parts to build a long decimal number. Signed-off-by: Hector Palacios <hector.palacios@digi.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Marek Vasut <marex@denx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-01-01iio: mxs-lradc: add scale attribute to channelsHector Palacios1-2/+54
Some LRADC channels have fixed pre-dividers and all have an optional divider by two which allows a maximum input voltage of VDDIO - 50mV. This patch - adds the scaling info flag to all channels - grabs the max reference voltage per channel (where the fixed pre-dividers apply) - allows to read the scaling attribute (computed from the Vref) Signed-off-by: Hector Palacios <hector.palacios@digi.com>. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Marek Vasut <marex@denx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-01-01staging:iio:impedance:ad5933: correct error checkJulia Lawall1-1/+1
iio_kfifo_allocate returns NULL in case of error. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression *x; identifier f; statement S1,S2; @@ *x = f(...); if (x) { <+... when != if (...) S1 else S2 -ENOMEM ...+> } // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Jonathan Cameron <jic23@kernel.org> cc: stable@vger.kernel.org
2013-12-24Merge tag 'iio-for-3.14b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-nextGreg Kroah-Hartman14-87/+159
Jonathan writes: 2nd round of new IIO drivers, features and cleanups for the 3.14 cycle. New drivers * HID inclinometer driver. * DHT11 humidity driver. Note that previous humidity drivers have been in hwmon, but no one was ever entirely happy with that, and they should find a more comfortable home in IIO (their original placement in hwmon was my fault - oops). As this is our first humidity driver, core support is also added. New features * Two of mxs-lradc channels are internally wired to a temperature sensor, make this explicit in the driver by providing the relevant temperature channel. * Add support for blocking IO on buffers. * Add a data_available call back to the interface between buffer implementations and the core. This is much cleaner than the old, 'stufftoread' flag. Implemented in the kfifo buffer. Cleanups * Last user of the old event configuration interface is converted and the old interface dropped. Nice to be rid of this thanks to Lars-Peter's hard work! * Replace all remaining instances of the IIO_ST macro with explicit filling of the scan_type structure within struct iio_chan_spec. This macro was a bad idea, that rapidly ceased to cover all elements of the structure. Miss reading of the macro arguements has led to a number of bugs so lets just get rid of it. The final removal patch is awaiting for some fixes to make their way into mainline. In a couple of drivers, no elements of scan_type were even being used so in those case, it has been dropped entirely. * Drop a couple of of_match_ptr helper uses in drivers where devicetree is not optional and hence the structures being protected by this always exist. * Fix up some cases where data was read from a device in a particular byte order, but he code placed it into a s16 or similar. These were highlighted by Sparse. * Use the new ATTRIBUTE_GROUPS macro to drop some boiler plate in the triggers core code. * ad7746 and ad7280a - stop storing buffers on the stack, giving cleaner code and possibly avoiding issues with i2c bus drivers that assume they can dma directly into the buffer. Note that this cannot currently happen as the the i2c_smbus_read_i2c_block_data function has a memcpy from the buffer actually passed to the bus driver. I missed this element of the commit message and don't think it is major enough to rebase the iio tree. * ad5791 and ad5504 stop storing buffers on the stack for an SPI driver. Unlike the i2c drivers, this is a real issue for SPI drivers which can dma directly into the buffer supplied.
2013-12-24Merge 3.13-rc5 into staging-nextGreg Kroah-Hartman1-1/+6
This resolves a merge issue with drivers/staging/imx-drm/imx-drm-core.c Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-22staging: iio: hmc5843: Remove redundant of_match_ptr helperSachin Kamat1-1/+1
'hmc5843_of_match' is always compiled in. Hence the helper macro is not needed. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-12-17staging:iio:ad799x fix incorrect endianness specification for buffer elementsJonathan Cameron1-1/+7
Due to use of the IIO_ST macro, the endianness element of scan_type was not being set. The result is that it will default to the cpu endianness whereas this driver will fill the buffer with big endian data. Thus for little endian machines, userspace will miss interpret the data. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2013-12-17staging:iio:ad7606 replaces IIO_ST macro with explicit entries to struct scan_typeJonathan Cameron1-1/+6
IIO_ST is going away as it is a pain to maintain. Note that this driver currently ensures all fields are converted to the native endianness to keep things consistent across the different bus types. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2013-12-17staging:iio:mag:hmc5843 fix incorrect endianness of channel as a result of missuse of the IIO_ST macro.Jonathan Cameron1-1/+6
This driver sets the shift value equal to IIO_BE (or 1) rather than setting that to 0 and specificying the endianness. This means the channel type is missreported as [be|le]:u16/16>>1 where the be|le is dependent on the cpu native endianness, rather than be:u16/16>>0 resulting in any userspace code using this information, miss converting the channel and generating thoroughly trashed data. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Cc: stable@vger.kernel.org
2013-12-08iio: Remove support for the legacy event config interfaceLars-Peter Clausen7-47/+47
Now that all drivers have been converted to the new event config interface we can remove for the legacy event config interface. Also drop the '_new' suffix for the event config interface callbacks, since those are the only callbacks now. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-12-07iio: mxs-lradc: compute temperature from channel 8 and 9Alexandre Belloni1-13/+78
The mxs LRADC is able to read an internal die temperature sensor. The temperature has to be calculated from the value read on channel 8 and channel 9. To be able to expose the result to hwmon, implement iio channel 8 as (channel 9 - channel 8). Then, implement IIO_CHAN_INFO_SCALE and IIO_CHAN_INFO_OFFSET so that it can be processed by hwmon through the in kernel provider/consumer mechanism. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-12-03staging:iio:ad9834: Mark transfer buffers as __b16Lars-Peter Clausen1-2/+2
Fixes the following warnings from sparse: drivers/staging/iio/frequency/ad9834.c:45:26: warning: incorrect type in assignment (different base types) drivers/staging/iio/frequency/ad9834.c:45:26: expected unsigned short [unsigned] [short] <noident> drivers/staging/iio/frequency/ad9834.c:45:26: got restricted __be16 [usertype] <noident> drivers/staging/iio/frequency/ad9834.c:47:26: warning: incorrect type in assignment (different base types) drivers/staging/iio/frequency/ad9834.c:47:26: expected unsigned short [unsigned] [short] <noident> drivers/staging/iio/frequency/ad9834.c:47:26: got restricted __be16 [usertype] <noident> drivers/staging/iio/frequency/ad9834.c:59:18: warning: incorrect type in assignment (different base types) drivers/staging/iio/frequency/ad9834.c:59:18: expected unsigned short [unsigned] data drivers/staging/iio/frequency/ad9834.c:59:18: got restricted __be16 [usertype] <noident> drivers/staging/iio/frequency/ad9834.c:100:26: warning: incorrect type in assignment (different base types) drivers/staging/iio/frequency/ad9834.c:100:26: expected unsigned short [unsigned] data drivers/staging/iio/frequency/ad9834.c:100:26: got restricted __be16 [usertype] <noident> drivers/staging/iio/frequency/ad9834.c:108:26: warning: incorrect type in assignment (different base types) drivers/staging/iio/frequency/ad9834.c:108:26: expected unsigned short [unsigned] data drivers/staging/iio/frequency/ad9834.c:108:26: got restricted __be16 [usertype] <noident> drivers/staging/iio/frequency/ad9834.c:122:26: warning: incorrect type in assignment (different base types) drivers/staging/iio/frequency/ad9834.c:122:26: expected unsigned short [unsigned] data drivers/staging/iio/frequency/ad9834.c:122:26: got restricted __be16 [usertype] <noident> drivers/staging/iio/frequency/ad9834.c:131:26: warning: incorrect type in assignment (different base types) drivers/staging/iio/frequency/ad9834.c:131:26: expected unsigned short [unsigned] data drivers/staging/iio/frequency/ad9834.c:131:26: got restricted __be16 [usertype] <noident> drivers/staging/iio/frequency/ad9834.c:194:26: warning: incorrect type in assignment (different base types) drivers/staging/iio/frequency/ad9834.c:194:26: expected unsigned short [unsigned] data drivers/staging/iio/frequency/ad9834.c:194:26: got restricted __be16 [usertype] <noident> drivers/staging/iio/frequency/ad9834.c:387:18: warning: incorrect type in assignment (different base types) drivers/staging/iio/frequency/ad9834.c:387:18: expected unsigned short [unsigned] data drivers/staging/iio/frequency/ad9834.c:387:18: got restricted __be16 [usertype] <noident> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-12-03staging:iio:ad9832: Mark transfer buffers as __be16Lars-Peter Clausen1-3/+3
Fixes the following warnings from sparse: drivers/staging/iio/frequency/ad9832.c:43:26: warning: incorrect type in assignment (different base types) drivers/staging/iio/frequency/ad9832.c:43:26: expected unsigned short [unsigned] [short] <noident> drivers/staging/iio/frequency/ad9832.c:43:26: got restricted __be16 [usertype] <noident> drivers/staging/iio/frequency/ad9832.c:46:26: warning: incorrect type in assignment (different base types) drivers/staging/iio/frequency/ad9832.c:46:26: expected unsigned short [unsigned] [short] <noident> drivers/staging/iio/frequency/ad9832.c:46:26: got restricted __be16 [usertype] <noident> drivers/staging/iio/frequency/ad9832.c:49:26: warning: incorrect type in assignment (different base types) drivers/staging/iio/frequency/ad9832.c:49:26: expected unsigned short [unsigned] [short] <noident> drivers/staging/iio/frequency/ad9832.c:49:26: got restricted __be16 [usertype] <noident> drivers/staging/iio/frequency/ad9832.c:52:26: warning: incorrect type in assignment (different base types) drivers/staging/iio/frequency/ad9832.c:52:26: expected unsigned short [unsigned] [short] <noident> drivers/staging/iio/frequency/ad9832.c:52:26: got restricted __be16 [usertype] <noident> drivers/staging/iio/frequency/ad9832.c:65:27: warning: incorrect type in assignment (different base types) drivers/staging/iio/frequency/ad9832.c:65:27: expected unsigned short [unsigned] [short] <noident> drivers/staging/iio/frequency/ad9832.c:65:27: got restricted __be16 [usertype] <noident> drivers/staging/iio/frequency/ad9832.c:68:27: warning: incorrect type in assignment (different base types) drivers/staging/iio/frequency/ad9832.c:68:27: expected unsigned short [unsigned] [short] <noident> drivers/staging/iio/frequency/ad9832.c:68:27: got restricted __be16 [usertype] <noident> drivers/staging/iio/frequency/ad9832.c:107:26: warning: incorrect type in assignment (different base types) drivers/staging/iio/frequency/ad9832.c:107:26: expected unsigned short [unsigned] data drivers/staging/iio/frequency/ad9832.c:107:26: got restricted __be16 [usertype] <noident> drivers/staging/iio/frequency/ad9832.c:120:26: warning: incorrect type in assignment (different base types) drivers/staging/iio/frequency/ad9832.c:120:26: expected unsigned short [unsigned] data drivers/staging/iio/frequency/ad9832.c:120:26: got restricted __be16 [usertype] <noident> drivers/staging/iio/frequency/ad9832.c:133:26: warning: incorrect type in assignment (different base types) drivers/staging/iio/frequency/ad9832.c:133:26: expected unsigned short [unsigned] data drivers/staging/iio/frequency/ad9832.c:133:26: got restricted __be16 [usertype] <noident> drivers/staging/iio/frequency/ad9832.c:144:26: warning: incorrect type in assignment (different base types) drivers/staging/iio/frequency/ad9832.c:144:26: expected unsigned short [unsigned] data drivers/staging/iio/frequency/ad9832.c:144:26: got restricted __be16 [usertype] <noident> drivers/staging/iio/frequency/ad9832.c:277:18: warning: incorrect type in assignment (different base types) drivers/staging/iio/frequency/ad9832.c:277:18: expected unsigned short [unsigned] data drivers/staging/iio/frequency/ad9832.c:277:18: got restricted __be16 [usertype] <noident> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-12-03staging:iio:ad7746: Do not store the transfer buffer on the stackLars-Peter Clausen1-7/+7
Some I2C controllers might not be able to handle transfer buffers that are stored on stack. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-12-03staging:iio:ad7746: Mark transfer buffer as __be32Lars-Peter Clausen1-1/+1
Fixes the following warnings from sparse: drivers/staging/iio/cdc/ad7746.c:599:25: warning: cast to restricted __be32 drivers/staging/iio/cdc/ad7746.c:599:25: warning: cast to restricted __be32 drivers/staging/iio/cdc/ad7746.c:599:25: warning: cast to restricted __be32 drivers/staging/iio/cdc/ad7746.c:599:25: warning: cast to restricted __be32 drivers/staging/iio/cdc/ad7746.c:599:25: warning: cast to restricted __be32 drivers/staging/iio/cdc/ad7746.c:599:25: warning: cast to restricted __be32 Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>