<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/iio/accel/st_accel_spi.c, branch linux-6.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.18.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.18.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2025-04-22T18:10:04Z</updated>
<entry>
<title>iio: normalize array sentinel style</title>
<updated>2025-04-22T18:10:04Z</updated>
<author>
<name>David Lechner</name>
<email>dlechner@baylibre.com</email>
</author>
<published>2025-04-11T20:49:34Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=70788d26ae1c482dba843efcc0cf166c2ba36a38'/>
<id>urn:sha1:70788d26ae1c482dba843efcc0cf166c2ba36a38</id>
<content type='text'>
Use `\t(\{ ?\},|\{\}|\{\s*/\*.*\*/\s*\},?)$` regex to find and replace
the array sentinel in all IIO drivers to the same style.

For some time, we've been trying to consistently use `{ }` (no trailing
comma, no comment, one space between braces) for array sentinels in the
IIO subsystem. Still nearly 50% of existing code uses a different style.
To save reviewers from having to request this trivial change as
frequently, let's normalize the style in all existing IIO drivers.
At least when code is copy/pasted to new drivers, the style will be
consistent.

Signed-off-by: David Lechner &lt;dlechner@baylibre.com&gt;
Reviewed-by: Andy Shevchenko &lt;andy@kernel.org&gt;
Link: https://patch.msgid.link/20250411-iio-sentinel-normalization-v1-1-d293de3e3d93@baylibre.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>module: Convert symbol namespace to string literal</title>
<updated>2024-12-02T19:34:44Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2024-12-02T14:59:47Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=cdd30ebb1b9f36159d66f088b61aee264e649d7a'/>
<id>urn:sha1:cdd30ebb1b9f36159d66f088b61aee264e649d7a</id>
<content type='text'>
Clean up the existing export namespace code along the same lines of
commit 33def8498fdd ("treewide: Convert macro and uses of __section(foo)
to __section("foo")") and for the same reason, it is not desired for the
namespace argument to be a macro expansion itself.

Scripted using

  git grep -l -e MODULE_IMPORT_NS -e EXPORT_SYMBOL_NS | while read file;
  do
    awk -i inplace '
      /^#define EXPORT_SYMBOL_NS/ {
        gsub(/__stringify\(ns\)/, "ns");
        print;
        next;
      }
      /^#define MODULE_IMPORT_NS/ {
        gsub(/__stringify\(ns\)/, "ns");
        print;
        next;
      }
      /MODULE_IMPORT_NS/ {
        $0 = gensub(/MODULE_IMPORT_NS\(([^)]*)\)/, "MODULE_IMPORT_NS(\"\\1\")", "g");
      }
      /EXPORT_SYMBOL_NS/ {
        if ($0 ~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+),/) {
  	if ($0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/ &amp;&amp;
  	    $0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(\)/ &amp;&amp;
  	    $0 !~ /^my/) {
  	  getline line;
  	  gsub(/[[:space:]]*\\$/, "");
  	  gsub(/[[:space:]]/, "", line);
  	  $0 = $0 " " line;
  	}

  	$0 = gensub(/(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/,
  		    "\\1(\\2, \"\\3\")", "g");
        }
      }
      { print }' $file;
  done

Requested-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Link: https://mail.google.com/mail/u/2/#inbox/FMfcgzQXKWgMmjdFwwdsfgxzKpVHWPlc
Acked-by: Greg KH &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>iio: accel: st_accel: add support for LIS2DS12</title>
<updated>2024-06-25T20:04:49Z</updated>
<author>
<name>Kaustabh Chakraborty</name>
<email>kauschluss@disroot.org</email>
</author>
<published>2024-06-22T12:33:45Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f168a6db111b83a44552a0006326178b2c92bd7d'/>
<id>urn:sha1:f168a6db111b83a44552a0006326178b2c92bd7d</id>
<content type='text'>
Define sensor settings for LIS2DS12 by STMicroelectronics (WhoAmI 0x43)
and add support in the I2C and SPI drivers.

Datasheet: https://www.st.com/resource/en/datasheet/lis2ds12.pdf
Signed-off-by: Kaustabh Chakraborty &lt;kauschluss@disroot.org&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://patch.msgid.link/20240622123520.39253-1-kauschluss@disroot.org
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: accel: add support for IIS328DQ variant</title>
<updated>2023-03-19T15:41:22Z</updated>
<author>
<name>Stefan Wahren</name>
<email>stefan.wahren@chargebyte.com</email>
</author>
<published>2023-03-17T10:33:20Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=46e33707fe95a21aa9896bded0be97285b779509'/>
<id>urn:sha1:46e33707fe95a21aa9896bded0be97285b779509</id>
<content type='text'>
Since the ST IIS328DQ accelerometer is compatible to the ST LIS331DL,
just add the new compatible to the st_accel framework.

