19 Sep, 2013
4 commits
-
ade7854_probe can fail. Return the value obtained from it
instead of 0 (success).Signed-off-by: Sachin Kamat
Cc: Barry Song
Signed-off-by: Jonathan Cameron -
recently broken, cd6fe06588423ff4cca85c85c4402027b04dccf1
staging:iio:hmc5843: Use i2c_smbus_read_word_swapped()Signed-off-by: Peter Meerwald
Signed-off-by: Jonathan Cameron -
The lux_uscale value is not initialized at probe. The value will be
uninitialized unless a value is written to it through the iio channel interface.
This fixes that.Signed-off-by: Derek Basehore
Reviewed-on: https://gerrit.chromium.org/gerrit/65998
Signed-off-by: Jonathan Cameron -
…ffer enabled for built in dummy driver.
This only occurs in the unlikely event that the example driver is built
in whilst the buffer implementation is not.Solved by switching from a depends on to a select for this particular case.
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
29 Aug, 2013
11 commits
-
Using devm_iio_device_alloc makes code simpler.
Signed-off-by: Sachin Kamat
Signed-off-by: Jonathan Cameron -
Using devm_iio_device_alloc makes code simpler.
Signed-off-by: Sachin Kamat
Signed-off-by: Jonathan Cameron -
devm_* APIs are device managed and make code simpler.
Signed-off-by: Sachin Kamat
Signed-off-by: Jonathan Cameron -
Using devm_iio_device_alloc makes code simpler.
Signed-off-by: Sachin Kamat
Signed-off-by: Jonathan Cameron -
Using devm_iio_device_alloc makes code simpler.
Signed-off-by: Sachin Kamat
Signed-off-by: Jonathan Cameron -
Using devm_iio_device_alloc makes code simpler.
Signed-off-by: Sachin Kamat
Signed-off-by: Jonathan Cameron -
Using devm_iio_device_alloc makes code simpler.
Signed-off-by: Sachin Kamat
Signed-off-by: Jonathan Cameron -
Using devm_iio_device_alloc makes code simpler.
Signed-off-by: Sachin Kamat
Signed-off-by: Jonathan Cameron -
Using devm_iio_device_alloc makes code simpler.
Signed-off-by: Sachin Kamat
Signed-off-by: Jonathan Cameron -
Using devm_iio_device_alloc makes code simpler.
Signed-off-by: Sachin Kamat
Signed-off-by: Jonathan Cameron -
Using devm_iio_device_alloc makes code simpler.
Signed-off-by: Sachin Kamat
Signed-off-by: Jonathan Cameron
17 Aug, 2013
2 commits
-
The LRADC virtual channels have an 18 bit field to store the sum of up
to 2^5 accumulated samples. The read_raw function however only operates
over a single sample (12 bit resolution).
In order to use this field for scaling operations, we need it to be the
exact resolution value of the LRADC.
Besides, the driver was using an 18 bit mask (LRADC_CH_VALUE_MASK) to
report touch coordinates to userland. A 12 bit mask should be used instead
or else the touch libraries will expect a coordinates range between 0
and 0x3ffff (18 bits), instead of between 0 and 0xfff (12 bits).Signed-off-by: Hector Palacios
Acked-by: Marek Vasut
Acked-by: Alexandre Belloni
Signed-off-by: Jonathan Cameron -
Using devm_iio_device_alloc makes code simpler.
Signed-off-by: Sachin Kamat
Acked-by: Lars-Peter Clausen
Signed-off-by: Jonathan Cameron
04 Aug, 2013
23 commits
-
Signed-off-by: Peter Meerwald
Signed-off-by: Jonathan Cameron -
Signed-off-by: Peter Meerwald
Signed-off-by: Jonathan Cameron -
Signed-off-by: Peter Meerwald
Cc: Shubhrajyoti Datta
Signed-off-by: Jonathan Cameron -
Signed-off-by: Peter Meerwald
Cc: Shubhrajyoti Datta
Signed-off-by: Jonathan Cameron -
avoid polling data ready bit forever; msleep() may be too long
for high sampling frequencies but the driver interface does not
support bufferingSigned-off-by: Peter Meerwald
Cc: Shubhrajyoti Datta
Signed-off-by: Jonathan Cameron -
Signed-off-by: Peter Meerwald
Cc: Shubhrajyoti Datta
Signed-off-by: Jonathan Cameron -
I2C is generally not probed for devices other than those commonly found
on architectures where device treeor board files are not used. Note also
that this implementation does not fill in the name field of the
i2c_board_info structure as the documentation states it must. Hence
it is unlikely anyone is actually using it.Signed-off-by: Peter Meerwald
Cc: Shubhrajyoti Datta
Signed-off-by: Jonathan Cameron -
The drivers is in more or less good shape, conforms to the IIO ABI and none of
the default static code checker report any problems, so move it out of staging.Signed-off-by: Lars-Peter Clausen
Signed-off-by: Jonathan Cameron -
The values presented here are completely bogus. Also ..._available attributes
are supposed to be used for properties that only support discrete sets of
values, but we accept continuous values and will round to the next supported
frequency.Signed-off-by: Lars-Peter Clausen
Signed-off-by: Jonathan Cameron -
A negative sampling frequency is obviously invalid, so use kstrtouint() instead
of strict_strtoul. Also when setting a sampling frequency smaller than the
minimum supported frequency set the frequency to the minimum supported frequency
instead of just cutting off the upper bits of the raw register value.Signed-off-by: Lars-Peter Clausen
Signed-off-by: Jonathan Cameron -
Remove some unused includes from the driver.
Signed-off-by: Lars-Peter Clausen
Signed-off-by: Jonathan Cameron -
While the inclination channel claims to support reading the scale the driver did
not implement this, so trying to read the scale results in a -EINVAL. This patch
fixes it.Signed-off-by: Lars-Peter Clausen
Signed-off-by: Jonathan Cameron -
This is not part of the ABI.
Signed-off-by: Lars-Peter Clausen
Signed-off-by: Jonathan Cameron -
Delete some extra whitespace.
Signed-off-by: Lars-Peter Clausen
Signed-off-by: Jonathan Cameron -
All channels for this device have the same number of bits for calibscale and
caliboffset, there is no need to determine it dynamically based on the channel
type. Also there is no locking required since adis_read_reg_16() will take care
of proper locking on its own.Signed-off-by: Lars-Peter Clausen
Signed-off-by: Jonathan Cameron -
Signed-off-by: Lars-Peter Clausen
Signed-off-by: Jonathan Cameron -
Instead of just cutting of the upper bits of the value make sure that the value
is in the valid range and return an error if it is not.Signed-off-by: Lars-Peter Clausen
Signed-off-by: Jonathan Cameron -
The header is only used by a single C file, just put the register defines
directly into that C file and remove the header.Signed-off-by: Lars-Peter Clausen
Signed-off-by: Jonathan Cameron -
The recomentation for IIO driver is to leave all scan elements off by default
and let userspace decide which channels need to be enabled.Signed-off-by: Lars-Peter Clausen
Signed-off-by: Jonathan Cameron -
The adis16260 driver implements a unique feature in that it allows to change the
orientation of the gyroscope channel by specifying the orientation in platform
data. This feature is as far as I can see unused though and makes the driver
unnecessarily complex. So this patch removes the support for it. If it turns
out we need this, the cleanest approach to implement it is by adding support for
orientation mapping inside the IIO core so it is available to all drivers.Signed-off-by: Lars-Peter Clausen
Signed-off-by: Jonathan Cameron -
Remove the unused 'negate' property from the driver state struct. This also
means we can now use the adis struct directly as the driver data.Signed-off-by: Lars-Peter Clausen
Signed-off-by: Jonathan Cameron -
Return the actual value read from the device and not just the mask.
Signed-off-by: Lars-Peter Clausen
Signed-off-by: Jonathan Cameron -
Using devm_iio_device_alloc makes code simpler.
Signed-off-by: Sachin Kamat
Cc: Laxman Dewangan
Signed-off-by: Jonathan Cameron