- 26 4月, 2016 6 次提交
-
-
由 Crestez Dan Leonard 提交于
Signed-off-by: NCrestez Dan Leonard <leonard.crestez@intel.com> Acked-by: NGe Gao <ggao@invensense.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Crestez Dan Leonard 提交于
This can be used to distinguish mpu6500. This is a warning rather than an error because the differences are mostly irrelevant and it's nice to avoid breaking users with slightly incorrect ACPI/DT. Signed-off-by: NCrestez Dan Leonard <leonard.crestez@intel.com> Acked-by: NGe Gao <ggao@invensense.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Crestez Dan Leonard 提交于
This field was unused and incorrect for mpu6500. Signed-off-by: NCrestez Dan Leonard <leonard.crestez@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Crestez Dan Leonard 提交于
The hw_info array was indexed by enum inv_devices chip_type despite the fact that the enumeration had more members than the array and was ordered differently. The patch cleans this up and adds explicit chip_types to i2c/spi/acpi IDs. It also adds some stricter checks inside the driver core. This happened to work so far because the differences between the supported models are very minor. Signed-off-by: NCrestez Dan Leonard <leonard.crestez@intel.com> Acked-by: NGe Gao <ggao@invensense.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Akinobu Mita 提交于
This adds ability to control the oversampling ratio of the temperature and pressure measurement for both bmp180 and bmp280. Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com> Acked-by: NVlad Dogaru <vlad.dogaru@intel.com> Cc: Christoph Mair <christoph.mair@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Akinobu Mita 提交于
This adds support for the BMP180 to the bmp280 iio driver. The BMP180 has already been supported by misc/bmp085 driver but it doesn't use iio framework. This change adds the kconfig dependency not to be selected both of them in order to avoid any issues. Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com> Acked-by: NVlad Dogaru <vlad.dogaru@intel.com> Cc: Christoph Mair <christoph.mair@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 24 4月, 2016 13 次提交
-
-
由 Crestez Dan Leonard 提交于
Signed-off-by: NCrestez Dan Leonard <leonard.crestez@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Crestez Dan Leonard 提交于
This patch exposes ALSTIM as illuminance_integration_time and ALSPGA as illuminance_scale. Changing ALSTIM also changes the number of bits available in the data register. This is handled inside raw value reading because: * It's very easy to shift a few bits * It allows SCALE and INT_TIME to be completely independent controls * Buffer support requires constant scan_type.realbits per-channel Signed-off-by: NCrestez Dan Leonard <leonard.crestez@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Crestez Dan Leonard 提交于
This is exposed as an output channel with "led" as an extend_name. Other sensors also have support for controlling an external LED. It's not clear that simply exposing an undecorated output channel is the correct approach. Signed-off-by: NCrestez Dan Leonard <leonard.crestez@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Crestez Dan Leonard 提交于
The proximity sensor relies on sending pulses to an external IR led and it is disabled by default on powerup. The driver will enable it with a default power setting. Signed-off-by: NCrestez Dan Leonard <leonard.crestez@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Crestez Dan Leonard 提交于
This just adds support for reporting illuminance with default settings. Important default registers are written on probe because the device otherwise lacks a reset function. Signed-off-by: NCrestez Dan Leonard <leonard.crestez@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Tiberiu Breana 提交于
Signed-off-by: NTiberiu Breana <tiberiu.a.breana@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Tiberiu Breana 提交于
Add basic support for the Aosong AM2315 relative humidity and ambient temperature sensor. Includes support for raw readings and ACPI detection. Datasheet: http://www.aosong.com/asp_bin/Products/en/AM2315.pdfSigned-off-by: NTiberiu Breana <tiberiu.a.breana@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Marek Vasut 提交于
Add support for HopeRF pressure and temperature sensor. This device uses two fixed I2C addresses, one for storing calibration coefficients and another for accessing the ADC. Signed-off-by: NMarek Vasut <marex@denx.de> Cc: Matt Ranostay <mranostay@gmail.com> Cc: Jonathan Cameron <jic23@kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Crestez Dan Leonard 提交于
This device has an identical interface to other supported sensors and the patch only adds IDs. Signed-off-by: NCrestez Dan Leonard <leonard.crestez@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Dan Carpenter 提交于
It causes a static checker warning if we use "buf" on the failure path so move that inside the if statement. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Gregor Boirie 提交于
Add a new rotation matrix sysfs attribute compliant with IIO core mounting matrix API. Matrix is retrieved from "in_anglvel_mount_matrix" and "in_accel_mount_matrix" sysfs attributes. It is declared into mpu6050 DTS entry as a "mount-matrix" property. Old interface is kept for backward userspace compatibility and may be retrieved from legacy platform_data mechanism only. Signed-off-by: NGregor Boirie <gregor.boirie@parrot.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Gregor Boirie 提交于
Expose a rotation matrix to indicate userspace the chip orientation with respect to the overall hardware system. Matrix is retrieved from "in_mount_matrix". It is declared into ak8975 DTS entry as a "mount-matrix" property. Signed-off-by: NGregor Boirie <gregor.boirie@parrot.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Gregor Boirie 提交于
Expose a rotation matrix to indicate userspace the chip placement with respect to the overall hardware system. This is needed to adjust coordinates sampled from a sensor chip when its position deviates from the main hardware system. Final coordinates computation is delegated to userspace since: * computation may involve floating point arithmetics ; * it allows an application to combine adjustments with arbitrary transformations. This 3 dimentional space rotation matrix is expressed as 3x3 array of strings to support floating point numbers. It may be retrieved from a "[<dir>_][<type>_]mount_matrix" sysfs attribute file. It is declared into a device / driver specific DTS property or platform data. Signed-off-by: NGregor Boirie <gregor.boirie@parrot.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 20 4月, 2016 12 次提交
-
-
由 Alison Schofield 提交于
Driver includes struct regmap and struct device in its global data. Remove the struct device and use regmap API to retrieve device info. Patch created using Coccinelle plus manual edits. Signed-off-by: NAlison Schofield <amsfield22@gmail.com> Reviewed-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Alison Schofield 提交于
Driver includes struct regmap and struct device in its global data. Remove the struct device and use regmap API to retrieve device info. Patch created using Coccinelle plus manual edits. Signed-off-by: NAlison Schofield <amsfield22@gmail.com> Reviewed-by: NIrina Tirdea <irina.tirdea@intel.com> Reviewed-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Peter Meerwald-Stadler 提交于
ultraviolet (UV) light sensor with I2C interface with a peak sensitivity at 355 nm strangely, chip uses two addresses 0x38 and 0x39 for LSB and MSB data, resp. datasheet: http://www.vishay.com/docs/84277/veml6070.pdfSigned-off-by: NPeter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Laxman Dewangan 提交于
Add following APIs in the list of managed resources of IIO: devm_iio_channel_get() devm_iio_channel_get_all() devm_iio_channel_release() devm_iio_channel_release_all() Signed-off-by: NLaxman Dewangan <ldewangan@nvidia.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Laxman Dewangan 提交于
Some of kernel driver uses the IIO framework to get the sensor value via ADC or IIO HW driver. The client driver get iio channel by iio_channel_get_all() and release it by calling iio_channel_release_all(). Add resource managed version (devm_*) of these APIs so that if client calls the devm_iio_channel_get_all() then it need not to release it explicitly, it can be done by managed device framework when driver get un-binded. This reduces the code in error path and also need of .remove callback in some cases. Signed-off-by: NLaxman Dewangan <ldewangan@nvidia.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Laxman Dewangan 提交于
Some of kernel driver uses the IIO framework to get the sensor value via ADC or IIO HW driver. The client driver get iio channel by iio_channel_get() and release it by calling iio_channel_release(). Add resource managed version (devm_*) of these APIs so that if client calls the devm_iio_channel_get() then it need not to release it explicitly, it can be done by managed device framework when driver get un-binded. This reduces the code in error path and also need of .remove callback in some cases. Signed-off-by: NLaxman Dewangan <ldewangan@nvidia.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Linus Walleij 提交于
If no channels are enabled when we run generic_buffer on a device, add a command-line option to just enable all of them, run the sampling and disable them all again afterwards. This is extremely useful when I'm low-level testing my sensors with interrupts and triggers, sample session: root@Ux500:/ lsiio Device 000: lsm303dlh_accel Device 001: lis331dl_accel Device 002: l3g4200d Device 003: lsm303dlh_magn Device 004: lps001wp Trigger 000: lsm303dlh_accel-trigger Trigger 001: lis331dl_accel-trigger Trigger 002: l3g4200d-trigger root@Ux500:/ generic_buffer -a -c 10 -n l3g4200d iio device number being used is 2 iio trigger number being used is 2 No channels are enabled, enabling all channels Enabling: in_anglvel_x_en Enabling: in_anglvel_y_en Enabling: in_anglvel_z_en Enabling: in_timestamp_en /sys/bus/iio/devices/iio:device2 l3g4200d-trigger -3.593664 -0.713133 4.870143 946684863662292480 3.225546 0.867357 -4.945878 946684863671875000 -0.676413 0.127296 0.106641 946684863681488037 -0.661113 0.110160 0.128826 946684863690673828 -0.664173 0.113067 0.123471 946684863700683593 -0.664938 0.109395 0.124848 946684863710144042 -0.664173 0.110619 0.130203 946684863719512939 -0.666162 0.111231 0.132651 946684863729125976 -0.668610 0.111690 0.130662 946684863738739013 -0.660501 0.110466 0.131733 946684863748565673 Disabling: in_anglvel_x_en Disabling: in_anglvel_y_en Disabling: in_anglvel_z_en Disabling: in_timestamp_en Pure awesomeness. If some channels have been enabled through scripts or manual interaction, nothing happens. Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Acked-by: NDaniel Baluta <daniel.baluta@intel.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Linus Walleij 提交于
Some types of ST Sensors can be connected to the same IRQ line as other peripherals using open drain. Add a device tree binding and a sensor data property to flip the right bit in the interrupt control register to enable open drain mode on the INT line. If the line is set to be open drain, also tag on IRQF_SHARED to the IRQ flags when requesting the interrupt, as the whole point of using open drain interrupt lines is to share them with more than one peripheral (wire-or). Cc: devicetree@vger.kernel.org Cc: Giuseppe Barba <giuseppe.barba@st.com> Cc: Denis Ciocca <denis.ciocca@st.com> Acked-by: NRob Herring <rob@kernel.org> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Linus Walleij 提交于
This makes all ST sensor drivers check that they actually have new data available for the requested channel(s) before claiming an IRQ, by reading the status register (which is conveniently the same for all ST sensors) and check that the channel has new data before proceeding to read it and fill the buffer. This way sensors can share an interrupt line: it can be flaged as shared and then the sensor that did not fire will return NO_IRQ, and the sensor that fired will handle the IRQ and return IRQ_HANDLED. Cc: Giuseppe Barba <giuseppe.barba@st.com> Cc: Denis Ciocca <denis.ciocca@st.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Linus Walleij 提交于
The current buffer read code tries to optimize reads from the sensor data registers by issuing a single read operation across all the indata registers. This doesn't work: when the LIS331DL accelerometer sensor is configured to open drain, active low interrupt mode, this will just clear the XDA (X-axis data available) bit in the STATUS_REG register (0x27), while YDA, ZDA and even ZYXDA remain set to 1, and the internal logic of the sensor holds the DRDY (INT1) line asserted (the value of the status register is 0xee). If we instead issue one read operation per enabled channel (X, Y, Z) things start working and we can use open drain and active low interrupts. Note that a backported patch fixing this issue will be heading via the fixes branch but changes in this file already in staging-next will make that patch 'look' rather different. The code in here is the correct one when that clash hits. Cc: Giuseppe Barba <giuseppe.barba@st.com> Cc: Denis Ciocca <denis.ciocca@st.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Stefan Wahren 提交于
This patch moves the STMP reset out of ADC init function so as to remove the possiblity of an error return which will be necessary for PM ops support patches to follow. Signed-off-by: NStefan Wahren <stefan.wahren@i2se.com> Tested-by: NMarek Vasut <marex@denx.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Stefan Wahren 提交于
This patch moves the touchscreen type configuration into a more suitable function. Btw this simplifies PM ops later. Signed-off-by: NStefan Wahren <stefan.wahren@i2se.com> Reviewed-by: NMarek Vasut <marex@denx.de> Tested-by: NMarek Vasut <marex@denx.de> Acked-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 19 4月, 2016 2 次提交
-
-
由 Daniel Baluta 提交于
Signed-off-by: NDaniel Baluta <daniel.baluta@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Daniel Baluta 提交于
This is useful for easily adding SPI support in later patches. Now bmc150_magn exports core functions to be used by I2C/SPI drivers instances. For the moment only I2C driver is supported. Signed-off-by: NDaniel Baluta <daniel.baluta@intel.com> Acked-by: NIrina Tirdea <irina.tirdea@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 17 4月, 2016 6 次提交
-
-
由 Ksenija Stanojevic 提交于
Set INPUT_PROP_DIRECT to indicate that it is a touchscreen on the device to help userspace classify it. Signed-off-by: NKsenija Stanojevic <ksenija.stanojevic@gmail.com> Acked-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Crestez Dan Leonard 提交于
Using this requires software triggers like CONFIG_IIO_HRTIMER_TRIGGER. The device can be configured to do internal periodic sampling but does not offer some sort of interrupt on data ready. Interrupts can only trigger when values get out of a specific range. Signed-off-by: NCrestez Dan Leonard <leonard.crestez@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Crestez Dan Leonard 提交于
These chips have an almost identical interface but support a different number of value bits. Datasheet links for comparison: * http://www.ti.com/lit/ds/symlink/adc081c021.pdf * http://www.ti.com/lit/ds/symlink/adc101c021.pdf * http://www.ti.com/lit/ds/symlink/adc121c021.pdfSigned-off-by: NCrestez Dan Leonard <leonard.crestez@intel.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Slawomir Stepien 提交于
This fix checkpatch warnings: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: NSlawomir Stepien <sst@poczta.fm> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Linus Walleij 提交于
This is a reimplementation of the old misc device driver for the ROHM BH1780 ambient light sensor (drivers/misc/bh1780gli.c). Differences from the old driver: - Uses the IIO framework - Uses runtime PM to idle the hardware after 5 seconds - No weird custom power management from userspace - No homebrewn values in sysfs This uses the same (undocumented) device tree compatible-string as the old driver ("rohm,bh1780gli"). Cc: Arnd Bergmann <arnd@arndb.de> Cc: Ulf Hansson <ulf.hansson@linaro.org> Cc: Daniel Mack <daniel@caiaq.de> Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NUlf Hansson <ulf.hansson@linaro.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Ksenija Stanojevic 提交于
Indent lines inside if statement. Signed-off-by: NKsenija Stanojevic <ksenija.stanojevic@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 16 4月, 2016 1 次提交
-
-
由 Lars-Peter Clausen 提交于
The ADIS16201 does not automatically clear the self test flag bit the self test has been, so clear it manually. Otherwise we'll see a offset caused by the self-test bias on the output values during normal operation. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-