[U-Boot] [PATCH 1/4] gpio: UniPhier: add driver for UniPhier GPIO controller

Simon Glass sjg at chromium.org
Wed Jul 29 15:46:51 CEST 2015


Hi Masahiro,

On 28 July 2015 at 22:15, Masahiro Yamada <yamada.masahiro at socionext.com> wrote:
> The previous message was accidentally sent before I finish writing...
>
>
>
>
>> If there is a reason why you need different size registers in your
>> GPIO driver then I think it's fine to implement it that way. But in
>> general we should use structures IMO.
>
>
> This hardware has only two registers in each bank.  (DIR and DATA)
>
> struct uniphier_gpio_bank {
>     u32 data;
>     u32 dir;
> };
>
> I could do this, but there is no good reason to do in this driver case.
>
> The I/O access in this driver is already simple enough, i think.

OK I'll leave this up to you.

BTW is the decision to avoid having a driver for each bank is mostly
for memory space/efficiency? I notice that exynos has very much the
same pin numbering as Uniphier and it uses multiple devices.

Regards,
Simon


More information about the U-Boot mailing list