<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/leds/flash, branch v6.5.2</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>leds: sgm3140: Add richtek,rt5033-led compatible</title>
<updated>2023-06-21T18:09:28+00:00</updated>
<author>
<name>Raymond Hackley</name>
<email>raymondhackley@protonmail.com</email>
</author>
<published>2023-06-02T13:11:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=7bd932d9adbcc5c5370d968bdb0b00385606bf3a'/>
<id>7bd932d9adbcc5c5370d968bdb0b00385606bf3a</id>
<content type='text'>
Richtek's rt5033-led has pin configurations similar to sgm3140.
Add it to the compatible list.

Signed-off-by: Raymond Hackley &lt;raymondhackley@protonmail.com&gt;
Link: https://lore.kernel.org/r/20230602131024.260297-1-raymondhackley@protonmail.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Richtek's rt5033-led has pin configurations similar to sgm3140.
Add it to the compatible list.

Signed-off-by: Raymond Hackley &lt;raymondhackley@protonmail.com&gt;
Link: https://lore.kernel.org/r/20230602131024.260297-1-raymondhackley@protonmail.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: flash: leds-qcom-flash: Fix an unsigned comparison which can never be negative</title>
<updated>2023-06-08T17:12:46+00:00</updated>
<author>
<name>Jiapeng Chong</name>
<email>jiapeng.chong@linux.alibaba.com</email>
</author>
<published>2023-05-31T05:35:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b3f4b679ff427bba8208177ea52cc39128995f62'/>
<id>b3f4b679ff427bba8208177ea52cc39128995f62</id>
<content type='text'>
The variable 'count' is defined as unsigned type, so the following if
statement is invalid, we can modify the type of count to int.

if (count &lt;= 0) {
	dev_err(dev, "No led-sources specified\n");
	return -ENODEV;
}

./drivers/leds/flash/leds-qcom-flash.c:546:5-10: WARNING: Unsigned expression compared with zero: count &lt;= 0.

Reported-by: Abaci Robot &lt;abaci@linux.alibaba.com&gt;
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=5344
Signed-off-by: Jiapeng Chong &lt;jiapeng.chong@linux.alibaba.com&gt;
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
Link: https://lore.kernel.org/r/20230531053559.5702-1-jiapeng.chong@linux.alibaba.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The variable 'count' is defined as unsigned type, so the following if
statement is invalid, we can modify the type of count to int.

if (count &lt;= 0) {
	dev_err(dev, "No led-sources specified\n");
	return -ENODEV;
}

./drivers/leds/flash/leds-qcom-flash.c:546:5-10: WARNING: Unsigned expression compared with zero: count &lt;= 0.

Reported-by: Abaci Robot &lt;abaci@linux.alibaba.com&gt;
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=5344
Signed-off-by: Jiapeng Chong &lt;jiapeng.chong@linux.alibaba.com&gt;
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
Link: https://lore.kernel.org/r/20230531053559.5702-1-jiapeng.chong@linux.alibaba.com
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: as3645a: Replace strlcpy with strscpy</title>
<updated>2023-05-25T11:44:25+00:00</updated>
<author>
<name>Azeem Shaikh</name>
<email>azeemshaikh38@gmail.com</email>
</author>
<published>2023-05-24T14:48:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=36af333a753a22b10771af7d11a28b01183c4190'/>
<id>36af333a753a22b10771af7d11a28b01183c4190</id>
<content type='text'>
Part of a tree-wide effort to remove deprecated strlcpy()[1] and replace
it with strscpy()[2]. No return values were used, so direct replacement
is safe.

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy
[2] https://github.com/KSPP/linux/issues/89

Signed-off-by: Azeem Shaikh &lt;azeemshaikh38@gmail.com&gt;
Link: https://lore.kernel.org/r/20230524144824.2360607-1-azeemshaikh38@gmail.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Part of a tree-wide effort to remove deprecated strlcpy()[1] and replace
it with strscpy()[2]. No return values were used, so direct replacement
is safe.

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy
[2] https://github.com/KSPP/linux/issues/89

Signed-off-by: Azeem Shaikh &lt;azeemshaikh38@gmail.com&gt;
Link: https://lore.kernel.org/r/20230524144824.2360607-1-azeemshaikh38@gmail.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: Replace all non-returning strlcpy with strscpy</title>
<updated>2023-05-25T11:31:55+00:00</updated>
<author>
<name>Azeem Shaikh</name>
<email>azeemshaikh38@gmail.com</email>
</author>
<published>2023-05-23T02:14:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=bf4a35e9201d30b63a8d276797d6ecfaa596ccd3'/>
<id>bf4a35e9201d30b63a8d276797d6ecfaa596ccd3</id>
<content type='text'>
strlcpy() reads the entire source buffer first.
This read may exceed the destination size limit.
This is both inefficient and can lead to linear read
overflows if a source string is not NUL-terminated [1].
In an effort to remove strlcpy() completely [2], replace
strlcpy() here with strscpy().
No return values were used, so direct replacement is safe.

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy
[2] https://github.com/KSPP/linux/issues/89

