Re: [PATCH RFC can-next 1/3] can: m_can: add handle_dev_interrupts callback to m_can_ops

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

 



On 14.05.2021 14:21:59, Torin Cooper-Bennun wrote:
> On Fri, May 14, 2021 at 02:26:10PM +0200, Marc Kleine-Budde wrote:
> > On 14.05.2021 13:19:44, Torin Cooper-Bennun wrote:
> > > This callback will allow M_CAN-based devices, e.g. TI TCAN4550, to
> > > handle device-specific interrupts which are not part of the M_CAN core,
> > > but are signaled on the same interrupt pin.
> > > 
> > > Signed-off-by: Torin Cooper-Bennun <torin@xxxxxxxxxxxxxxxxxx>
> > 
> > Another option would be to register a 2nd threaded interrupt handler in
> > the tcan4x5x driver....But this is much simpler.
> 
> Total separation of the two does make some sense. Events arising from
> the device-specific interrupt handling would be things like
> under-/over-voltage faults, CAN stuck dominant, SPI malfunction, etc...
> things that M_CAN shouldn't have to care about at all.

Technically you could register a 2nd interrupt handler, which is totally
independent of the main one. But there are no callbacks for open() and
stop() into the tcan4x5x driver to request and free the interrupt
handler. So having a single callback is the way to go here.

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

Attachment: signature.asc
Description: PGP signature


[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