[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1303601181.2513.132.camel@pasglop>
Date: Sun, 24 Apr 2011 09:26:21 +1000
From: Benjamin Herrenschmidt <benh@...nel.crashing.org>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Saravana Kannan <skannan@...eaurora.org>,
Paul McKenney <paul.mckenney@...aro.org>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>,
linux-arm-kernel@...ts.infradead.org,
Sascha Hauer <s.hauer@...gutronix.de>,
Stephen Boyd <sboyd@...eaurora.org>,
Jeremy Kerr <jeremy.kerr@...onical.com>, kernel@...gutronix.de,
linux-kernel <linux-kernel@...r.kernel.org>,
Ben Dooks <ben-linux@...ff.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Arnd Bergmann <arnd@...db.de>,
Paul Mundt <lethal@...ux-sh.org>,
linux-sh <linux-sh@...r.kernel.org>
Subject: Re: [PATCH RFC] clk: add support for automatic parent handling
On Thu, 2011-04-21 at 12:33 +0200, Thomas Gleixner wrote:
>
> Depends, there is a lot of sane hardware out there (not necessarily in
> the ARM SoC world). We can do with a pointer if the need arises.
>
> > > optionally a set of common register accessor functions like I did
> > > for the generic irq chip.
> >
> > Again, I don't see the point in having this in the common code. May be I'm
> > missing something?
>
> See my RFC patch of a generic irq chip implementation and how much
> duplicated five line inline functions they removed.
>
> > IMO, a better option instead of the base register and the offsets would be an
> > option to have a priv_data pointer. I forgot the exact use case, but we
> > thought that would have been helpful when we tried to port the msm clock
> > driver in our tree on top of Jeremy's patches.
>
> It works either way, but we should try to comeup with a sensible
> common base struct for sane hardware.
Doesn't have to be in the base struct tho. I think a better approach is
to keep the base struct reasonably API-only, and have an
"implementation" subclass called something like simple_clk for example,
that carries those few fields common to most MMIO based implementation
and which can be created with existing "helper" code for the most common
ones.
Ben.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists