- 07 5月, 2015 2 次提交
-
-
由 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>
-
由 Jonathan Cameron 提交于
Note this is not a bug due to the fact the region cannot be reached without the sanity check passing. The autobuilder reported it as missaligned code which is kind of true as well. Signed-off-by: NJonathan Cameron <jic23@kernel.org> Cc: Roberta Dobrescu <roberta.dobrescu@gmail.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>
-
- 01 5月, 2015 1 次提交
-
-
由 Roberta Dobrescu 提交于
This patch refactors the isl29018 driver code in order to use standard sysfs attributes for scale and integration time. ISL29018 light sensor uses four ranges and four ADC's resolutions which influence the calculated lux. Adc resolution is strongly connected to integration time and range should be controlled by scale. This patch introduces the usage of integration time and scale instead of adc resolution and range. Signed-off-by: NRoberta Dobrescu <roberta.dobrescu@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 27 4月, 2015 11 次提交
-
-
由 Roberta Dobrescu 提交于
This patch renames lux_scale to calibscale and lux_uscale to ucalibscale. This is done in order to avoid confusion since these parameters are used for hardware applied calibration. Signed-off-by: NRoberta Dobrescu <roberta.dobrescu@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Roberta Dobrescu 提交于
This patch removes non-standard sysfs attributes range, range_available, adc_resolution and adc_resolution_available. It also removes the corresponding show and store functions. This is in preparation for using standard IIO attributes in order to move the code out of staging. Signed-off-by: NRoberta Dobrescu <roberta.dobrescu@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 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>
-
- 09 4月, 2015 7 次提交
-
-
由 Vignesh R 提交于
Refactor DT parsing into a separate function from probe() to help addition of more DT parameters later. No functional changes. Signed-off-by: NVignesh R <vigneshr@ti.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
The device uses the MSB of the returned temperature value as an error flag. Return a read error when this bit is set. 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>
-
Add support for system sleep and runtime power management. To wake up the device, the SDA line should be held low for at least 33ms while SCL is high. As this is not possible using the i2c API (and not supported by all i2c adapters), a GPIO connected to the SDA line is needed. The GPIO is named "wakeup" and can be specified in a device tree with the "wakeup-gpios" binding. If the wake-up GPIO is not given, disable power management for the device. Entering sleep requires an SMBus byte access, hence power management is also disabled if byte access is not supported by the adapter. 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>
-
The mapping from the 16-bit EEPROM value to the decimal 0-1 range is approximate. A special case ensures 0xFFFF shows as 1.0 instead of 0.999998565. Writing to EEPROM requires an explicit erase by writing zero. In addition, it takes 20ms for the erase/write to complete. During this time no EEPROM register should be accessed. Therefore, two msleep()s are added to the write function and a mutex protects against concurrent access. 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>
-
Also introduce "melexis" as a vendor prefix for device tree bindings. 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>
-
Contact-less IR temperature sensors measure the temperature of an object by using its thermal radiation. Surfaces with different emissivity ratios emit different amounts of energy at the same temperature. IIO_CHAN_INFO_CALIBEMISSIVITY allows the user to inform the sensor of the emissivity of the object in front of it, in order to effectively measure its temperature. A device providing such setting is Melexis's MLX90614: http://melexis.com/Assets/IR-sensor-thermometer-MLX90614-Datasheet-5152.aspx. 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>
-
由 Vlad Dogaru 提交于
In its present state, the driver mandates that its buffer only be triggered by one of the device's own triggers (data ready or any motion). This is not always desirable, for example because the interrupt pins may not be wired in. Patch the driver to be able to accept using an external trigger, such as one based on hrtimer. When using such a trigger, we need to ensure that the device is powered on when the buffer is started. We do that by setting setup_ops for the buffer. Signed-off-by: NVlad Dogaru <vlad.dogaru@intel.com> Reviewed-by: NDaniel Baluta <daniel.baluta@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-