From: Jamie Iles <jamie-wmLquQDDieKakBO8gow8eQ@public.gmane.org>
To: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
Anton Vorontsov
<cbouatmailru-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCHv3] gpio-generic: add support for device tree probing
Date: Sun, 31 Jul 2011 16:22:14 +0100 [thread overview]
Message-ID: <20110731151642.GA7094@pulham.picochip.com> (raw)
In-Reply-To: <20110731030611.GC24334-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
On Sat, Jul 30, 2011 at 09:06:11PM -0600, Grant Likely wrote:
> On Fri, Jul 29, 2011 at 05:49:40PM +0100, Jamie Iles wrote:
> > On Fri, Jul 29, 2011 at 10:24:53AM -0600, Grant Likely wrote:
> > > I really do think that the compatible property can be dropped from the
> > > child nodes... although thinking further. It doesn't have much value
> > > for specifying the exact controller, but maybe it should be used to
> > > specify the specific type of bank. Right now the generic code uses a
> > > heuristic to figure out which set of accessor ops to use which strikes
> > > me as rather fragile. I think it would be better to identify the
> > > major types of gpio controllers and name them.
> >
> > I did think of doing this originally but I felt it could get a bit too
> > unwieldy to describe all of the combinations (both in the compatible
> > string and parsing code). I guess in the driver we could have a list of
> > templates that have a mask of the required registers for a given
> > compatible string.
>
> Yes, I was thinking along those lines. The devil is in the
> implementation details of course.
OK. I'll try prototyping something over the next couple of days but
initially I was thinking something along the lines of a bitmask for all
required registers for a given compatible string. Then at probe time,
for now just check that we have all of the required regoffset-*
properties (and none that we shouldn't have). We could still use the
heuristics for working out the accessors for now but add accessors to
the templates later if needed.
Jamie
prev parent reply other threads:[~2011-07-31 15:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-29 10:45 [PATCHv3] gpio-generic: add support for device tree probing Jamie Iles
[not found] ` <1311936301-19942-1-git-send-email-jamie-wmLquQDDieKakBO8gow8eQ@public.gmane.org>
2011-07-29 16:24 ` Grant Likely
[not found] ` <20110729162453.GH11164-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2011-07-29 16:49 ` Jamie Iles
[not found] ` <20110729164940.GB5585-apL1N+EY0C9YtYNIL7UdTEEOCMrvLtNR@public.gmane.org>
2011-07-31 3:06 ` Grant Likely
[not found] ` <20110731030611.GC24334-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2011-07-31 15:22 ` Jamie Iles [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=20110731151642.GA7094@pulham.picochip.com \
--to=jamie-wmlquqddiekakbo8gow8eq@public.gmane.org \
--cc=cbouatmailru-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.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).