diff options
author | Eddie James <eajames@linux.ibm.com> | 2025-02-21 09:51:44 -0600 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2025-02-21 16:13:46 +0000 |
commit | 012825dbd5aa7454b93f7a17bd99efee114023ba (patch) | |
tree | b63e2709706e4e5591da8725045e45574eaa1e94 | |
parent | 2f372a5dce6885f1d2647f7add01756bee0fef49 (diff) |
Revert "leds-pca955x: Remove the unused function pca95xx_num_led_regs()"
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>
Link: https://lore.kernel.org/r/20250221155144.2109806-1-eajames@linux.ibm.com
Signed-off-by: Lee Jones <lee@kernel.org>
-rw-r--r-- | drivers/leds/leds-pca955x.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/leds/leds-pca955x.c b/drivers/leds/leds-pca955x.c index 156649e1e1c4..e9cfde9fe4b1 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). |