Signed-off-by: Azeem Shaikh &lt;azeemshaikh38@gmail.com&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Link: https://lore.kernel.org/r/20230523021451.2406362-1-azeemshaikh38@gmail.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
strlcpy() reads the entire source buffer first.
This read may exceed the destination size limit.
This is both inefficient and can lead to linear read
overflows if a source string is not NUL-terminated [1].
In an effort to remove strlcpy() completely [2], replace
strlcpy() here with strscpy().
No return values were used, so direct replacement is safe.

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy
[2] https://github.com/KSPP/linux/issues/89

Signed-off-by: Azeem Shaikh &lt;azeemshaikh38@gmail.com&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Link: https://lore.kernel.org/r/20230523021451.2406362-1-azeemshaikh38@gmail.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: Switch i2c drivers back to use .probe()</title>
<updated>2023-05-25T11:16:22+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-05-17T18:05:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d9ff8a8eecf8ad70aadc54cce39208b3957f2c6a'/>
<id>d9ff8a8eecf8ad70aadc54cce39208b3957f2c6a</id>
<content type='text'>
After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new()
call-back type"), all drivers being converted to .probe_new() and then
03c835f498b5 ("i2c: Switch .probe() to not take an id parameter") convert
back to (the new) .probe() to be able to eventually drop .probe_new() from
struct i2c_driver.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20230517180559.166329-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new()
call-back type"), all drivers being converted to .probe_new() and then
03c835f498b5 ("i2c: Switch .probe() to not take an id parameter") convert
back to (the new) .probe() to be able to eventually drop .probe_new() from
struct i2c_driver.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20230517180559.166329-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: flash: leds-qcom-flash: Disable LED when changing brightness</title>
<updated>2023-05-25T11:16:20+00:00</updated>
<author>
<name>Dylan Van Assche</name>
<email>me@dylanvanassche.be</email>
</author>
<published>2023-05-07T17:29:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=91fe1bda4672c31aa93d018176e6cf62c6ccb657'/>
<id>91fe1bda4672c31aa93d018176e6cf62c6ccb657</id>
<content type='text'>
The Qualcomm PMI8998 PMIC requires the LED to be disabled when configuring
the brightness. Always disable the LED when setting the brightness and
re-enable it afterwards.

Signed-off-by: Dylan Van Assche &lt;me@dylanvanassche.be&gt;
Link: https://lore.kernel.org/r/20230507172941.364852-3-me@dylanvanassche.be
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The Qualcomm PMI8998 PMIC requires the LED to be disabled when configuring
the brightness. Always disable the LED when setting the brightness and
re-enable it afterwards.

Signed-off-by: Dylan Van Assche &lt;me@dylanvanassche.be&gt;
Link: https://lore.kernel.org/r/20230507172941.364852-3-me@dylanvanassche.be
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: flash: leds-qcom-flash: Add PMI8998 support</title>
<updated>2023-05-25T11:16:19+00:00</updated>
<author>
<name>Dylan Van Assche</name>
<email>me@dylanvanassche.be</email>
</author>
<published>2023-05-07T17:29:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=0ae8dc1a1a998c7b6b866cb83de83bea5740fb8e'/>
<id>0ae8dc1a1a998c7b6b866cb83de83bea5740fb8e</id>
<content type='text'>
Add subtype for the Qualcomm PMI8998 PMIC to support it besides the
PM8150 PMIC which has the same registers. Adjust the driver to recognize
both PMIC subtypes as a 3 channel LED driver.

Signed-off-by: Dylan Van Assche &lt;me@dylanvanassche.be&gt;
Link: https://lore.kernel.org/r/20230507172941.364852-2-me@dylanvanassche.be
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add subtype for the Qualcomm PMI8998 PMIC to support it besides the
PM8150 PMIC which has the same registers. Adjust the driver to recognize
both PMIC subtypes as a 3 channel LED driver.

Signed-off-by: Dylan Van Assche &lt;me@dylanvanassche.be&gt;
Link: https://lore.kernel.org/r/20230507172941.364852-2-me@dylanvanassche.be
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: flash: Set variables mvflash_{3,4}ch_regs storage-class-specifier to static</title>
<updated>2023-03-30T12:58:24+00:00</updated>
<author>
<name>Tom Rix</name>
<email>trix@redhat.com</email>
</author>
<published>2023-03-17T19:13:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=22dc3789b737fe29d8f54f0d084047aede5550ad'/>
<id>22dc3789b737fe29d8f54f0d084047aede5550ad</id>
<content type='text'>
Smatch reports:

  drivers/leds/flash/leds-qcom-flash.c:103:18: warning:
    symbol 'mvflash_3ch_regs' was not declared. Should it be static?
  drivers/leds/flash/leds-qcom-flash.c:115:18: warning:
    symbol 'mvflash_4ch_regs' was not declared. Should it be static?

These variables are only used locally, so it should be static.

