<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/iio/dac, branch v5.15.7</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.15.7</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.15.7'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2021-11-18T18:16:07+00:00</updated>
<entry>
<title>iio: ad5770r: make devicetree property reading consistent</title>
<updated>2021-11-18T18:16:07+00:00</updated>
<author>
<name>Nuno Sá</name>
<email>nuno.sa@analog.com</email>
</author>
<published>2021-08-18T08:05:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=df56942798c48598e06e56624152e1715127516e'/>
<id>urn:sha1:df56942798c48598e06e56624152e1715127516e</id>
<content type='text'>
commit 26df977a909f818b7d346b3990735513e7e0bf93 upstream.

The bindings file for this driver is defining the property as 'reg' but
the driver was reading it with the 'num' name. The bindings actually had
the 'num' property when added in
commit ea52c21268e6 ("dt-bindings: iio: dac: Add docs for AD5770R DAC")
and then changed it to 'reg' in
commit 2cf3818f18b2 ("dt-bindings: iio: dac: AD5570R fix bindings errors").
However, both these commits landed in v5.7 so the assumption is
that either 'num' is not being used or if it is, the validations were not
done.

Anyways, if someone comes back yelling about this, we might just support
both of the properties in the future. Not ideal, but that's life...

Fixes: 2cf3818f18b2 ("dt-bindings: iio: dac: AD5570R fix bindings errors")
Signed-off-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Link: https://lore.kernel.org/r/20210818080525.62790-1-nuno.sa@analog.com
Cc: Stable@vger.kernel.org
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>iio: dac: ad5446: Fix ad5622_write() return value</title>
<updated>2021-11-18T18:16:07+00:00</updated>
<author>
<name>Pekka Korpinen</name>
<email>pekka.korpinen@iki.fi</email>
</author>
<published>2021-09-29T18:57:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a92d075cb4b5be5f6be75e9f128e8fb32fc5257a'/>
<id>urn:sha1:a92d075cb4b5be5f6be75e9f128e8fb32fc5257a</id>
<content type='text'>
commit 558df982d4ead9cac628153d0d7b60feae05ddc8 upstream.

On success i2c_master_send() returns the number of bytes written. The
call from iio_write_channel_info(), however, expects the return value to
be zero on success.

This bug causes incorrect consumption of the sysfs buffer in
iio_write_channel_info(). When writing more than two characters to
out_voltage0_raw, the ad5446 write handler is called multiple times
causing unexpected behavior.

Fixes: 3ec36a2cf0d5 ("iio:ad5446: Add support for I2C based DACs")
Signed-off-by: Pekka Korpinen &lt;pekka.korpinen@iki.fi&gt;
Link: https://lore.kernel.org/r/20210929185755.2384-1-pekka.korpinen@iki.fi
Cc: &lt;Stable@vger.kernel.org&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drivers: iio: dac: ad5766: Fix dt property name</title>
<updated>2021-11-18T18:16:07+00:00</updated>
<author>
<name>Mihail Chindris</name>
<email>mihail.chindris@analog.com</email>
</author>
<published>2021-10-07T08:00:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bd297200b747908f4725880e34f0298e313b4634'/>
<id>urn:sha1:bd297200b747908f4725880e34f0298e313b4634</id>
<content type='text'>
commit d9de0fbdeb0103a204055efb69cb5cc8f5f12a6a upstream.

In the documentation the name for the property is
output-range-microvolts which is a standard name, therefore this name
must be used.

Fixes: fd9373e41b9ba ("iio: dac: ad5766: add driver support for AD5766")
Signed-off-by: Mihail Chindris &lt;mihail.chindris@analog.com&gt;
Reviewed-by: Alexandru Ardelean &lt;ardeleanalex@gmail.com&gt;
Link: https://lore.kernel.org/r/20211007080035.2531-5-mihail.chindris@analog.com
Cc: &lt;Stable@vger.kernel.org&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>iio: dac: ti-dac5571: fix an error code in probe()</title>
<updated>2021-09-14T11:02:08+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2021-08-16T18:39:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f7a28df7db84eb3410e9eca37832efa5aed93338'/>
<id>urn:sha1:f7a28df7db84eb3410e9eca37832efa5aed93338</id>
<content type='text'>
If we have an unexpected number of channels then return -EINVAL instead
of returning success.

