<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-next.git/drivers/leds/trigger, branch master</title>
<subtitle>Linux kernel latest source</subtitle>
<id>http://mirrors.hust.edu.cn/git/linux-next.git/atom?h=master</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/linux-next.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/'/>
<updated>2026-09-24T12:17:32+00:00</updated>
<entry>
<title>leds: trigger: Add led_trigger_notify_hw_control_changed() interface</title>
<updated>2026-09-24T12:17:32+00:00</updated>
<author>
<name>Rong Zhang</name>
<email>i@rong.moe</email>
</author>
<published>2026-09-20T19:40:24+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=05b4738b0078f7d6f154f68068a11c8a0635e9df'/>
<id>urn:sha1:05b4738b0078f7d6f154f68068a11c8a0635e9df</id>
<content type='text'>
Some hardware can autonomously activate/deactivate hardware control.
After that, the LED hardware notifies the LED driver. Currently, there
is no mechanism for LED drivers to notify the LED core about such events
and initiate a trigger transition to reflect the hardware state.

Add a new interface called led_trigger_notify_hw_control_changed(), so
that LED drivers can call it to notify the LED core about the
transition.

The interface only allows two transitions:

1. "none" =&gt; private trigger
2. private trigger =&gt; "none"

If the current trigger is neither the private trigger nor "none", no
transition will be made. This protects the currently selected software
trigger.

Note that LED_OFF won't be emitted during the #2 transition, as some
hardware may have selected a new brightness level during its hardware
state transition (e.g., laptop keyboards with a shortcut cycling through
different backlight brightnesses and auto mode).

The interface is designed as a void function as any failure should be
non-fatal and the result of transition should not have any impact on the
LED drivers' event handling procedures.

To use the interface, the config LEDS_TRIGGERS_HW_CHANGED must be
enabled, and the LED driver must set the LED_TRIG_HW_CHANGED flag for
the classdev.

By default, the config is enabled when LEDS_BRIGHTNESS_HW_CHANGED is
enabled.

Acked-by: Ike Panhc &lt;ikepanhc@gmail.com&gt;
Signed-off-by: Rong Zhang &lt;i@rong.moe&gt;
Link: https://patch.msgid.link/20260921-leds-trigger-hw-changed-v7-10-fe3cdb6dec51@rong.moe
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
<entry>
<title>leds: trigger: netdev: Implement hw_offloaded() callback</title>
<updated>2026-09-24T12:17:32+00:00</updated>
<author>
<name>Rong Zhang</name>
<email>i@rong.moe</email>
</author>
<published>2026-09-20T19:40:22+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=072e0e799bc6b3909afc8fd7fac750b31e37b438'/>
<id>urn:sha1:072e0e799bc6b3909afc8fd7fac750b31e37b438</id>
<content type='text'>
"netdev" can run in hardware control according to hardware capabilities
and trigger options.

Implement hw_offloaded() callback to provide its hardware control state
to the LED core, and document the relation between the custom
"offloaded" attribute and the generic "trigger_may_offload_to_hw"
attribute.

The callback mimics how the existing "offloaded" attribute does, i.e.,
locklessly reads hw_control, as it's just a hint and don't need to be
accurate.

Acked-by: Ike Panhc &lt;ikepanhc@gmail.com&gt;
Signed-off-by: Rong Zhang &lt;i@rong.moe&gt;
Link: https://patch.msgid.link/20260921-leds-trigger-hw-changed-v7-8-fe3cdb6dec51@rong.moe
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
<entry>
<title>leds: Use assign_bit() where applicable</title>
<updated>2026-09-23T15:17:47+00:00</updated>
<author>
<name>Peng Fan</name>
<email>peng.fan@nxp.com</email>
</author>
<published>2026-09-18T14:17:23+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=52931e38d7eeb28bacc5e7fef2afddd08baa0ecb'/>
<id>urn:sha1:52931e38d7eeb28bacc5e7fef2afddd08baa0ecb</id>
<content type='text'>
Convert open-coded if/else with set_bit/clear_bit and their
non-atomic __set_bit/__clear_bit variants to the assign_bit/__assign_bit
API.

Done with Coccinelle semantic patch and manual fixups.

Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Link: https://patch.msgid.link/20260918141728.3022983-1-peng.fan@oss.nxp.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
<entry>
<title>leds: trigger: netdev: Extend speeds up to 100G</title>
<updated>2026-07-01T20:24:28+00:00</updated>
<author>
<name>Mike Marciniszyn (Meta)</name>
<email>mike.marciniszyn@gmail.com</email>
</author>
<published>2026-05-20T20:03:35+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=7ddc04d1bd08f80ffc1e2fb97f3fc6cacab0ffc0'/>
<id>urn:sha1:7ddc04d1bd08f80ffc1e2fb97f3fc6cacab0ffc0</id>
<content type='text'>
Add 25G, 40G, 50G, and 100G as available speeds to the netdev LED trigger.

Signed-off-by: Mike Marciniszyn (Meta) &lt;mike.marciniszyn@gmail.com&gt;
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Link: https://patch.msgid.link/20260520200337.204431-2-mike.marciniszyn@gmail.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'leds-next-7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds</title>
<updated>2026-06-18T21:45:08+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-06-18T21:45:08+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=6e717507bfbe8d6955f3f4c5604857a392c7e6fa'/>
<id>urn:sha1:6e717507bfbe8d6955f3f4c5604857a392c7e6fa</id>
<content type='text'>
Pull LED updates from Lee Jones:
 "New Support &amp; Features:
   - Samsung S2MU005: Add support for the Samsung S2MU005 PMIC which
     includes flash and RGB LED controllers
   - Texas Instruments:
       - LP5812: Add support for the TI LP5812 LED driver
       - LP5860: Add support for the Texas Instruments LP5860 LED matrix
         driver via SPI

  Improvements &amp; Fixes:
   - Core:
       - Adjust the brightness sysfs node documentation to clarify that
         only decimal values are accepted
       - Fix a race condition in the software blink logic when stopping
         blinking and setting brightness simultaneously
       - Introduce the `multi_max_intensity` sysfs attribute for
         multicolor LEDs to support hardware-based global brightness
         control
       - Replace OF-based device lookup with firmware node equivalents
         to support ACPI and software nodes
       - Return `ENODATA` when reading brightness from
         hardware-controlled LEDs
       - Set the coherent DMA mask to zero for the Samsung PMIC device
         to suppress unnecessary "DMA mask not set" messages
   - ams OSRAM AS3668: Fix a Kconfig symbol name mismatch in the
     Makefile that prevented the driver from being built
   - BlinkM: Fix spelling and comment style issues in the driver
   - DAC124S085: Declare the SPI command word as `__le16` to ensure
     correct endianness and pass sparse checks
   - GPIO Trigger: Use `GPIOD_FLAGS_BIT_NONEXCLUSIVE` to allow sharing
     GPIOs between the LED trigger and other drivers
   - NXP PCA9532: Fix an issue where the LED would stop blinking when
     changing brightness to a non-zero value
   - Qualcomm: Unify the user-visible company name to "Qualcomm" across
     flash LED config options
   - Qualcomm LPG: Optimize memory allocation by combining main
     structure and channels into a single allocation using flexible
     array members
   - Texas Instruments
       - LP5860: Add missing `CONFIG_OF` dependency to prevent build
         warnings
       - TPS6131x: Increase the overvoltage protection threshold to 6V
         to avoid false triggers with 5V input supplies
   - Userspace LEDs (uLEDs):
       - Fix a potential buffer overread by using `strnchr()` for name
         string validation
       - Return `-EFAULT` on `copy_to_user()` failure to properly handle
         read errors

  Cleanups &amp; Refactoring:
   - Core:
       - Convert various `i2c_device_id` arrays to use named
         initializers for improved robustness and readability
       - Multi-color: Fix incorrect `KernelVersion` and `Date` tags for
         the `multi_max_intensity` ABI
   - Broadcom BCM63138 / ChromeOS EC: Move `MODULE_DEVICE_TABLE`
     declarations next to the ID tables for consistency
   - LP5812: Fix a sysfs ABI reference in the documentation
   - ST1202: Remove an unused legacy GPIO header include

  Device Tree Binding Updates:
   - Class: Document the keyboard backlight LED class naming
     conventions, including a new scheme for zoned backlights
   - Core: Dual-license the common LED bindings header under GPLv2
     and BSD-2-Clause
   - IR SPI LED: Add a new 30% duty-cycle value for the IR transmitter
     used in Xiaomi Redmi Note 8
   - Samsung S2M series:
       - Document the flash LED device bindings for Samsung S2M series
         PMICs
       - Document the pattern behavior for Samsung S2M series PMIC RGB
       - S2MU005: Add device tree bindings for the S2MU005 PMIC,
         including its flash and RGB LED sub-devices
   - TI LM3560: Document the TI LM3559 and LM3560 synchronous boost
     flash drivers"

* tag 'leds-next-7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: (30 commits)
  leds: tps6131x: Increase overvoltage protection threshold to 6V
  leds: Fix sysfs ABI date
  leds: Fix CONFIG_OF dependency for LEDS_LP5860_CORE
  leds: uleds: Fix potential buffer overread
  leds: Use named initializers for arrays of i2c_device_data
  leds: uleds: Return -EFAULT on copy_to_user() failure
  leds: core: Report ENODATA for brightness of hardware controlled LED
  leds: class: Use firmware nodes for device lookup
  Documentation: leds: Document pattern behavior of Samsung S2M series PMIC RGB LEDs
  leds: rgb: Add support for Samsung S2M series PMIC RGB LED device
  leds: flash: Add support for Samsung S2M series PMIC flash LED device
  dt-bindings: leds: Document Samsung S2M series PMIC flash LED device
  leds: core: Fix race condition for software blink
  leds: Adjust documentation of brightness sysfs node
  leds: dac124s085: Declare SPI command word as __le16
  leds: Introduce the multi_max_intensity sysfs attribute
  dt-bindings: leds: Document TI LM3560 Synchronous Boost Flash Driver
  leds: bcm63138/cros_ec: Move MODULE_DEVICE_TABLE next to the table itself
  leds: Add support for TI LP5860 LED driver chip
  Documentation: leds: leds-class: Document keyboard backlight LED class naming
  ...
</content>
</entry>
<entry>
<title>leds: trigger: gpio: Use GPIOD_FLAGS_BIT_NONEXCLUSIVE</title>
<updated>2026-06-17T10:28:09+00:00</updated>
<author>
<name>Piotr Kubik</name>
<email>piotr@kubik.pl</email>
</author>
<published>2026-04-08T11:51:06+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=26e15f2558f66b6747ef981df8054d0d92d01b60'/>
<id>urn:sha1:26e15f2558f66b6747ef981df8054d0d92d01b60</id>
<content type='text'>
When a GPIO is shared between the LED trigger driver and another driver,
the LED trigger driver needs to request the GPIO with
GPIOD_FLAGS_BIT_NONEXCLUSIVE to allow both drivers to monitor the same
GPIO pin.

Without this flag, if another driver has already claimed the GPIO,
the LED trigger driver's gpiod_get_optional() call fails silently,
and the LED trigger doesn't work.

This is needed for scenarios like:
- SFP module presence/status LED triggered by SFP Mod_ABS/Rx_LOS

Both GPIOs are also monitored by the SFP driver for module state
management, so they need to be shared.

Signed-off-by: Piotr Kubik &lt;piotr@kubik.pl&gt;
Link: https://patch.msgid.link/20260408115106.379834-1-piotr@kubik.pl
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
<entry>
<title>leds: trigger: netdev: don't recurse on the netdev ops lock</title>
<updated>2026-06-04T21:04:56+00:00</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2026-06-03T01:28:38+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=ea8ea212d4154f8e445cf282e246c47649a18a59'/>
<id>urn:sha1:ea8ea212d4154f8e445cf282e246c47649a18a59</id>
<content type='text'>
get_device_state() calls __ethtool_get_link_ksettings() on the trigger's
netdev, which will soon take the dev's ops lock. Three of its callers
already hold that lock and one doesn't, so the function would either
deadlock or run unprotected depending on the path.

Make get_device_state() expect the dev's ops lock held and switch to
netif_get_link_ksettings():

  * netdev_trig_notify() NETDEV_UP / NETDEV_CHANGE / NETDEV_CHANGENAME
    arrive with the dev's ops lock held (per netdevices.rst).
  * set_device_name() does not hold the lock, take it explicitly.

Due to lock ordering we need to reshuffle the code in set_device_name()
a little bit. We need to find the device earlier on, so that we can
lock it before we take trigger_data-&gt;lock.

Link: https://patch.msgid.link/20260603012840.2254293-10-kuba@kernel.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>leds: Prefer IS_ERR_OR_NULL over manual NULL check</title>
<updated>2026-03-10T13:33:26+00:00</updated>
<author>
<name>Philipp Hahn</name>
<email>phahn-oss@avm.de</email>
</author>
<published>2026-03-10T11:49:17+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=e68f95a51d1a8c1594b536c4d495cbea38d47561'/>
<id>urn:sha1:e68f95a51d1a8c1594b536c4d495cbea38d47561</id>
<content type='text'>
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.

Change generated with coccinelle.

Signed-off-by: Philipp Hahn &lt;phahn-oss@avm.de&gt;
Link: https://patch.msgid.link/20260310-b4-is_err_or_null-v1-51-bd63b656022d@avm.de
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
<entry>
<title>Convert 'alloc_obj' family to use the new default GFP_KERNEL argument</title>
<updated>2026-02-22T01:09:51+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-02-22T00:37:42+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43'/>
<id>urn:sha1:bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43</id>
<content type='text'>
This was done entirely with mindless brute force, using

    git grep -l '\&lt;k[vmz]*alloc_objs*(.*, GFP_KERNEL)' |
        xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'

to convert the new alloc_obj() users that had a simple GFP_KERNEL
argument to just drop that argument.

Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.

For the same reason the 'flex' versions will be done as a separate
conversion.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>treewide: Replace kmalloc with kmalloc_obj for non-scalar types</title>
<updated>2026-02-21T09:02:28+00:00</updated>
<author>
<name>Kees Cook</name>
<email>kees@kernel.org</email>
</author>
<published>2026-02-21T07:49:23+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=69050f8d6d075dc01af7a5f2f550a8067510366f'/>
<id>urn:sha1:69050f8d6d075dc01af7a5f2f550a8067510366f</id>
<content type='text'>
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:

Single allocations:	kmalloc(sizeof(TYPE), ...)
are replaced with:	kmalloc_obj(TYPE, ...)

Array allocations:	kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with:	kmalloc_objs(TYPE, COUNT, ...)

Flex array allocations:	kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with:	kmalloc_flex(*PTR, FAM, COUNT, ...)

(where TYPE may also be *VAR)

The resulting allocations no longer return "void *", instead returning
"TYPE *".

Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</content>
</entry>
</feed>
