<feed xmlns='http://www.w3.org/2005/Atom'>
<title>blaster4385/linux-IllusionX/drivers/iio/light, branch v6.12.1</title>
<subtitle>Linux kernel with personal config changes for arch linux</subtitle>
<id>http://git.tablaster.dev/blaster4385/linux-IllusionX/atom?h=v6.12.1</id>
<link rel='self' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/atom?h=v6.12.1'/>
<link rel='alternate' type='text/html' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/'/>
<updated>2024-10-24T17:30:03Z</updated>
<entry>
<title>iio: light: veml6030: fix microlux value calculation</title>
<updated>2024-10-24T17:30:03Z</updated>
<author>
<name>Javier Carrasco</name>
<email>javier.carrasco.cruz@gmail.com</email>
</author>
<published>2024-10-16T17:04:31Z</published>
<link rel='alternate' type='text/html' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/commit/?id=63dd163cd61dda6f38343776b42331cc6b7e56e0'/>
<id>urn:sha1:63dd163cd61dda6f38343776b42331cc6b7e56e0</id>
<content type='text'>
The raw value conversion to obtain a measurement in lux as
INT_PLUS_MICRO does not calculate the decimal part properly to display
it as micro (in this case microlux). It only calculates the module to
obtain the decimal part from a resolution that is 10000 times the
provided in the datasheet (0.5376 lux/cnt for the veml6030). The
resulting value must still be multiplied by 100 to make it micro.

This bug was introduced with the original implementation of the driver.

Only the illuminance channel is fixed becuase the scale is non sensical
for the intensity channels anyway.

Cc: stable@vger.kernel.org
Fixes: 7b779f573c48 ("iio: light: add driver for veml6030 ambient light sensor")
Signed-off-by: Javier Carrasco &lt;javier.carrasco.cruz@gmail.com&gt;
Link: https://patch.msgid.link/20241016-veml6030-fix-processed-micro-v1-1-4a5644796437@gmail.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'iio-fixes-for-6.12a' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-linus</title>
<updated>2024-10-13T15:23:47Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2024-10-13T15:23:47Z</published>
<link rel='alternate' type='text/html' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/commit/?id=7528cb0f65d7472c1d6b96956f86b408c5ab6b11'/>
<id>urn:sha1:7528cb0f65d7472c1d6b96956f86b408c5ab6b11</id>
<content type='text'>
Jonathan writes:

IIO: 1st set of fixes for the 6.12 cycle.

Most of this pull request is the result of Javier Carrasco doing a
careful audit for missing Kconfig dependencies that luck has meant
the random builds have never hit. The rest is the usual mix of old
bugs that have surfaced and some fallout from the recent merge window.

adi,ad5686
 - Fix binding duplication of compatible strings.
bosch,bma400
 - Fix an uninitialized variable in the event tap handling.
bosch,bmi323
 - Fix several issues in the register saving and restore on suspend/resume
sensiron,spd500
 - Fix missing CRC8 dependency
ti,op3001
 - Fix a missing full-scale range value (values above this point were
   all reported wrongly)
vishay,veml6030
 - Fix a segmentation fault due to some type confusion.
 - Fix wrong ambient light sensor resolution.

* tag 'iio-fixes-for-6.12a' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (34 commits)
  iio: frequency: admv4420: fix missing select REMAP_SPI in Kconfig
  iio: frequency: {admv4420,adrf6780}: format Kconfig entries
  iio: adc: ad4695: Add missing Kconfig select
  iio: adc: ti-ads8688: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig
  iio: hid-sensors: Fix an error handling path in _hid_sensor_set_report_latency()
  iioc: dac: ltc2664: Fix span variable usage in ltc2664_channel_config()
  iio: dac: stm32-dac-core: add missing select REGMAP_MMIO in Kconfig
  iio: dac: ltc1660: add missing select REGMAP_SPI in Kconfig
  iio: dac: ad5770r: add missing select REGMAP_SPI in Kconfig
  iio: amplifiers: ada4250: add missing select REGMAP_SPI in Kconfig
  iio: frequency: adf4377: add missing select REMAP_SPI in Kconfig
  iio: resolver: ad2s1210: add missing select (TRIGGERED_)BUFFER in Kconfig
  iio: resolver: ad2s1210 add missing select REGMAP in Kconfig
  iio: proximity: mb1232: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig
  iio: pressure: bm1390: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig
  iio: magnetometer: af8133j: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig
  iio: light: bu27008: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig
  iio: chemical: ens160: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig
  iio: dac: ad5766: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig
  iio: dac: ad3552r: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig
  ...
</content>
</entry>
<entry>
<title>iio: light: bu27008: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig</title>
<updated>2024-10-06T15:29:32Z</updated>
<author>
<name>Javier Carrasco</name>
<email>javier.carrasco.cruz@gmail.com</email>
</author>
<published>2024-10-03T21:04:56Z</published>
<link rel='alternate' type='text/html' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/commit/?id=aa99ef68eff5bc6df4959a372ae355b3b73f9930'/>
<id>urn:sha1:aa99ef68eff5bc6df4959a372ae355b3b73f9930</id>
<content type='text'>
This driver makes use of triggered buffers, but does not select the
required modules.

Add the missing 'select IIO_BUFFER' and 'select IIO_TRIGGERED_BUFFER'.

Fixes: 41ff93d14f78 ("iio: light: ROHM BU27008 color sensor")
Signed-off-by: Javier Carrasco &lt;javier.carrasco.cruz@gmail.com&gt;
Acked-by: Matti Vaittinen &lt;mazziesaccount@gmail.com&gt;
Link: https://patch.msgid.link/20241003-iio-select-v1-10-67c0385197cd@gmail.com
Cc: &lt;Stable@vger.kernel.org&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>move asm/unaligned.h to linux/unaligned.h</title>
<updated>2024-10-02T21:23:23Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2024-10-01T19:35:57Z</published>
<link rel='alternate' type='text/html' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/commit/?id=5f60d5f6bbc12e782fac78110b0ee62698f3b576'/>
<id>urn:sha1:5f60d5f6bbc12e782fac78110b0ee62698f3b576</id>
<content type='text'>
asm/unaligned.h is always an include of asm-generic/unaligned.h;
might as well move that thing to linux/unaligned.h and include
that - there's nothing arch-specific in that header.

auto-generated by the following:

for i in `git grep -l -w asm/unaligned.h`; do
	sed -i -e "s/asm\/unaligned.h/linux\/unaligned.h/" $i
done
for i in `git grep -l -w asm-generic/unaligned.h`; do
	sed -i -e "s/asm-generic\/unaligned.h/linux\/unaligned.h/" $i
done
git mv include/asm-generic/unaligned.h include/linux/unaligned.h
git mv tools/include/asm-generic/unaligned.h tools/include/linux/unaligned.h
sed -i -e "/unaligned.h/d" include/asm-generic/Kbuild
sed -i -e "s/__ASM_GENERIC/__LINUX/" include/linux/unaligned.h tools/include/linux/unaligned.h
</content>
</entry>
<entry>
<title>iio: light: veml6030: fix ALS sensor resolution</title>
<updated>2024-09-30T08:20:54Z</updated>
<author>
<name>Javier Carrasco</name>
<email>javier.carrasco.cruz@gmail.com</email>
</author>
<published>2024-09-22T22:17:49Z</published>
<link rel='alternate' type='text/html' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/commit/?id=c9e9746f275c45108f2b0633a4855d65d9ae0736'/>
<id>urn:sha1:c9e9746f275c45108f2b0633a4855d65d9ae0736</id>
<content type='text'>
The driver still uses the sensor resolution provided in the datasheet
until Rev. 1.6, 28-Apr-2022, which was updated with Rev 1.7,
28-Nov-2023. The original ambient light resolution has been updated from
0.0036 lx/ct to 0.0042 lx/ct, which is the value that can be found in
the current device datasheet.

Update the default resolution for IT = 100 ms and GAIN = 1/8 from the
original 4608 mlux/cnt to the current value from the "Resolution and
maximum detection range" table (Application Note 84367, page 5), 5376
mlux/cnt.

Cc: &lt;stable@vger.kernel.org&gt;
Fixes: 7b779f573c48 ("iio: light: add driver for veml6030 ambient light sensor")
Signed-off-by: Javier Carrasco &lt;javier.carrasco.cruz@gmail.com&gt;
Link: https://patch.msgid.link/20240923-veml6035-v2-1-58c72a0df31c@gmail.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: light: opt3001: add missing full-scale range value</title>
<updated>2024-09-30T08:20:53Z</updated>
<author>
<name>Emil Gedenryd</name>
<email>emil.gedenryd@axis.com</email>
</author>
<published>2024-09-13T09:57:02Z</published>
<link rel='alternate' type='text/html' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/commit/?id=530688e39c644543b71bdd9cb45fdfb458a28eaa'/>
<id>urn:sha1:530688e39c644543b71bdd9cb45fdfb458a28eaa</id>
<content type='text'>
The opt3001 driver uses predetermined full-scale range values to
determine what exponent to use for event trigger threshold values.
The problem is that one of the values specified in the datasheet is
missing from the implementation. This causes larger values to be
scaled down to an incorrect exponent, effectively reducing the
maximum settable threshold value by a factor of 2.

Add missing full-scale range array value.

Fixes: 94a9b7b1809f ("iio: light: add support for TI's opt3001 light sensor")
Signed-off-by: Emil Gedenryd &lt;emil.gedenryd@axis.com&gt;
Cc: &lt;Stable@vger.kernel.org&gt;
Link: https://patch.msgid.link/20240913-add_opt3002-v2-1-69e04f840360@axis.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: light: veml6030: fix IIO device retrieval from embedded device</title>
<updated>2024-09-30T08:20:53Z</updated>
<author>
<name>Javier Carrasco</name>
<email>javier.carrasco.cruz@gmail.com</email>
</author>
<published>2024-09-13T13:18:58Z</published>
<link rel='alternate' type='text/html' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/commit/?id=c7c44e57750c31de43906d97813273fdffcf7d02'/>
<id>urn:sha1:c7c44e57750c31de43906d97813273fdffcf7d02</id>
<content type='text'>
The dev pointer that is received as an argument in the
in_illuminance_period_available_show function references the device
embedded in the IIO device, not in the i2c client.

dev_to_iio_dev() must be used to accessthe right data. The current
implementation leads to a segmentation fault on every attempt to read
the attribute because indio_dev gets a NULL assignment.

This bug has been present since the first appearance of the driver,
apparently since the last version (V6) before getting applied. A
constant attribute was used until then, and the last modifications might
have not been tested again.

Cc: stable@vger.kernel.org
Fixes: 7b779f573c48 ("iio: light: add driver for veml6030 ambient light sensor")
Signed-off-by: Javier Carrasco &lt;javier.carrasco.cruz@gmail.com&gt;
Link: https://patch.msgid.link/20240913-veml6035-v1-3-0b09c0c90418@gmail.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: light: ltr390: Calculate 'counts_per_uvi' dynamically</title>
<updated>2024-08-17T14:38:14Z</updated>
<author>
<name>Abhash Jha</name>
<email>abhashkumarjha123@gmail.com</email>
</author>
<published>2024-08-14T11:31:34Z</published>
<link rel='alternate' type='text/html' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/commit/?id=4bd7e5ce519a9f1de1a58fb10438e45aa9cc85ca'/>
<id>urn:sha1:4bd7e5ce519a9f1de1a58fb10438e45aa9cc85ca</id>
<content type='text'>
counts_per_uvi depends on the current value of gain and resolution.
Hence, we cannot use the hardcoded value 96.
The `counts_per_uvi` function gives the count based on the current gain
and resolution (integration time).

Signed-off-by: Abhash Jha &lt;abhashkumarjha123@gmail.com&gt;
Link: https://patch.msgid.link/20240814113135.14575-3-abhashkumarjha123@gmail.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: light: ltr390: Add ALS channel and support for gain and resolution</title>
<updated>2024-08-17T14:38:14Z</updated>
<author>
<name>Abhash Jha</name>
<email>abhashkumarjha123@gmail.com</email>
</author>
<published>2024-08-14T11:31:33Z</published>
<link rel='alternate' type='text/html' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/commit/?id=14e0d914a855f9ad2669c0a2ed35f0003f771be5'/>
<id>urn:sha1:14e0d914a855f9ad2669c0a2ed35f0003f771be5</id>
<content type='text'>
Add new ALS channel and allow reading lux and scale values.
Also provide gain and resolution configuration for ALS channel.
Add automatic mode switching between the UVS and ALS channel
based on which channel is being accessed.
The default mode in which the sensor start is ALS mode.

Signed-off-by: Abhash Jha &lt;abhashkumarjha123@gmail.com&gt;
Link: https://patch.msgid.link/20240814113135.14575-2-abhashkumarjha123@gmail.com
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: light: noa1305: Fix up integration time look up</title>
<updated>2024-08-17T14:37:37Z</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2024-08-14T19:19:09Z</published>
<link rel='alternate' type='text/html' href='http://git.tablaster.dev/blaster4385/linux-IllusionX/commit/?id=076c4d18de4e93591641d03fb921875c02b30eb3'/>
<id>urn:sha1:076c4d18de4e93591641d03fb921875c02b30eb3</id>
<content type='text'>
The current code is always iterating over two fields in the
noa1305_int_time_available array. Fix iteration limit, which
has to be halved to avoid out of bounds access in case the
value that is being looked up is not in the array.

Fixes: 025f23cfebad ("iio: light: noa1305: Make integration time configurable")
Reported-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Suggested-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Link: https://patch.msgid.link/20240814191946.81386-1-marex@denx.de
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
</feed>
