[PATCH v2 1/2] pinctrl: pinctrl-imx: add support for set bits for general purpose registers
Dong Aisheng
b29396 at freescale.com
Thu Jul 12 21:04:43 EST 2012
On Thu, Jul 12, 2012 at 05:48:46PM +0800, Hui Wang wrote:
...
> > +
> > +int imx_pinctrl_gpr_read(u8 gpr)
> > +{
> > + if (!imx_pinctrl)
> > + return -EPROBE_DEFER;
> > +
> > + return readl(imx_pinctrl->base + gpr);
> >
> Suppose the MSB of the register content is 1, how does the caller
> distinguish if the function return an error or return a register content?
>
Good catch, it's indeed an issue.
We need find a way to fix it, probably i would add a parameter for
read API to return a u32 value.
Thanks
Regards
Dong Aisheng
More information about the devicetree-discuss
mailing list