On 10/9/19 3:51 PM, Schlüßler, Timo wrote: > Please find attached a first try. I tested all GPIOs with a MCP2515 > connected to a Raspberry Pi 3 Model B. Please send patches vis git send-email if you email setup allows. This makes review easier. > I have two questions: > 1. How to handle power management? Does the driver have to restore > the previous gpio state? I'm not sure if a framework takes care of this. Have you had a look at other GPIO drivers in drivers/gpio: gpio-74x164.c gpio-max3191x.c gpio-max7301.c gpio-mc33880.c gpio-xra1403.c > 2. I used spi_device.modalias as name for the gpiochip because that > translates nicely to mcp{251{0,5},25625} at least when loaded by the > device tree. I didn't test but suppose that the same name will be > used when loaded without device tree. Is that correct? Other driers use spi->modalias, too: ./gpio-74x164.c:135: chip->gpio_chip.label = spi->modalias; ./gpio-max3191x.c:418: max3191x->gpio.label = spi->modalias; So I think this is ok. regards, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
Attachment:
signature.asc
Description: OpenPGP digital signature