From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: Trent Piepho <tpiepho@freescale.com>
Cc: Paul Mackerras <paulus@samba.org>, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] of/gpio: Implement of_get_gpio_flags()
Date: Fri, 28 Nov 2008 13:07:47 +0300 [thread overview]
Message-ID: <20081128100747.GA16515@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <Pine.LNX.4.64.0811280107380.5161@t2.domain.actdsltmp>
On Fri, Nov 28, 2008 at 01:11:38AM -0800, Trent Piepho wrote:
> On Thu, 27 Nov 2008, Anton Vorontsov wrote:
> > This function is alike to the simple of_get_gpio(), but accepts new
> > argument: flags. This new function will be used by the drivers that
> > need to retrieve additional GPIO information, such as active-low flag.
> >
> > Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
>
> So you want to do the clean up patch later?
Yup, some day in 2.6.30, I think.
> > + /*
> > + * We're discouraging gpio_cells < 2, since that way you'll have to
> > + * write your own xlate function (that will have to retrive the GPIO
> > + * number and the flags from a single gpio cell -- this is possible,
> > + * but not recommended).
> > + */
> > + if (of_gc->gpio_cells < 2) {
> > + WARN_ON(1);
> > + return -EINVAL;
> > + }
>
> If you're not going to allow 1 cell anymore (which should perhaps be
> mentioned in the changelog),
It wasn't allowed from the start, I just had to catch the bogus users
on the mailing list.
> you could just check that when the of_gpio
> chip is registered. There's no need to see if of_gc->gpio_cells has
> changed each time a driver maps a GPIO.
There is no single OF GPIO registration function, yet. So the only
way we can check for correct gpio_cells for all "simple" gpio chips
is .xlate(). Soon there will be of_gpio_{,un}register_simple() thus
we can move that check there.
Thanks,
--
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2
next prev parent reply other threads:[~2008-11-28 10:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-27 20:44 [PATCH] of/gpio: Implement of_get_gpio_flags() Anton Vorontsov
2008-11-28 9:11 ` Trent Piepho
2008-11-28 10:07 ` Anton Vorontsov [this message]
2008-12-01 16:30 ` [PATCH v2] " Anton Vorontsov
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=20081128100747.GA16515@oksana.dev.rtsoft.ru \
--to=avorontsov@ru.mvista.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
--cc=tpiepho@freescale.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.