Age | Commit message (Collapse) | Author |
|
Some SPI controllers may not be able to handle transfer buffers that are placed
on the stack.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Fixes the following warnings from sparse:
drivers/iio/dac/ad5504.c:71:19: warning: incorrect type in initializer (different base types)
drivers/iio/dac/ad5504.c:71:19: expected unsigned short [unsigned] [usertype] tmp
drivers/iio/dac/ad5504.c:71:19: got restricted __be16 [usertype] <noident>
drivers/iio/dac/ad5504.c:80:19: warning: incorrect type in initializer (different base types)
drivers/iio/dac/ad5504.c:80:19: expected unsigned short [unsigned] [usertype] tmp
drivers/iio/dac/ad5504.c:80:19: got restricted __be16 [usertype] <noident>
drivers/iio/dac/ad5504.c:93:16: warning: cast to restricted __be16
drivers/iio/dac/ad5504.c:93:16: warning: cast to restricted __be16
drivers/iio/dac/ad5504.c:93:16: warning: cast to restricted __be16
drivers/iio/dac/ad5504.c:93:16: warning: cast to restricted __be16
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
we want these fixes in here.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
drivers/built-in.o: In function `gp2ap020a00f_thresh_event_handler':
powercap_sys.c:(.text+0x15f90c): undefined reference to `irq_work_queue'
make[1]: *** [vmlinux] Error 1
make[1]: Target `uImage' not remade because of errors.
make: *** [sub-make] Error 2
make: Target `uImage' not remade because of errors.
You need the IRQ work support, but GP2AP020A00F is not selecting this
symbol.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
In the original HID sensor hub firmwares all Named array enums were
to 0-based. But the most recent hub implemented as 1-based,
because of the implementation by one of the major OS vendor.
Using logical minimum for the field as the base of enum. So we add
logical minimum to the selector values before setting those fields.
Some sensor hub FWs already changed logical minimum from 0 to 1
to reflect this and hope every other vendor will follow.
There is no easy way to add a common HID quirk for NAry elements,
even if the standard specifies these field as NAry, the collection
used to describe selectors is still just "logical".
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Jonathan writes:
First set of new features, drivers and cleanups for IIO in the 3.14 cycle.
This mostly consists of patches that didn't quite make the last cycle. Lots
of interesting things under review currently.
Core:
- Add devm_iio_device_register/unregister. I took some convincing on whether
there would be many devices that really were simple enough to need no
explicit actions on removal. Turns out there are some.
- Move some stray docs to above the relevant implemenation.
- Drop a redundant repeated check on the fact the trigger has actually changed
when there is a userspace attempt change it.
Drivers:
New drivers
- Freescale MPL3115A2 Pressure / temperature sensor
New functionality
- hid_sensors: add sensitivity support.
DT bindings
- tsl2563
- hmc5843
Cleanups
- Drop unused scan_type from viperboard adc driver.
- devm_iio_device_register used in viperboard, ad5421, ad5755, adis16130,
adxrs450, vcnl4000, adis16220, ad7816, lpc32xx, adt7316, adis16060, isl29018
and ad2s1200. Note that this was proposed in a number of other drivers
and this revealed a number of missorderings in remove functions. Also for
now I have blocked this on any device that any hardware suspend suport on
the basis that we probably want to power down devices if they have no driver
support loaded.
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus
Jonathan writes:
First round of fixes for IIO in the 3.13 cycle.
The usual mixed bag of fixes.
* 3 cases where kconfig dependencies were missing. We need to keep a closer
eye on this in new drivers.
* hid_sensors was abusing the iio_dev->trigger pointer. We had a round
of clearing this out some time ago but this driver clearly slipped through.
* A misuse of the IIO_ST macro, in mcp3422, which we should really make a
concertive effort to finish removing.
* Avoid a double free introduced by recent buffer reference counting in the
one driver that (quite reasonably!) does things differently (am335x)
* A missing mutex_unlock in kxsd9 that means that driver has been non
functional for some time and no one noticed (including me who for once
actually has one of the supported devices).
* An incorrect assumption about the parameters of sign_extend32 in mcp3422.
So nothing controversial. The only substantial patch is the hid_sensors
one and that is actually just adding a new pointer to the devices private
state then moving the code over to it.
|
|
devm_iio_device_register simplifies the code.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
devm_iio_device_register simplifies the code.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
devm_iio_device_register simplifies the code.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
devm_iio_device_register simplifies the code.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
devm_iio_device_register simplifies the code.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
devm_iio_device_register simplifies the code.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Add Device Tree support for the TSL2563 driver,
document the binding and add AMS-TAOS Inc. to the
list of vendor prefixes.
Signed-off-by: Sebastian Reichel <sre@debian.org>
Acked-by: Kumar Gala <galak@codeaurora.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
I2C-controlled MEMS sensor with 20-bit pressure measurement (pascal) and
12-bit temperature measurement
driver only exposes basic functionality, see TODO remarks
datasheet: http://cache.freescale.com/files/sensors/doc/data_sheet/MPL3115A2.pdf
v2:
* store 20-bit value in 32-bit buffer element (instead of 24-bit)
* zero buffer to prevent kernel data leak to userspace
* fix mutex unlock in trigger handler (thanks Andi Shyti)
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Reviewed-by: Andi Shyti <andi@etezian.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
same check is performed a new lines above
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
devm_iio_device_register simplifies the code.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Documentation related to function should be placed above
its implementation. Move it accordingly.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Add device managed devm_iio_device_{register,unregister}()
to automatically unregister IIO drivers thus leading to
simplified IIO driver code.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
This will leave a lock held after reading from the device, preventing
any further reads.
Signed-off-by: Frank Zago <frank@zago.net>
Cc: stable@vger.kernel.org
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
This patch enhances the type safety for the kfifo API. It is now safe
to put const data into a non const FIFO and the API will now generate a
compiler warning when reading from the fifo where the destination
address is pointing to a const variable.
As a side effect the kfifo_put() does now expect the value of an element
instead a pointer to the element. This was suggested Russell King. It
make the handling of the kfifo_put easier since there is no need to
create a helper variable for getting the address of a pointer or to pass
integers of different sizes.
IMHO the API break is okay, since there are currently only six users of
kfifo_put().
The code is also cleaner by kicking out the "if (0)" expressions.
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Stefani Seibold <stefani@seibold.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
Use this new function to make code more comprehensible, since we are
reinitialzing the completion, not initializing.
[akpm@linux-foundation.org: linux-next resyncs]
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org> (personally at LCE13)
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
A number of Properties that can be applied to Data Fields are per data
field basis or for all data fields. Adding sensitivity field for all
magnetometer fields, which is most commonly used in currently available
sensor hubs.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
the driver does not support buffering, hence scan_type is not needed
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Lars Poeschel <poeschel@lemonage.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
The driver is missing the iio_buffer_attach() call. As such it will attempt
to free the buffer twice on removal.
Introduced in commit 9e69c9 ("iio: Add reference counting for buffers").
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reported-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
last argument of IIO_ST is shift, not endianness
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
A number of Properties that can be applied to Data Fields are per data
field basis or for all data fields. Adding sensitivity field for all
als fields, which is most commonly used in currently available
sensor hubs.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
A number of Properties that can be applied to Data Fields are per data
field basis or for all data fields. Adding sensitivity field for all
gyro fields, which is most commonly used in currently available
sensor hubs.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
A number of Properties that can be applied to Data Fields are per data
field basis or for all data fields. Adding sensitivity field for all
accelerometer fields, which is most commonly used in currently
available sensor hubs.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
the index argument to sign_extend32() gives the bit position (from 0)
to the sign bit
so e.g. if the measurement has 16-bit resolution, we need to pass 15;
a measurement of 0x8000 should be reported as -32768, not 32768
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
We can't store the trigger instance created by iio_trigger_alloc, in
trig field of iio_device structure. This needs to be stored in the
driver private data. Othewise it can result in crash during module
unload. Hence created a trig_ptr in the common data structure
for each HID sensor IIO driver and storing here.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Fix to return -ENODEV instead of 0 if non-TSMR adc don't
support, as done elsewhere in this function.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
The if check is redundant as the value obtained from
iio_device_register() is already in the required format.
Hence return the function directly.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Remove an inconsequential print message and return directly
thereby cleaning up some code.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Remove an inconsequential print message and return directly
thereby eliminating an intermediate variable.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
The if check is redundant as the value obtained from
iio_device_register() is already in the required format.
Error messages are already printed by iio_device_register();
hence not needed.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
The if check is redundant as the value obtained from
iio_device_register() is already in the required format.
Hence return the function directly. Error messages are already
printed by iio_device_register(); hence not needed.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
The if check is redundant as the value obtained from
iio_device_register() is already in the required format.
Hence return the function directly.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Return directly thereby eliminating an intermediate variable.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Silences the following checkpatch warning:
WARNING: sizeof *iio_attr should be sizeof(*iio_attr)
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Use of pr_err is preferred to printk.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
Signed-off-by: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
ti_adc_dt_ids is always compiled in. Hence of_match_ptr is not
needed.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
nau7802_dt_ids is always compiled in. Hence of_match_ptr is not
needed.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
of_twl6030_match_tbl is always compiled in. Hence of_match_ptr is
not necessary.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
three-axis digital magnetometer with I2C interface
datasheet is available from
http://cache.freescale.com/files/sensors/doc/data_sheet/MAG3110.pdf
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|
|
The driver currently supports only I2C access. But supported devices with an
accuracy of 8-bit are compatible with the SMBus byte access routines.
This patch wraps the send and receive routines depending on the chip
accuracy and fonctionnalities of its adapter.
For instance, this allows us to use a MAX11603 on a ICH7 controller.
This patch also simplifies the max1363_write_basic_config() routine to
use the struct max1363_state fields directly.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
|