]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
leds: pca955x: Optimize probe LED selection
authorEddie James <eajames@linux.ibm.com>
Wed, 12 Feb 2025 14:30:37 +0000 (08:30 -0600)
committerLee Jones <lee@kernel.org>
Thu, 20 Feb 2025 14:29:13 +0000 (14:29 +0000)
commit14ef0738a31dcecfbba38626884b7d9a60b75cd0
tree9412f2a26b3ebc5bd5125976415ff43989a1c927
parent1ddab1e2de10a37b66b235cff30e5b0a0beb8809
leds: pca955x: Optimize probe LED selection

Previously, the probe function might do up to 32 reads and writes
to the same 4 registers to program the LED selection. Reduce this to
a maximum of 5 operations by accumulating the changes to the LED
selection and comparing with the previous value to write the
selection if different.

Signed-off-by: Eddie James <eajames@linux.ibm.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20250212143038.1416501-4-eajames@linux.ibm.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/leds/leds-pca955x.c