Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp478114ybh; Mon, 20 Jul 2020 23:23:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzUBLCgNZLdcVTgTn/LpbgwXu9HGa29dVFcfsWJX59CsoVCOVUurp2bqFtmyDXJxVsMsepw X-Received: by 2002:a05:6402:1d89:: with SMTP id dk9mr24337742edb.31.1595312588236; Mon, 20 Jul 2020 23:23:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595312588; cv=none; d=google.com; s=arc-20160816; b=llftqi3DUKbkP8p0sT8tWGlOQ0zvR56HaalH45vRMTDW4gAFdagYBNtVCbwcxaWCvl RDecdc69QWdYOxS01udmLL7UebSFN1p/O+YotEq4t3N4VT4qTUbJ3OWfTiMQXFJVX2Md jfIjML4eCov7YDwOsPXC9/TZiehFjZ4RY63rkZiZg3uyc5i69agrkBJsb09b8d/fv3ql Zmv2eDzemSLqZ9/bsir/UX8aLf5Ztu81K+yB0m8+JLsWE7wTjYkTB+Ay6Xl6SqDPuMMj ulo/+mDtkVQaqXbmpH8z8/m7stK7KtTKniTOktUs5yMJq42YUD+A29zxRnru/P4KuqXz 6v/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=QwxXG1shnkUK9nRp5WtCbhOLQCdB5nCMCFKYC2o//oE=; b=mpJcxULgW+kQ1kGy/940Y482NIPoc+1tx3A61+deE3p7ALAM4mN8eYwNcfYibeYXYw V0PIHlcuBfWkAFT9CfnMUvGeiZ0IKER+3SlzghnIK6CZf8EA+lmjtPEfK3XAGgIcuTrn IeY7ljSxu7PAW/4GRotwZuJ4UjGTnAWmAvlzLEgrSdNkL3ghe+yVLwCbc60cV7cRCu5l nJfzXE0NlSR7aN2obRhQhx1D7JVomj6BFbR6BJ/ukb8Js9SSyMmocubrZrdPyLoSrt4T iUQxlfjohUV4dbO1QuXOGO4lIBsabD4a667sqn7PejOlKgzChfJrZjHUTQOvdj1Ohwmy hRZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=aFO1sfzy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h28si14316533edj.267.2020.07.20.23.22.44; Mon, 20 Jul 2020 23:23:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=aFO1sfzy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727019AbgGUGWY (ORCPT + 99 others); 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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+--