Re: [PATCH can-next 0/5] m_can, tcan4x5x: device-specific interrupt handling

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

 



On 26.05.2021 13:47:42, Torin Cooper-Bennun wrote:
> Hi Marc and list,
> 
> This series is a follow-up to the RFC here:
>   https://lore.kernel.org/linux-can/20210514121946.2344901-1-torin@xxxxxxxxxxxxxxxxxx/
> 
> In this series we enable M_CAN-based devices to implement their own
> device-specific interrupt handling, and add such handling for tcan4x5x.
> 
> In 1, we replace the clear_interrupts() m_can_ops callback with
> handle_interrupts(), which returns irqreturn_t and has an extra
> parameter, clear_only, which is used if it isn't necessary to handle
> device interrupts, only clear them.
> 
> In 2, we use the new infrastructure in m_can_isr(). If M_CAN core
> interrupts are handled, we still only clear device interrupts.
> Otherwise, we try to handle any pending device interrupts.
> 
> In 3-5, we clean up interrupt enabling and clearing in tcan4x5x, and
> handle device interrupts appropriately. We specifically look for fatal
> errors arising from transceiver or power, and SPI errors, which are not
> necessarily fatal, but are dangerous!
> 
> TCAN4550 shutdown is attempted by setting the device into standby mode.
> There is probably a better way, but I understand we are limited by being
> in the ISR context.

Not exactly. The tcan's ISR runs in a threaded context, so you can
basically do normal SPI or regmap transactions, shut down clocks and
regulators, etc...

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