Re: [PATCH 2/5] dt-bindings: gpio: gpio-thunderx: Describe pin-cfg option

From: Linus Walleij
Date: Sat Jun 25 2022 - 18:59:31 EST


On Mon, Jun 13, 2022 at 10:04 AM Piyush Malgujar <pmalgujar@xxxxxxxxxxx> wrote:

> Thanks for the reply.
> But as in this case, we expect a 32 bit reg value via DTS for this driver
> only from user with internal understanding of marvell soc and this reg bit
> value can have many different combinations as the register fields can vary
> for different marvell SoCs.
> This patch just reads the reg value from DTS and writes it to the register.

I understand that this is convenient but it does not use the right kernel
abstractions and it does not use device tree bindings the right way
either.

Rewrite the patches using definitions and fine control and move away
from magic numbers to be poked into registers.

Yours,
Linus Walleij