Re: [PATCH 0/2] ARM: dts: rskrza1: Add I2C and remaining LEDs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Chris,

On Thu, Mar 21, 2019 at 11:02 AM Geert Uytterhoeven
<geert@xxxxxxxxxxxxxx> wrote:
> On Wed, Mar 20, 2019 at 9:41 PM Chris Brandt <Chris.Brandt@xxxxxxxxxxx> 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@xxxxxxxxxxxxxx

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



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux