[PATCH] pinctrl-sunxi: fix pin attribute handling.
Ithamar R. Adema
ithamar at upgrade-android.com
Sun Jun 23 06:24:57 EDT 2013
Dear Maxime,
On Jun 23, 2013, at 12:20 , Maxime Ripard <maxime.ripard at free-electrons.com> wrote:
> While your reasoning is correct here, the point is that the platform is
> still a little obscure, with not a lot of documentation and so on. So
> relying on the bootloader to do some muxing could still prove useful.
Fair enough, I'll adjust this for sunxi then. The reason I'm asking is because I used this code for another architecture I hope to mainline (telechips) and I just wanted to know if this was some requirement of the subsystem or more related to the platform. Thanks for your explanation.
>> Just to make sure I understand, are you suggesting to stretch that
>> writel() onliner into an if (arg) writel() else writel() ?
>
> Yes, something like
>
> case PULL_UP:
> val = readl(pctl->membase + sunxi_pull_reg(g->pin));
> mask = PULL_PINS_MASK << sunxi_pull_offset(g->pin);
> if (arg)
> writel((val & ~mask) | 1 << sunxi_pull_offset(g->pin), reg);
> else
> writel(val & ~mask, reg);
Okay, clear.
I'll send a new patch along fixes the mentioned issues as suggested.
Thanks!
Regards,
Ithamar.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4163 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130623/91f87caa/attachment.p7s>
More information about the linux-arm-kernel
mailing list