22 Sep, 2014
1 commit
-
We want the fixes in there, and it resolves a merge issue with
drivers/iio/accel/bma180.cSigned-off-by: Greg Kroah-Hartman
15 Sep, 2014
2 commits
-
Use const char* instead of casting const char* to char*.
Signed-off-by: Irina Tirdea
Signed-off-by: Jonathan Cameron -
This patch fix gains values. The first driver was designed using
engineering samples, in mass production the values are changed.Signed-off-by: Denis Ciocca
Cc: Stable@vger.kernel.org
Signed-off-by: Jonathan Cameron
27 Aug, 2014
1 commit
-
This patch removes the .owner field for drivers which use the
platform_driver_register api because this is overriden in
_platform_driver_register.Signed-off-by: Sanjeev Sharma
Signed-off-by: Jonathan Cameron
27 Jul, 2014
1 commit
-
Fix build warning, sizeof() called on dynamically
sized pointer, by removing the call and the dependent
function parameter. It is not needed or used in this
driver, when pushing values to an iio buffer.Changes from v1
- Fix mistake in varible nameSigned-off-by: Reyad Attiyat
Signed-off-by: Jonathan Cameron
25 Jul, 2014
1 commit
-
…/iio into staging-next
Jonathan writes:
Fourth round of IIO new drivers, functionality and cleanups for the 3.17 cycle
New functionality
* A new modifier to indicate that a rotation is relative to either
true or magnetic north. This is to be used by some magnetometers
that provide data in this way.
* hid magnetometer now supports output rotations from various variants on
North
* HMC5843 driver converted to regmap and reworked to allow easy support
of other similar devices. Support for HMC5983 added via both i2c and SPI.
* Rework of Exynos driver to simplify extension to support more devices.
* Addition of support for the Exynos3250 ADC (which requires an additional
clock) Support for quite a few more devices on its way.Cleanups
* ad7997 - a number of cleanups and tweaks to how the events are controlled
to make it more intuitive.
* kxcjk - cleanups and minor fixes for this new driver.
20 Jul, 2014
2 commits
-
Add the HID usage attribute ID's and IIO channel info for rotation
from north support.Signed-off-by: Reyad Attiyat
Acked-by: Srinivas Pandruvada
Signed-off-by: Jonathan Cameron -
Scan for and count the HID usage attributes supported by the driver.
This allows for the driver to only setup the IIO channels for the
sensor usages present in the HID USB reports.Changes from v5
-Fixed kernel panic from invalid pointer dereference
-Fixed variable assignment styleSigned-off-by: Reyad Attiyat
Acked-by: Srinivas Pandruvada
Signed-off-by: Jonathan Cameron
14 Jul, 2014
1 commit
-
We want the fixes in -rc5 in here as well.
Signed-off-by: Greg Kroah-Hartman
12 Jul, 2014
1 commit
-
The I2C devices that make up the STMicroelectronics MEMS sensors
may be sneakily enabled by cleverly giving the device node the same
name as a string match from the platform device ID table. However
the right method is to use the compatible string.On detection, the ST sensors use the ID string to probe and
instatiate the right sensor driver, so pass the kernel-internal ID
string in the .data field of the OF match table, and set the I2C
client name to this name when a compatible match is used.This avoids having misc Linux-specific strings floating around in
the device tree.Cc: Lee Jones
Cc: Denis CIOCCA
Signed-off-by: Linus Walleij
Signed-off-by: Jonathan Cameron
07 Jul, 2014
1 commit
-
This allows in kernel client drivers to access this
Signed-off-by: Jonathan Cameron
Cc: Denis Ciocca
Reviewed-by: Hartmut Knaack
05 Jul, 2014
1 commit
-
IIO_CHAN_INFO_SAMP_FREQ and IIO_CHAN_INFO_HYSTERESIS cases ignored
the actual return values (which could be -EINVAL) and instead
returned IIO_VAL_INT_PLUS_MICRO always. Return the actual value
obtained from the functions. Both functions return IIO_VAL_INT_PLUS_MICRO
upon success.Signed-off-by: Sachin Kamat
Cc: Srinivas Pandruvada
Signed-off-by: Jonathan Cameron
30 Jun, 2014
1 commit
-
…/iio into staging-next
Jonathan writes:
Second round of new drivers and cleanups for IIO in the 3.17 cycle.
New drivers
* mcp4902, mcp4912 and mcp4922 SPI DAC driver.
* max1027, max1029 and max1031 SPI ADC driver.Cleanups
* cm32181 - use devm APIs to simplify error paths.
* ak8975 - use devm APIs to simplify error paths.
* ad9850 - drop some unused defines and an unnecessary goto.
* hmc5843 - add missing devices to the device id table and the documentation.
* ad9832 - small formatting cleanups.
* sca3000 - hide direct use of the stufftoread element by adding a
data_available function. This is a precursor for the addition of buffer
watermarks to the subsystem but stands as a good cleanup on its own.
29 Jun, 2014
1 commit
-
This patch use devm_* APIs make driver simpler.
Signed-off-by: Beomho Seo
Signed-off-by: Jonathan Cameron
23 Jun, 2014
1 commit
-
We want the staging fixes here as well.
19 Jun, 2014
1 commit
-
…/jic23/iio into staging-linus
Jonathan writes:
First set of IIO fixes for the 3.16 cycle.
A mixed bag of fixes, many of which feel just to late for 3.15.
* hid sensors - some devices need a feature report request in order to
change power state. This isn't part of the spec, but has been observed
on several devices and does no harm to others.
* mpl3115 has had two errors in the buffer description fixed. The presure is
signed, not unsigned and the temperature has 12 bits rather than 16.
These could lead to incorrect interpretation of the data in userspace.
* tsl2x7x - the high byte of the proximity thresholds should be written along
with the low byte (which was). This could lead to interesting results
with large thresholds.
* twl4030 - a flag to specify processed values were required was not set
when initializing a reading. As such values returned were in an unknown
state. Fixed by simply initializing it appropriately.
* IIO_SIMPLE_DUMMY_BUFFER did not select IIO_BUFFER leading to randconfig
build errors.
* ak8975 was applying an unwanted le16_to_cpu conversion as the i2c framework
already performs one. As such for big endian systems, the bytes would be
in the wrong order in the magnetic field measurements reported.
* mxs-lradc - the controllable voltage dividers were not enabled / disabled for
later channels than the first one during conversion.
* at91_adc error handling returned -ENOMEM in a u8. Return value of
at91_adc_get_trigger_value_by_name changed to int thus allowing -ENOMEM and
also original values to be returned.
* mcb - mcb_request_mem returns and ERR_PTR but the caller was checking for
NULL to detect an error.
17 Jun, 2014
1 commit
-
Added IIO magnetometer driver for AK09911. In functionality is resembles
AK8975 or AK8963. But there are several differences, so instead of
modifying existing AK8975 driver and keep it clean, implemented as
a separate driver.
The key differences are:
- Register map is different and have different indexes
- AK09911 is a very compact interface with no DRDY pin. So no support
of interrupt or GPIO poll
- Even for polled mode no mention on ST2 register, which is required in
ak8975 driver
- mode values are different for fuse accessSigned-off-by: Srinivas Pandruvada
Signed-off-by: Jonathan Cameron
07 Jun, 2014
1 commit
-
i2c_smbus_read_word_data() does host endian conversion already,
no need for le16_to_cpu()Signed-off-by: Peter Meerwald
Signed-off-by: Jonathan Cameron
Cc: Stable@vger.kernel.org
05 May, 2014
3 commits
-
Added support for raw reading of channel. If the sensor is powered
off, it will turn on for reading valueSigned-off-by: Srinivas Pandruvada
Signed-off-by: Jonathan Cameron -
Added an API to allow client drivers to turn ON and OFF sensors for
quick read. Added data_read as counting varaible instead of boolean,
so that sensor is powered off only when last user released it.Signed-off-by: Srinivas Pandruvada
Signed-off-by: Jonathan Cameron -
Using units and unit exponent to calculate scale which is compliant
to IIO ABI.Signed-off-by: Srinivas Pandruvada
Signed-off-by: Jonathan Cameron
03 May, 2014
3 commits
-
Fixing issue caused by clash of two patches, one adding a name with
the acpi enumeration patch.54ab3e24 Beomho Seo 2014-04-02 @572 indio_dev->name = id->name;
d913971e Srinivas Pandruvada 2014-03-19 574 indio_dev->name = name;The name added by commit 54ab3e24 is not required as this is already
added by taking care of case where id is NULL.Signed-off-by: Srinivas Pandruvada
Reported-by: kbuild test robot
Signed-off-by: Jonathan Cameron -
add IIO_CHAN_INFO_CALIBBIAS
Signed-off-by: Peter Meerwald
Signed-off-by: Jonathan Cameron -
DR bits need to be shifted; since MAG3110_CTRL_DR_DEFAULT is
zero, the change has no effectSigned-off-by: Peter Meerwald
Signed-off-by: Jonathan Cameron
26 Apr, 2014
2 commits
-
Currently the pressure sensor has code to retrieve and enable two
regulators for Vdd and Vdd IO, but actually these voltage inputs
are found on all of these ST sensors, so move the regulator
handling to the core and make sure all the ST sensors call these
functions on probe() and remove() to enable/disable power.Here also mover over to obtaining the regulator from the *parent*
device of the IIO device, as the IIO device is created on-the-fly
in this very subsystem it very unlikely evert have any regulators
attached to it whatsoever. It is much more likely that the parent
is a platform device, possibly instantiated from a device tree,
which in turn have Vdd and Vdd IO supplied assigned to it.Cc: Lee Jones
Cc: Denis CIOCCA
Signed-off-by: Linus Walleij
Signed-off-by: Jonathan Cameron -
It is pretty helpful to know already from dmesg that a certain
device is successfully registered, instead of having to browse
sysfs to see if it's actually there.Cc: Lee Jones
Cc: Denis CIOCCA
Signed-off-by: Linus Walleij
Signed-off-by: Jonathan Cameron
29 Mar, 2014
1 commit
-
Added capability so that this device can be enumerated via ACPI.
Signed-off-by: Srinivas Pandruvada
Signed-off-by: Jonathan Cameron
22 Mar, 2014
1 commit
-
AK8963 and AK8975 use same register definitions, except the range
of X,Y,Z values. Added support of 8963 based on i2c_device_id.
Unfortunately there is no way to detect the type via registers,
both device registers return 0x48 as id of chipset.Signed-off-by: Srinivas Pandruvada
Signed-off-by: Jonathan Cameron
26 Feb, 2014
1 commit
-
drivers/iio/magnetometer/mag3110.c:197 mag3110_read_raw()
info: ignoring unreachable code.drivers/iio/magnetometer/mag3110.c
185 case IIO_CHAN_INFO_SCALE:
186 switch (chan->type) {
187 case IIO_MAGN:
188 *val = 0;
189 *val2 = 1000;
190 return IIO_VAL_INT_PLUS_MICRO;
191 case IIO_TEMP:
192 *val = 1000;
193 return IIO_VAL_INT;
194 default:
195 return -EINVAL;
196 }
197 return IIO_VAL_INT_PLUS_MICRO;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^introduced by f9279d3a, mag3110: Scale factor missing
Signed-off-by: Peter Meerwald
Reported-by: Dan Carpenter
Signed-off-by: Jonathan Cameron
15 Feb, 2014
1 commit
-
temperature is reported in milli-Celsius
Signed-off-by: Peter Meerwald
Signed-off-by: Jonathan Cameron
12 Feb, 2014
1 commit
-
…/iio into staging-next
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 sensorCleanups
* 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.
08 Feb, 2014
4 commits
-
This patch add device name.
Signed-off-by: Beomho Seo
Signed-off-by: Jonathan Cameron -
This effects the reported scale of the raw values, and thus userspace
applications that use this value.One micro tesla equal 0.01 gauss. So I have fixed calculation formula And add RAW_TO_GAUSS macro.
ASA is in the range of 0 to 255. If multiply 0.003, calculation result(in_magn_[*]_scale) is
always 0. So multiply 3000 and return and IIO_VAL_INT_PLUS_MICRO.
As a result, read_raw call back function return accurate scale value.Signed-off-by: Beomho Seo
Cc: stable@vger.kernel.org
Signed-off-by: Jonathan Cameron -
need to print leading zeros, hence "%d.%06d"
Signed-off-by: Peter Meerwald
Signed-off-by: Jonathan Cameron -
individual reads are not permitted concurrently with buffered reads
Signed-off-by: Peter Meerwald
Signed-off-by: Jonathan Cameron
18 Dec, 2013
1 commit
-
The IIO_ST macro no longer covers all the elements of struct scan_type
and has this has lead to some bugs being introduced.The drivers are easier to follow with this structure being directly
filled so that is now preferred.Signed-off-by: Jonathan Cameron
Acked-by: Lars-Peter Clausen
03 Dec, 2013
1 commit
-
we want these fixes in here.
Signed-off-by: Greg Kroah-Hartman
09 Nov, 2013
3 commits
-
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
Signed-off-by: Jonathan Cameron -
Signed-off-by: Peter Meerwald
Signed-off-by: Jonathan Cameron -
last argument of IIO_ST is shift, not endianness
Signed-off-by: Peter Meerwald
Signed-off-by: Jonathan Cameron