From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8005A28C037 for ; Tue, 30 Jun 2026 08:39:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782808787; cv=none; b=Z2vbLiO4lGMmkXdYV3OfYGzBTAbwWMnK1edRhHHQmXaZzQ4wEIuq/20bdrpl+Gs08szTpo0hMfr1j3eyJFEjg7KuRK0DiB8Pfp1wrKYAztrYCwji0mNDi4RmthR5w30BzdiWyccntoVSZFDKbYU6b3zEpKllEAH5IJ/5/x7tfHo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782808787; c=relaxed/simple; bh=EUfQGRyasCSbmwp8IOII8FDqfG3pxS91aWxjSPo+AW8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Ub1qKrDu6iEWKr/jIMrS41OXgXncZnN+/S+jueQkYTKbdZHGAR/aUGR7T4jf7ZALnfE60j8/PPmIaM8w6Lx2y6Lhq7ZDcctfhW7bbezxxxwD9jKqmqSkYmxJaApWOI0URPoWhkNUoJlFGCM8VP02uhPogzaM3mlK1waezx+BWsg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=QMe5WCND; arc=none smtp.client-ip=192.198.163.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="QMe5WCND" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1782808786; x=1814344786; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=EUfQGRyasCSbmwp8IOII8FDqfG3pxS91aWxjSPo+AW8=; b=QMe5WCNDlT+9NXh0qEUvESOoXUvgRbtyZgp0sHla3LfC2fviDCHcv+Ff tGT/fGT0MPm7ilWm3RMIGPOkfAv8bNBVyF9Wj7boi5KijNnmmSe7DzkCX jzyVHaZR0aLiYFKyUH3Qe6nYvxx0+SJDxePCBWIRU9LFCZc9fKEphWgfI 3aXPMWPWHwDF0tGuG9eh77frJeDf4mMi+nn57rY2GgMD/oiNstG7lLHPw boUI+Kl7YAgjH1ze/xcF0mXlCGxP5hlnBUx2R/qrwgjXbRTOB31LuRagK 8Yly588bYiIihVv7/EPhYePi3zKA6WH2ANkcXmlIrt6xVtVf9ICegCIjn w==; X-CSE-ConnectionGUID: sX5BXS1JQ/6BRkqYU1CdfQ== X-CSE-MsgGUID: qObGPWRCQjqQoyvmGuIprQ== X-IronPort-AV: E=McAfee;i="6800,10657,11832"; a="71038344" X-IronPort-AV: E=Sophos;i="6.24,233,1774335600"; d="scan'208";a="71038344" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2026 01:39:46 -0700 X-CSE-ConnectionGUID: jlcP/zO/SX+BvGRiA8zevg== X-CSE-MsgGUID: GVF3NpmfRRar7SSIHgmKzA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.24,233,1774335600"; d="scan'208";a="255798935" Received: from black.igk.intel.com ([10.91.253.5]) by orviesa003.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2026 01:39:43 -0700 Date: Tue, 30 Jun 2026 10:39:39 +0200 From: Raag Jadav To: Heikki Krogerus Cc: Rodrigo Vivi , Matthew Brost , Thomas =?iso-8859-1?Q?Hellstr=F6m?= , "Michael J . Ruhl" , Andy Shevchenko , Mika Westerberg , Riana Tauro , David Airlie , Simona Vetter , Andi Shyti , dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/3] drm/xe/i2c: Handler for SMBus Alerts Message-ID: References: <20260625125939.429078-1-heikki.krogerus@linux.intel.com> <20260625125939.429078-3-heikki.krogerus@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260625125939.429078-3-heikki.krogerus@linux.intel.com> 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(). > + return 0; > + > + alert = i2c_new_smbus_alert_device(i2c->adapter, &xe_i2c_smbus_setup); > + if (IS_ERR(alert)) > + return PTR_ERR(alert); > + > + i2c->client[XE_I2C_CLIENT_ALERT] = alert; > + > + return 0; > +} ... > @@ -182,7 +222,10 @@ void xe_i2c_irq_handler(struct xe_device *xe, u32 master_ctl) > return; > > /* Forward interrupt to I2C adapter */ > - generic_handle_irq_safe(xe->i2c->adapter_irq); > + if (xe->info.platform == XE_CRESCENTISLAND) Ditto. Raag > + xe_i2c_handle_smbus_alert(xe->i2c); > + else > + generic_handle_irq_safe(xe->i2c->adapter_irq);