Re: [OpenWrt-Devel] [PATCH] bcm47xx: Fix GPIO API return codes

From: Michael Buesch
Date: Sun Feb 15 2009 - 09:23:59 EST


On Sunday 15 February 2009 14:27:36 Florian Fainelli wrote:
> Hi Michael,
>
> Le Saturday 14 February 2009 21:27:19 Michael Buesch, vous avez ÃcritÂ:
> > The GPIO API is supposed to return 0 or a negative error code,
> > but the SSB GPIO functions return the bitmask of the GPIO register.
> > Fix this by ignoring the bitmask and always returning 0. The SSB GPIO
> > functions can't fail.
>
> At some point we might want to convert the existing board code to use gpiolib.
> I will try to come up with a patch for this later this afternoon.

Well, why? What's the advantage?
I think it would degrade performance even more, due to yet another few function
calls in the hotpath. And yes, performance does matter.

The only reason the optional inlined GPIO API exists is to avoid the gpiolib callbacks
on platforms where the GPIO numbers are written in stone anyway.
And that's the case for bcm47xx

--
Greetings, Michael.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/