1) Some little fixes for the ad5064 dac driver.
2) A build warning 'fix' for a false positive in st_sensors
3) A couple of missing dependencies on IIO_BUFFER.
So nothing major and these mostly showed the advantages of the randconfig
builds various people have performed.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
iQIcBAABAgAGBQJRNjamAAoJEFSFNJnE9BaIUwMP/jed+bdUW1fYtGjv6vRmG9fj
XQK7pMIrk5STiE8UJAMf4vavtXA8lSKK32cAVeUaOXh2huxIXXG+6X/fIu0pfQ+F
CZNtnl41WVfp0sYA7Pw+on9bXMv8HajJKlbzbe9sBKKyqkpO3EvUZpWyKEBt5cQi
HMa6gmrditBzkjSXabDH/7lrQE0kN4jSFZUAdRYCVt5oxTs+OzdjH4sUjfwX4/Pg
YzdZKnqdqftuV/o7Mf1B0D7/7bc15KhNA+QAdBf7tuncvCmGFm2hdLf6DHAdHXsQ
D0ZcVo5Txg+Md4J3ZOvy45pO667l9KSETLXQq2cBMRMZt0ARCOyxGjxxmYpqUxKO
r369/tkL/LAV1BOvWZmK9j5W2KOwXtYSigtjZbVPjnYPYCPOlVwgxPZj7J9N8vb/
nM08QAV6oj9R9UZ4K06K4BoV4W4VD3xaHSTJyxMujlr7R7Eh9aUNH+xsbvkXEDnt
A8e/n2CLqBjl9M0uTydG5eX9aDzq21ykz/xF1qnz2BsB53zaxizexw2ywXIdAQvD
waFBUORnUBSZor4cUbO63njhr02NXqA87M+0C3OE/Xvfmn5ygjnPMe1fjcGHeyf+
fcE7EPzG23ChMZzoNdTDgpjGddvqCTQ95JGUKR55AETt8hv5PpUeUd3B1d5s7tGZ
LuM8g3lZhYho+RVYkLC5
=hA1D
-----END PGP SIGNATURE-----
Merge tag 'iio-fixes-for-3.9a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus
Jonathan writes:
"First round of iio fixes post the 3.9 merge window.
1) Some little fixes for the ad5064 dac driver.
2) A build warning 'fix' for a false positive in st_sensors
3) A couple of missing dependencies on IIO_BUFFER.
So nothing major and these mostly showed the advantages of the randconfig
builds various people have performed."
Fix:
drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c: In function ‘inv_mpu6050_read_fifo’:
drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c:176:3: error: implicit declaration of
function ‘iio_push_to_buffers’ [-Werror=implicit-function-declaration]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Initialize the register cache to the proper mid-scale value based on the
resolution of the device.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
The DAC value range check allows values one larger than the maximum value, which
effectively results in setting the DAC value to 0. This patch fixes the issue.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
The ad5065, ad5045, ad5025 use address '3' for the second channel, so they need
their own channel spec.
Note that ad5064_sync_powerdown_mode() also needs to be slightly updated since
it was relying on the fact that chan->address always equaled chan->channel.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Here's the big staging tree merge for 3.9-rc1
Lots of cleanups and updates for drivers all through the staging tree.
We are pretty much "code neutral" here, adding just about as many lines
as we removed.
All of these have been in linux-next for a while.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
iEUEABECAAYFAlEmW7QACgkQMUfUDdst+ymlIACXT5mv8Y5A/KJa+QLTNNsofI8u
aACgq9hNZxJzX6VQMLXUV8+2SILOqYo=
=5wIj
-----END PGP SIGNATURE-----
Merge tag 'staging-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging tree update from Greg Kroah-Hartman:
"Here's the big staging tree merge for 3.9-rc1
Lots of cleanups and updates for drivers all through the staging tree.
We are pretty much "code neutral" here, adding just about as many
lines as we removed.
All of these have been in linux-next for a while."
* tag 'staging-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (804 commits)
staging: comedi: vmk80xx: wait for URBs to complete
staging: comedi: drivers: addi-data: hwdrv_apci3200.c: Add a missing semicolon
staging: et131x: Update TODO list
staging: et131x: Remove assignment of skb->dev
staging: wlan-ng: hfa384x.h: fix for error reported by smatch
staging/zache checkpatch ERROR: spaces prohibited around that
staging/ozwpan: Mark read only parameters and structs as const
staging/ozwpan: Remove empty and unused function oz_cdev_heartbeat
staging/ozwpan: Mark local functions as static (fix sparse warnings)
staging/ozwpan: Add missing header includes
staging/usbip: Mark local functions as static (fix sparse warnings)
staging/xgifb: Remove duplicated code in loops.
staging/xgifb: Consolidate return paths
staging/xgifb: Remove code without effect
staging/xgifb: Remove unnecessary casts
staging/xgifb: Consolidate if/else if with identical code branches
staging: vt6656: replaced custom TRUE definition with true
staging: vt6656: replaced custom FALSE definition with false
staging: vt6656: replace custom BOOL definition with bool
staging/rtl8187se: Mark functions as static to silence sparse
...
This the basic functional Invensense MPU6050 Device driver.
Signed-off-by: Ge Gao <ggao@invensense.com>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Partly a case of removing unused headers and partly a case
of ifdefing out the iio_trigger_ops structures. This has
come about because of an 'unusual' separation of code in this
driver.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Denis Ciocca <denis.ciocca@st.com>
Use the new spi_sync_transfer() helper function instead of open-coding it.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
For iio_channel_get to work with OF based configurations, it needs the
consumer device pointer instead of the consumer device name as argument.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Anton Vorontsov <anton@enomsg.org>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Implement external reference voltage as regulator named "vref".
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
New drivers
1) A driver for ST microelectronics sensors. This driver already covers
a large set of new parts (20 gyros, accelerometer and magnetometers)
not currently covered by the existing drivers. The intent moving forward
is to merge this with the other drivers for similar parts already in tree.
The lis3l02dq driver currently in staging/iio will be trivial, the lis3
driver in misc more complex as it has a number of additional interfaces.
Any merging in of the lis3 driver will rely on the not currently
merged iio_input bridge driver and handling of freefall notifications
etc.
2) A driver for the itg3200 gyroscope.
Graduations from staging
1) Cleanup and move out of staging of the adxrs450 gyroscope driver. The
cleanup required was all minor but there were a couple of fixes hidden in
there.
Core and driver additions
1) Initial work from Guenter Roeck on device tree support for IIO's provider/
consumer code. Focuses on the iio_hwmon driver and the max1363 adc driver.
The full device tree syntax is currently under discussion but should
follow shortly.
Cleanups and fixes
1) Remove a noop function __iio_update_buffer
2) Couple of small fixes and cleanups for the max1363
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
iQIcBAABAgAGBQJRDQDyAAoJEFSFNJnE9BaIqZMP/i2fNpArDu3jXchJZJ1WuB0L
eY3JdMWOCO/ujPnjf6qWCjqZ+GWzFSSE8q+ZfUFYRv42Hcu2WV06eAeczilRJwzu
ZZAiWvWMTRV5tIAyg6guMoQvoxA5IHr5nG8JJ6OxY3ZtnnZr76kGm2/XIZCiy23d
1gFZOm9rew/lozbLdO16kcUm2WNBpX78PHStyQRUFjCGyDaM+BTFQjvZ+xRxKM9o
G3/snb/ExIIwlrIhwSZecmBhZoXvQhSIl49sKyT2EWGoNdDnC9YqTeYp3UYtBUuO
3uQ6ne1xGZRBu97CjnKEVpLFAd+xVjB8I2i5CeZWDBUQIkb0DEXV3blOaOLEks0J
bePhrlyDArdri18CQFFx2h5NwP87SjZ+U4zQkA63JWAXGC/w+vXp+MhxZpdvWXEy
jI0SKlxaeD5a1N0helc8zvibMZDsYMQSMz+BoI9Js3YpOypz6YNgaaSG8lI1rZ8W
YOsJiBWl6/jzg36QetD2Uhf8vVsA5KtDLSlLQbUBBjnvrN4XcPr/hWa2tv2GHnGh
/YMqWA1wOxNSAMaqn1bdJKDNm02+j7B8DfY+3E5m6fVTxwgHQmfPsECrY8k2i6ma
aMNDNuGnDCbpn8dKiIyQuvt+/1lktClcBcdHWUe/FGZtHdV7Kan5pDZQFLqoddCJ
mUE2y65xc4Hc2pmjWyim
=E5mK
-----END PGP SIGNATURE-----
Merge tag 'iio-for-3.9c' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Jonathan writes:
"Third set of IIO new drivers, cleanups and fixes for the 3.9 cycle
New drivers
1) A driver for ST microelectronics sensors. This driver already covers
a large set of new parts (20 gyros, accelerometer and magnetometers)
not currently covered by the existing drivers. The intent moving forward
is to merge this with the other drivers for similar parts already in tree.
The lis3l02dq driver currently in staging/iio will be trivial, the lis3
driver in misc more complex as it has a number of additional interfaces.
Any merging in of the lis3 driver will rely on the not currently
merged iio_input bridge driver and handling of freefall notifications
etc.
2) A driver for the itg3200 gyroscope.
Graduations from staging
1) Cleanup and move out of staging of the adxrs450 gyroscope driver. The
cleanup required was all minor but there were a couple of fixes hidden in
there.
Core and driver additions
1) Initial work from Guenter Roeck on device tree support for IIO's provider/
consumer code. Focuses on the iio_hwmon driver and the max1363 adc driver.
The full device tree syntax is currently under discussion but should
follow shortly.
Cleanups and fixes
1) Remove a noop function __iio_update_buffer
2) Couple of small fixes and cleanups for the max1363
"
merge commit 17cb3be61b
seems to have resulted in two functions that were removed in
4389fbec5b reappearing.
Spotted due to a build kicking out
drivers/iio/adc/max1363.c:1486:12: warning: 'max1363_register_buffered_funcs_and_init' defined but not used
drivers/iio/adc/max1363.c:1521:13: warning: 'max1363_buffer_cleanup' defined but not used
This patch just removes them again.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Instead of requiring the map to unregister, simply unregister all map entries
associated with the given iio device. This simplifies map removal and also works
for maps generated through devicetree.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Pass device pointer instead of device name as parameter to iio_channel_get_all
and iio_channel_get_all_cb. This will enable us to use OF information to
retrieve consumer channel information.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
For chips with more than 8 bit ADC resolution, received data was always
masked against 0xfff, ie with a 12 bit mask. This can result in bad data
for chips with 10 bit resolution if those chips have higher bits set
(seen with MAX1139).
The receive buffer was defined as char array. This could result in
unintentional sign extensions if the upper bit in a received byte
was set. Since the chip is configured for unipolar mode, we never
have to handle negative values, and sign extensions are never needed.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This patch remove st_sensors_get_sampling_frequency_avl and
st_sensors_get_scale_avl functions used only in
st_sensors_sysfs_sampling_frequency_avail and st_sensors_sysfs_scale_avail
sysfs functions.
Signed-off-by: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This patch adds support for the InvenSense itg3200.
The itg3200 is a three-axis gyro with 16-bit ADC and
I2C interface.
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
The adxrs450 is in a reasonable shape now. It follows the IIO ABI and non of the
standard code checker tools report any issue, so move it out of staging.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
__iio_update_buffer updates the buffer's bytes_per_datum and length fields.
But the only user of this function just passes in these exact fields, so the
call basically looks like this:
buffer->bytes_per_datum = buffer->bytes_per_datum;
buffer->length = buffer->length;
Which means it is a noop and can be removed. Also remove the function itself,
since it is now unused.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This patch adds a generic magnetometer driver for STMicroelectronics
magnetometers, currently it supports:
LSM303DLHC, LSM303DLM, LIS3MDL.
Signed-off-by: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This driver is simple, uses the latest interfaces and contains few if
any controversial elements. All of its interfaces have been in place
for a long time now. Hence let's move it out of staging.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Peter Meerwald <pmeerw@pmeerw.net>
The driver is rather simple and in a good shape. It follows the IIO ABI and the
standard codechecker tools do not report any issues, so move it out of staging.
While moving it also remove one outdated 'fixme' comment.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
The adis16448 is more or less from the same family of devices as supported by
this driver. It features three acceleration channels, three angular velocity
channels, three magnetometer channels, one temperature channels and one
barometric pressure channel.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Expose some information useful for debugging a device in debugfs. This includes
for now the flash count, the product id and the serial number and raw register
access.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
The adis16400 and similar have two different base sampling rate available, from
which the actual sampling rate is derived. 1638 Hz and 52.85 Hz, switching to
the lower base sampling rate allows to support lower sampling rates.
This patch adds support for switching to the lower base sampling rate if the
requested sampling frequency is outside of the range which can be supported by
the higher base sampling rate.
The function which is used to read the current sampling rate already has support
for the lower sampling rate, so no changes are required there.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
The devices supported by this drivers support sample rates with less than one
sample per second. To support this increase the samplerate precession to allow
setting (and reading) the samplerate with a milli-HZ precession.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This adis16400 driver is in pretty good shape now, so move it out of staging.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
ERROR: "iio_triggered_buffer_setup" [drivers/iio/adc/max1363.ko] undefined!
ERROR: "iio_triggered_buffer_cleanup" [drivers/iio/adc/max1363.ko] undefined!
add select IIO_TRIGGERED_BUFFER
IIO_TRIGGERED_BUFFER in turn selects IIO_TRIGGER and IIO_KFIFO_BUF, so drop those
MAX1363_RING_BUFFER is not used anymore
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Convert all uses of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Here are a number of small fixes to staging drivers for your 3.8-rc3
tree.
Well, the omapdrm fixes aren't really "small" but they were waiting on a
number of other drm patches to go in through the drm tree, and got
delayed by my vacation over the holidays. They are totally
self-contained, everyone involved have acked them, and they fix issues
that people have been having with the driver.
Other than that one, it's a bunch of tiny bugfixes for a number of
reported issues.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
iEYEABECAAYFAlDzjqQACgkQMUfUDdst+ym/FgCfTOKtRk2YP9FJ+GlJnO7Ij2Ez
r/AAoJhhlxUwn59zhyCA6iIOLLix0tfU
=llcV
-----END PGP SIGNATURE-----
Merge tag 'staging-3.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging fixes from Greg Kroah-Hartman:
"Here are a number of small fixes to staging drivers for your 3.8-rc3
tree.
Well, the omapdrm fixes aren't really "small" but they were waiting on
a number of other drm patches to go in through the drm tree, and got
delayed by my vacation over the holidays. They are totally
self-contained, everyone involved have acked them, and they fix issues
that people have been having with the driver.
Other than that one, it's a bunch of tiny bugfixes for a number of
reported issues.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
* tag 'staging-3.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (36 commits)
staging: zram: fix invalid memory references during disk write
staging: tidspbridge: use prepare/unprepare on dsp clocks
staging: tidspbridge: Fix build breakage due to splitting CM functions.
staging: comedi: comedi_test: fix race when cancelling command
staging: comedi: Kconfig: COMEDI_NI_AT_A2150 should select COMEDI_FC
staging: comedi: prevent auto-unconfig of manually configured devices
staging: comedi: fix minimum AO period for NI 625x and NI 628x
staging: vme_pio2: fix oops on module unloading
staging: speakup: avoid out-of-range access in synth_add()
staging: speakup: avoid out-of-range access in synth_init()
staging: rtl8192e: Fix failure to check pci_map_single()
staging: rtl8187se: Fix failure to check pci_map_single()
staging: drm/imx: fix double free bug in error path
staging: drm/imx: several bug fixes
staging: drm/imx: check return value of ipu_reset()
staging: drm/omap: fix flags in dma buf exporting
staging: drm/omap: use omapdss low level API
staging/fwserial: Update TODO file per reviewer comments
staging/fwserial: Limit tx/rx to 1394-2008 spec maximum
staging/fwserial: Refine Kconfig help text
...
This is to get the comedi fixes, and resolve the issue in comdi_test.c
and comedi_fops.c that were caused by changes in both branches.
It also allows the fwserial driver changes to be applied, as they
required the fixes that are in staging-linus.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The structure with common attributes for hid-sensors isn't specific
to the iio-subsystem, so rename it to hid_sensor_common.
Signed-off-by: Alexander Holler <holler@ahsoftware.de>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
The stuff in hid-sensor-attributes.h is needed by every piece which
uses hid-sensor-hub and merging it into hid-sensor-hub.h makes it accessible
from outside the iio subdirectory.
Signed-off-by: Alexander Holler <holler@ahsoftware.de>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Use 'dev' of iio device in a kernel message rather than i2c client device node.
Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
The lp8788-adc is a platform driver of lp8788-mfd.
The platform device is allocated when mfd_add_devices() is called
in lp8788-mfd.
On the other hand, 'lp->dev' is the i2c client device.
Therefore, this 'platform_device' is a proper parent device of
iio device and device kernel message.
Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
markings need to be removed.
This change removes the use of __devinit, __devexit_p, and __devexit
from these drivers.
Based on patches originally written by Bill Pemberton, but redone by me
in order to handle some of the coding style issues better, by hand.
Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
use iio_triggered_buffer_setup(), iio_triggered_buffer_cleanup()
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>