<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/leds/flash/leds-qcom-flash.c, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2025-08-18T08:49:12Z</updated>
<entry>
<title>leds: flash: leds-qcom-flash: Add a separate register map for PMI8998</title>
<updated>2025-08-18T08:49:12Z</updated>
<author>
<name>Fenglin Wu</name>
<email>fenglin.wu@oss.qualcomm.com</email>
</author>
<published>2025-07-29T04:51:23Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7d5c3cac1f395324673e9ec32b65e4f6ff23fcb9'/>
<id>urn:sha1:7d5c3cac1f395324673e9ec32b65e4f6ff23fcb9</id>
<content type='text'>
The 3-channel flash module in PMI8998 has several registers different
than the others, such as: torch_clamp. Add different register fields
for it.

Signed-off-by: Fenglin Wu &lt;fenglin.wu@oss.qualcomm.com&gt;
Reviewed-by: Konrad Dybcio &lt;konrad.dybcio@oss.qualcomm.com&gt;
Link: https://lore.kernel.org/r/20250729-fix-torch-clamp-issue-v2-2-9b83816437a3@oss.qualcomm.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
<entry>
<title>leds: flash: leds-qcom-flash: Update torch current clamp setting</title>
<updated>2025-08-18T08:49:11Z</updated>
<author>
<name>Fenglin Wu</name>
<email>fenglin.wu@oss.qualcomm.com</email>
</author>
<published>2025-07-29T04:51:22Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5974e8f6c3e47ab097c3dd8ece7324d1f88fe739'/>
<id>urn:sha1:5974e8f6c3e47ab097c3dd8ece7324d1f88fe739</id>
<content type='text'>
There is a register to clamp the flash current per LED channel when
safety timer is disabled. It needs to be updated according to the
maximum torch LED current setting to ensure the torch current won't
be clamped unexpectedly.

Fixes: 96a2e242a5dc ("leds: flash: Add driver to support flash LED module in QCOM PMICs")
Signed-off-by: Fenglin Wu &lt;fenglin.wu@oss.qualcomm.com&gt;
Reviewed-by: Konrad Dybcio &lt;konrad.dybcio@oss.qualcomm.com&gt;
Link: https://lore.kernel.org/r/20250729-fix-torch-clamp-issue-v2-1-9b83816437a3@oss.qualcomm.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
<entry>
<title>leds: flash: leds-qcom-flash: Fix registry access after re-bind</title>
<updated>2025-06-13T13:41:34Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzysztof.kozlowski@linaro.org</email>
</author>
<published>2025-05-29T06:33:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=fab15f57360b1e6620a1d0d6b0fbee896e6c1f07'/>
<id>urn:sha1:fab15f57360b1e6620a1d0d6b0fbee896e6c1f07</id>
<content type='text'>
Driver in probe() updates each of 'reg_field' with 'reg_base':

	for (i = 0; i &lt; REG_MAX_COUNT; i++)
		regs[i].reg += reg_base;

'reg_field' array (under variable 'regs' above) is statically allocated,
thus each re-bind would add another 'reg_base' leading to bogus
register addresses.  Constify the local 'reg_field' array and duplicate
it in probe to solve this.

Fixes: 96a2e242a5dc ("leds: flash: Add driver to support flash LED module in QCOM PMICs")
Cc: stable@vger.kernel.org
Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Reviewed-by: Fenglin Wu &lt;fenglin.wu@oss.qualcomm.com&gt;
Link: https://lore.kernel.org/r/20250529063335.8785-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
<entry>
<title>leds: Switch back to struct platform_driver::remove()</title>
<updated>2024-10-15T08:58:10Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@baylibre.com</email>
</author>
<published>2024-10-10T20:36:23Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6bdc6d4a374fa5a4fbed7d913f0c6d11d08bb867'/>
<id>urn:sha1:6bdc6d4a374fa5a4fbed7d913f0c6d11d08bb867</id>
<content type='text'>
After commit 0edb555a65d1 ("platform: Make platform_driver::remove()
return void") .remove() is (again) the right callback to implement for
platform drivers.

Convert all platform drivers below drivers/leds/ to use .remove(), with
the eventual goal to drop struct platform_driver::remove_new(). As
.remove() and .remove_new() have the same prototypes, conversion is done
by just changing the structure member name in the driver initializer.

While touching these files, make indention of the struct initializer
consistent in several files.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@baylibre.com&gt;
Link: https://lore.kernel.org/r/20241010203622.839625-5-u.kleine-koenig@baylibre.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
<entry>
<title>leds: flash: leds-qcom-flash: Switch to device_for_each_child_node_scoped()</title>
<updated>2024-10-09T14:16:30Z</updated>
<author>
<name>Javier Carrasco</name>
<email>javier.carrasco.cruz@gmail.com</email>
</author>
<published>2024-09-26T23:20:54Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f64dd42a4f939fb5acc3f3568ef2118487617996'/>
<id>urn:sha1:f64dd42a4f939fb5acc3f3568ef2118487617996</id>
<content type='text'>
Switch to device_for_each_child_node_scoped() to simplify the code by
removing the need for calls to fwnode_handle_put() in the error paths.

This also prevents possible memory leaks if new error paths are added
without the required call to fwnode_handle_put().

Signed-off-by: Javier Carrasco &lt;javier.carrasco.cruz@gmail.com&gt;
Link: https://lore.kernel.org/r/20240927-leds_device_for_each_child_node_scoped-v1-3-95c0614b38c8@gmail.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
<entry>
<title>leds: flash: leds-qcom-flash: Limit LED current based on thermal condition</title>
<updated>2024-08-01T12:40:08Z</updated>
<author>
<name>Fenglin Wu</name>
<email>quic_fenglinw@quicinc.com</email>
</author>
<published>2024-07-05T07:55:01Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a0864cf32044233e56247fa0eed3ac660f15db9e'/>
<id>urn:sha1:a0864cf32044233e56247fa0eed3ac660f15db9e</id>
<content type='text'>
The flash module has status bits to indicate different thermal
conditions which are called as OTSTx. For each OTSTx status,
there is a recommended total flash current for all channels to
prevent the flash module entering into higher thermal level.
For example, the total flash current should be limited to 1000mA/500mA
respectively when the HW reaches the OTST1/OTST2 thermal level.

Signed-off-by: Fenglin Wu &lt;quic_fenglinw@quicinc.com&gt;
Link: https://lore.kernel.org/r/20240705-qcom_flash_thermal_derating-v3-1-8e2e2783e3a6@quicinc.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
<entry>
<title>leds: flash: leds-qcom-flash: Test the correct variable in init</title>
<updated>2024-07-11T11:46:33Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@linaro.org</email>
</author>
<published>2024-07-04T15:19:32Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=87e552ad654554be73e62dd43c923bcee215287d'/>
<id>urn:sha1:87e552ad654554be73e62dd43c923bcee215287d</id>
<content type='text'>
This code was passing the incorrect pointer to PTR_ERR_OR_ZERO() so it
always returned success.  It should have been checking the array element
instead of the array itself.

Fixes: 96a2e242a5dc ("leds: flash: Add driver to support flash LED module in QCOM PMICs")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Link: https://lore.kernel.org/r/ZoWJS_epjIMCYITg@stanley.mountain
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
<entry>
<title>leds: Convert all platform drivers to return void</title>
<updated>2023-11-01T11:28:35Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-09-17T13:09:47Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6061302092305a0584aacf0d82a9d5e66653884c'/>
<id>urn:sha1:6061302092305a0584aacf0d82a9d5e66653884c</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() is renamed to .remove().

All platform drivers below drivers/leds/ unconditionally return zero in
their remove callback and so can be converted trivially to the variant
returning void.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20230917130947.1122198-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
<entry>
<title>leds: flash: leds-qcom-flash: Put child node if registration failed</title>
<updated>2023-07-28T11:17:40Z</updated>
<author>
<name>Fenglin Wu</name>
<email>quic_fenglinw@quicinc.com</email>
</author>
<published>2023-07-25T09:57:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=546924102de8327a5b2095d2134faed6de971476'/>
<id>urn:sha1:546924102de8327a5b2095d2134faed6de971476</id>
<content type='text'>
Put the child node if register flash LED device failed.

Signed-off-by: Fenglin Wu &lt;quic_fenglinw@quicinc.com&gt;
Link: https://lore.kernel.org/r/20230725-leds-qcom-flash-driver-tiny-fixes-v2-3-0f5cbce5fed0@quicinc.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
<entry>
<title>leds: flash: leds-qcom-flash: Turn off LED before setting flash current</title>
<updated>2023-07-28T11:17:32Z</updated>
<author>
<name>Fenglin Wu</name>
<email>quic_fenglinw@quicinc.com</email>
</author>
<published>2023-07-25T09:57:20Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7c47381c8664d55861036d1d858daf5e9d5d67b8'/>
<id>urn:sha1:7c47381c8664d55861036d1d858daf5e9d5d67b8</id>
<content type='text'>
Strobe off the LED before setting flash current to avoid it's being
enabled with an incorrect current if it has been working in torch
mode.

Signed-off-by: Fenglin Wu &lt;quic_fenglinw@quicinc.com&gt;
Link: https://lore.kernel.org/r/20230725-leds-qcom-flash-driver-tiny-fixes-v2-2-0f5cbce5fed0@quicinc.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
</feed>