Signed-off-by: Tom Rix &lt;trix@redhat.com&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
Link: https://lore.kernel.org/r/20230317191341.1670660-1-trix@redhat.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Smatch reports:

  drivers/leds/flash/leds-qcom-flash.c:103:18: warning:
    symbol 'mvflash_3ch_regs' was not declared. Should it be static?
  drivers/leds/flash/leds-qcom-flash.c:115:18: warning:
    symbol 'mvflash_4ch_regs' was not declared. Should it be static?

These variables are only used locally, so it should be static.

Signed-off-by: Tom Rix &lt;trix@redhat.com&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
Link: https://lore.kernel.org/r/20230317191341.1670660-1-trix@redhat.com
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: flash: mt6370: Add MediaTek MT6370 flashlight support</title>
<updated>2023-03-23T14:54:08+00:00</updated>
<author>
<name>ChiYuan Huang</name>
<email>cy_huang@richtek.com</email>
</author>
<published>2023-03-10T06:55:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=fa31e4221c65b205e18c82c459c3bcd68404a1c6'/>
<id>fa31e4221c65b205e18c82c459c3bcd68404a1c6</id>
<content type='text'>
The MediaTek MT6370 is a highly-integrated smart power management IC,
which includes a single cell Li-Ion/Li-Polymer switching battery
charger, a USB Type-C &amp; Power Delivery (PD) controller, dual Flash
LED current sources, a RGB LED driver, a backlight WLED driver,
a display bias driver and a general LDO for portable devices.

Add support for the MT6370 Flash LED driver. Flash LED in MT6370
has 2 channels and support torch/strobe mode.

Co-developed-by: Alice Chen &lt;alice_chen@richtek.com&gt;
Signed-off-by: Alice Chen &lt;alice_chen@richtek.com&gt;
Signed-off-by: ChiYuan Huang &lt;cy_huang@richtek.com&gt;
Signed-off-by: ChiaEn Wu &lt;chiaen_wu@richtek.com&gt;
Acked-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
Link: https://lore.kernel.org/r/52480420a160e5a4c71715fbbf105e684a16e7c2.1678430444.git.chiaen_wu@richtek.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The MediaTek MT6370 is a highly-integrated smart power management IC,
which includes a single cell Li-Ion/Li-Polymer switching battery
charger, a USB Type-C &amp; Power Delivery (PD) controller, dual Flash
LED current sources, a RGB LED driver, a backlight WLED driver,
a display bias driver and a general LDO for portable devices.

Add support for the MT6370 Flash LED driver. Flash LED in MT6370
has 2 channels and support torch/strobe mode.

Co-developed-by: Alice Chen &lt;alice_chen@richtek.com&gt;
Signed-off-by: Alice Chen &lt;alice_chen@richtek.com&gt;
Signed-off-by: ChiYuan Huang &lt;cy_huang@richtek.com&gt;
Signed-off-by: ChiaEn Wu &lt;chiaen_wu@richtek.com&gt;
Acked-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
Link: https://lore.kernel.org/r/52480420a160e5a4c71715fbbf105e684a16e7c2.1678430444.git.chiaen_wu@richtek.com
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: flash: Add driver to support flash LED module in QCOM PMICs</title>
<updated>2023-03-16T15:08:45+00:00</updated>
<author>
<name>Fenglin Wu</name>
<email>quic_fenglinw@quicinc.com</email>
</author>
<published>2023-03-03T09:50:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=96a2e242a5dcb677fe3063be38bda335c17849d3'/>
<id>96a2e242a5dcb677fe3063be38bda335c17849d3</id>
<content type='text'>
Add initial driver to support flash LED module found in Qualcomm
Technologies, Inc. PMICs. The flash module can have 3 or 4 channels
and each channel can be controlled indepedently and support full scale
current up to 1.5 A. It also supports connecting two channels together
to supply one LED component with full scale current up to 2 A. In that
case, the current will be split on each channel symmetrically and the
channels will be enabled and disabled at the same time.

Signed-off-by: Fenglin Wu &lt;quic_fenglinw@quicinc.com&gt;
Tested-by: Luca Weiss &lt;luca.weiss@fairphone.com&gt; # sm7225-fairphone-fp4 + pm6150l
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
Link: https://lore.kernel.org/r/20230303095023.538917-2-quic_fenglinw@quicinc.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add initial driver to support flash LED module found in Qualcomm
Technologies, Inc. PMICs. The flash module can have 3 or 4 channels
and each channel can be controlled indepedently and support full scale
current up to 1.5 A. It also supports connecting two channels together
to supply one LED component with full scale current up to 2 A. In that
case, the current will be split on each channel symmetrically and the
channels will be enabled and disabled at the same time.

Signed-off-by: Fenglin Wu &lt;quic_fenglinw@quicinc.com&gt;
Tested-by: Luca Weiss &lt;luca.weiss@fairphone.com&gt; # sm7225-fairphone-fp4 + pm6150l
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
Link: https://lore.kernel.org/r/20230303095023.538917-2-quic_fenglinw@quicinc.com
</pre>
</div>
</content>
</entry>
</feed>
