<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/leds, branch v6.13</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.13</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.13'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2024-12-02T19:34:44Z</updated>
<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://git.shady.money/linux/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>Merge tag 'leds-next-6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds</title>
<updated>2024-11-23T00:25:20Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2024-11-23T00:25:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=93251bdf7a771c4eeb0f95fa38ded92e95154ef7'/>
<id>urn:sha1:93251bdf7a771c4eeb0f95fa38ded92e95154ef7</id>
<content type='text'>
PULL LED updates from Lee Jones:

 - Remove unused local header files from various drivers

 - Revert platform driver removal to the original method for consistency

 - Introduce ordered workqueues for LED events, replacing the less
   efficient system_wq

 - Switch to a safer iteration macro in several drivers to prevent
   potential memory leaks

 - Fix a refcounting bug in the mt6360 flash LED driver

 - Fix an uninitialized variable in the mt6370_mc_pattern_clear()
   function

 - Resolve Smatch warnings in the leds-bcm6328 driver

 - Address a potential NULL pointer dereference in the brightness_show()
   function

 - Fix an incorrect format specifier in the ss4200 driver

 - Prevent a resource leak in the max5970 driver's probe function

 - Add support for specifying the number of serial shift bits in the
   device tree for the BCM63138 family

 - Implement multicolor brightness control in the lp5562 driver

 - Add a device tree property to override the default LED pin polarity

 - Add a property to specify the default brightness value when the LED
   is initially on

 - Set missing timing properties for the ktd2692 driver

 - Document the "rc-feedback" trigger for controlling LEDs based on
   remote control activity

 - Convert text bindings to YAML for the pca955x driver to enable device
   tree validation

 - Remove redundant checks for invalid channel numbers in the lp55xx
   driver

 - Update the MAINTAINERS file with current contact information

* tag 'leds-next-6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: (46 commits)
  leds: ss4200: Fix the wrong format specifier for 'blinking'
  leds: pwm: Add optional DT property default-brightness
  dt-bindings: leds: pwm: Add default-brightness property
  leds: class: Protect brightness_show() with led_cdev-&gt;led_access mutex
  leds: ktd2692: Set missing timing properties
  leds: max5970: Fix unreleased fwnode_handle in probe function
  leds: Introduce ordered workqueue for LEDs events instead of system_wq
  MAINTAINERS: Replace Siemens IPC related bouncing maintainers
  leds: bcm6328: Replace divide condition with comparison for shift value
  leds: lp55xx: Remove redundant test for invalid channel number
  dt-bindings: leds: pca955x: Convert text bindings to YAML
  leds: rgb: leds-mt6370-rgb: Fix uninitialized variable 'ret' in mt6370_mc_pattern_clear
  leds: lp5562: Add multicolor brightness control
  dt-bindings: leds: Add 'active-high' property
  leds: Switch back to struct platform_driver::remove()
  leds: bcm63138: Add some register defines
  leds: bcm63138: Handle shift register config
  leds: bcm63138: Use scopes and guards
  dt-bindings: leds: bcm63138: Add shift register bits
  leds: leds-gpio-register: Reorganize kerneldoc parameter names
  ...
</content>
</entry>
<entry>
<title>leds: ss4200: Fix the wrong format specifier for 'blinking'</title>
<updated>2024-11-12T14:39:26Z</updated>
<author>
<name>Zhu Jun</name>
<email>zhujun2@cmss.chinamobile.com</email>
</author>
<published>2024-11-11T06:58:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e8501858035b1f95468da525e7357c8c33811b88'/>
<id>urn:sha1:e8501858035b1f95468da525e7357c8c33811b88</id>
<content type='text'>
The format specifier of "signed int" in sprintf() should be "%d", not
"%u".

Signed-off-by: Zhu Jun &lt;zhujun2@cmss.chinamobile.com&gt;
Link: https://lore.kernel.org/r/20241111065809.3814-1-zhujun2@cmss.chinamobile.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
<entry>
<title>leds: pwm: Add optional DT property default-brightness</title>
<updated>2024-11-12T12:14:00Z</updated>
<author>
<name>George Stark</name>
<email>gnstark@salutedevices.com</email>
</author>
<published>2024-11-05T18:50:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8cb08101835d98fd69cfa2a2b06146eddc057df6'/>
<id>urn:sha1:8cb08101835d98fd69cfa2a2b06146eddc057df6</id>
<content type='text'>
When probing if default LED state is on then default brightness will be
applied instead of max brightness.

Signed-off-by: George Stark &lt;gnstark@salutedevices.com&gt;
Link: https://lore.kernel.org/r/20241105185006.1380166-3-gnstark@salutedevices.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
<entry>
<title>leds: gpio: Avoid using GPIOF_ACTIVE_LOW</title>
<updated>2024-11-09T13:55:33Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2024-11-04T09:34:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e6a2f0ea519fd2478920d02ce3de07a14fe36b2f'/>
<id>urn:sha1:e6a2f0ea519fd2478920d02ce3de07a14fe36b2f</id>
<content type='text'>
Avoid using GPIOF_ACTIVE_LOW as it's deprecated and subject to remove.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Acked-by: Lee Jones &lt;lee@kernel.org&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://lore.kernel.org/r/20241104093609.156059-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Bartosz Golaszewski &lt;bartosz.golaszewski@linaro.org&gt;
</content>
</entry>
<entry>
<title>leds: class: Protect brightness_show() with led_cdev-&gt;led_access mutex</title>
<updated>2024-11-06T08:42:59Z</updated>
<author>
<name>Mukesh Ojha</name>
<email>quic_mojha@quicinc.com</email>
</author>
<published>2024-11-03T16:05:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4ca7cd938725a4050dcd62ae9472e931d603118d'/>
<id>urn:sha1:4ca7cd938725a4050dcd62ae9472e931d603118d</id>
<content type='text'>
There is NULL pointer issue observed if from Process A where hid device
being added which results in adding a led_cdev addition and later a
another call to access of led_cdev attribute from Process B can result
in NULL pointer issue.

Use mutex led_cdev-&gt;led_access to protect access to led-&gt;cdev and its
attribute inside brightness_show() and max_brightness_show() and also
update the comment for mutex that it should be used to protect the led
class device fields.

	Process A 				Process B

 kthread+0x114
 worker_thread+0x244
 process_scheduled_works+0x248
 uhid_device_add_worker+0x24
 hid_add_device+0x120
 device_add+0x268
 bus_probe_device+0x94
 device_initial_probe+0x14
 __device_attach+0xfc
 bus_for_each_drv+0x10c
 __device_attach_driver+0x14c
 driver_probe_device+0x3c
 __driver_probe_device+0xa0
 really_probe+0x190
 hid_device_probe+0x130
 ps_probe+0x990
 ps_led_register+0x94
 devm_led_classdev_register_ext+0x58
 led_classdev_register_ext+0x1f8
 device_create_with_groups+0x48
 device_create_groups_vargs+0xc8
 device_add+0x244
 kobject_uevent+0x14
 kobject_uevent_env[jt]+0x224
 mutex_unlock[jt]+0xc4
 __mutex_unlock_slowpath+0xd4
 wake_up_q+0x70
 try_to_wake_up[jt]+0x48c
 preempt_schedule_common+0x28
 __schedule+0x628
 __switch_to+0x174
						el0t_64_sync+0x1a8/0x1ac
						el0t_64_sync_handler+0x68/0xbc
						el0_svc+0x38/0x68
						do_el0_svc+0x1c/0x28
						el0_svc_common+0x80/0xe0
						invoke_syscall+0x58/0x114
						__arm64_sys_read+0x1c/0x2c
						ksys_read+0x78/0xe8
						vfs_read+0x1e0/0x2c8
						kernfs_fop_read_iter+0x68/0x1b4
						seq_read_iter+0x158/0x4ec
						kernfs_seq_show+0x44/0x54
						sysfs_kf_seq_show+0xb4/0x130
						dev_attr_show+0x38/0x74
						brightness_show+0x20/0x4c
						dualshock4_led_get_brightness+0xc/0x74

