Re: [PATCH 3/6] staging: bcm2835-firmware-gpio: Expand DT options for driver

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

 



On Sat, 2017-03-18 at 14:24 +0100, Stefan Wahren wrote:
> > Michael Zoran <mzoran@xxxxxxxxxxxx> hat am 17. März 2017 um 16:22
> > geschrieben:
> > 
> > 
> > This change adds the following optional DT properties:
> > 
> > number-gpios: Number of GPIOs the device should expose
> > gpio-base: GPIO base that is registered with the kernel
> 
> Please don't reinvent existing properties. Take a look at the gpio-
> range from the general gpio binding.
> 
> > firmware-gpio-base: GPIO bases as viewed by the firmware
> > 
> 
> Since this isn't a general DT property this needs a vendor prefix.
> 
> Please also look at Eric's version [1] and the comments.
> 
> [1] - https://www.spinics.net/lists/arm-kernel/msg532889.html
> 
> > The purpose of these DT nodes is to make the driver more
> > general.
> > 
> > Signed-off-by: Michael Zoran <mzoran@xxxxxxxxxxxx>

The more I look into this, the more I see this GPIO thing is a total
complete mess.

First, I don't understand the purpose of gpio-base on the local side. 
Since all references through the GPIO system are relative to the gpio
chip and not global numbers, I should be able to make gpio-base
anything I want it to be(say 1000000 or something).  In fact, I think
the gpio system wants to get rid of this at some point.  

I'm thinking of changing the DT properties to:

raspberrypi, firmware-gpio-base (The offset)
raspberrypi, firmware-gpio-window-size (The window that is exposed)


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux