<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/iio/common/st_sensors, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/iio/common/st_sensors?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/iio/common/st_sensors?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-08-19T17:23:14Z</updated>
<entry>
<title>iio: st_sensors: move from strlcpy with unused retval to strscpy</title>
<updated>2022-08-19T17:23:14Z</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa+renesas@sang-engineering.com</email>
</author>
<published>2022-08-18T21:00:16Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=ae2c9cf14c1ee451cd2215584b21619f1568d9e1'/>
<id>urn:sha1:ae2c9cf14c1ee451cd2215584b21619f1568d9e1</id>
<content type='text'>
Follow the advice of the below link and prefer 'strscpy' in this
subsystem. Conversion is 1:1 because the return value is not used.
Generated by a coccinelle script.

Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/
Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Link: https://lore.kernel.org/r/20220818210017.6817-1-wsa+renesas@sang-engineering.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: st_sensors: Use iio_device_claim/release_direct_mode() when relevant</title>
<updated>2022-04-10T15:21:45Z</updated>
<author>
<name>Miquel Raynal</name>
<email>miquel.raynal@bootlin.com</email>
</author>
<published>2022-02-07T14:38:35Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=2da03b432ddfb7c914f3611c88f7feb5eebd3690'/>
<id>urn:sha1:2da03b432ddfb7c914f3611c88f7feb5eebd3690</id>
<content type='text'>
The st_sensors_core driver hardcodes the content of the
iio_device_claim_direct_mode() and iio_device_release_direct_mode()
helpers. Let's get rid of this handcrafted implementation and use the
proper core helpers instead. Additionally, this lowers the tab level
(which is always good) and prevents the use of the -&gt;currentmode
variable which is not supposed to be used like this anyway.

Cc: Denis Ciocca &lt;denis.ciocca@st.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/r/20220207143840.707510-9-miquel.raynal@bootlin.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: st_sensors: Add a local lock for protecting odr</title>
<updated>2022-04-10T15:21:45Z</updated>
<author>
<name>Miquel Raynal</name>
<email>miquel.raynal@bootlin.com</email>
</author>
<published>2022-02-07T14:38:33Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=474010127e2505fc463236470908e1ff5ddb3578'/>
<id>urn:sha1:474010127e2505fc463236470908e1ff5ddb3578</id>
<content type='text'>
Right now the (framework) mlock lock is (ab)used for multiple purposes:
1- protecting concurrent accesses over the odr local cache
2- avoid changing samplig frequency whilst buffer is running

Let's start by handling situation #1 with a local lock.

Suggested-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
Cc: Denis Ciocca &lt;denis.ciocca@st.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/r/20220207143840.707510-7-miquel.raynal@bootlin.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: st_sensors: Drop the protection on _avail functions</title>
<updated>2022-04-10T15:15:02Z</updated>
<author>
<name>Miquel Raynal</name>
<email>miquel.raynal@bootlin.com</email>
</author>
<published>2022-02-07T14:38:32Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=05a32f1aeb05c41dd33d95c060ee5d1b81f70e55'/>
<id>urn:sha1:05a32f1aeb05c41dd33d95c060ee5d1b81f70e55</id>
<content type='text'>
The use of a lock there seems pointless. Besides preventing to read
these information from userspace while buffers are enabled (which is not
supposed to happen), it only protect read accesses over static const
values, which are never supposed to be written anyway.

Drop these lock calls.

Suggested-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
Cc: Denis Ciocca &lt;denis.ciocca@st.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/r/20220207143840.707510-6-miquel.raynal@bootlin.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio:st-sensors: Move exports into IIO_ST_SENSORS namespace</title>
<updated>2022-02-18T11:36:54Z</updated>
<author>
<name>Jonathan Cameron</name>
<email>Jonathan.Cameron@huawei.com</email>
</author>
<published>2022-01-16T18:05:35Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=0805b5121f2933a17616b9799a33bc175d07e722'/>
<id>urn:sha1:0805b5121f2933a17616b9799a33bc175d07e722</id>
<content type='text'>
To avoid unnecessary pollution of the global symbol namespace move the
driver core and type specific core exports into their a new namespace
and import that where needed.

For more info see https://lwn.net/Articles/760045/

Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Cc: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Cc: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: Denis Ciocca &lt;denis.ciocca@st.com&gt;
Link: https://lore.kernel.org/r/20220116180535.2367780-14-jic23@kernel.org
</content>
</entry>
<entry>
<title>iio:st-sensors: Remove duplicate MODULE_*</title>
<updated>2022-02-18T11:36:54Z</updated>
<author>
<name>Jonathan Cameron</name>
<email>Jonathan.Cameron@huawei.com</email>
</author>
<published>2022-01-16T18:05:34Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d4786e7df03dc26e67d706910f3089de43a4fffe'/>
<id>urn:sha1:d4786e7df03dc26e67d706910f3089de43a4fffe</id>
<content type='text'>
The core module and type specific core modules are made up of
several files. There is no benefit in duplicating the MODULE_* macros
in each file so remove them.

Noticed whilst adding MODULE_IMPORT_NS() as I missed some files and
it still worked, making it clear not all of these blocks were needed.

Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Cc: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Cc: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Cc: Denis Ciocca &lt;denis.ciocca@st.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://lore.kernel.org/r/20220116180535.2367780-13-jic23@kernel.org
</content>
</entry>
<entry>
<title>iio: st_sensors: don't always auto-enable I2C and SPI interface drivers</title>
<updated>2022-01-23T18:03:35Z</updated>
<author>
<name>Nikita Yushchenko</name>
<email>nikita.yoush@cogentembedded.com</email>
</author>
<published>2022-01-10T15:24:32Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=26b2ec2e9a27f881998b830fd5158f8a30de82a1'/>
<id>urn:sha1:26b2ec2e9a27f881998b830fd5158f8a30de82a1</id>
<content type='text'>
This patch makes I2C and SPI interface drivers for STMicroelectronics
sensor chips individually selectable via Kconfig.

The default is kept unchanged - I2C and SPI interface drivers are still
selected by default if the corresponding bus support is available.

However, the patch makes it possible to explicitly disable drivers
that are not needed for a particular target.

Signed-off-by: Nikita Yushchenko &lt;nikita.yoush@cogentembedded.com&gt;
Acked-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20220110152432.3799227-1-nikita.yoush@cogentembedded.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: st-sensors: Use dev_to_iio_dev() in sysfs callbacks</title>
<updated>2021-11-17T17:51:32Z</updated>
<author>
<name>Lars-Peter Clausen</name>
<email>lars@metafoo.de</email>
</author>
<published>2021-10-20T08:53:49Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=4498863cad7befbbd14006e033ae84784a33ae53'/>
<id>urn:sha1:4498863cad7befbbd14006e033ae84784a33ae53</id>
<content type='text'>
Using `dev_get_drvdata()` in IIO sysfs callbacks to get a pointer to the
IIO device is a relic from the very early days of IIO. The IIO core as well
as most other drivers have switched over to using `dev_to_iio_dev()`
instead.

This driver is one of the last few drivers remaining that uses the outdated
idiom, update it. This will allow to eventually update the IIO core to no
longer set the drvdata for the IIO device and free it up for driver usage.

Signed-off-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Link: https://lore.kernel.org/r/20211020085349.16178-1-lars@metafoo.de
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: st_sensors: Make use of the helper function dev_err_probe()</title>
<updated>2021-10-19T07:30:44Z</updated>
<author>
<name>Cai Huoqing</name>
<email>caihuoqing@baidu.com</email>
</author>
<published>2021-09-28T01:40:53Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=4dff754876959b3f3b354800089bc8aaa3ec1d95'/>
<id>urn:sha1:4dff754876959b3f3b354800089bc8aaa3ec1d95</id>
<content type='text'>
When possible use dev_err_probe help to properly deal with the
PROBE_DEFER error, the benefit is that DEFER issue will be logged
in the devices_deferred debugfs file.
Using dev_err_probe() can reduce code size, and the error value
gets printed.

Signed-off-by: Cai Huoqing &lt;caihuoqing@baidu.com&gt;
Link: https://lore.kernel.org/r/20210928014055.1431-1-caihuoqing@baidu.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: st_sensors: remove reference to parent device object on st_sensor_data</title>
<updated>2021-09-14T11:00:32Z</updated>
<author>
<name>Alexandru Ardelean</name>
<email>aardelean@deviqon.com</email>
</author>
<published>2021-08-23T11:22:04Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e42696515414a15774c80f1d454194ce0cd9f145'/>
<id>urn:sha1:e42696515414a15774c80f1d454194ce0cd9f145</id>
<content type='text'>
The idea behind it, is that all devm_ calls in ST sensors are bound to the
parent device object.

However, the reference to that object is kept on both the st_sensor_data
struct and the IIO object parent (indio_dev-&gt;dev.parent).

This change only adds a bit consistency and uses the reference stored on
indio_dev-&gt;dev.parent, to enforce the assumption that all ST sensors' devm_
calls are bound to the same reference as the one store on st_sensor_data.

Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Signed-off-by: Alexandru Ardelean &lt;aardelean@deviqon.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://lore.kernel.org/r/20210823112204.243255-6-aardelean@deviqon.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
</feed>
