On 10/11/19 5:16 PM, Schlüßler, Timo wrote: > On 10/11/19 4:40 PM, Marc Kleine-Budde wrote: >> Just the gpio changes is ok. > > To be able to restore the GPIO state after reset, the private > structure contains a variable to hold the current value of the output > control register: > >> +#ifdef CONFIG_GPIOLIB >> + struct gpio_chip gpio; >> + u8 reg_bfpctrl; >> +#endif > > reg_bfpctrl is touched in the _request, _free, _set and _set_multiple > functions. Should I add #ifdefs around the accesses, include the > variable always in the struct or should I add the #ifdef for those > functions again? Hmm. I see. Then just make no-op functions for setup, remove and restore. >> + >> + priv->reg_bfpctrl = priv->reg_bfpctrl | bit; >> + I've cleaned up the driver a bit and send a v4. 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