[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACPK8Xcq27cRQOwKCmVHD0uphERPm=hxQUscw2Z6zzi8DTT9Nw@mail.gmail.com>
Date: Wed, 29 Jan 2020 12:05:27 +0000
From: Joel Stanley <joel@....id.au>
To: Daniel Lezcano <daniel.lezcano@...aro.org>
Cc: Rob Herring <robh+dt@...nel.org>,
Cédric Le Goater <clg@...d.org>,
Thomas Gleixner <tglx@...utronix.de>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
devicetree <devicetree@...r.kernel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Andrew Jeffery <andrew@...id.au>
Subject: Re: [PATCH v2 1/4] clocksource: fttmr010: Parametrise shutdown
On Wed, 29 Jan 2020 at 11:53, Daniel Lezcano <daniel.lezcano@...aro.org> wrote:
>
> On 29/01/2020 12:41, Joel Stanley wrote:
> > On Wed, 29 Jan 2020 at 11:25, Daniel Lezcano <daniel.lezcano@...aro.org> wrote:
> >>
> >> On 07/11/2019 10:42, Joel Stanley wrote:
> >>> In preparation for supporting the ast2600 which uses a different method
> >>> to clear bits in the control register, use a callback for performing the
> >>> shutdown sequence.
> >>>
> >>> Reviewed-by: Cédric Le Goater <clg@...d.org>
> >>> Reviewed-by: Linus Walleij <linus.walleij@...aro.org>
> >>> Signed-off-by: Joel Stanley <joel@....id.au>
> >>
> >> It will be cleaner if you create a struct of_device_id array where you
> >> store the different variant data.
> >
> > I agree, and that's the path I would have taken when writing a normal
> > driver. However as the timer drivers probe with the
> > TIMER_OF_DECLARE/timer_probe infrastructure, we can't register our own
> > .data pointer (TIMER_OF_DECLARE uses .data to store the _init
> > function).
> >
> > Unless I'm missing something?
>
> I was suggesting to add the array like:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/clocksource/timer-atmel-tcb.c#n351
>
> TIMER_OF_DECLARE is used and the probe functions relies on the match array:
>
> match = of_match_node(atmel_tcb_of_match, node->parent);
I see. So we don't use this table for probing the driver, just getting
the associated data.
I'm not convinced that's an improvement over what we have. If you have
a strong preference I can try it out.
Powered by blists - more mailing lists