From: Eddie James <eajames@linux.ibm.com>
To: linux-leds@vger.kernel.org
Cc: lee@kernel.org, pavel@ucw.cz, jiapeng.chong@linux.alibaba.com,
Eddie James <eajames@linux.ibm.com>
Subject: [PATCH] Revert "leds-pca955x: Remove the unused function pca95xx_num_led_regs()"
Date: Fri, 21 Feb 2025 09:51:44 -0600 [thread overview]
Message-ID: <20250221155144.2109806-1-eajames@linux.ibm.com> (raw)
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
next reply other threads:[~2025-02-21 15:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-21 15:51 Eddie James [this message]
2025-02-21 16:14 ` (subset) [PATCH] Revert "leds-pca955x: Remove the unused function pca95xx_num_led_regs()" Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250221155144.2109806-1-eajames@linux.ibm.com \
--to=eajames@linux.ibm.com \
--cc=jiapeng.chong@linux.alibaba.com \
--cc=lee@kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox