- 23 7月, 2017 9 次提交
-
-
由 Rob Herring 提交于
Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: NRob Herring <robh@kernel.org> Cc: Jonathan Cameron <jic23@kernel.org> Cc: Hartmut Knaack <knaack.h@gmx.de> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Cc: Carlo Caione <carlo@caione.org> Cc: Kevin Hilman <khilman@baylibre.com> Cc: linux-iio@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Jaya Durga 提交于
CHECK: Macro argument reuse 'addr' - possible side-effects? convert AD7280A_DEVADDR to ad7280a_devaddr static function to fix checkpath check v3: small style changes Signed-off-by: NJaya Durga <rjdurga@gmail.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Lorenzo Bianconi 提交于
Add support for active low interrupts (IRQF_TRIGGER_LOW and IRQF_TRIGGER_FALLING). Configure the device as active high or low according to the requested irq line. Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@st.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Lorenzo Bianconi 提交于
Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@st.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Lorenzo Bianconi 提交于
Configure sensor ODR just in hts221_write_raw() in order to avoid to set device sample rate multiple times. Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@st.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Lorenzo Bianconi 提交于
GENMASK(6, 3) in CTRL_REG1 and GENMASK(6, 2) in CTRL_REG2 are marked reserved. Do not changed the original value (not declared in the datasheet) during power-down/suspend routines. Fixes: e4a70e3e (iio: humidity: add support to hts221 rh/temp device) Fixes: b7079eea (iio: humidity: hts221: add power management support) Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@st.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Lorenzo Bianconi 提交于
Enable Block Data Update in hts221_probe() in order to avoid to reconfigure it every time the sensor is enabled Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@st.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Lorenzo Bianconi 提交于
Move bit-shift in hts221_write_with_mask() instead of coding the shift depth in the configured value. That change will be necessary to fix an issue in device power-down procedure. Simplify hts221_avg_list table management Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@st.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Narcisa Ana Maria Vasile 提交于
Add support for CCS811 VOC sensor. This patch adds support for reading current and voltage across the sensor and TVOC and equivalent CO2 values. Scale and offset values have been computed according to datasheet: - For current: raw value is in microamps => 0.001 scale to convert to milliamps - For voltage: 1.65V = 1023, therefore 1650mV = 1023 => 1650.0/1023 = 1.612903 scale to convert to millivolts - For eCO2: raw value range is from 400ppm to 8192ppm. => (val - 400) * (100 - 0) / (8192 - 400) + 0 = (val - 400) * 0.01283367 => offset: -400, scale = 0.012834 to get a percentage value -For TVOC: raw value range is from 0ppb to 1187ppb. => (val - 0) * 100 / (1187 - 0) + 0 = val * 0.0842459 => scale = 0.084246 for getting a percentage value 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>
-
- 18 7月, 2017 2 次提交
-
-
由 Fabio Estevam 提交于
The gpiod API checks for NULL descriptors, so there is no need to duplicate the check in the driver. Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Julia Lawall 提交于
Drop static on a local variable, when the variable is initialized before any possible use. Thus, the static has no benefit. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @bad exists@ position p; identifier x; type T; @@ static T x@p; ... x = <+...x...+> @@ identifier x; expression e; type T; position p != bad.p; @@ -static T x@p; ... when != x when strict ?x = e; // </smpl> Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
- 15 7月, 2017 3 次提交
-
-
由 Gaurav Gupta 提交于
When adding maps to the list, they were added using list_add, which adds them in LIFO order. When parsing using iio_channel_get_all(), these elements are hence returned in reverse order. As a result, the iio_hwmon mapping maps the first entry to the last channel and so on. Signed-off-by: NGaurav Gupta <gauragup@cisco.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Fabrice Gasnier 提交于
This adds support for STM32F4 Digital-To-Analog converter. Add compatible configuration data to handle hfsel (not present in stm32f4). Signed-off-by: NFabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Fabrice Gasnier 提交于
Fix error message, there's no 'st,dac-channel' property, but 'reg' (see https://lkml.org/lkml/2017/4/3/567). Signed-off-by: NFabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
- 11 7月, 2017 1 次提交
-
-
由 Colin Ian King 提交于
Don't populate array startup_lookup on the stack but instead make it static. Makes the object code smaller. Before: text data bss dec hex filename 21754 5440 128 27322 6aba drivers/iio/adc/at91_adc.o After: text data bss dec hex filename 21613 5496 128 27237 6a65 drivers/iio/adc/at91_adc.o Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
- 10 7月, 2017 15 次提交
-
-
由 Lorenzo Bianconi 提交于
In order to use the standard name convention rename H3LIS331DL_DRIVER_NAME macro in H3LIS331DL_ACCEL_DEV_NAME Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@st.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Lorenzo Bianconi 提交于
Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@st.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Lorenzo Bianconi 提交于
Add H3LIS331DL, LIS331DL and LIS3LV02DL entries in st_accel_id_table Fixes: 1e52fefc (iio: accel: Add support for the h3lis331dl accel) Fixes: bbf5f037 (iio: st_accel: support the LIS331DL sensor) Fixes: 3acddf74 (iio: st-sensors: add support for lis3lv02d accel) Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@st.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Colin Ian King 提交于
Making the const array startup_lookup static rather having it on the stack saves 69 bytes. Add in missing int specifier to clean up a checkpatch warning. Before: text data bss dec hex filename 10297 2800 128 13225 33a9 drivers/iio/adc/at91-sama5d2_adc.o After: text data bss dec hex filename 10140 2888 128 13156 3364 drivers/iio/adc/at91-sama5d2_adc.o Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 Colin Ian King 提交于
Making the const array init_data static rather having it on the stack saves us a couple hundreds of bytes: Before: text data bss dec hex filename 3175 848 0 4023 fb7 drivers/iio/accel/da311.o After: text data bss dec hex filename 2860 936 0 3796 ed4 drivers/iio/accel/da311.o Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 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> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
-
由 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 7 次提交
-
-
由 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>
-