Hi Linus,
On Fri, Nov 16, 2018 at 12:13 PM Linus Walleij <[email protected]> wrote:
> On Fri, Nov 16, 2018 at 1:31 AM Finn Thain <[email protected]> wrote:
> > On Wed, 14 Nov 2018, Linus Walleij wrote:
> > > Apart from this (which is the most important step!) I think the custom
> > > LED heartbeat code in kernel/time.c needs to be replaced with a standard
> > > drivers/leds driver for each LED using the "heartbeat" trigger as is
> > > custom these days.
> > >
> > > That should clean out another chunk of legacy time-related code.
> >
> > Are you referring to LED heartbeat code in arch/m68k/kernel/time.c?
> >
> > > I suppose you are currently keeping the call to timer_interrupt() for
> > > exactly this reason (i.e. keep the heartbeat LED blinking)?
> >
> > It would be great to have that call inlined, which the compiler can't do
> > at the moment, because timer_interrupt() is in a different compilation
> > unit (arch/m68k/kernel/time.c).
> >
> > Is there some other benefit to eliminating the call to timer_interrupt()
> > that I've overlooked?
>
> I mean that whole thing should go away by abstracting those LEDs
> (for the systems that have them) using the struct led_classdev,
> populating a proper platform device for it and instantiate using
> a driver in drivers/leds/*, and the function to provide the heartbeat
> be replaced with the existing heartbeat trigger in
> drivers/leds/trigger/ledtrig-heartbeat.c assigned as default
> trigger for that LED.
>
> I think that is WAY out of the focus for your current work (which,
> by the way, is a piece of art) but more something for the m68k
> maintainers to look into.
Just going with struct led_classdev is probably doable.
Going for the full monty, using leds-gpio, probably requires moving m68k
to DT. Which would not be that ... uninteresting ;-)
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
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