linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH RFC] clk: add support for automatic parent handling
Date: Sat, 23 Apr 2011 23:26:21 +0000	[thread overview]
Message-ID: <1303601181.2513.132.camel@pasglop> (raw)
In-Reply-To: <alpine.LFD.2.02.1104211147300.3323@ionos>

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.



      parent reply	other threads:[~2011-04-23 23:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <alpine.LFD.2.00.1104192339180.2744@localhost6.localdomain6>
     [not found] ` <1303308457-7501-1-git-send-email-u.kleine-koenig@pengutronix.de>
     [not found]   ` <alpine.LFD.2.02.1104201704350.3323@ionos>
     [not found]     ` <20110420185922.GD31131@pengutronix.de>
     [not found]       ` <alpine.LFD.2.02.1104202113250.3323@ionos>
2011-04-21  6:58         ` [PATCH RFC] clk: add support for automatic parent handling Saravana Kannan
2011-04-21 10:33           ` Thomas Gleixner
2011-04-21 19:22             ` torbenh
2011-04-23 23:26             ` Benjamin Herrenschmidt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1303601181.2513.132.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).