Re: [PATCH v2 1/2] pinctrl: pinctrl-imx: add support for set bits for general purpose registers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel


[Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [PDAs]     [Linux]     [Linux MIPS]     [Yosemite Campsites]     [Photos]

Add to Google Follow linuxarm on Twitter