Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp264252ybk; Tue, 12 May 2020 22:44:38 -0700 (PDT) X-Google-Smtp-Source: APiQypJsoPDmGIGS7/W2X5LFvFaxJ1uydh8P6yW82zhdeg1oAh6CxeDuJgas/LsWxIBHxN2aN9do X-Received: by 2002:a50:9a04:: with SMTP id o4mr19955356edb.289.1589348678780; Tue, 12 May 2020 22:44:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589348678; cv=none; d=google.com; s=arc-20160816; b=VD4ZAWGaBhgueFHtxq1YMJYQS4cbGIEJuFGv9ksF/cGA4yRgid1Agw0GsgyMu6E0WS /hj1LowlTOlSg6CxoMSePkzq4wuwVQ7DaC5z2vq5bTrY8tMK+6YRNtu+tO54Ro2zFdsw 3TnahUYJVQeaeHFd32GqDR5XblNVISlOKEY5KC97DN5PZ7QzphUhKFzrV4/mQ1iQGcYy S5Yf347gcFcd+XfESZXJtBU8+bEWFxTMRgkSt24/OT58dg2Ei+Ac2IiklgvsiUDAoi6X 7JdH0LUmiSYmONp+MhpqgH9Gc+Oc3ccaYSI90Il8aw4pKLXpUp5VzkNCSHxez3OFrwEj nnBA== 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=PA4ZXQ0yWBr3TXyuz71Z6yCek2TSTzgnyT8SThVO9WM=; b=UvW7YJKZ+1p41+9NGiG86mcOF6Z2bG+ZIam8ZGtF5pk30EUqU19ekcYtGH3Pl0PvQf JSsrz3yP78Nh/cFQsGMuwEexrlHHovsSjGB/cV53TSJT1O785lKU4C0PCEP8Kq80xSic uvSfrubPKUCdW7rAzYA11rv98hhA6Nt0Pmo0E9oaCUlVXvKVh0JdYByLE135QeYrrOzW XlUibU80C/xIELinnocQqe3sim6eHi1P+Id6eE4My5jVTpthnH06Pf9riJXhQtZPi3Ga giHRWdtApI8r5VQWAARKkHSPJfFqBQ4CXYB/ty4QxuoIvzwnbJOP+4vd/P3j9uN5MzoT lNCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=cBKs8dP3; 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 jz6si9107836ejb.327.2020.05.12.22.44.14; Tue, 12 May 2020 22:44:38 -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=cBKs8dP3; 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 S1728865AbgEMFmy (ORCPT + 99 others); Wed, 13 May 2020 01:42:54 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:9834 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728097AbgEMFmy (ORCPT ); Wed, 13 May 2020 01:42:54 -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 04D5gKwG030195; Wed, 13 May 2020 07:42:38 +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=PA4ZXQ0yWBr3TXyuz71Z6yCek2TSTzgnyT8SThVO9WM=; b=cBKs8dP3gE1rIUG2bqKcIRQOanm7pzuqyCC4/EqFsjyf8Vc048pCQi0+GyDvyK6rvUaY sVOQvIXe/ooRW65Ym3Qk/YUeKI79nY3KGV1L1Qzfd3eKwOfqt/s5Zjyj0t8k0FuiUpzL rVa/eo6uT+hrtDkq2ScaPQ0d9hmCfzP8p88T8JADVbdvZF2jWw72lnsjCEwJwd5gQR1f ByeJ1zGbZ468urJOvdEW0p8y6VjK0M6HBYHNV2mJr1C5Al+tuAwyclQfiszWgkmIg+Mu YyXaGJi1nIMeXPyxdlY9UphXl2Q+TPd+oG42omIeQkyaIbHqE4bLwqGjisEr1CL+re5V 1w== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 3100vpam3m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 May 2020 07:42:37 +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 7284310002A; Wed, 13 May 2020 07:42:37 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag3node2.st.com [10.75.127.8]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 4234721FE90; Wed, 13 May 2020 07:42:37 +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; Wed, 13 May 2020 07:42:36 +0200 Date: Wed, 13 May 2020 07:42:31 +0200 From: Alain Volmat To: Rob Herring CC: "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 Subject: Re: [PATCH 3/4] dt-bindings: i2c-stm32: add SMBus Alert bindings Message-ID: <20200513054231.GA16558@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> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20200513021932.GA9172@bogus> X-Disclaimer: ce message est personnel / this message is private X-Originating-IP: [10.75.127.50] X-ClientProxiedBy: SFHDAG7NODE2.st.com (10.75.127.20) 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-13_01:2020-05-11,2020-05-13 signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > >