From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA35FC433E1 for ; Tue, 21 Jul 2020 06:22:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C134122C9C for ; Tue, 21 Jul 2020 06:22:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595312544; bh=47dJEVMdxrfXF2oYeyAzojzZPGNAbJ4RDRe72YadUlk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=qR/E3FMZWcg1dBhvptc3EfnZgTePimc89lqMm6PhAH8e3URspjKWc2dxVYre3LB3B 8GXCO8J9TtrA1UVaZJ+de5bisqgKjCE3fqIptNc6+EUd2wpPdMRPkmWV8ictK71Hy5 93VUUjun5X/I9qo+S9rnhGv5upWXc5Q3nIEsHiuA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726284AbgGUGWY (ORCPT ); Tue, 21 Jul 2020 02:22:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:37318 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726053AbgGUGWX (ORCPT ); Tue, 21 Jul 2020 02:22:23 -0400 Received: from localhost (p5486cdb1.dip0.t-ipconnect.de [84.134.205.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9CB0E20792; Tue, 21 Jul 2020 06:22:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595312543; bh=47dJEVMdxrfXF2oYeyAzojzZPGNAbJ4RDRe72YadUlk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aFO1sfzyiSsQ1aRHew1Fs3t3HI9JCj0gnJYlQfk/Wn+lFIwh2wcj9fdH+Uf4agaTQ oHaCrMb0N0PX0kMcmZoQu3HE3aEJxxd8pAinpjgDk+f0OYHP+pE+UPzSlTZQ+7FEWP CWY0zTjGWsjW1KPmZOKcxbu5Z+ZJNG/oCu+weqRQ= Date: Tue, 21 Jul 2020 08:22:17 +0200 From: Wolfram Sang To: Rob Herring Cc: Alain Volmat , mark.rutland@arm.com, pierre-yves.mordret@st.com, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, fabrice.gasnier@st.com Subject: Re: [PATCH v2 3/4] dt-bindings: i2c-stm32: add SMBus Alert bindings Message-ID: <20200721062217.GA1044@kunai> References: <1593070769-9106-1-git-send-email-alain.volmat@st.com> <1593070769-9106-4-git-send-email-alain.volmat@st.com> <20200630194107.GA999@ninjato> <20200714023048.GA1151665@bogus> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="8t9RHnE3ZwKMSgU+" Content-Disposition: inline In-Reply-To: <20200714023048.GA1151665@bogus> Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org --8t9RHnE3ZwKMSgU+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Rob, > > > The I2C/SMBUS framework already provides a mechanism to enable SMBus-= Alert > > > by naming an IRQ line "smbus_alert". However, on stm32, the SMBus-Ale= rt is > > > part of the i2c IRQ. Using the smbus_alert naming here would lead to = having > > > 2 handlers (the handler of the driver and the smbus_alert handler > > > from I2C/SMBUS framework) on the unique i2c IRQ of the stm32. Meaning= that > > > the smbus_alert handler would get called for all IRQ generated by the= stm32 > > > I2C controller. > > >=20 > > > For that reason, the smbus_alert IRQ naming cannot be used and a dedi= cated > > > binding is introduced. > >=20 > > What if we update the core to not register another irq handler if the > > "smbus_alert" and main irq are the same? > >=20 > > I think it could work. However, while trying to make a proof-of-concept, > > I found that irq descriptions in the generic i2c binding document are > > probably mixed up. And before fixing that, I'd like to get HostNotify > > done first. >=20 > Why does this even need to be in DT? Can't the driver just register that= =20 > it supports SMBus alert or have some call to the core signaling an SMBus= =20 > alert?=20 If we emulate this SMBus behaviour with I2C, it means we apply additional restrictions. In this case, there is an address which can't be used anymore. Because there is another case of additional restrictions, I proposed the binding "smbus" which means this bus is not I2C but SMBus, so it is more restricted. Thanks, Wolfram --8t9RHnE3ZwKMSgU+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAl8WiZIACgkQFA3kzBSg Kbagiw/8CFregwnGWfzJ8CixS6lpRM7jx77tfodUx9ozPR0J2bZ0XG7itMnirLQO VIMV2kRUkbaIO3Gfwr0WTM2HvL3Ej5lIJttqPPcm4ZxvYvPhX6eZEe7fYquFnnje 7/uxFH+GgXqjRfWLVtSG4uwFg7WV70UEQ52E8lORH/PJEdYya/7ICWebcdIfTWhQ W+XV4pN08sYkPBUo775Fan2JxruVmISkr/dNRZztLT4PMpczhUf+BQMdOIyrmPO7 Ix/pPt2inVZfZHzYrM53SXzdOritt6OhYG0xHrdwtTgg4mL2b/Ov1qJCYKDlGGBY T00o2ynEp8/IqIXHZ2huw3zplAMvVpxgPFjesoE4tNUwlGjaaGuWECfoFGmdJNJ1 p2xiXrKLl+6Vlwg+NoDuqZwyL7NY1pEweyCkHjcYs58XrFCoHPbfsvhHcERIgytY N4QRmRjTI0D+WtyrNcoBbphl/RtSLAn59lP7SwuiLb9fslTQ34srGDPJXfFBageK i1bPBMYMnN3fWD1I29OzDZjPQZPYPzH0qVDKFIj5DLtEx9lM6aUOzKm6EQgduoWn rQ+wJX+vml0lfIXZ6jjKBv+JwKg9cvloJlqSlVwVPBLscgn0ptmw6jUuofXtETAg cBuIRLHb+u+rorqO89KpaxDXuI/ZFP/zNxC6/4el9FLFawCJ3ZY= =ORZA -----END PGP SIGNATURE----- --8t9RHnE3ZwKMSgU+--