RE: [PATCH v3 3/3] can: mcp251x: Add GPIO support

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

 



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?

> +
> +	priv->reg_bfpctrl = priv->reg_bfpctrl | bit;
> +

Regards
Timo




[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux