Re: [PATCH v1] usb: typec: tipd: keep default interrupts enabled during probe()

From: Hector Martin
Date: Tue Jan 11 2022 - 06:10:24 EST


On 2022/01/11 1:35, Martin Kepplinger wrote:
> Commit 9990f2f6264c ("usb: typec: tipd: Enable event interrupts by default")
> writes a fixed set of interrupts to TPS_REG_INT_MASK1. In case interrupts
> had been enabled by the firmware by default, these get disabled now
> which can break use cases. Only append to what is already enabled instead.
>

I'm confused. The kernel drives the hardware, it needs to enable only
the interrupts it can handle. Do you have some kind of firmware trying
to share access to the same I2C port that needs other interrupts? That
sounds like a recipe for trouble... or am I misunderstanding things?

If the *kernel* needs other interrupts enabled to make something work,
then they should also be enabled unconditionally, and you'd have to
check the IRQ handler to make sure it actually handles it.

--
Hector Martin (marcan@xxxxxxxxx)
Public Key: https://mrcn.st/pub