- 15 9月, 2013 4 次提交
-
-
由 Jacek Anaszewski 提交于
Add a new driver for the ambient light/proximity sensor device. The driver exposes three channels: light_clear light_ir and proximity. It also supports triggered buffer, high and low ambient light threshold event and proximity detection events. Signed-off-by: NJacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Peter Meerwald 提交于
chip has four 16-bit channels for red, green, blue, clear color intensity; driver supports the TCS3x7x family of devices and was tested with a TCS34725 chip; further information here: http://www.ams.com/eng/Products/Light-Sensors/Color-Sensor/TCS34725 v2 (thanks to Jonathan Cameron): * drop dynamic buffer allocation, buffer is in tcs3472_data * limit sysfs output to PAGE_SIZE * check val2 == 0 when writing CALIBSCALE Signed-off-by: NPeter Meerwald <pmeerw@pmeerw.net> Cc: Jon Brenner <jon.brenner@ams.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Peter Meerwald 提交于
driver for the TSL4531 family of 16-bit I2C ambient light sensors; information is here: http://www.ams.com/eng/Products/Light-Sensors/Ambient-Light-Sensor-ALS/TSL45315 the chip offers simple lux output v3 (thanks Lars-Peter Clausen): * add mutex to when updating integration time * fix chip ID checking * code cleanups v2: * rename to tsl4351 * use INT_TIME Signed-off-by: NPeter Meerwald <pmeerw@pmeerw.net> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Peter Meerwald 提交于
Signed-off-by: NPeter Meerwald <pmeerw@pmeerw.net> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 20 8月, 2013 2 次提交
-
-
由 Peter Meerwald 提交于
using word reads, no need for HI/LO register #defines Signed-off-by: NPeter Meerwald <pmeerw@pmeerw.net> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Peter Meerwald 提交于
IIO_VAL_INT_PLUS_MICRO is the default, no need to return it explicitly Signed-off-by: NPeter Meerwald <pmeerw@pmeerw.net> Acked-by: Nsrinivas pandruvada <srinivas.pandruvada@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 04 8月, 2013 8 次提交
-
-
由 Peter Meerwald 提交于
Signed-off-by: NPeter Meerwald <pmeerw@pmeerw.net> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Peter Meerwald 提交于
Signed-off-by: NPeter Meerwald <pmeerw@pmeerw.net> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Sachin Kamat 提交于
devm_* APIs are device managed and make code simpler. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Reviewed-by: NAmit Kucheria <amit.kucheria@linaro.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Sachin Kamat 提交于
Using devm_iio_device_alloc makes code simpler. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Cc: Johan Hovold <jhovold@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Sachin Kamat 提交于
Using devm_iio_device_alloc makes code simpler. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Cc: Srinivas Pandruvada <srinivas.pandruvada@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Oleksandr Kravchenko 提交于
This patch adds IIO driver for APDS9300 ambient light sensor (ALS). http://www.avagotech.com/docs/AV02-1077EN The driver allows to read raw data from ADC registers or calculate lux value. It also can handle threshold interrupt. Signed-off-by: NOleksandr Kravchenko <o.v.kravchenko@globallogic.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Lars-Peter Clausen 提交于
Keeping Makefile and Kconfig entries in alphabetical order usually works better than just appending new entries at the end, since it reduces the amount of conflicts. This patch adds a comment to the IIO Kconfig and Makefile files to document that the entries should be kept in alphabetical order. Also reorder those entries which weren't in alphabetical order yet. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Alexander Holler 提交于
Add a MODULE_DEVICE_TABLE in order to let hotplug mechanisms automatically load the driver. This makes it also possible to use the usual driver name instead of HID-SENSOR-2000xx which isn't very descriptive in kernel messages. Signed-off-by: NAlexander Holler <holler@ahsoftware.de> Acked-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 23 5月, 2013 1 次提交
-
-
由 Alexandre Relange 提交于
The original driver was pasted from accelerometer driver, but the name of the ID was not changed. This patch fixes this comment. Signed-off-by: NAlexandre Relange <alexandre@relange.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 18 3月, 2013 5 次提交
-
-
由 Jonathan Cameron 提交于
The original info_mask is going away in favour of the broken out versions. Signed-off-by: NJonathan Cameron <jic23@kernel.org> cc: Peter Meerwald <pmeerw@pmeerw.net>
-
由 Jonathan Cameron 提交于
The original info_mask is going away in favour of the broken out versions. Signed-off-by: NJonathan Cameron <jic23@kernel.org> cc: Jon Brenner <jbrenner@taosinc.com>
-
由 Jonathan Cameron 提交于
The original info_mask is going away in favour of the broken out versions. Signed-off-by: NJonathan Cameron <jic23@kernel.org> cc: Johan Hovold <jhovold@gmail.com>
-
由 Jonathan Cameron 提交于
The original info_mask is going away in favour of the broken out versions. Signed-off-by: NJonathan Cameron <jic23@kernel.org> cc: Peter Meerwald <pmeerw@pmeerw.net>
-
由 Jonathan Cameron 提交于
The original info_mask is going away in favour of the broken out versions. Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 28 1月, 2013 1 次提交
-
-
由 Jonathan Cameron 提交于
This driver is simple, uses the latest interfaces and contains few if any controversial elements. All of its interfaces have been in place for a long time now. Hence let's move it out of staging. Signed-off-by: NJonathan Cameron <jic23@kernel.org> Acked-by: NPeter Meerwald <pmeerw@pmeerw.net>
-
- 06 1月, 2013 2 次提交
-
-
由 Alexander Holler 提交于
The structure with common attributes for hid-sensors isn't specific to the iio-subsystem, so rename it to hid_sensor_common. Signed-off-by: NAlexander Holler <holler@ahsoftware.de> Acked-by: NJiri Kosina <jkosina@suse.cz> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Alexander Holler 提交于
The stuff in hid-sensor-attributes.h is needed by every piece which uses hid-sensor-hub and merging it into hid-sensor-hub.h makes it accessible from outside the iio subdirectory. Signed-off-by: NAlexander Holler <holler@ahsoftware.de> Acked-by: NJiri Kosina <jkosina@suse.cz> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 04 1月, 2013 1 次提交
-
-
由 Greg Kroah-Hartman 提交于
CONFIG_HOTPLUG is going away as an option. As a result, the __dev* markings need to be removed. This change removes the use of __devinit, __devexit_p, and __devexit from these drivers. Based on patches originally written by Bill Pemberton, but redone by me in order to handle some of the coding style issues better, by hand. Cc: Bill Pemberton <wfp5p@virginia.edu> Cc: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 27 12月, 2012 1 次提交
-
-
由 Alexander Holler 提交于
Not much to say, without that change, hid-sensor-trigger will be always compiled if HID_SENSOR_IIO_COMMON is selected which fails if CONFIG_IIO_TRIGGER is not set because CONFIG_IIO_CONSUMERS_PER_TRIGGER will not be defined. Signed-off-by: NAlexander Holler <holler@ahsoftware.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 17 11月, 2012 1 次提交
-
-
由 Axel Lin 提交于
Return -ENOMEM instead of 0 if kmemdup fails. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 10 11月, 2012 1 次提交
-
-
由 Jonathan Cameron 提交于
Route all buffer writes through the demux. Addition or removal of a buffer results in tear down and setup of all the buffers for a given device. Signed-off-by: NJonathan Cameron <jic23@kernel.org> Tested-by: Nsrinivas pandruvada <srinivas.pandruvada@intel.com>
-
- 08 9月, 2012 2 次提交
-
-
由 Lars-Peter Clausen 提交于
Drop timestamp parameter from buffer store_to callback and subsequently from iio_push_to_buffer. The timestamp parameter is unused and it seems likely that it will stay unused in the future, so it should be safe to remove it. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Jonathan Cameron 提交于
Consistently use iio_push_to_buffer instead of manually calling the buffers store_to callback. These crossed with Lars-Peter's patch set doing every other case. Signed-off-by: NJonathan Cameron <jic23@kernel.org> Acked-by: Nsrinivas pandruvada <srinivas.pandruvada@intel.com>
-
- 07 9月, 2012 1 次提交
-
-
由 srinivas pandruvada 提交于
Added usage id processing for ALS. This uses IIO interfaces for triggered buffer to present data to user mode.This uses HID sensor framework for registering callback events from the sensor hub. Signed-off-by: Nsrinivas pandruvada <srinivas.pandruvada@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 17 8月, 2012 2 次提交
-
-
由 Axel Lin 提交于
Fix below build warnings: CC [M] drivers/iio/light/lm3533-als.o drivers/iio/light/lm3533-als.c:667:8: warning: initialization from incompatible pointer type [enabled by default] drivers/iio/light/lm3533-als.c:667:8: warning: (near initialization for 'dev_attr_in_illuminance0_thresh_either_en.show') [enabled by default] drivers/iio/light/lm3533-als.c:667:8: warning: initialization from incompatible pointer type [enabled by default] drivers/iio/light/lm3533-als.c:667:8: warning: (near initialization for 'dev_attr_in_illuminance0_thresh_either_en.store') [enabled by default] Signed-off-by: NAxel Lin <axel.lin@gmail.com>
-
由 Alexey Khoroshilov 提交于
Do not leak memory by updating pointer with potentially NULL realloc return value. There is no need to preserve data in the buffer, so replace krealloc() by kfree()-kmalloc() pair. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: NAlexey Khoroshilov <khoroshilov@ispras.ru> Acked-by: NPeter Meerwald <pmeerw@pmeerw.net> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 16 7月, 2012 1 次提交
-
-
由 Peter Meerwald 提交于
fix compile warning reported by Fengguang Wu: drivers/iio/light/adjd_s311.c: In function 'adjd_s311_trigger_handler': drivers/iio/light/adjd_s311.c:188:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] drivers/iio/light/adjd_s311.c:188:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 185 } 186 187 if (indio_dev->scan_timestamp) > 188 *(s64 *)((phys_addr_t)data->buffer + ALIGN(len, sizeof(s64))) 189 = time_ns; 190 iio_push_to_buffer(buffer, (u8 *)data->buffer, time_ns); 191 Signed-off-by: NPeter Meerwald <pmeerw@pmeerw.net> Reported-by: NFengguang Wu <fengguang.wu@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 13 7月, 2012 1 次提交
-
-
由 Peter Meerwald 提交于
sensor has 4 channels (10-bit each, R/G/B and clear), sensitivity and gain is controlled in the driver by ext_info integration_time and CHAN_INFO_HARDWAREGAIN driver supports triggered buffer and IIO_CHAN_INFO_RAW to get the sensor data v5: address comments by Jonathan Cameron * use macro for channel declaration * get timestamp right before measurement * cleanups v4: address comments by Lars-Peter Clausen * make sure trigger handler is exited with iio_trigger_notify_done() and IRQ_HANDLED * kfree()/kalloc() -> krealloc() v3: * fix warnings v2: address comments by Lars-Peter Clausen * buffer allocation now in update_scan_mode instead of in trigger handler * simplify trigger code (assume active_scan_mask is not empty, use for_each_set_bit, use iio_push_to_buffer) * reorder entry in Makefile and Kconfig * fix remove Signed-off-by: NPeter Meerwald <pmeerw@pmeerw.net> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 21 6月, 2012 1 次提交
-
-
由 Peter Meerwald 提交于
minimal driver, no IR current control and proximity/event handling yet v5: * checkpatch warnings * increase msleep() to 20 ms when waiting for data ready as measurement/conversion can take up to 100 ms, 1 ms is too short v4 (address comments by Jonathan Cameron) * remove SENSORS_ prefix in Kconfig * change from IIO_INTENSITY to IIO_LIGHT * move from staging v3 (address comments by Shubhrajyoti Datta) * cleanup Kconfig entry * call I2C read/write functions directly v2 (address comments by Lars-Peter Clausen and Jonathan Cameron) * unify code for reading PS and AL data into parameterized _measure() function * limit wait for data to become ready within 20 tries * drop IIO_LIGHT channel, add SCALE to IIO_INTENSITY * drop extra string arguments used for logging purpose only Signed-off-by: NPeter Meerwald <pmeerw@pmeerw.net> Acked-by: NJonathan Cameron <jic23@kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 05 6月, 2012 1 次提交
-
-
由 Johan Hovold 提交于
Add sub-driver for the ambient-light-sensor interface on National Semiconductor / TI LM3533 lighting power chips. The sensor interface can be used to control the LEDs and backlights of the chip through defining five light zones and three sets of corresponding output-current values. The driver provides raw and mean adc readings along with the current light zone through sysfs. A threshold event can be generated on zone changes. The ALS-control output values can be set per zone for the three current output channels. Signed-off-by: NJohan Hovold <jhovold@gmail.com> Acked-by: NJonathan Cameron <jic23@kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-