17 Nov, 2014
8 commits
-
Set the threshold to low by default. With this thresholds any movement
on the device with this sensor will generate event.Signed-off-by: Srinivas Pandruvada
Signed-off-by: Jonathan Cameron -
Change event spec direction from
IIO_EV_DIR_RISING | IIO_EV_DIR_FALLING
to
IIO_EV_DIR_EITHERSuggested-by: Daniel Baluta
Signed-off-by: Srinivas Pandruvada
Signed-off-by: Jonathan Cameron -
This chip is capable to identify motion across x, y and z axes. So
send different events.Signed-off-by: Srinivas Pandruvada
Signed-off-by: Jonathan Cameron -
When mode set fails due to some transient failures, it will atleast
reset the state of runtime usage count and also let the runtime
suspend retry from the driver framework.Signed-off-by: Srinivas Pandruvada
Signed-off-by: Jonathan Cameron -
Change event spec direction from
IIO_EV_DIR_RISING | IIO_EV_DIR_FALLING
to
IIO_EV_DIR_EITHERSuggested-by: Daniel Baluta
Signed-off-by: Srinivas Pandruvada
Signed-off-by: Jonathan Cameron -
This chip is capable to identify motion across x, y and z axes. So
send different events.Signed-off-by: Srinivas Pandruvada
Signed-off-by: Jonathan Cameron -
Change the mode to push/pull type instead of open drain as some
platforms fails to drive the GPIO pin with open drain.Signed-off-by: Srinivas Pandruvada
Signed-off-by: Jonathan Cameron -
When mode set fails due to some transient failures, it will atleast
reset the state of runtime usage count and also let the runtime
suspend retry from the driver framework.Signed-off-by: Srinivas Pandruvada
Signed-off-by: Jonathan Cameron
16 Nov, 2014
2 commits
-
The mcb_device_id table is supposed to be zero-terminated.
Signed-off-by: Axel Lin
Cc:
Signed-off-by: Jonathan Cameron -
Currently, we get the new GSEL bits by OR-ing the old values
with the new ones. This only works first time when the old
values are 0.Startup:
* GSEL0 = 0, GSEL1 = 0Set range to 4G: (GSEL0 = 1, GSEL1 = 0)
* GSEL0 = 0 | 1 = 1
* GSEL1 = 0 | 0 = 0
* correctChange range to 2G: (GSEL0 = 0, GSEL1 = 0)
* GSEL0 = 1 | 0 = 1
* GSEL1 = 0 | 0 = 0
* wrong, GSEL0 should be 0This has the nice effect that we can use the full scale range,
exported in in_accel_scale_available.Fixes: a735e3d7f03 (iio: accel: kxcjk-1013: Set adjustable range)
Signed-off-by: Daniel Baluta
Reviewed-by: Srinivas Pandruvada
Cc:
Signed-off-by: Jonathan Cameron
06 Nov, 2014
4 commits
-
Signed-off-by: George McCollister
Acked-by: Hartmut Knaack
Cc:
Signed-off-by: Jonathan Cameron -
Because IIO_EV_DIR_* are not bitmasks but enums,
IIO_EV_DIR_RISING | IIO_EV_DIR_FALLING is not equal
with IIO_EV_DIR_EITHER.This could lead to potential misformatted sysfs attributes
like:
* in_accel_x_thresh_(null)_en
* in_accel_x_thresh_(null)_period
* in_accel_x_thresh_(null)_valueor even memory corruption.
Fixes: b4b491c083 (iio: accel: kxcjk-1013: Support threshold)
Signed-off-by: Daniel Baluta
Cc:
Signed-off-by: Jonathan Cameron -
Fix the compiler error when the CONFIG_PM_OPS flag is not set.
drivers/iio/light/tsl4531.c:235:8: error: ‘tsl4531_suspend’ undeclared here (not in a function)
drivers/iio/light/tsl4531.c:235:8: error: ‘tsl4531_resume’ undeclared here (not in a function)Signed-off-by: Dan Murphy
Signed-off-by: Jonathan Cameron -
Use byte_for_channel as iterator to properly initialize the buffer.
Signed-off-by: Robin van der Gracht
Acked-by: Denis Ciocca
Signed-off-by: Jonathan Cameron
Cc:
22 Sep, 2014
2 commits
-
Fix up a build merge error in drivers/iio/accel/bma180.c that I caused.
Signed-off-by: Greg Kroah-Hartman
-
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
18 commits
-
the BMA250 has only 10-bit resolution; while the data readout registers
have identical layout, the configuration is completely different compared
to the BMA180datasheet: http://ae-bst.resource.bosch.com/media/products/dokumente/bma250/BST-BMA250-DS002-05.pdf
Signed-off-by: Peter Meerwald
Cc: Oleksandr Kravchenko
Signed-off-by: Jonathan Cameron -
makes it easier to add more chip variants and removes redundancy:
scales and frequencies are now stated just onceSigned-off-by: Peter Meerwald
Cc: Oleksandr Kravchenko
Signed-off-by: Jonathan Cameron -
allow to specify channels resolution and compute shift assuming
16-bit registers and MSB allocationSigned-off-by: Peter Meerwald
Cc: Oleksandr Kravchenko
Signed-off-by: Jonathan Cameron -
move part of bma180_init() to bma180_config() (split initialization and
configuration code); configuration is heavily chip-specificSigned-off-by: Peter Meerwald
Cc: Oleksandr Kravchenko
Signed-off-by: Jonathan Cameron -
Signed-off-by: Peter Meerwald
Cc: Oleksandr Kravchenko
Signed-off-by: Jonathan Cameron -
statically allocate maximum size
Signed-off-by: Peter Meerwald
Cc: Oleksandr Kravchenko
Signed-off-by: Jonathan Cameron -
8-bit signed; 0 LSB @ 24 °C, 0.5 °C per LSB
Signed-off-by: Peter Meerwald
Cc: Oleksandr Kravchenko
Signed-off-by: Jonathan Cameron -
Signed-off-by: Peter Meerwald
Cc: Oleksandr Kravchenko
Signed-off-by: Jonathan Cameron -
Signed-off-by: Peter Meerwald
Cc: Oleksandr Kravchenko
Signed-off-by: Jonathan Cameron -
and minor cleanups
Signed-off-by: Peter Meerwald
Cc: Oleksandr Kravchenko
Signed-off-by: Jonathan Cameron -
Signed-off-by: Peter Meerwald
Cc: Oleksandr Kravchenko
Signed-off-by: Jonathan Cameron -
Add support for the BMI055 gyroscope sensor. BMI055 is a package
consisting of an acceleration sensor and a gyroscope. This patch
adds support for the gyroscope only.Spec downloaded from:
http://ae-bst.resource.bosch.com/media/products/dokumente/bmi055/BST-BMI055-DS000-06.pdfThe BMI055 gyroscope uses the same register definition as BMG160,
but does not specify a temp register. However, the temp register
seems to be working in the same way as for BMG160, so this patch
does not remove the temp channel for BMI055.Signed-off-by: Irina Tirdea
Reviewed-by: Srinivas Pandruvada
Signed-off-by: Jonathan Cameron -
Noticed when compiling with CONFIG_PM_RUNTIME not set:
kxcjk-1013.c: warning: ‘kxcjk1013_get_startup_times’ defined but not used [-Wunused-function]Introduced by commit 124e1b1d (iio: accel: kxcjk-1013: support runtime pm).
Signed-off-by: Daniel Baluta
Reviewed-by: Srinivas Pandruvada
Signed-off-by: Jonathan Cameron -
Use const char* instead of casting const char* to char*.
Signed-off-by: Irina Tirdea
Signed-off-by: Jonathan Cameron -
When CONFIG_PM_RUNTIME is not defined and bmg160 tries to power
off the device, bmg160_set_power_state will call pm_runtime_put_autosuspend,
which is not implemented (wil return -ENOSYS).Only call bmg160_set_power_state when CONFIG_PM_RUNTIME is defined.
Signed-off-by: Irina Tirdea
Acked-by: Hartmut Knaack
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 -
If touchscreen mode is enabled and a conversion is requested on another
channel, the result in the last converted data register can be a
touchscreen relative value. Starting a conversion involves to do a
conversion for all active channel. It starts with ADC channels and ends
with touchscreen channels. Then if ADC_LCD register is not read quickly,
its content may be a touchscreen conversion.
To remove this temporal constraint, the conversion value is taken from
the channel data register.Signed-off-by: Ludovic Desroches
Acked-by: Alexandre Belloni
Acked-by: Nicolas Ferre
Cc: Stable@vger.kernel.org
Signed-off-by: Jonathan Cameron -
This patch fixes incorrect logic for assigning address
to auxiliary channels of xilinx xadc.Signed-off-by: Subbaraya Sundeep Bhatta
Acked-by: Lars-Peter Clausen
Cc: Stable@vger.kernel.org
Signed-off-by: Jonathan Cameron
14 Sep, 2014
2 commits
-
This patch adds support for KXTJ2-1009 3-axis acceleromenter sensor.
KXTJ2-1009 uses the same register definitions as KXCJK-1013.The specification for KXTJ2-1009 can be downloaded from:
http://www.kionix.com/sites/default/files/KXTJ2-1009%20Specifications%20Rev%204.pdfReviewed-by: Srinivas Pandruvada
Signed-off-by: Daniel Baluta
Signed-off-by: Jonathan Cameron -
The following chips are either similar or have only the resolution
different. Hence, change this driver to support these chips too:BMI055 - combo chip (accelerometer part is identical to BMC150's)
BMA255 - identical to BMC150's accelerometer
BMA222E - 8 bit resolution
BMA250E - 10 bit resolution
BMA280 - 14 bit resolutionAdditionally:
* add bmc150_accel_match_acpi_device() function to check that the device
has been enumerated through ACPI;
* rename bmc150_accel_acpi_gpio_probe() to bmc150_accel_gpio_probe()
since the ACPI matching has been moved to the new function. Also, this
will allow for the GPIO matching to be done against a device tree too, not only
ACPI tree;
* rename bmc150_scale_info struct member 'range' to 'reg_range' to be
consistent with the naming convention used elsewhere in the driver
and declare it u8, instead of int;
* change CONFIG description to list all supported chips;Signed-off-by: Laurentiu Palcu
Acked-by: Srinivas Pandruvada
Signed-off-by: Jonathan Cameron
11 Sep, 2014
1 commit
-
Minimal implementation. This driver provides raw illuminance readings.
This is based on drivers/hwmon/al3320.c (*) driver from msm tree written
by Tsechih Lin* https://android.googlesource.com/kernel/msm.git
Signed-off-by: Daniel Baluta
Reviewed-by: Hartmut Knaack
Signed-off-by: Jonathan Cameron
31 Aug, 2014
1 commit
-
This patch adds support for KXCJ9-1008 3-axis acceleromenter sensor.
KXCJ9-1008 uses the same register definitions as KXCJK-1013.The specification for KXCJ9-1008 can be downloaded from:
http://www.kionix.com/sites/default/files/KXCJ9-1008%20Specifications%20Rev%205.pdfSigned-off-by: Daniel Baluta
Signed-off-by: Jonathan Cameron
30 Aug, 2014
2 commits
-
When CONFIG_PM_RUNTIME is not set, the following issues are seen:
* warning message at compilation time:
warning: 'bmc150_accel_get_startup_times' defined but not used [-Wunused-function]
* bmc150_accel_set_power_state() will always fail and reading the
accelerometer data is impossible;
This occurs because of the call to pm_runtime_put_autosuspend calls
__pm_runtime_suspend which returns -ENOSYS.This commit fixes these.
Signed-off-by: Laurentiu Palcu
Signed-off-by: Jonathan Cameron -
According to documentation ([1] - page 27), the range for 16G is
7.81mg/LSB. Converted to SI, this is:
7.81 * 10^-3 * 9.80665 m/s^2 / LSB = 0.0765899365 m/s^2 / LSB[1] http://ae-bst.resource.bosch.com/media/products/dokumente/bmc150/BST-BMC150-DS000-04.pdf
Signed-off-by: Laurentiu Palcu
Signed-off-by: Jonathan Cameron