linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Chris Brandt <Chris.Brandt@renesas.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
	Simon Horman <horms@verge.net.au>,
	Magnus Damm <magnus.damm@gmail.com>,
	"linux-renesas-soc@vger.kernel.org" 
	<linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH 0/2] ARM: dts: rskrza1: Add I2C and remaining LEDs
Date: Fri, 22 Mar 2019 09:23:09 +0100	[thread overview]
Message-ID: <CAMuHMdUSxx94+-M6OR+2BOO0NgAdP27o1Af7c_xeufv1b1Hp5A@mail.gmail.com> (raw)
In-Reply-To: <CAMuHMdXG2wD9sbZY-1LY3d+AVA3BBjpjsn3zd3dJEi2r2BVEfg@mail.gmail.com>

Hi Chris,

On Thu, Mar 21, 2019 at 11:02 AM Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> On Wed, Mar 20, 2019 at 9:41 PM Chris Brandt <Chris.Brandt@renesas.com> wrote:
> > On Wed, Mar 20, 2019, Geert Uytterhoeven wrote:
> > > This patch series adds support for devices on the I2C bus on the RSKRZA1
> > > board, including the GPIO expander that drives 3 LEDs.
> >
> > Very cool.
> >
> > I figured there was a more graceful way of turning on/off those LEDs
> > than what I was doing...which was just writing to the I2C bus in my LED
> > heartbeat kernel thread.
> > https://github.com/renesas-rz/rza_linux-4.19/blob/master/arch/arm/mach-shmobile/board-rskrza1.c#L145
>
> Yeah, I've seen that code. Not fit for upstream ;-)

The proper way is to use that standard heartbeat LED trigger
CONFIG_LEDS_TRIGGER_HEARTBEAT=y, configurable from
sysfs.

For your sample DTS: you can even specify an LED trigger from DT, cfr.
Documentation/devicetree/bindings/leds/common.txt:

    linux,default-trigger = "heartbeat".

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  parent reply	other threads:[~2019-03-22  8:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-20 19:44 [PATCH 0/2] ARM: dts: rskrza1: Add I2C and remaining LEDs Geert Uytterhoeven
2019-03-20 19:44 ` [PATCH 1/2] ARM: dts: rskrza1: Add I2C support Geert Uytterhoeven
2019-03-22 10:23   ` Simon Horman
2019-03-25 10:55     ` Geert Uytterhoeven
2019-03-27 12:08       ` Simon Horman
2019-03-20 19:44 ` [PATCH 2/2] ARM: dts: rskrza1: Add remaining LEDs Geert Uytterhoeven
2019-03-27 12:09   ` Simon Horman
2019-03-20 20:41 ` [PATCH 0/2] ARM: dts: rskrza1: Add I2C and " Chris Brandt
2019-03-21 10:02   ` Geert Uytterhoeven
2019-03-21 12:16     ` Chris Brandt
2019-03-21 12:28       ` Geert Uytterhoeven
2019-03-22  8:23     ` Geert Uytterhoeven [this message]
2019-03-22 11:04       ` Chris Brandt

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=CAMuHMdUSxx94+-M6OR+2BOO0NgAdP27o1Af7c_xeufv1b1Hp5A@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=Chris.Brandt@renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=horms@verge.net.au \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    /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).