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=-6.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 8676AC433DF for ; Thu, 30 Jul 2020 09:02:31 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4AE3F2075F for ; Thu, 30 Jul 2020 09:02:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="p7NaBVjO"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="MIelXHHq"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=microchiptechnology.onmicrosoft.com header.i=@microchiptechnology.onmicrosoft.com header.b="DuVmqvQn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4AE3F2075F Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Content-ID:In-Reply-To:References: Message-ID:Date:Subject:To:From:Reply-To:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=6NSRY3H0MvHgcsVytWIoq9rYSiLEV85YD5wrPC2+1As=; b=p7NaBVjOQNQfrQvQu1q7OlChT a9hTdyNzvKeBm+50Xj7Sw/+98i8E2UvF6q6qEPdjiqfGpMhBnzoG354rmKlEM0f0Nu5x/L4d/xhDr twsBGlzgQFHceJBw1IpIeWM5edVCWihPNIfo4Hv+RjNK3GCdI0bu+kfBpZxt/J6w0mGG8Of6+1rSA eSVjiZmrAiM/APMZovYPXOkU6sBr4uJxcmlsThjW87lUOeh8oGtlm+nIVisqFC5scR26zGfIvdVoU Binp7iVbwD+WQ+hBGrx53vckQLkXa06jBXECjLqmddujP3I89HYobvCaqidman11R4SsTCDeWNOxx ydDSWspag==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k14Qi-0001EU-Ce; Thu, 30 Jul 2020 09:00:48 +0000 Received: from esa5.microchip.iphmx.com ([216.71.150.166]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k14Qd-0001CJ-AS for linux-arm-kernel@lists.infradead.org; Thu, 30 Jul 2020 09:00:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1596099643; x=1627635643; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=DPl7zT6OD2I2ZMNazeD4O8XCMK6sv762YJ9WPz23AbU=; b=MIelXHHqHPuKMz+H9lW0C2VjHWbFOL+jkr6oV7rD9oROjnaVeSsRCG0c zTqiUqRBPBNrMWgZ5Feor0/tDN5EG0ygiLl9ItfRlmB1z5+M9xt8pj1+G 248zN8+mU6JnjkYfLIClMhzt4oQcNTg7F6WzN/cSHBrtqH7a4hz/A6KgE BPggR4gS8cn9uhg3RZvJfTsX2swnTk6J4kkqUZXyJSy3NzAt2VYZAgDAV r7RVAkBxR4C/wPm0qympC9O+sSqY2OfXQj6WzOKDqYEUYI1x1Je2I0syl LqyCjsnFy0WWxAvT4k51ROW9kvk4YJ3pg5H7gPaCRf5Z4XLakjSVPFcV6 w==; IronPort-SDR: Ik0+T1mPNf+r2YtjVGGO/107OLxBNQ1hIJVNB0I4fe1Y+ZxAj/6U6OIGgscf/rzjjysCil+Nbh zdx2tXgeyVdgeeze5Zw8KqrHZlMVXydGXvEDgPJHCraRUEoS0UhC8vZBduRJOyjP02X+J7Cyzb elHshA3MLmGgluTNvUSjFVn+4VGORiXainRbnb5PEM57O0DUEqdOYVO6oFvOHbOw36eTnMztyk 5GcGL02ljJ26GcIHQ+HY2OQaQdt8/Xhb3El8i6nK5hsRY71Wefu62nP10lqYKh5jMMMqxgtBZn PTg= X-IronPort-AV: E=Sophos;i="5.75,413,1589266800"; d="scan'208";a="85157134" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 30 Jul 2020 02:00:39 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Thu, 30 Jul 2020 01:59:53 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.87.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3 via Frontend Transport; Thu, 30 Jul 2020 01:59:53 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k7fLXm16Iyy+lILRQqmDOx0HGXla7eeJMz6MNZRx9cceO+rsoJgaNt2GouGf7eRGd0N3shqVHadPqZ7b+1XBwi4WQIddzrjd80koUen0KNx78TLwDK3ao+yCYhuTWJGmY0vsq/8QJtWe5mawjtF0VzKdRTFCnotwEqzNfp/JmeeFE42ZoxUX8kEbwgX1QjYB6eqddK0441V/6YidOPXX8TckdGz6tII6jTEkYQikI2XipdwbeIi0++ZSM+sGo2jyD7ttC/1btF51z+hEyrjhizuM6rU7xr7BfSf0rCC6z2vCO2m/c7BlkNCiHZF/g0l28MwNj1vI+0OJgAxOiW3cXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DPl7zT6OD2I2ZMNazeD4O8XCMK6sv762YJ9WPz23AbU=; b=MZoxwwjUxuhtUhSgQGfQV0eqrs9XIWWHCZGMMUvCnshZwoP4K5cM4jAbe7QFDbRA7cjOOCTB62cVjX7BaVVYcvArs2Ci1MsXUBUqjjnK46NWHYJNdfc50At2qkjgJlxddqCvrIV2TGYIZs6xlF0ZhfIKKHrLMFFt2xsU1fODjzEWKmZk3liKN71swQfydCHjWmiMppNeQGwdpJrMcL8rh32St6nC8w619gKcctA1h01MMmyH6VYsejSnPMvMhlR+2CAJOHQ07WhCghldH+zxWG4Q5yiKI+/sw9Y42eqlTF9OT/6HTSjvEYHAGkqJStK7xPAVxeEuc3wchxYv8iGxpA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microchip.com; dmarc=pass action=none header.from=microchip.com; dkim=pass header.d=microchip.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector2-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DPl7zT6OD2I2ZMNazeD4O8XCMK6sv762YJ9WPz23AbU=; b=DuVmqvQnKLJS2H8dhjYxy8mcGQPew/8KCm7tIYTbdX8X7bhfLZynIxPv6hZj1Y31/JCMsQXvIzMjANCJzIwd0vwBR3Hf02AvgxVa+R0Mso27GC6chf3FtCfuXnefe7f5nHEw+Fe7Qycl5YjzrnbaBUtcrvcTzQrU8T/fFuFbzE8= Received: from DM6PR11MB3500.namprd11.prod.outlook.com (2603:10b6:5:6a::19) by DM6PR11MB4409.namprd11.prod.outlook.com (2603:10b6:5:1df::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.16; Thu, 30 Jul 2020 09:00:36 +0000 Received: from DM6PR11MB3500.namprd11.prod.outlook.com ([fe80::a17e:18e2:4d49:b77e]) by DM6PR11MB3500.namprd11.prod.outlook.com ([fe80::a17e:18e2:4d49:b77e%5]) with mapi id 15.20.3216.033; Thu, 30 Jul 2020 09:00:36 +0000 From: To: Subject: Re: [RFC PATCH 1/4] dt-binding: i2c: add generic properties for GPIO bus recovery Thread-Topic: [RFC PATCH 1/4] dt-binding: i2c: add generic properties for GPIO bus recovery Thread-Index: AQHWRkS/OBUazr8JiUiilPsVNX+PNqj5l1gAgB3AVoCAABRggIAEDVcAgAABjYCABJhKgA== Date: Thu, 30 Jul 2020 09:00:36 +0000 Message-ID: <1e788319-c841-d1f1-b65c-d25052f7f90b@microchip.com> References: <20200619141904.910889-1-codrin.ciubotariu@microchip.com> <20200619141904.910889-2-codrin.ciubotariu@microchip.com> <20200705211918.GB1055@kunai> <20200724193913.GD1227@ninjato> <20200724205209.GC1551@shell.armlinux.org.uk> <20200727105029.GI1551@shell.armlinux.org.uk> In-Reply-To: <20200727105029.GI1551@shell.armlinux.org.uk> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 authentication-results: armlinux.org.uk; dkim=none (message not signed) header.d=none;armlinux.org.uk; dmarc=none action=none header.from=microchip.com; x-originating-ip: [84.232.220.208] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5320b9de-a768-45b2-de1f-08d83467067a x-ms-traffictypediagnostic: DM6PR11MB4409: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-bypassexternaltag: True x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: l2RlADyj4WRwDMSKhORogUgzfNYxpd4zYjHUcEDVueYSl3P9vLRHP3VIEc0lFBM05B7QuEI18c1LTUUqXIVMvLemefLma4AWCSFGYQGaapJg3fk52B0dt3l1PX3QBU2a5bPwQmnE/dJW1cDNeg2tFb1rTUYWh8Mi2aaxzYgOVhT3II07jAkZQT/7To+0Nn7kDBfPuPsV/j1FN5yvrk8iJn/29euojR464smXFZamyE5zgfWD3Cv9Pwn1YJRmHSKlzafeBkwtzPbnM95/sbnK79b5gPKqgpRLCWzYoQnLoJ5qe/zqz1e3T30P01QGZmbsjFpSX1z/UljusEfzAzCy8BWiINnDlh+mvF4otchqjeoXEyVN7/gW546ldct5GtxU6ADIyZzzSdC8/ZoQoGbEj+NceyWDLE3Rpl0lMl5DJxNTsGS/iElPekg6cLO2MLhbm5VCBEeTEm6Ozg5GYWFS44gNgUAddOpCb/i6njmkx5w= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB3500.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(39860400002)(376002)(366004)(396003)(136003)(346002)(8936002)(966005)(31686004)(76116006)(31696002)(54906003)(316002)(26005)(53546011)(6512007)(4326008)(8676002)(186003)(36756003)(6916009)(83380400001)(6486002)(6506007)(91956017)(5660300002)(66476007)(66946007)(64756008)(2616005)(478600001)(66446008)(66556008)(71200400001)(86362001)(2906002)(41533002)(43740500002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: ltVb8XPYDd1/FhAfNW8m8SJLrpRKcPr4UQ7ArH1hzhtMXFabcZH6kM26twLFI6Y3V7QT4fUEjDlKmvFlF+3iXH1iFJ+xqbJ0SUVhNTietDqvkoqO4sYbv0IC75NM/38NjlzAsqoTPspoAk5EzZYJ7FGSKyR1wPXTy7B8uPzaj+WjMlAlV/WM/LBaTYyG2G1pq5kTm30SisFjY+KDXsXE/cm94E/TAaGdNEL06SfMkcI/YmIEeluuZAje8qIqEsACAY6yQC/EBJ6+69yHFxPKmYlt3tEGoJJx/HumpdWxLz4raEnpgXmFEY8G29Ftko8D13SC20VZ5lO7/dt99BidR6mSxjS2uBH4+QN76RrleNbNSD8/JkdD6UzJj8XwudHrWHhYvJmORXgR9d5TRuw1ybCtlaU8XD9bntbOsZ5Uw6R4ky+Uh0oWAzprVSqc6noTbdTtvZlB6PQF+xwF/eJ3vrwDZriF7mjFWQWUKusbV2/DvAFA1mSeL+/4HmskSh235WQLZ4P6Qt4B7M/amRC2PKjwvIuh3S7tSeg5p/pMNcq7g9PnE/dCzIJtadrZv66qp2KOPuqzUWt00MWrSCdNe1wpap51oYSPLreDdHaZoWzLPuHRceTX0VubguLourYmSpqweRULWw0vktgt/w8ULg== Content-ID: <134D6824E8A8CD418840892EF70A3DC0@namprd11.prod.outlook.com> MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB3500.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5320b9de-a768-45b2-de1f-08d83467067a X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Jul 2020 09:00:36.7286 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: x4bnWpIs+q8cTCgQoSjj4PSx37TVu9tEMvdIC3fqmrrn0KeX/h1dy6iAE4ewsKv0h9Igk0PYMBzkPiPWa1Vxsw3CjI54iQINaaK3MT3Gwk8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4409 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200730_050043_510149_6D288014 X-CRM114-Status: GOOD ( 23.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, alexandre.belloni@bootlin.com, kamel.bouhara@bootlin.com, linux-kernel@vger.kernel.org, wsa@kernel.org, Ludovic.Desroches@microchip.com, robh+dt@kernel.org, linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 27.07.2020 13:50, Russell King - ARM Linux admin wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > > On Mon, Jul 27, 2020 at 10:44:57AM +0000, Codrin.Ciubotariu@microchip.com wrote: >> On 24.07.2020 23:52, Russell King - ARM Linux admin wrote: >>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe >>> >>> On Fri, Jul 24, 2020 at 09:39:13PM +0200, Wolfram Sang wrote: >>>> On Sun, Jul 05, 2020 at 11:19:18PM +0200, Wolfram Sang wrote: >>>>> >>>>>> +- pinctrl >>>>>> + add extra pinctrl to configure SCL/SDA pins to GPIO function for bus >>>>>> + recovery, call it "gpio" or "recovery" state >>>>> >>>>> I think we should stick with "gpio" only. That is what at91 and imx have >>>>> in their bindings. pxa uses "recovery" as a pinctrl state name but I >>>>> can't find any further use or documentation of that. PXA is not fully >>>>> converted to the best of my knowledge, so maybe it is no problem for PXA >>>>> to switch to "gpio", too? We should ask Russell King (cced). >>> >>> Fully converted to what? The generic handling where the i2c core layer >>> handles everything to do with recovery, including the switch between >>> modes? >>> >>> i2c-pxa _intentionally_ carefully handles the switch between i2c mode and >>> GPIO mode, and I don't see a generic driver doing that to avoid causing >>> any additional glitches on the bus. Given the use case that this recovery >>> is targetted at, avoiding glitches is very important to keep. >> >> Why is it not possbile to handle glitches in a generic way? I guess it >> depends on the pinctl, but we could treat a worst-case scenario to >> assure the switch between states is done properly. > > Please look at how i2c-pxa switches between the two, and decide whether > the generic implementation can do the same. The handling of glitches from initialization looks generic to me. I see that there are specific clear/reset routines that are in the (un)prepare_recovery() callbacks, but these callbacks are not replaced by the generic i2c recovery and will still be used if given by the driver. The only thing the generic recovery does is to switch the pinmux state. We can discuss whether we want to change the pinmux state first or call the (un)preapre_recovery(). What I had in mind for the generic recovery was to just handle the common parts that follow the same bindings, which is getting the gpios and changing the pinmux states before recovering. Best regards, Codrin > > -- > RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ > FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel