- 10 7月, 2017 9 次提交
-
-
由 Gustavo A. R. Silva 提交于
Check return value from call to of_match_device() in order to prevent a NULL pointer dereference. In case of NULL print error message and return -ENODEV Signed-off-by: NGustavo A. R. Silva <garsilva@embeddedor.com> Acked-by: NMartin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Brian Masney 提交于
The return value from tsl2x7x_invoke_change() was not checked in most places in the driver. This patch adds the proper error checks. The return values inside tsl2x7x_invoke_change() are now checked by this patch as well. Previously, if there was an error turning the chip back on, then the driver would attempt to turn the chip off and incorrectly return success. The code to power off the chip is removed by this patch since we should fail fast. Signed-off-by: NBrian Masney <masneyb@onstation.org> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Brian Masney 提交于
This driver in some cases can busy wait for upwards of 15ms. Since the kernel at this point is not running in atomic context, and is running in process context, we can safely use usleep_range() instead. This patch changes the two occurrences of mdelay() to usleep_range(). Signed-off-by: NBrian Masney <masneyb@onstation.org> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Brian Masney 提交于
tsl2x7x_read_thresh() and tsl2x7x_write_thresh() currently assumes that IIO_EV_INFO_VALUE is the only iio_event_info that will be passed in. This patch refactors these two functions so that additional iio_event_infos can be passed in. The functions are renamed from tsl2x7x_{read,write}_thresh() to tsl2x7x_{read,write}_event_value(). This patch also adds the missing return value check to tsl2x7x_invoke_change() since this was previously missing. This patch is in preparation for moving the in_intensity0_thresh_period and in_proximity0_thresh_period sysfs attributes to be created by iio_event_spec. Signed-off-by: NBrian Masney <masneyb@onstation.org> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Brian Masney 提交于
The calibration function calls i2c_smbus_write_byte() and i2c_smbus_read_byte(). These two function calls are replaced with a single call to i2c_smbus_read_byte_data() by this patch. This patch also removes an unnecessary call that reads the CNTRL register a second time. One of the error paths returned -1 if the ADC was not enabled and this patch changes that return value to -EINVAL. Signed-off-by: NBrian Masney <masneyb@onstation.org> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Brian Masney 提交于
tsl2x7x_i2c_read() would call i2c_smbus_write_byte() and i2c_smbus_read_byte(). These two i2c functions can be replaced with a single call to i2c_smbus_read_byte_data(). This patch removes the tsl2x7x_i2c_read() function and replaces all occurrences with a call to i2c_smbus_read_byte_data(). Signed-off-by: NBrian Masney <masneyb@onstation.org> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Brian Masney 提交于
The TSL2X7X driver has a custom power_state sysfs attribute. Remove this attribute since the runtime power management code provides a sysfs attribute to control the power state of the device. Signed-off-by: NBrian Masney <masneyb@onstation.org> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Brian Masney 提交于
Add device tree support for the tsl2x7x IIO driver with no custom properties. The device tree documentation is in a separate commit so that the changes to trivial-devices.txt can go in via the device tree subsystem. Signed-off-by: NBrian Masney <masneyb@onstation.org> CC: Rob Herring <robh+dt@kernel.org> CC: Mark Rutland <mark.rutland@arm.com> CC: devicetree@vger.kernel.org Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Jack Andersen 提交于
This patch adds support for Diolan DLN2 ADC via IIO's ADC interface. ADC is the fourth and final component of the DLN2 for the kernel. Signed-off-by: NJack Andersen <jackoalan@gmail.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
- 07 7月, 2017 1 次提交
-
-
由 Joe Perches 提交于
Add newlines to the macro definitions and use a more common style. Signed-off-by: NJoe Perches <joe@perches.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 05 7月, 2017 2 次提交
-
-
由 Mike Looijmans 提交于
The LTC2741 and LTC2473 are single voltage ADC chips. The LTC2473 is similar to the LTC2471 but outputs a signed differential value. Datasheet: http://cds.linear.com/docs/en/datasheet/24713fb.pdfSigned-off-by: NMike Looijmans <mike.looijmans@topic.nl> Reviewed-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Mikko Koivunen 提交于
Set up and use triggered buffer if there is irq defined for device in device tree. Trigger producer triggers from rpr0521 drdy interrupt line. Trigger consumer reads rpr0521 data to scan buffer. Depends on previous commits of _scale and _offset. Signed-off-by: NMikko Koivunen <mikko.koivunen@fi.rohmeurope.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 02 7月, 2017 12 次提交
-
-
由 Reno Farnesi 提交于
This patch fixes the following checkpatch warnings: Prefer 'unsigned int' to bare use of 'unsigned Signed-off-by: NReno Farnesi <nfarnesi4@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Lorenzo Bianconi 提交于
Add device tree support for LPS22HB, LPS25H, LPS331AP, LPS001WP pressure sensors Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@st.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Lorenzo Bianconi 提交于
Add device tree support for L3G4200D, LSM330D, LSM330DL, LSM330DLC, L3GD20, L3GD20H, L3G4IS, LSM330, LSM9DS0 gyroscope sensors Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@st.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Lorenzo Bianconi 提交于
Add device tree support for LIS3MDL and LSM303AGR magnetometer sensors Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@st.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Lorenzo Bianconi 提交于
Add device tree support for LIS3DH, LSM330D, LSM330DL, LSM330DLC, LIS331DLH, LSM330, LSM303AGR, LIS2DH12, LIS3L02DQ, LNG2DM accel sensors. Fix LIS302DL support defining of_device_id data field in st_accel_of_match table Fixes: 76222772 (iio: accel: st_accel: handle deprecated bindings) Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@st.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Matthias Kaehlcke 提交于
Don't inflate the kernel size with data that isn't used. The conditional declaration also fixes the following warning when building with clang: drivers/iio/magnetometer/ak8975.c:704:36: error: variable 'ak_acpi_match' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration] Signed-off-by: NMatthias Kaehlcke <mka@chromium.org> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Reno Farnesi 提交于
Removes trailing whitespace to fix checkpatch errors Signed-off-by: NReno Farnesi <nfarnesi4@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Gaurav Gupta 提交于
Add missing hooks in the LTC2497 IIO driver to allow hwmon mapping. Signed-off-by: NGaurav Gupta <gauragup@cisco.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Colin Ian King 提交于
The array stm32h7_adc_ckmodes_spec does not need to be in global scope, so make it static. Cleans up sparse warning: "symbol 'stm32h7_adc_ckmodes_spec' was not declared. Should it be static?" Signed-off-by: NColin Ian King <colin.king@canonical.com> Acked-by: NFabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Angelo Compagnucci 提交于
Some part of the configuration are not touched after the probe and if something goes wrong on writing the initial one, the chip will misbehave. Adding an error checking ensures that the inital configuration will be written correctly. Moreover ensures that a sensible configuration will be saved in driver data and used subsequently as intended. Signed-off-by: NAngelo Compagnucci <angelo.compagnucci@gmail.com> Reported-by: NMaarten Brock <m.brock@vanmierlo.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Angelo Compagnucci 提交于
Initial channel should be the first available channel on all configurations, so changing to channel 0 available on all supported chips. Signed-off-by: NAngelo Compagnucci <angelo.compagnucci@gmail.com> Reported-by: NMaarten Brock <m.brock@vanmierlo.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Linus Walleij 提交于
Open drain should work fine with rising or high level IRQs, this code was due to some misunderstanding on my part. Reported-by: NLorenzo Bianconi <lorenzo.bianconi83@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 01 7月, 2017 16 次提交
-
-
由 Akinobu Mita 提交于
Add a link to the TCS3472 datasheet in the AMS's website. Cc: Peter Meerwald <pmeerw@pmeerw.net> Cc: Jonathan Cameron <jic23@kernel.org> Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Zhiyong Tao 提交于
This commit adds mt7622 compatible node. Signed-off-by: NZhiyong Tao <zhiyong.tao@mediatek.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Zhiyong Tao 提交于
This patch supports auxadc suspend/resume flow. Disable auxadc clk and power in suspend function. Enable axuadc clk and power in resume function. Signed-off-by: NZhiyong Tao <zhiyong.tao@mediatek.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Zhiyong Tao 提交于
The commit adds mt7622 compatible node in binding document. Signed-off-by: NZhiyong Tao <zhiyong.tao@mediatek.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Lorenzo Bianconi 提交于
Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@st.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Lorenzo Bianconi 提交于
Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@st.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Lorenzo Bianconi 提交于
Add open drain support in order to share requested IRQ line between st_lsm6dsx device and other peripherals Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@st.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Manivannan Sadhasivam 提交于
Add device tree bindings for Measurement-Specialties MS5637, MS5805, MS5837 and MS8607 pressure & temperature sensor Signed-off-by: NManivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Manivannan Sadhasivam 提交于
Add of_match_table for Measurement-Specialties MS5637, MS5805, MS5837 and MS8607 pressure & temperature sensor Signed-off-by: NManivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Manivannan Sadhasivam 提交于
Add device tree bindings for Measurement-Specialties HTU21 temperature & humidity sensor and humidity part of MS8607 sensor Signed-off-by: NManivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Manivannan Sadhasivam 提交于
Add of_match_table for Measurement-Specialties htu21 temperature & humidity sensor and humidity part of MS8607 sensor Signed-off-by: NManivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Fabrice Gasnier 提交于
Clock name has been updated during driver/DT binding review: https://lkml.org/lkml/2016/12/13/718 Update DT binding doc to reflect this. Fixes: bf2d8581 (iio: Add bindings for STM32 timer trigger driver) Signed-off-by: NFabrice Gasnier <fabrice.gasnier@st.com> Acked-by: NBenjamin Gaignard <benjamin.gaignard@linaro.org> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Eugen Hristev 提交于
Added support for suspend/resume functionality for the ADC IP in sama5d2 SoC. In order to enter Suspend to ram mode (backup + self refresh mode for memory), in which the ADC IP is no longer powered, we need to reset the pins to default state, for the scenario when they are also used for I2C bus to communicate with the PMIC. On resume, we need to reconfigure the ADC IP registers and reconfigure the trigger registers in the case when the suspend procedure is done while sysfs has the buffer and trigger enabled. In the case the suspend happens exactly during a software triggered conversion, the request will time out, because we reset and power down the ADC. Signed-off-by: NEugen Hristev <eugen.hristev@microchip.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Lorenzo Bianconi 提交于
In order to add proper device tree support give a more general name to of_device_id table Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@st.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Lorenzo Bianconi 提交于
Move st_sensors_of_i2c_probe() in st_sensors_core and rename it in st_sensors_of_name_probe(). That change is necessary to add device-tree support in spi code otherwise the rest of the autodetection will fail since spi->modalias (and indio_dev->name) will be set using compatible string value that differs from standard sensor name Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@st.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Lorenzo Bianconi 提交于
Enable multiread by default for LIS3MDL since using I2C interface the subaddr Msb is used to automatically increase the slave address during multiple data read/write. In the same way, using SPI interface, bit 1 in register address is used to enable auto-increment of the slave address in multiple read/write. Fixes: 872e79ad (iio:magn: Add STMicroelectronics magn driver) Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@st.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-