[ 3313.874295][ T4013] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000060
[ 3313.874301][ T4013] Mem abort info:
[ 3313.874303][ T4013]   ESR = 0x0000000096000006
[ 3313.874305][ T4013]   EC = 0x25: DABT (current EL), IL = 32 bits
[ 3313.874307][ T4013]   SET = 0, FnV = 0
[ 3313.874309][ T4013]   EA = 0, S1PTW = 0
[ 3313.874311][ T4013]   FSC = 0x06: level 2 translation fault
[ 3313.874313][ T4013] Data abort info:
[ 3313.874314][ T4013]   ISV = 0, ISS = 0x00000006, ISS2 = 0x00000000
[ 3313.874316][ T4013]   CM = 0, WnR = 0, TnD = 0, TagAccess = 0
[ 3313.874318][ T4013]   GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
[ 3313.874320][ T4013] user pgtable: 4k pages, 39-bit VAs, pgdp=00000008f2b0a000
..

[ 3313.874332][ T4013] Dumping ftrace buffer:
[ 3313.874334][ T4013]    (ftrace buffer empty)
..
..
[ dd3313.874639][ T4013] CPU: 6 PID: 4013 Comm: InputReader
[ 3313.874648][ T4013] pc : dualshock4_led_get_brightness+0xc/0x74
[ 3313.874653][ T4013] lr : led_update_brightness+0x38/0x60
[ 3313.874656][ T4013] sp : ffffffc0b910bbd0
..
..
[ 3313.874685][ T4013] Call trace:
[ 3313.874687][ T4013]  dualshock4_led_get_brightness+0xc/0x74
[ 3313.874690][ T4013]  brightness_show+0x20/0x4c
[ 3313.874692][ T4013]  dev_attr_show+0x38/0x74
[ 3313.874696][ T4013]  sysfs_kf_seq_show+0xb4/0x130
[ 3313.874700][ T4013]  kernfs_seq_show+0x44/0x54
[ 3313.874703][ T4013]  seq_read_iter+0x158/0x4ec
[ 3313.874705][ T4013]  kernfs_fop_read_iter+0x68/0x1b4
[ 3313.874708][ T4013]  vfs_read+0x1e0/0x2c8
[ 3313.874711][ T4013]  ksys_read+0x78/0xe8
[ 3313.874714][ T4013]  __arm64_sys_read+0x1c/0x2c
[ 3313.874718][ T4013]  invoke_syscall+0x58/0x114
[ 3313.874721][ T4013]  el0_svc_common+0x80/0xe0
[ 3313.874724][ T4013]  do_el0_svc+0x1c/0x28
[ 3313.874727][ T4013]  el0_svc+0x38/0x68
[ 3313.874730][ T4013]  el0t_64_sync_handler+0x68/0xbc
[ 3313.874732][ T4013]  el0t_64_sync+0x1a8/0x1ac

