Re: [PATCH v3 1/2] gpio: dt-bindings: add parsing of loongson gpio offset

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

 



On Wed, Aug 09, 2023 at 03:47:55PM +0800, Yinbo Zhu wrote:
> 在 2023/8/8 下午8:05, Conor Dooley 写道:
> > On Mon, Aug 07, 2023 at 03:40:42PM +0800, Yinbo Zhu wrote:

> > > +  loongson,gpio-ctrl-mode:
> > > +    $ref: /schemas/types.yaml#/definitions/uint32
> > > +    description:
> > > +      This option indicate this GPIO control mode, where '0' represents
> > > +      bit control mode and '1' represents byte control mode.
> > 
> > How is one supposed to know which of these modes to use?
> 
> 
> Byte mode is to access by byte, such as gpio3, the base address of the
> gpio controller is offset by 3 bytes as the access address of gpio3.
> 
> The bit mode is the normal mode that like other platform gpio and it is
> to access by bit.
> 
> If both modes are supported, it is recommended to prioritize using byte
> mode that according to spec.

So, sounds like this property should instead be a boolean that notes
whether the hardware supports the mode or not, rather than the current
enum used to determine software policy.

However, from Krzysztof's comments & my own feeling, it really does seem
like you should drop the do-everything compatible and introduce things
that are soc-specific.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux