- 20 8月, 2017 19 次提交
-
-
由 Akinobu Mita 提交于
The ADS1015 device provides programmable comparator that can issue an interrupt on the ALERT pin. This change adds the iio threshold event support for that feature. The ADS1015 device only have a single config register which contains an input multiplexer selection, comparator settings, and etc. So only a single event channel can be enabled at a time. Also enabling both buffer and event are prohibited for simplicity. Cc: Daniel Baluta <daniel.baluta@gmail.com> Cc: Jonathan Cameron <jic23@kernel.org> Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Akinobu Mita 提交于
While the iio buffer for the ti-ads1015 driver is enabled, reading the raw ADC channel data is restricted. We usually use the iio_device_claim_direct_mode()/iio_device_release_direct_mode() pair for that. This change consequently reverses the locking order for the driver's private lock and indio_dev->mlock which acquired by iio_device_claim_direct_mode() internally. But it's safe because there is no other dependency between these locks. Cc: Daniel Baluta <daniel.baluta@gmail.com> Cc: Jonathan Cameron <jic23@kernel.org> Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Akinobu Mita 提交于
Use devm_iio_triggered_buffer_setup to simplify the error path in the probe() and remove() function. This changes the remove order, but the end result of remove function actually does the reverse of probe. Cc: Daniel Baluta <daniel.baluta@gmail.com> Cc: Jonathan Cameron <jic23@kernel.org> Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Akinobu Mita 提交于
This adds a helper function to set conversion mode as there are a fair number of users. Cc: Daniel Baluta <daniel.baluta@gmail.com> Cc: Jonathan Cameron <jic23@kernel.org> Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Akinobu Mita 提交于
The ti-ads1015 driver has eight iio voltage channels and each iio channel can hold own scale information. The ADS1015 device only have a single config register which contains an input multiplexer selection, PGA and data rate settings. So the driver should load the correct settings when the input multiplexer selection is changed. However, regardless of which channlel is currently selected, changing any iio channel's scale information immediately overwrites the current PGA setting in the config register. It is harmless because the correct PGA settings are reloaded just before getting adc result anyway. But it is unnecessary register update and should be removed. Cc: Daniel Baluta <daniel.baluta@gmail.com> Cc: Jonathan Cameron <jic23@kernel.org> Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Akinobu Mita 提交于
This driver assumes that the device is operating in the continuous conversion mode which performs the conversion continuously. So this driver inserts a wait time before reading the conversion register if the configuration is changed from a previous request. Currently, the wait time is only the period required for a single conversion that is calculated as the reciprocal of the sampling frequency. However we also need to wait for the the previous conversion to complete. Otherwise we probably get the conversion result for the previous configuration when the sampling frequency is lower. Cc: Daniel Baluta <daniel.baluta@gmail.com> Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com> Cc: <Stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Akinobu Mita 提交于
pm_runtime_get_sync() and pm_runtime_put_autosuspend() return 0 on success, 1 if the device's runtime PM status was already requested status or error code on failure. So a positive return value doesn't indicate an error condition. However, any non-zero return values from buffer preenable and postdisable callbacks are recognized as an error and this driver reuses the return value from pm_runtime_get_sync() and pm_runtime_put_autosuspend() in these callbacks. This change fixes the false error detections. Cc: Daniel Baluta <daniel.baluta@gmail.com> Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com> Cc: <Stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Akinobu Mita 提交于
This driver assumes that the device is operating in the continuous conversion mode which performs the conversion continuously. So this driver doesn't insert a wait time before reading the conversion register if the configuration is not changed from a previous request. This assumption is broken if the device is runtime suspended and entered a power-down state. The forthcoming request causes reading a stale result from the conversion register as the device is runtime resumed just before. Fix it by adding a flag to detect that condition and insert a necessary wait time. Cc: Daniel Baluta <daniel.baluta@gmail.com> Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com> Cc: <Stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Akinobu Mita 提交于
The ADS1015 device have two operating modes, continuous conversion mode and single-shot mode. This driver assumes that the continuous conversion mode is selected by runtime resume callback when the ADC result is requested. If CONFIG_PM is disabled, the device is always in the default single-shot mode and no one begins a single conversion. So the conversion register doesn't contain valid ADC result. Fix it by changing the continuous mode in probe function. Cc: Daniel Baluta <daniel.baluta@gmail.com> Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com> Cc: <Stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Akinobu Mita 提交于
The ti-ads1015 driver supports ADS1015 and ADS1115 devices. The same scale information is used for both devices in this driver, however they have actually different values and the ADS1115's one is not correct. These devices have the same full-scale input voltage range for each PGA selection. So instead of adding another hardcoded scale information, compute a correct scale on demand from each device's resolution. Cc: Daniel Baluta <daniel.baluta@gmail.com> Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com> Cc: <Stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Akinobu Mita 提交于
The ti-ads1015 driver has eight iio voltage channels and each iio channel can hold own sampling frequency information. The ADS1015 device only have a single config register which contains an input multiplexer selection, PGA and data rate settings. So the driver should load the correct settings when the input multiplexer selection is changed. However, regardless of which channlel is currently selected, changing any iio channel's sampling frequency information immediately overwrites the current data rate setting in the config register. It breaks the current data rate setting if the different channel's sampling frequency information is changed because the data rate setting is not reloaded when the input multiplexer is switched. This removes the unexpected config register update and correctly load the data rate setting before getting adc result. Cc: Daniel Baluta <daniel.baluta@gmail.com> Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com> Cc: <Stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Andy Shevchenko 提交于
ACPI enabled platforms do not have a mean of regulators. Instead we use hard coded voltage value for reference pin. When value is 0 (default) we fall back to request a regulator. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Michał Mirosław 提交于
Use AMI306 calibration data for randomness and debugging. Signed-off-by: NMichał Mirosław <mirq-linux@rere.qmqm.pl> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Michał Mirosław 提交于
Reading INT_CLEAR has side effects - disallow reading it via debugfs. Signed-off-by: NMichał Mirosław <mirq-linux@rere.qmqm.pl> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Michał Mirosław 提交于
Mix device-specific data into randomness pool. Signed-off-by: NMichał Mirosław <mirq-linux@rere.qmqm.pl> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Michał Mirosław 提交于
Add support for AMI306 magnetometer - very similar to AMI305. Signed-off-by: NMichał Mirosław <mirq-linux@rere.qmqm.pl> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Arvind Yadav 提交于
i2c_device_id are not supposed to change at runtime. All functions working with i2c_device_id provided by <linux/i2c.h> work with const i2c_device_id. So mark the non-const structs as const. Signed-off-by: NArvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Arvind Yadav 提交于
i2c_device_id are not supposed to change at runtime. All functions working with i2c_device_id provided by <linux/i2c.h> work with const i2c_device_id. So mark the non-const structs as const. Signed-off-by: NArvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Arvind Yadav 提交于
i2c_device_id are not supposed to change at runtime. All functions working with i2c_device_id provided by <linux/i2c.h> work with const i2c_device_id. So mark the non-const structs as const. Signed-off-by: NArvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
- 18 8月, 2017 5 次提交
-
-
由 Narcisa Ana Maria Vasile 提交于
A software trigger such as hrtimer can be used to capture the data that will be stored in the buffer. Cc: Daniel Baluta <daniel.baluta@gmail.com> Cc: Alison Schofield <amsfield22@gmail.com> Signed-off-by: NNarcisa Ana Maria Vasile <narcisaanamaria12@gmail.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Andreas Klinger 提交于
srf02 added with support for i2c interface Attributes for setting max range or sensitivity are omitted for the case of srf02 type sensor, because they are not supported by the hardware. Signed-off-by: NAndreas Klinger <ak@it-klinger.de> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Andreas Klinger 提交于
Ultrasonic sensor srf10 is quite similar to srf08 and now also supported by the driver as device tree compatible string. It was necessary to prepare the source for supplementary sensors. This is done by enum srf08_sensor_type. The most significiant difference between srf08 and srf10 is another range and values of register gain (in the driver it's call sensitivity). Therefore the array of it is extended and dependent of the sensor type. Signed-off-by: NAndreas Klinger <ak@it-klinger.de> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Andreas Klinger 提交于
Add support for triggered buffers. Data format is quite simple: distance 16 Bit alignment 48 Bit timestamp 64 Bit Signed-off-by: NAndreas Klinger <ak@it-klinger.de> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Andreas Klinger 提交于
Added MODULE_DEVICE_TABLE for device tree bindings. It used to work without it by using the i2c_device_id table, but adding the table makes everything clear and documented. Signed-off-by: NAndreas Klinger <ak@it-klinger.de> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
- 17 8月, 2017 3 次提交
-
-
由 Lorenzo Bianconi 提交于
Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@st.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Lorenzo Bianconi 提交于
add support to STMicroelectronics LIS2MDL magnetometer in st_magn framework http://www.st.com/resource/en/datasheet/lis2mdl.pdfSigned-off-by: NLorenzo Bianconi <lorenzo.bianconi@st.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Arnd Bergmann 提交于
Without the triggered buffer code, we get a link error: drivers/iio/adc/at91-sama5d2_adc.o: In function `at91_adc_probe': at91-sama5d2_adc.c:(.text+0x938): undefined reference to `devm_iio_triggered_buffer_setup' This adds a Kconfig 'select' statement like other ADC drivers have it already. Fixes: 5e1a1da0 ("iio: adc: at91-sama5d2_adc: add hw trigger and buffer support") Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
- 12 8月, 2017 8 次提交
-
-
由 Lorenzo Bianconi 提交于
Remove int2 configuration parameter for LIS3DH, LSM303DLHC, LSM330D, LSM330DL, LSM330DLC, LSM303AGR, LIS2DH12 and LNG2DM since these devices export just int1 as data-ready line Fixes: 23cde4d6 (iio: Added platform data to select the DRDY pin) Fixes: dcdb0a78 (iio: accel: st_accel: add support to lng2dm) Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@st.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Lorenzo Bianconi 提交于
Remove int2 configuration parameter for LPS22HB and LPS25H since these devices export just int1 as data-ready line Fixes: 93187840 (iio:pressure: Add support for LPS25H pressure sensor) Fixes: e039e2f5 (iio:st_pressure:initial lps22hb sensor support) Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@st.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Sai Krishna Potthuri 提交于
This patch fix following checkpatch warnings in xadc driver 1. prefer 'unsigned int' to bare use of 'unsigned'. 2. else is not generally useful after a break or return. 3. fill all function definition arguments with identifier name Signed-off-by: NSai Krishna Potthuri <lakshmis@xilinx.com> Signed-off-by: NMichal Simek <michal.simek@xilinx.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Gustavo A. R. Silva 提交于
platform_get_irq() returns an error code, but the ad7606_par driver ignores it and always returns -ENODEV. This is not correct and, prevents -EPROBE_DEFER from being propagated properly. Print and propagate the return value of platform_get_irq on failure. This issue was detected with the help of Coccinelle. Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Andy Yan 提交于
Add device tree bindings document for saradc on rockchip rv1108 soc. Signed-off-by: NAndy Yan <andy.yan@rock-chips.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Fabrice Gasnier 提交于
Add output compare trigger sources available on some instances. Signed-off-by: NFabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Fabrice Gasnier 提交于
Add support for STM32H7 timer triggers: - Add new valids_table - Introduce compatible, with configuration data - Extend up to 15 timers, available on STM32H7 Signed-off-by: NFabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Fabrice Gasnier 提交于
STM32H7 has slightly different triggers than previous versions. Introduce st,stm32h7-timer-trigger compatible to handle this new variant. Signed-off-by: NFabrice Gasnier <fabrice.gasnier@st.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
- 09 8月, 2017 5 次提交
-
-
由 Andy Shevchenko 提交于
Allow user to call install target. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Andy Shevchenko 提交于
There is a nice buildsystem dedicated for userspace tools in Linux kernel tree. Switch iio target to be built by it. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Andy Shevchenko 提交于
The driver doesn't have a struct of_device_id table but supported devices are registered via Device Trees. This is working on the assumption that a SPI device registered via OF will always match a legacy SPI device ID and that the MODALIAS reported will always be of the form spi:<device>. There is an ACPI method to enumerate such devices via specific ACPI ID and use of compatible strings. It will not work for the drivers which have no OF match ID table present. Besides this could change in the future so the correct approach is to have an OF device ID table if the devices are registered via OF. Tested-by: NDavid Lechner <david@lechnology.com> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Fabrice Gasnier 提交于
STM32 ADC allows each channel to be sampled with a different sampling time, by setting SMPR registers. Basically, value depends on local electrical properties. Selecting correct value for sampling time highly depends on analog source impedance. There is a manual that may help in this process: 'How to get the best ADC accuracy in STM32...' This patch allows to configure minimum sampling time via device tree, either for: - all channels at once: st,min-sample-time-nsecs = <10000>; - independently for each channel (must match "st,adc-channels" list): st,adc-channels = <0 1>; st,min-sample-time-nsecs = <5000 10000>; Signed-off-by: NFabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Fabrice Gasnier 提交于
STM32 ADC allows each channel to be sampled with a different sampling time. There's an application note that deals with this: 'How to get the best ADC accuracy in STM32...' It basically depends on analog input signal electrical properties (depends on board). Add optional 'st,min-sample-time-nsecs' property so this can be tuned in dt. Signed-off-by: NFabrice Gasnier <fabrice.gasnier@st.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-