Re: [PATCH 02/14] platform/x86: add backend for macsmc in intel macs
From: Atharva Tiwari
Date: Fri Dec 04 2026 - 14:58:09 EST
> > + bool has_interrupt;
>
> Why? Isn't non-positive value means no interrupt?
>
> > + bool interrupt_enabled;
>
> Why? Isn't IRQ core provides something for this?
Sorry if i was not clear, but basically
has_interrupt means that there is a interrupt line present in ACPI and
the driver should write to NTOK key.
interrupt_enabled means that interrupts are enabled (NTOK written successfully)
and interrupts can be used for reading and writing, thats why when a interrupt
is missed, the driver sets interrupt_enabled to 0:
+ if (smc->interrupt_enabled) {
+ if (wait_for_completion_timeout(&smc->cmd_done,
+ msecs_to_jiffies(SMC_TIMEOUT_MS)) > 0)
+ return 0;
+
+ smc->interrupt_enabled = 0;
+ dev_dbg(smc->dev, "mmio/wait: interrupt missed, reverting to polling\n");
+ }
interrupt_enabled is not used anywhere else except in the resume code.
I will remove the has_interrupt variable, because you said non-positive irq means no interrupt.