- 11 5月, 2015 4 次提交
-
-
由 Irina Tirdea 提交于
Add support for the Bosh BMC150 Magnetometer. The specification can be downloaded from: http://ae-bst.resource.bosch.com/media/products/dokumente/bmc150/BST-BMC150-DS000-04.pdf. The chip contains both an accelerometer and a magnetometer. This patch adds support only for the magnetometer part. The temperature compensation formulas are based on bmm050_api.c authored by contact@bosch.sensortec.com. Signed-off-by: NIrina Tirdea <irina.tirdea@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Geert Uytterhoeven 提交于
The GPIO subsystem provides dummy GPIO consumer functions if GPIOLIB is not enabled. Hence drivers that depend on GPIOLIB, but use GPIO consumer functionality only, can still be compiled if GPIOLIB is not enabled. Relax the dependency on GPIOLIB if COMPILE_TEST is enabled, where appropriate. Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org> Cc: Jonathan Cameron <jic23@kernel.org> Cc: linux-iio@vger.kernel.org Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Tiberiu Breana 提交于
Added interrupt support for proximity threshold events to the stk3310 driver. Signed-off-by: NTiberiu Breana <tiberiu.a.breana@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Tiberiu Breana 提交于
Minimal implementation of an IIO driver for the Sensortek STK3310 ambient light and proximity sensor. The STK3311 model is also supported. Includes: - ACPI support; - read_raw and write_raw; - reading and setting configuration parameters for gain/scale and integration time for both ALS and PS. - power management Signed-off-by: NTiberiu Breana <tiberiu.a.breana@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 07 5月, 2015 8 次提交
-
-
由 Linus Walleij 提交于
The LSM303DLH accelerometer/magnetometer has a different device identification method than using register 0x0f, instead three registers contain a magic value. We rely on WhoAmI to be zero for this variant. Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Linus Walleij 提交于
The ST sensors are detected by reading a WhoAmI register and matching the number found to a sensor name string. To make it easier to figure out what happens when things go wrong, print the WhoAmI value and the device name we're trying to match. Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Linus Walleij 提交于
Not all sensors support BDU (block data update) and in fact a bunch of the in-kernel sensor settings do not specify the BDU address field. Make this optional. Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Linus Walleij 提交于
Some sensors such as magnetometers and pressure sensors doesn't have interrupts at all, and thus no DRDY setting applies. Make the assignment of an interrupt optional, and do not call st_sensors_set_drdy_int_pin() if there is no drdy (data ready) pin specified. Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Linus Walleij 提交于
Print a proper error message if we're missing the trigger IRQ. Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Antonio Ospite 提交于
Some extra blank lines between if checks don't hurt and improve readability. Signed-off-by: NAntonio Ospite <ao2@ao2.it> Cc: Bastien Nocera <hadess@hadess.net> Reviewed-by: NDaniel Baluta <daniel.baluta@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Antonio Ospite 提交于
This id has been seen in the DSDT of the Teclast X98 Air 3G tablet based on Intel Bay Trail. Signed-off-by: NAntonio Ospite <ao2@ao2.it> Cc: Bastien Nocera <hadess@hadess.net> Reviewed-by: NDaniel Baluta <daniel.baluta@intel.com> Cc: <Stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Jonathan Cameron 提交于
Signed-off-by: NJonathan Cameron <jic23@kernel.org> Reported-by: Nkbuild test robot <fengguang.wu@intel.com> Cc: Vlad Dogaru <vlad.dogaru@intel.com>
-
- 04 5月, 2015 1 次提交
-
-
由 Jonathan Cameron 提交于
Clearly the intent was to error if the value was not 0 or 1. As implemented we have (A != 0 || A != 1) which is always true as A is never both 0 and 1 at the same time. As the autobuilder suggested, && makes more sense for this error check. Reported-by: Nkbuild test robot <fengguang.wu@intel.com> Acked-by: NKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> Cc: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 27 4月, 2015 9 次提交
-
-
由 Irina Tirdea 提交于
Initial value of gpio bitnum is set to -1, but the variable is declared as unsigned. Use a positive invalid value for initial gpio bitnum. Signed-off-by: NIrina Tirdea <irina.tirdea@intel.com> Suggested-by: NHartmut Knaack <knaack.h@gmx.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Irina Tirdea 提交于
Refactor code for simplicity and clarity. Signed-off-by: NIrina Tirdea <irina.tirdea@intel.com> Suggested-by: NHartmut Knaack <knaack.h@gmx.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Irina Tirdea 提交于
Add mma9553_ prefix to all local functions/declarations. Signed-off-by: NIrina Tirdea <irina.tirdea@intel.com> Suggested-by: NHartmut Knaack <knaack.h@gmx.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Irina Tirdea 提交于
Use GENMASK instead of BIT or direct value to define a mask. Signed-off-by: NIrina Tirdea <irina.tirdea@intel.com> Suggested-by: NHartmut Knaack <knaack.h@gmx.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Irina Tirdea 提交于
Use "GPIO" instead of "gpio" and "ACPI" instead of "acpi". Includes a couple of small style fixes in comments (missing full stop, whitespace, paranthesis). Signed-off-by: NIrina Tirdea <irina.tirdea@intel.com> Suggested-by: NHartmut Knaack <knaack.h@gmx.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Irina Tirdea 提交于
Use return 0 instead of return ret to mark clearly the success return path. Signed-off-by: NIrina Tirdea <irina.tirdea@intel.com> Suggested-by: NHartmut Knaack <knaack.h@gmx.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Irina Tirdea 提交于
When configuring gpio, we need to read initial values for activity and step count. This function may fail due to i2c read errors. Check the error code returned by mma9553_read_activity_stepcnt and return the appropriate error in gpio config function. Signed-off-by: NIrina Tirdea <irina.tirdea@intel.com> Reported-by: NHartmut Knaack <knaack.h@gmx.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Irina Tirdea 提交于
Fix typo in Reset/Suspend/Clear Application ID definition. Signed-off-by: NIrina Tirdea <irina.tirdea@intel.com> Reported-by: NHartmut Knaack <knaack.h@gmx.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Irina Tirdea 提交于
Fix docummentation for mma9553_read_* functions. Signed-off-by: NIrina Tirdea <irina.tirdea@intel.com> Reported-by: NHartmut Knaack <knaack.h@gmx.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 26 4月, 2015 2 次提交
-
-
由 Daniel Baluta 提交于
Added support for Liteon 301 Ambient light sensor. Since LTR-301 and LTR-501 are register compatible(and even have same part id), LTR-501 driver has been extended to support both devices. LTR-501 is similar to LTR-301 in ALS sensing, But the only difference is, LTR-501 also supports proximity sensing. LTR-501 - ALS + Proximity combo LTR-301 - ALS sensor. Signed-off-by: NKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> Signed-off-by: NDaniel Baluta <daniel.baluta@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Daniel Baluta 提交于
This device is register compatible with LTR501, with a minor difference for ALS control register as showed below: ALS Control register for LTR501: 7 6 5 4 3 2 1 0 +------+------+------+------+------+------+------+------+ | | | | | | Reserved | Gain | SW | ALS Mode | | | | Reset| | +------+------+------+------+------+------+------+------+ ALS Control register for LTR559: 7 6 5 4 3 2 1 0 +------+------+------+------+------+------+------+------+ | | | | | | Reserved | Gain | SW | ALS | | | | Reset| Mode | +------+------+------+------+------+------+------+------+ We handle this difference by introducing ltr501_chip_info. Datasheet for LTR559 is at: http://optoelectronics.liteon.com/upload/download/DS86-2013-0003/S_110_LTR-559ALS-01_DS_V1.pdfSigned-off-by: NDaniel Baluta <daniel.baluta@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 19 4月, 2015 14 次提交
-
-
Added ACPI enumeration support for LTR501 chip. Signed-off-by: NKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
Added rate control support for ALS and proximity threshold interrupts.Also, Added support to modify and read ALS & proximity sensor sampling frequency. LTR-501 supports interrupt rate control using persistence register settings. Writing <n> to persistence register would generate interrupt only if there are <n> consecutive data values outside the threshold range. Since we don't have any existing ABI's to directly control the persistence register count, we have implemented the rate control using IIO_EV_INFO_PERIOD. _period event attribute represents the amount of time in seconds an event should be true for the device to generate the interrupt. So using _period value and device frequency, persistence count is calculated in driver using following logic. count = period / measurement_rate If the given period is not a multiple of measurement rate then we round up the value to next multiple. This patch also handles change to persistence count whenever there is change in frequency. Signed-off-by: NKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
This patch adds interrupt support for Liteon 501 chip. Interrupt will be generated whenever ALS or proximity data exceeds values given in upper and lower threshold register settings. Signed-off-by: NKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
Added support to modify and read ALS integration time. Signed-off-by: NKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Peter Meerwald 提交于
just cleanup, no functional change Signed-off-by: NPeter Meerwald <pmeerw@pmeerw.net> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Peter Meerwald 提交于
just cleanup, no functional change Signed-off-by: NPeter Meerwald <pmeerw@pmeerw.net> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Peter Meerwald 提交于
just cleanup, no functional change Signed-off-by: NPeter Meerwald <pmeerw@pmeerw.net> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Vlad Dogaru 提交于
If a GPIO reset pin is listed in ACPI or Device Tree, use it to reset the device on initialization. Signed-off-by: NVlad Dogaru <vlad.dogaru@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Vlad Dogaru 提交于
Signed-off-by: NVlad Dogaru <vlad.dogaru@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Vlad Dogaru 提交于
In the interest of lowering power usage, we only activate the proximity channels and interrupts that we are currently using. For raw reads, we activate the corresponding channel and the data ready interrupt and wait for the interrupt to trigger. If no interrupt is available, we wait for the documented scan period, as specified in the datasheet. The following types of usage patterns may overlap: * raw proximity reads (need a single data ready interrupt) * trigger usage (needs data ready interrupts as long as active) * proximity events (need near/far interrupts) * triggered buffer reads (don't need any interrupts, but are usually coupled with our own trigger. To mitigate all possible patterns, we implement usage counting for all the resources used: data ready interrupts, near/far interrupts and individual channels. The device enters sleep mode as documented in the data sheet when its buffer, trigger and events are disabled, and no raw reads are currently running. Because of this new usage pattern, it is important that we give the device a chance to perform an initial compensation for all its channels at probe time. Signed-off-by: NVlad Dogaru <vlad.dogaru@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
Fix a typo triggering a duplicate const warning on some compilers. Signed-off-by: NVianney le Clément de Saint-Marcq <vianney.leclement@essensium.com> Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
Added regmap support. It will be useful to handle bitwise updates to als & ps control registers. Signed-off-by: NKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Vlad Dogaru 提交于
Signed-off-by: NVlad Dogaru <vlad.dogaru@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Vlad Dogaru 提交于
Signed-off-by: NVlad Dogaru <vlad.dogaru@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 10 4月, 2015 2 次提交
-
-
由 Vlad Dogaru 提交于
Signed-off-by: NVlad Dogaru <vlad.dogaru@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Daniel Baluta 提交于
This makes ltr501 code consistent with the coding style adopted for the new drivers added to IIO. We prepare the path for adding support for LTR559 chip. Reported by checkpatch.pl Signed-off-by: NDaniel Baluta <daniel.baluta@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-