Signed-off-by: Mukesh Ojha &lt;quic_mojha@quicinc.com&gt;
Reviewed-by: Anish Kumar &lt;yesanishhere@gmail.com&gt;
Link: https://lore.kernel.org/r/20241103160527.82487-1-quic_mojha@quicinc.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
<entry>
<title>leds: ktd2692: Set missing timing properties</title>
<updated>2024-11-06T08:35:21Z</updated>
<author>
<name>Raymond Hackley</name>
<email>raymondhackley@protonmail.com</email>
</author>
<published>2024-11-03T08:35:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=95c65546f03f888481eda98b499947252e1f3b20'/>
<id>urn:sha1:95c65546f03f888481eda98b499947252e1f3b20</id>
<content type='text'>
props.timing is not set after commit b5a8c50e5c18 ("leds: ktd2692: Convert
to use ExpressWire library"). Set it with ktd2692_timing.

Fixes: b5a8c50e5c18 ("leds: ktd2692: Convert to use ExpressWire library")
Signed-off-by: Raymond Hackley &lt;raymondhackley@protonmail.com&gt;
Acked-by: Duje Mihanović &lt;duje.mihanovic@skole.hr&gt;
Link: https://lore.kernel.org/r/20241103083505.49648-1-raymondhackley@protonmail.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
<entry>
<title>leds: max5970: Fix unreleased fwnode_handle in probe function</title>
<updated>2024-11-06T08:13:14Z</updated>
<author>
<name>Javier Carrasco</name>
<email>javier.carrasco.cruz@gmail.com</email>
</author>
<published>2024-10-31T16:30:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=02f58f97419c828f58e30f24f54395ac9be159c0'/>
<id>urn:sha1:02f58f97419c828f58e30f24f54395ac9be159c0</id>
<content type='text'>
An object initialized via device_get_named_child_node() requires calls
to fwnode_handle_put() when it is no longer required to avoid leaking
memory.

Add the automatic cleanup facility for 'led_node' to ensure that
fwnode_handle_put() is called in all execution paths.

Fixes: 736214b4b02a ("leds: max5970: Add support for max5970")
Signed-off-by: Javier Carrasco &lt;javier.carrasco.cruz@gmail.com&gt;
Link: https://lore.kernel.org/r/20241031-max5970-of_node_put-v2-1-0ffe1f1d3bc9@gmail.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
<entry>
<title>leds: Introduce ordered workqueue for LEDs events instead of system_wq</title>
<updated>2024-11-06T08:11:19Z</updated>
<author>
<name>Dmitry Rokosov</name>
<email>ddrokosov@salutedevices.com</email>
</author>
<published>2024-09-03T22:39:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=32360bf6a5d4016669c3545e7b0ec939937f5331'/>
<id>urn:sha1:32360bf6a5d4016669c3545e7b0ec939937f5331</id>
<content type='text'>
This allows to setup ordered workqueue for LEDs events. This may be
useful, because default 'system_wq' does not guarantee execution order
of each work_struct, thus for several brightness update requests (for
multiple LEDs), real brightness switch could be in random order.

Yes, for sysfs-based LEDs we have flush_work() call inside
brightness_store() operation, but it's blocking call, so userspace
caller can be blocked at a long time, which means LEDs animation stream
can be broken.

Ordered workqueue has the same behaviour as system_wq + flush_work(),
but all scheduled works are async and userspace caller is not blocked,
which it better for userspace animation scheduling.

Signed-off-by: Alexey Romanov &lt;avromanov@salutedevices.com&gt;
Signed-off-by: Dmitry Rokosov &lt;ddrokosov@salutedevices.com&gt;
Link: https://lore.kernel.org/r/20240903223936.21292-1-ddrokosov@salutedevices.com
[Lee: Couple of style fix-ups]
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
<entry>
<title>leds: bcm6328: Replace divide condition with comparison for shift value</title>
<updated>2024-10-31T16:22:23Z</updated>
<author>
<name>Dipendra Khadka</name>
<email>kdipendra88@gmail.com</email>
</author>
<published>2024-10-19T07:33:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=99d36eed05e735105e89e0a18877518c08618e52'/>
<id>urn:sha1:99d36eed05e735105e89e0a18877518c08618e52</id>
<content type='text'>
Fixes the following Smatch warnings:
drivers/leds/leds-bcm6328.c:116 bcm6328_led_mode() warn: replace divide condition 'shift / 16' with 'shift &gt;= 16'
drivers/leds/leds-bcm6328.c:360 bcm6328_led() warn: replace divide condition 'shift / 16' with 'shift &gt;= 16'

Signed-off-by: Dipendra Khadka &lt;kdipendra88@gmail.com&gt;
Reviewed-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Link: https://lore.kernel.org/r/20241019073302.35499-1-kdipendra88@gmail.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
</feed>