Fixes: df38a4a72a3b ("iio: dac: add TI DAC5571 family support")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Link: https://lore.kernel.org/r/20210816183954.GB2068@kili
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: dac: max5821: convert device register to device managed function</title>
<updated>2021-07-31T17:17:22+00:00</updated>
<author>
<name>Théo Borém Fabris</name>
<email>theobf@usp.br</email>
</author>
<published>2021-07-24T22:02:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6a25893cb0e255ab8888d6a4f40e8d1e9d554ad0'/>
<id>urn:sha1:6a25893cb0e255ab8888d6a4f40e8d1e9d554ad0</id>
<content type='text'>
Add a device managed hook, via devm_add_action_or_reset() and
max5821_regulator_disable(), to disable voltage regulator on device
detach.
Replace iio_device_register() by devm_iio_device_register() and remove
the max5821_remove() function used to unregister the device and disable the
voltage regulator.
Remove i2c_set_clientdata() from the probe function, since
i2c_get_clientdata() is not used anymore.
Remove regulator_disable() calls from the probe function.

Signed-off-by: Théo Borém Fabris &lt;theobf@usp.br&gt;
Reviewed-by: Alexandru Ardelean &lt;ardeleanalex@gmail.com&gt;
Link: https://lore.kernel.org/r/20210724220159.11998-1-theobf@usp.br
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: dac: ad5624r: Fix incorrect handling of an optional regulator.</title>
<updated>2021-07-19T08:51:58+00:00</updated>
<author>
<name>Jonathan Cameron</name>
<email>Jonathan.Cameron@huawei.com</email>
</author>
<published>2021-06-27T16:32:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=97683c851f9cdbd3ea55697cbe2dcb6af4287bbd'/>
<id>urn:sha1:97683c851f9cdbd3ea55697cbe2dcb6af4287bbd</id>
<content type='text'>
The naming of the regulator is problematic.  VCC is usually a supply
voltage whereas these devices have a separate VREF pin.

Secondly, the regulator core might have provided a stub regulator if
a real regulator wasn't provided. That would in turn have failed to
provide a voltage when queried. So reality was that there was no way
to use the internal reference.

In order to avoid breaking any dts out in the wild, make sure to fallback
to the original vcc naming if vref is not available.

Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Acked-by: Nuno Sá &lt;nuno.sa@analog.com&gt;
Link: https://lore.kernel.org/r/20210627163244.1090296-9-jic23@kernel.org
</content>
</entry>
<entry>
<title>Merge tag 'iio-for-5.14a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next</title>
<updated>2021-06-09T10:11:49+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2021-06-09T10:11:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6771fb0b940eb74f1a68fe3f180a7668103397d3'/>
<id>urn:sha1:6771fb0b940eb74f1a68fe3f180a7668103397d3</id>
<content type='text'>
Jonathan writes:

1st set of new IIO/counter device support, features and cleanup for 5.14

There are a couple of large cleanup sets in here alongside a number of new
drivers.

Note an immutable branch merged to add a stub for i2c_verify_client()
as needed to avoid a build issue in the fxls8962af driver as a result of a
workaround for a device errata that only applies when i2c interface is used.

Counters
========

New device support
* intel,quadrature encoder peripheral found on Elkhart Lake platforms.
  - New driver.

IIO
===

New device support
* amstaos,tsl2591 ambient light sensor.
  - New driver + bindings
  - Follow up fix to ensure some local variables are suitable for error
    handling.
* fsl,fxls8962af + fsl,fxls8964af accelerometers
  - New driver + bindings
  - Includes an errata work around that cause a build bot failure fixed
    by adding a stub to i2c.
* kionix,kxcjk-1013
  - Add support for KX023-1025 device.  Mostly a different register map
    that needed to be supported.
* murata,sca3300 accelerometer
  - New driver + bindings
* st,lsm9ds0 IMU
  - Rework of st,sensors driver to cleanly support this new glue driver
    that enables the two parts of the LSM9DS0.
* ti,tsc2046 touchscreen controller ADC.
  - New driver. Intent here is to use this with existing IIO consumer
    drivers such as resistive-adc-touch.
  - Follow up fix to avoid an issue with unsigned subtraction in error
    check.
* ti,tmp117 digital temperature sensor
  - New driver + bindings

Features
* adi,ad5755
  - Add missing dt-binding doc
* adi,ad7298
  - Add ACPI ID used on Intel Galileo Gen 1 boards.
  - Add missing dt-binding doc
* adi,ad7476
  - Add missing dt-binding doc
* adi,ad7746
  - Add missing dt-binding doc for this driver that will hopefully move out
    of staging shortly. Update staging driver to use the binding instead of
    platform data.
* adi,adis16201 + adis16209
  - Add missing dt-binding doc
* adi,adis16480
  - Support burst mode for adis16495 and adis16497 parts.
* bosch,bma220
  - Add missing dt-binding doc
* fsl,mma7455
  - Add missing dt-binding doc
