Re: SV: [PATCH RFC] gpio: new driver for a gpio simulator

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

 



Hello Einar,

On Fri, Oct 12, 2018 at 08:02:09AM +0000, Einar Vading wrote:
> Since I was just evaluating the mockup driver to use in a test setup
> I'll give my 2 cents.

very welcome, thanks.

> The benefit of the simulator is that we get the possibility to, if I
> understand correctly, monitor an input for changes on the connected
> output. Sure, we could also use ftrace but I like the idea of having
> the two connected GPIOs. As a matter of fact I was just thinking about
> implementing something that gave the same functionality for the mockup
> driver.
> 
> What I like from the mockup driver is the possibility to have *many*
> gpios on the same chip. We currently have a MCU I/O expander that
> gives us 110+ gpios. So for us 64 GPIOs is really not enough.

Currently several states are stored in an u32 where each bit corresponds
to a GPIO which simplifies some operations. Probably an array of
unsigned long could be used, which would have the benefit that set_bit
et al would work. Then we either need a compile time limit, a variadic
driver data struct or one additional allocation for each variable that
is an u32 currently.

Would it help to instanciate more than one gpio-simulator?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |



[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