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

From: Heikki Krogerus

Date: Tue Jun 30 2026 - 06:20:16 EST


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.

Thanks!

--
heikki