* iio-rescale
  - Support handling of processed channels from provider.  Some ADCs
    require (typically non linear) calibration functions to be applied,
    and so provide only IIO_CHAN_INFO_PROCESSED read back. They can be
    used as providers to the iio-rescale driver which needs to handle them
    somewhat differently from IIO_CHAN_INFO_RAW
* sensiron,sps30
  - Support the serial interface.  Note this required significant
    refactoring of existing driver.
* st,st-sensors
  - Add mount matrix support for normal dt-binding whilst continuing to
    support the odd ACPI approach for accelerometers.
* ti,dac082s085 + similar
  - Add missing dt-binding doc
* trivial-devices - add entries for
  - memsic,mx4005, memsic,mx6255 and memsic,mxc6655
  - sensortek,stk8312 and sensortek,stk8ba50

Cleanup / minor fixes
* core
  - Use devm_add_action_or_reset() to replace boilerplate in several
    driver and core IIO devm_* functions.
  - Fix an error path issue introduced by above, that could return an
    error pointer rather than the expected null from dev_iio_device_alloc()
  - Move more IIO internals related fields from struct iio_dev to
    struct iio_dev_opaque.
  - Drop unused final update of in_loc in demux setup.
* Docs
  - Move some docs from driver specific to core dos to avoid replication
    of names which the documentation builder does not allow.
    Note this means adding a few device specific notes to the general docs
    to cover the more unusual uses of the ABI.
  - ABI: Move old buffer/* and scan_elements/* docs to obsolete as now we
    have the bufferX/* variant.  Not we are not getting rid of these
    interfaces, just encouraging new code to use the new interface.
* IIO wide:
  - Tidy up new cases of dev.parent etc being set in drivers as the core
    now does it.
  - Fix more cases of possible miss-aligned buffers when passed to
    iio_push_to_buffers_with_timestamp().  Note we only have one known
    instance of anyone seeing this bug actually happening, so this has been
    a low priority cleanup effort for several cycles.
  - sysfs_emit() used in more drivers.
  - Runtime pm tidy up and use of pm_runtime_resume_and_get()
  - Buffer alignment fixes as iio_push_to_buffers_with_timestamp requires
    that the timestamp when inserted by naturally aligned + consumers can
    assume that all fields are naturally aligned. Part of a long running
    effort, with at least 2 more series to come tackling additional
    variants.
  - Stop specifying "mount-matrix" property name in every lookup of the
    mount matrix from firmware by hard coding it in the core.
* adi,ad7476
  - Handle the variety of different regulators used by the parts supported
    by this driver (came up in dt-binding review)
* adi,ad7746
  - Trivial drop of if (ret) return ret; return 0; pattern
  - Tidy up comments
  - Pull capdac setup out to own function.
* adi,ad7766
  - Trivial drop of if (ret) return ret; return 0; pattern
* adi,adis
  - Avoid returning error codes in interrupt handlers.
  - Handle a failure in spi_write in the trigger handler.
  - Rework to add updating of device page after changing it.
  - Don't push data to IIO buffers when read failed.
  - Add configuration of burst max speed to core avoid handling this in
    each driver.
  - Use the adis_dev_lock() helper in adis16260 and adis16136 drivers.
  - Excessive includes cleanup via include-what-you-use static checker
    after zero day highlighted that these needed updating.
* afe
  - Amend binding to add #io-channel-cells, thus allowing this IIO
    consumer to also be an IIO provider.
* aosong,am2315
  - Drop ACPI id. Unlikely this one is in the wild and it isn't valid
    ACPI naming.
* bosch,bma180
  - Adding missing bandwidth settings (500, 1000 Hz)
* bosch,bme680
  - Drop ACPI id. Unlikely this one is in the wild and it isn't valid
    ACPI naming.
* ep93xx_adc,
  - Drop a redundant error print.
* maxim,max118
  - Convert remainder of probe() to devm_ managed functions.
  - Avoid some repeated jumping back and forth between iio_dev and
    spi structures.
* maxim,max11100
  - Use get_unaligned_be16() instead of open coding.
  - Convert remainder of probe() to devm_ managed functions.
* samsung,exynos_adc
  - Unused error value dropped.
* sensiron,sgp30
  - Drop use of %hx in favor of %x and letting the normal type conversion
    work.
* sensortek,stk8312
  - Add lowercase device id and note uppercase version deprecated.
  - Drop ACPI id. Unlikely this one is in the wild and it isn't valid
    ACPI naming.
* sprx,sc72xx_adc
  - add MODULE_DEVICE_TABLE
* st,lsm6dsx
  - Fix docs of valid ODRs
* st,sensors
  - dt-binding rework.  Two efforts on this crossed in a previous cycle
    so this update cherry picks the best of the two yaml conversions.
  - Don't copy the channel spec array as now ext_info is no longer modified.
* st,stm32-adc
  - tidy up some docs that were marked as kernel-doc but aren't.
* ti,adc081c, ti,adc0832, ti,adc108s102 and ti,adc161s626
  - Convert remainder of probe() functions to devm_ managed functions
    to simplify error handing and remove paths.

* tag 'iio-for-5.14a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (171 commits)
  i2c: core: Add stub for i2c_verify_client() if !CONFIG_I2C
  iio: adis: Cleanout unused headers
  iio: accel: bma180: Add missing 500 Hz / 1000 Hz bandwidth
  counter: Add support for Intel Quadrature Encoder Peripheral
  staging: iio: cdc: ad7746: extract capac setup to own function
  staging: iio: cdc: ad7746: clean up probe return
  staging: iio: cdc: ad7746: remove ordinary comments
  iio: adc: ti-adc161s626: Use devm managed functions for all of probe.
  iio: adc: ti-adc108s102: Use devm managed functions for all of probe()
  iio: adc: ti-adc0832: Use devm managed functions for all of probe()
  iio: adc: ti-adc081c: Use devm managed functions for all of probe()
  iio: adc: max1118: Avoid jumping back and forth between spi and iio structures
  iio: adc: max1118: Use devm_ managed functions for all of probe
  iio: adc: max11100: Use devm_ functions for rest of probe()
  iio: adc: max11100: Use get_unaligned_be16() rather than opencoding.
  iio: chemical: sgp30: Drop use of %hx in format string.
  iio: gyro: st_gyro: Support mount matrix
  iio: magnetometer: st_magn: Support mount matrix
  iio: accel: st_sensors: Stop copying channels
  iio: accel: st_sensors: Support generic mounting matrix
  ...
</content>
</entry>
<entry>
<title>iio: dac: ad5770r: Put fwnode in error case during -&gt;probe()</title>
<updated>2021-05-22T07:32:36+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andy.shevchenko@gmail.com</email>
</author>
<published>2021-05-10T09:56:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=98b7b0ca0828907dbb706387c11356a45463e2ea'/>
<id>urn:sha1:98b7b0ca0828907dbb706387c11356a45463e2ea</id>
<content type='text'>
device_for_each_child_node() bumps a reference counting of a returned variable.
We have to balance it whenever we return to the caller.

Fixes: cbbb819837f6 ("iio: dac: ad5770r: Add AD5770R support")
Cc: Alexandru Tachici &lt;alexandru.tachici@analog.com&gt;
Signed-off-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Reviewed-by: Alexandru Ardelean &lt;ardeleanalex@gmail.com&gt;
Link: https://lore.kernel.org/r/20210510095649.3302835-1-andy.shevchenko@gmail.com
Cc: &lt;Stable@vger.kernel.org&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: dac: stm32-dac: Use pm_runtime_resume_and_get() to replace open coding.</title>
<updated>2021-05-17T12:54:26+00:00</updated>
<author>
<name>Jonathan Cameron</name>
<email>Jonathan.Cameron@huawei.com</email>
</author>
<published>2021-05-09T11:33:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=54e81f6818b899ef621b2d513014da004add8845'/>
<id>urn:sha1:54e81f6818b899ef621b2d513014da004add8845</id>
<content type='text'>
Found using coccicheck script under review at:
https://lore.kernel.org/lkml/20210427141946.2478411-1-Julia.Lawall@inria.fr/

This is a prequel to taking a closer look at the runtime pm in IIO drivers
in general

Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Cc: Fabrice Gasnier &lt;fabrice.gasnier@foss.st.com&gt;
Reviewed-by: Fabrice Gasnier &lt;fabrice.gasnier@foss.st.com&gt;
Reviewed-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Link: https://lore.kernel.org/r/20210509113354.660190-17-jic23@kernel.org
</content>
</entry>
<entry>
<title>iio: dac: ad5766: Drop duplicate setting of iio_dev.dev.parent and of_node</title>
<updated>2021-05-17T12:49:12+00:00</updated>
<author>
<name>Jonathan Cameron</name>
<email>Jonathan.Cameron@huawei.com</email>
</author>
<published>2021-04-26T17:02:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e42523c11f2a182a0969b0e7462337fc190f8ca2'/>
<id>urn:sha1:e42523c11f2a182a0969b0e7462337fc190f8ca2</id>
<content type='text'>
This is set to the same value in devm_iio_device_alloc() so no need to do
it again.

Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Cc: Cristian Pop &lt;cristian.pop@analog.com&gt;
Reviewed-by: Alexandru Ardelean &lt;ardeleanalex@gmail.com&gt;
Link: https://lore.kernel.org/r/20210426170251.351957-3-jic23@kernel.org
</content>
</entry>
</feed>
