Re: [PATCH v2 2/3] drm/xe/i2c: Handler for SMBus Alerts

From: Heikki Krogerus

Date: Thu Jul 09 2026 - 08:42:06 EST


Hi Raag,

On Tue, Jun 30, 2026 at 12:56:34PM +0300, Heikki Krogerus wrote:
> On Tue, Jun 30, 2026 at 10:39:39AM +0200, Raag Jadav wrote:
> > On Thu, Jun 25, 2026 at 02:59:38PM +0200, Heikki Krogerus wrote:
> > > Some devices that are attached to the I2C controller use the
> > > SMBus Alert signal for example to inform the host about
> > > thermal events, so registering the default SMBus Alert
> > > device for them. The alert device makes sure that the alert
> > > is processed and passed to the correct I2C client driver.
> >
> > ...
> >
> > > +static int xe_i2c_register_smbus_alert(struct xe_i2c *i2c)
> > > +{
> > > + struct xe_device *xe = kdev_to_xe_device(i2c->drm_dev);
> > > + struct i2c_client *alert;
> > > +
> > > + if (xe->info.platform != XE_CRESCENTISLAND)
> >
> > Rather, introduce a has_i2c_smbus flag in xe_device_types.h and keep
> > things platform agnostic. I think you'll also need it to early return
> > from xe_i2c_create_irq().
>
> OK. Feature flags are nice.

There is an issue with the interrupts. Right now with mainline the
i2c-designware enables the interrupt because it is supplied with the
adapter_irq, even though the interupt can only be used for these
alerts. So that really has to be fixed.

I'm going to drop this alert handler, and instead propose that we
process the alerts from AMC directly here in Xe, and at the same time
remove the problematic adapter_irq completely like you proposed
earlier.

Thanks,

--
heikki