summaryrefslogtreecommitdiffstats
path: root/drivers/iio/adc/qcom-spmi-adc5.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-02-03 07:01:54 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-02-03 07:01:54 +0100
commit196db6bb44738b76d7401c33aadadcea307894c2 (patch)
treeae91c0ba288ce688e9554a3bfabc0f531b7df4c5 /drivers/iio/adc/qcom-spmi-adc5.c
parentcbce3de28c37fdd7531526d8dbb0ae2187667dfe (diff)
parent4ae612e4af95d72e36f478cad66d47c06b86de68 (diff)
downloadlinux-stable-196db6bb44738b76d7401c33aadadcea307894c2.tar.gz
linux-stable-196db6bb44738b76d7401c33aadadcea307894c2.tar.bz2
linux-stable-196db6bb44738b76d7401c33aadadcea307894c2.zip
Merge tag 'iio-for-6.3a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next
Jonathan writes: 1st set of IIO new device support, features and cleanups for the 6.3 cycle The usual mixed bag. So far this has been a quiet cycle for IIO. New device support * adi,ad8686 - Add support for the AD5337 DAC - ID and 8 bit channel support. * maxim,max5522 - New driver for this 2 channel DAC. * nxp,imx93-adc - New driver for this SoC ADC which is a fresh IP that will probably turn up in additional SoCs going forwards. * st,magn - Add support for magnetometer part of LSM303C which is very similar to standalone LIS3MDL already supported. * ti,ads7924 - New driver for this 4 channel, 12-bit I2C ADC. * ti,lmp92064 - New driver for this 12 bit SPI ADC. * ti,tmag5273 - New driver for this 3D Hall-Effect Sensor. Features * core - Add a standard structure for the value pairs in IIO_VAL_INT_PLUS_MICRO available attributes and similar. * cirrus,ep93xx - Add DT binding docs and convert driver to DT based probing. - Enable testing building with CONFIG_COMPILE_TEST. * st,stm32-dfsdm - Enable ID register support for discovery of hardware capabilities on some devices. Cleanups and minor fixes * core - Drop the custom iio_sysfs_match_string_with_gaps(). The special ability of this function to skip gaps in an array was never used by any upstream driver. - Sort headers whilst touching this file. * tools - Fix memory leak in iio_utils.c * various - leftover i2c probe_new() conversions. - scnprintf() -> sysfs_emit() cleanups. - hand rolled devm enables -> devm_regulator[_bulk]_get_enable() - typo fixes - dt-binding cleanup (whitespace, excess quotes and similar) * adi,ad7746 - Set variable without pointless conditional. * fsl,mma9551 - Squash false positives about use of uninitialized variable where garbage undergoes an endian conversion before being ignored. * measspec,ms5611 - Switch to fully devm_ managed probe() and so drop explicit remove() * qcom,spmi-adc - Use dev_err_probe() to suppress deferred print. * qcom,spmi-adc5 - Define a missing channel used for battery identification. * qcom,spmi-iadc - Document a compatible seen in wild. * semtech,sx9360 - Fix units on semtech,resolution dt-binding. * sensiron,scd30 - dev_err_probe() usage to simplify error paths a little. * st,lsm6dsx - Add missing mount matrix for the gyro IIO device. * taos,tsl2563 - Respect firmware configured interrupt polarity if present. - Use i2c_smbus_write_word_data() in a few cases not previously covered. - Factor out duplicated interrupt configuration. - Switch to GENMASK() / BIT() from hand coded equivalents. - Tidy up unused definitions. - Use dev_err_probe() as appropriate. - Drop platform_data as no in kernel users and there are better ways to do equivalent if any are added. - Add local struct device variable to tidy up code. - Avoid dance via i2c_client to get the drvdata. - Tidy up headers ordering and Makefile ordering. * ti,adc128s052 - Use new spi_get_device_match_data(). - Drop ACPI_PTR() protection. - Sort headers whilst here. - Use asm instead of incorrect include of asm-generic/unaligned.h * vishay,vcn4000 - Interrupt support for vcnl4040 (lots of refactoring needed) * xilinx,ams - Use fwnode_device_is_compatible() instead of open coding it. * tag 'iio-for-6.3a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (71 commits) iio: adc: ad7291: Fix indentation error by adding extra spaces iio: accel: mma9551_core: Prevent uninitialized variable in mma9551_read_config_word() iio: accel: mma9551_core: Prevent uninitialized variable in mma9551_read_status_word() dt-bindings: iio/proximity: semtech,sx9360: Fix 'semtech,resolution' type iio: imu: fix spdx format iio: adc: imx93: Fix spelling mistake "geting" -> "getting" dt-bindings: iio: cleanup examples - indentation dt-bindings: iio: use lowercase hex in examples dt-bindings: iio: correct node names in examples dt-bindings: iio: minor whitespace cleanups dt-bindings: iio: drop unneeded quotes dt-bindings: iio: adc: Add NXP IMX93 ADC iio: adc: add imx93 adc support dt-bindings: iio: adc: add Texas Instruments ADS7924 iio: adc: ti-ads7924: add Texas Instruments ADS7924 driver iio: imu: st_lsm6dsx: add 'mount_matrix' sysfs entry to gyro channel. iio: imu: st_lsm6dsx: fix naming of 'struct iio_info' in st_lsm6dsx_shub.c. iio: light: vcnl4000: Add interrupt support for vcnl4040 iio: light: vcnl4000: Make irq handling more generic iio: light: vcnl4000: Prepare for more generic setup ...
Diffstat (limited to 'drivers/iio/adc/qcom-spmi-adc5.c')
-rw-r--r--drivers/iio/adc/qcom-spmi-adc5.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/iio/adc/qcom-spmi-adc5.c b/drivers/iio/adc/qcom-spmi-adc5.c
index 821fee60a765..e90c299c913a 100644
--- a/drivers/iio/adc/qcom-spmi-adc5.c
+++ b/drivers/iio/adc/qcom-spmi-adc5.c
@@ -543,6 +543,8 @@ static const struct adc5_channels adc5_chans_pmic[ADC5_MAX_CHANNEL] = {
SCALE_HW_CALIB_DEFAULT)
[ADC5_XO_THERM_100K_PU] = ADC5_CHAN_TEMP("xo_therm", 0,
SCALE_HW_CALIB_XOTHERM)
+ [ADC5_BAT_ID_100K_PU] = ADC5_CHAN_TEMP("bat_id", 0,
+ SCALE_HW_CALIB_DEFAULT)
[ADC5_AMUX_THM1_100K_PU] = ADC5_CHAN_TEMP("amux_thm1_100k_pu", 0,
SCALE_HW_CALIB_THERM_100K_PULLUP)
[ADC5_AMUX_THM2_100K_PU] = ADC5_CHAN_TEMP("amux_thm2_100k_pu", 0,
@@ -894,10 +896,8 @@ static int adc5_probe(struct platform_device *pdev)
mutex_init(&adc->lock);
ret = adc5_get_fw_data(adc);
- if (ret) {
- dev_err(dev, "adc get dt data failed\n");
- return ret;
- }
+ if (ret)
+ return dev_err_probe(dev, ret, "adc get dt data failed\n");
irq_eoc = platform_get_irq(pdev, 0);
if (irq_eoc < 0) {