From: Mark Rutland <mark.rutland@arm.com>
To: "Stefan Sørensen" <stefan.sorensen@spectralink.com>
Cc: "richardcochran@gmail.com" <richardcochran@gmail.com>,
"grant.likely@linaro.org" <grant.likely@linaro.org>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH] dp83640: Get gpio and master/slave configuration from DT
Date: Mon, 10 Feb 2014 15:39:01 +0000 [thread overview]
Message-ID: <20140210153901.GH29080@e106331-lin.cambridge.arm.com> (raw)
In-Reply-To: <1392045915.30419.6.camel@e37108.spectralink.com>
On Mon, Feb 10, 2014 at 03:25:15PM +0000, Stefan Sørensen wrote:
> On Mon, 2014-02-10 at 13:42 +0000, Mark Rutland wrote:
>
> > Binding document please.
>
> Dang, I somehow managed to drop that from the patch. I will fix for the
> next version.
Cheers.
>
> > > + if (of_find_property(node, "dp83640,slave", NULL))
> > > + dp83640->slave = true;
> >
> > Use of_property_read_bool.
>
> Fixed.
>
> > > + prop = of_find_property(node, "dp83640,perout-gpios", &proplen);
> > > + if (prop) {
> > > + if (dp83640->slave) {
> > > + pr_err("dp83640,perout-gpios property can not be set together with dp83640,slave");
> > > + return -EINVAL;
> > > + }
> > > +
> > > + clock->caps.n_per_out = proplen / sizeof(u32);
> > > + if (clock->caps.n_per_out > N_EXT) {
> > > + pr_err("dp83640,perout-gpios may not have more than %d entries",
> > > + N_EXT);
> > > + return -EINVAL;
> > > + }
> > > + err = of_property_read_u32_array(node, "dp83640,perout-gpios",
> > > + clock->perout_gpios,
> > > + clock->caps.n_per_out);
> > > + if (err < 0)
> > > + return err;
> > > + }
> >
> > This looks nothing like the standard gpio bindings. What _exactly_ is
> > this property describing?
>
> The dp83640 has a number of pins of which 8 of them can be used for
> either timestamping events or triggering changes at programmed
> intervals. These properties are used to configure which pins get
> assigned to what function.
Ok.
>
> > If this is not using the standard gpio bindings then this should be
> > renamed.
>
> Maybe a gpio->pin renaming?
That sounds good to me.
Thanks,
Mark.
next prev parent reply other threads:[~2014-02-10 15:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-10 13:00 [PATCH] dp83640: Get gpio and master/slave configuration from DT Stefan Sørensen
[not found] ` <1392037240-30913-1-git-send-email-stefan.sorensen-usnHOLptxrsHrNJx0XZkJA@public.gmane.org>
2014-02-10 13:42 ` Mark Rutland
2014-02-10 15:25 ` Stefan Sørensen
2014-02-10 15:39 ` Mark Rutland [this message]
2014-02-10 18:46 ` Richard Cochran
2014-02-11 8:01 ` Stefan Sørensen
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=20140210153901.GH29080@e106331-lin.cambridge.arm.com \
--to=mark.rutland@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=robh+dt@kernel.org \
--cc=stefan.sorensen@spectralink.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 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).