* [PATCH] Revert "leds-pca955x: Remove the unused function pca95xx_num_led_regs()"
@ 2025-02-21 15:51 Eddie James
2025-02-21 16:14 ` (subset) " Lee Jones
0 siblings, 1 reply; 2+ messages in thread
From: Eddie James @ 2025-02-21 15:51 UTC (permalink / raw)
To: linux-leds; +Cc: lee, pavel, jiapeng.chong, Eddie James
This reverts commit 38bcb51f81af17a6d40fc135e565fc1fb8aa8e9d. This
function is needed by the hardware blink support just introduced. Also
rename the function to pca955x_num_led_regs to match the rest of the
functions in the driver.
Signed-off-by: Eddie James <eajames@linux.ibm.com>
---
Sorry for the build failure everyone. My series was pretty old so I didn't
have that commit to remove the function. Simple rebase didn't conflict so
I didn't notice. Will make sure to test build *after* rebasing next time.
drivers/leds/leds-pca955x.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/leds/leds-pca955x.c b/drivers/leds/leds-pca955x.c
index 156649e1e1c4f..e9cfde9fe4b13 100644
--- a/drivers/leds/leds-pca955x.c
+++ b/drivers/leds/leds-pca955x.c
@@ -147,6 +147,12 @@ static inline int pca955x_num_input_regs(int bits)
return (bits + 7) / 8;
}
+/* 4 bits per LED selector register */
+static inline int pca955x_num_led_regs(int bits)
+{
+ return (bits + 3) / 4;
+}
+
/*
* Return an LED selector register value based on an existing one, with
* the appropriate 2-bit state value set for the given LED number (0-3).
--
2.43.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: (subset) [PATCH] Revert "leds-pca955x: Remove the unused function pca95xx_num_led_regs()"
2025-02-21 15:51 [PATCH] Revert "leds-pca955x: Remove the unused function pca95xx_num_led_regs()" Eddie James
@ 2025-02-21 16:14 ` Lee Jones
0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2025-02-21 16:14 UTC (permalink / raw)
To: linux-leds, Eddie James; +Cc: lee, pavel, jiapeng.chong
On Fri, 21 Feb 2025 09:51:44 -0600, Eddie James wrote:
> This reverts commit 38bcb51f81af17a6d40fc135e565fc1fb8aa8e9d. This
> function is needed by the hardware blink support just introduced. Also
> rename the function to pca955x_num_led_regs to match the rest of the
> functions in the driver.
>
>
Applied, thanks!
[1/1] Revert "leds-pca955x: Remove the unused function pca95xx_num_led_regs()"
commit: 012825dbd5aa7454b93f7a17bd99efee114023ba
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-02-21 16:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-21 15:51 [PATCH] Revert "leds-pca955x: Remove the unused function pca95xx_num_led_regs()" Eddie James
2025-02-21 16:14 ` (subset) " Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox