[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140210153901.GH29080@e106331-lin.cambridge.arm.com>
Date: Mon, 10 Feb 2014 15:39:01 +0000
From: Mark Rutland <mark.rutland@....com>
To: Stefan Sørensen <stefan.sorensen@...ctralink.com>
Cc: "richardcochran@...il.com" <richardcochran@...il.com>,
"grant.likely@...aro.org" <grant.likely@...aro.org>,
"robh+dt@...nel.org" <robh+dt@...nel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>
Subject: Re: [PATCH] dp83640: Get gpio and master/slave configuration from
DT
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists