lkml.org 
[lkml]   [2011]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH RFC] clk: add support for automatic parent handling
From
Date
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.




\
 
 \ /
  Last update: 2011-04-24 01:29    [W:0.061 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site