On 8/20/19 1:23 PM, Marc Kleine-Budde wrote: > > Thanks for the pointer. > > > > What do you mean with "proper"? > > The right way to do GPIOs is via the gpiochip framework, using custom > ioctl() is not. > > > Can't we just add the relevant gpiochip_ calls in mcp251xx.c? > Of course. > > Do all mcp251x variant support the GPIOs? Yes, all three devices feature 3 general purpose inputs and 2 general purpose outputs. The inputs can also be used to trigger sending of preloaded CAN messages. I don't know if this is compatible with the Linux CAN implementation or whether this option is wanted. The outputs can also be used to signal the reception of a CAN message. Probably this option shouldn't be selectable through the GPIO interface but somehow else. Do you have an idea? Probably this should get addressed separately - I just wanted to mention that the GPIOs can also be configured to have dedicated functions. Timo