linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eddie James <eajames@linux.ibm.com>
To: pavel@ucw.cz
Cc: linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org,
	andy.shevchenko@gmail.com, joel@jms.id.au,
	dan.carpenter@oracle.com, eajames@linux.ibm.com
Subject: [PATCH v6 0/4] leds: pca955x: Add HW blink support
Date: Tue,  6 Sep 2022 16:58:51 -0500	[thread overview]
Message-ID: <20220906215855.1937331-1-eajames@linux.ibm.com> (raw)

This series adds support for blinking using the PCA955x chip, falling
back to software blinking if another LED on the chip is already blinking
at a different rate, or if the requested rate isn't representable with
the PCA955x.
Also included are some minor clean up and optimization changes that make
the HW blinking a bit easier.

Changes since v5:
 - Use auto-incrementing control register to read all the led selectors
   at once during initialization

Changes since v4:
 - Set duty cycle to fifty percent for blinked LEDs in order to maintain
   the specified blink rate.

Changes since v3:
 - Initialize return value in the blink function
   Thanks Dan Carpenter and kernel test robot

Changes since v2:
 - Split the cleanup patch
 - Prettier dev_err calls
 - Include units for blink period and use defined unit translations
   rather than just a number.
 - Use positive conditionals.

Changes since v1:
 - Rework the blink function to fallback to software blinking if the
   period is out of range of the chip's capabilities or if another LED
   on the chip is already blinking at a different rate.
 - Add the cleanup patch

Eddie James (4):
  leds: pca955x: Refactor with helper functions and renaming
  leds: pca955x: Use pointers to driver data rather than I2C client
  leds: pca955x: Optimize probe led selection
  leds: pca955x: Add HW blink support

 drivers/leds/leds-pca955x.c | 350 ++++++++++++++++++++++++------------
 1 file changed, 239 insertions(+), 111 deletions(-)

-- 
2.31.1


             reply	other threads:[~2022-09-06 21:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-06 21:58 Eddie James [this message]
2022-09-06 21:58 ` [PATCH v6 1/4] leds: pca955x: Refactor with helper functions and renaming Eddie James
2022-09-06 21:58 ` [PATCH v6 2/4] leds: pca955x: Use pointers to driver data rather than I2C client Eddie James
2022-09-06 21:58 ` [PATCH v6 3/4] leds: pca955x: Optimize probe led selection Eddie James
2022-09-06 21:58 ` [PATCH v6 4/4] leds: pca955x: Add HW blink support Eddie James

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=20220906215855.1937331-1-eajames@linux.ibm.com \
    --to=eajames@linux.ibm.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=dan.carpenter@oracle.com \
    --cc=joel@jms.id.au \
    --cc=linux-kernel@vger.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;
as well as URLs for NNTP newsgroup(s).