Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2621998ybk; Mon, 18 May 2020 03:57:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjFOG0dfZu2D9L24kXb9Mq/i+9jv+NATH29+5tztpWN46eOwWH5BVS2+rbifZ+U0WwaGX3 X-Received: by 2002:a50:fd0c:: with SMTP id i12mr1465165eds.48.1589799473424; Mon, 18 May 2020 03:57:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589799473; cv=none; d=google.com; s=arc-20160816; b=QCBygJUiayE9pvEOvYTuvegMmaFi8h6RTlq4cW9jkdgWnpummaTaQrI9Pnr0a8NR8B LtOpXnlKrPer3HPvQusqw5SG56qLdydHFRqf8Gn74fqFK6lUz0x596Uqo5dh2ObAosOC tU8kk4UGOhX9KF+c1dm9whx1puyxbODCpLDM9tX9fhdadSXK8jBE7lsY8h8t0VDyGU4J WmwjLzTV3dqKtz8cEG2lTju3lleomI2juG1m0G+DiqVRz6kp4ujbj9Hx0fsWAm9x8LuD L+FP9UeMYfhZ8KfnkWP9FkNQ7m4Tb2wdZtq80jx/uZMvUFWf758HWru4ECc89A28DrfT wCRg== 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:mail-followup-to:message-id:subject:cc:to :from:date:dkim-signature; bh=hYr/Z/iJo/s19A9RchK0rY3q7SlsXVvKYRI52EdpnXw=; b=ad+/Xzh/2GWtvsvEIWsO0krjJHC0jAxtytSNUZXHxDn8zigW1m5mA0w8yR1pnFHYR+ ZHbBb7J/rqcnm/xCYDtqJctuQ4k4VbUazCfVQqqfYgZLMkllv9xIQWNIu/zS7jlWeeOg YDiThICHWxD3vCPuFRYFQMvHDOQS/fMEExw6/+jgf/x4e+TbtSqBrWyW5/mp/mSvEY5x /tSVRti4D+CsRCie9N1TESt2AGZ7pheD10balg5beFu649AYCINi6v+uTOZdqgaZFTnJ kShjYxGCZDpTPKyCvtw/TB0q75BY5KPLit5bs66y6ZDul64JkQdWKNHS8sYpQ1d4XW8v ophg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=NCJGs8JU; 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=st.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r26si1774542edi.376.2020.05.18.03.57.30; Mon, 18 May 2020 03:57:53 -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=@st.com header.s=STMicroelectronics header.b=NCJGs8JU; 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=st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726739AbgERKxu (ORCPT + 99 others); Mon, 18 May 2020 06:53:50 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:4604 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726279AbgERKxt (ORCPT ); Mon, 18 May 2020 06:53:49 -0400 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 04IAqpKn026437; Mon, 18 May 2020 12:53:32 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=STMicroelectronics; bh=hYr/Z/iJo/s19A9RchK0rY3q7SlsXVvKYRI52EdpnXw=; b=NCJGs8JUFONHamPapy20sfh1fVkO6XQyHiQSd4/xROmPage7ADLZqklwszMqpqsVgwxA lMqc4bG5glGFxTXrs1Iir6on5eImHx+BjlfkdAo1fBRN9CiiiURGpiHRgNeAoGI23/2z r48D7xnVP9cQPfjtXi+e132cpzaM3YlI4nxDjTOmqp54tvlcjhIutScTFDq+hGRco6kT eK/8hqBMdmUSqVmg5+ZyRAvqO1jR2WB/wkcfL6y54LAkGAGLipPUMcsR2+UE99FAGL6N PE8SJaqn+1OU3VoUlxzX/G1s72TlsPhNh7D3FT1XHGQt9tQq7YL+Zke3zDzz4WLA4zIs gg== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 3125a93cjj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 18 May 2020 12:53:32 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 2AF8410002A; Mon, 18 May 2020 12:53:32 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag3node2.st.com [10.75.127.8]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 150562AEF19; Mon, 18 May 2020 12:53:32 +0200 (CEST) Received: from gnbcxd0016.gnb.st.com (10.75.127.50) by SFHDAG3NODE2.st.com (10.75.127.8) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Mon, 18 May 2020 12:53:31 +0200 Date: Mon, 18 May 2020 12:53:26 +0200 From: Alain Volmat To: Rob Herring , "wsa@kernel.org" CC: "mark.rutland@arm.com" , Pierre Yves MORDRET , "mcoquelin.stm32@gmail.com" , Alexandre TORGUE , "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 Subject: Re: [PATCH 3/4] dt-bindings: i2c-stm32: add SMBus Alert bindings Message-ID: <20200518105326.GA3267@gnbcxd0016.gnb.st.com> Mail-Followup-To: Rob Herring , "wsa@kernel.org" , "mark.rutland@arm.com" , Pierre Yves MORDRET , "mcoquelin.stm32@gmail.com" , Alexandre TORGUE , "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 References: <1588657871-14747-1-git-send-email-alain.volmat@st.com> <1588657871-14747-4-git-send-email-alain.volmat@st.com> <20200513021932.GA9172@bogus> <20200513054231.GA16558@gnbcxd0016.gnb.st.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20200513054231.GA16558@gnbcxd0016.gnb.st.com> X-Disclaimer: ce message est personnel / this message is private X-Originating-IP: [10.75.127.50] X-ClientProxiedBy: SFHDAG6NODE1.st.com (10.75.127.16) To SFHDAG3NODE2.st.com (10.75.127.8) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216,18.0.676 definitions=2020-05-18_04:2020-05-15,2020-05-18 signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Gentle Reminder, as I wrote in my previous responce, smbus_alert interrupt refers to an host and not a client. And since we do not have a dedicated irq for smbus_alert, I propose to add this st, binding to enable the smbus_alert mechanism. On Wed, May 13, 2020 at 07:42:31AM +0200, Alain Volmat wrote: > Hello Rob, > > On Wed, May 13, 2020 at 02:19:32AM +0000, Rob Herring wrote: > > On Tue, May 05, 2020 at 07:51:10AM +0200, Alain Volmat wrote: > > > Add a new binding of the i2c-stm32f7 driver to enable the handling > > > of the SMBUS-Alert > > > > > > Signed-off-by: Alain Volmat > > > --- > > > Documentation/devicetree/bindings/i2c/st,stm32-i2c.yaml | 4 ++++ > > > 1 file changed, 4 insertions(+) > > > > > > diff --git a/Documentation/devicetree/bindings/i2c/st,stm32-i2c.yaml b/Documentation/devicetree/bindings/i2c/st,stm32-i2c.yaml > > > index b50a2f420b36..04c0882c3661 100644 > > > --- a/Documentation/devicetree/bindings/i2c/st,stm32-i2c.yaml > > > +++ b/Documentation/devicetree/bindings/i2c/st,stm32-i2c.yaml > > > @@ -36,6 +36,10 @@ allOf: > > > minItems: 3 > > > maxItems: 3 > > > > > > + st,smbus-alert: > > > + description: Enable the SMBus Alert feature > > > + $ref: /schemas/types.yaml#/definitions/flag > > > + > > > > We already have smbus_alert interrupt. Can't you just check for this in > > the slave nodes and enable if found? > > My understanding reading the code (smbalert_probe within i2c-smbus.c, of_i2c_setup_smbus_alert called when > registering an adapter within i2c-core-smbus.c) is that smbus_alert refers to an interrupt on the > adapter side. That is an interrupt that would be triggered when the adapter is receiving an smbus_alert > message. > In our case (stm32f7), we do not have specific interrupt for that purpose. The interrupt triggered when > an SMBUS Alert is received (by the adapter) is the same interrupt as for other reasons and we check > within the irq handler within stm32f7 the reason before calling i2c_handle_smbus_alert if the status > register indicated an SMBUS Alert. > So my understanding is that we cannot rely on the mechanism of naming an interrupt smbus_alert. > Did I misunderstood something ? > > > > > > - if: > > > properties: > > > compatible: > > > -- > > > 2.17.1 > > >