Link: https://www.st.com/resource/en/datasheet/iis328dq.pdf
Signed-off-by: Stefan Wahren &lt;stefan.wahren@chargebyte.com&gt;
Link: https://lore.kernel.org/r/20230317103323.7741-6-stefan.wahren@chargebyte.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: accel: st_accel: Add LSM303C</title>
<updated>2023-01-08T13:01:02Z</updated>
<author>
<name>Stephan Gerhold</name>
<email>stephan@gerhold.net</email>
</author>
<published>2023-01-06T10:22:38Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=23fd6f0bd6cbf010216a078a99dcbaa30c8bb5ae'/>
<id>urn:sha1:23fd6f0bd6cbf010216a078a99dcbaa30c8bb5ae</id>
<content type='text'>
The accelerometer part of ST LSM303C is similar (perhaps even identical)
to the already supported standalone LIS2HH12 accelerometer, so just
add the new st,lsm303c-accel compatible for the existing definitions.

Signed-off-by: Stephan Gerhold &lt;stephan@gerhold.net&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://lore.kernel.org/r/20230106102239.9647-3-stephan@gerhold.net
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: accel: add support for LIS302DL variant</title>
<updated>2022-04-04T08:11:23Z</updated>
<author>
<name>Sicelo A. Mhlongo</name>
<email>absicsz@gmail.com</email>
</author>
<published>2022-03-07T13:25:02Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8a7449d68670a8f9033d57b9e7997af77a900d53'/>
<id>urn:sha1:8a7449d68670a8f9033d57b9e7997af77a900d53</id>
<content type='text'>
Add support for STMicroelectronics LIS302DL accelerometer to the st_accel
framework.

Datasheet: https://www.st.com/resource/en/datasheet/lis302dl.pdf

Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Sicelo A. Mhlongo &lt;absicsz@gmail.com&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20220307132502.73854-4-absicsz@gmail.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://universe.0xinfinity.dev/distro/kernel/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 all driver remove functions</title>
<updated>2021-09-14T11:00:31Z</updated>
<author>
<name>Alexandru Ardelean</name>
<email>aardelean@deviqon.com</email>
</author>
<published>2021-08-23T11:22:03Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6b658c31bb6bc033f6ae60141c676383fb78784c'/>
<id>urn:sha1:6b658c31bb6bc033f6ae60141c676383fb78784c</id>
<content type='text'>
At this point all ST driver remove functions do iio_device_unregister().
This change removes them from them and replaces all iio_device_register()
with devm_iio_device_register().

This can be done in a single change relatively easy, since all these remove
functions are define in st_sensors.h.

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-5-aardelean@deviqon.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: st_sensors: remove st_sensors_power_disable() function</title>
<updated>2021-09-14T11:00:31Z</updated>
<author>
<name>Alexandru Ardelean</name>
<email>aardelean@deviqon.com</email>
</author>
<published>2021-08-23T11:22:02Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5363c6c17b1014f696bf0b2984af4b694062ce8f'/>
<id>urn:sha1:5363c6c17b1014f696bf0b2984af4b694062ce8f</id>
<content type='text'>
This change converts the st_sensors_power_enable() function to use
devm_add_action_or_reset() handlers to register regulator_disable hooks for
when the drivers get unloaded.

The parent device of the IIO device object is used. This is based on the
assumption that all other devm_ calls in the ST sensors use this reference.

This makes the st_sensors_power_disable() un-needed.
Removing this also changes unload order a bit, as all ST drivers would call
st_sensors_power_disable() first and iio_device_unregister() after that.

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-4-aardelean@deviqon.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: st_sensors: disable regulators after device unregistration</title>
<updated>2021-09-14T11:00:31Z</updated>
<author>
<name>Alexandru Ardelean</name>
<email>aardelean@deviqon.com</email>
</author>
<published>2021-08-23T11:22:00Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9f0b3e0cc0c88618aa9e5cecef747b1337ae0a5d'/>
<id>urn:sha1:9f0b3e0cc0c88618aa9e5cecef747b1337ae0a5d</id>
<content type='text'>
Up until commit ea7e586bdd331 ("iio: st_sensors: move regulator retrieveal
to core") only the ST pressure driver seems to have had any regulator
disable. After that commit, the regulator handling was moved into the
common st_sensors logic.

In all instances of this regulator handling, the regulators were disabled
before unregistering the IIO device.
This can cause issues where the device would be powered down and still be
available to userspace, allowing it to send invalid/garbage data.

This change moves the st_sensors_power_disable() after the common probe
functions. These common probe functions also handle unregistering the IIO
device.

Fixes: 774487611c949 ("iio: pressure-core: st: Provide support for the Vdd power supply")
Fixes: ea7e586bdd331 ("iio: st_sensors: move regulator retrieveal to core")
Cc: Lee Jones &lt;lee.jones@linaro.org&gt;
Cc: Denis CIOCCA &lt;denis.ciocca@st.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Signed-off-by: Alexandru Ardelean &lt;aardelean@deviqon.com&gt;
Link: https://lore.kernel.org/r/20210823112204.243255-2-aardelean@deviqon.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
</feed>
