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=-5.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,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 00DEDC433E4 for ; Mon, 27 Jul 2020 10:50:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D1ADF2074F for ; Mon, 27 Jul 2020 10:50:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="M/MiaHAO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728295AbgG0Kuc (ORCPT ); Mon, 27 Jul 2020 06:50:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726298AbgG0Kub (ORCPT ); Mon, 27 Jul 2020 06:50:31 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9870CC061794; Mon, 27 Jul 2020 03:50:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=sz/TXSzKwrYpkCffdtkbnq911qx5/h9PjyH0klXmmJw=; b=M/MiaHAOnlt9dU1zcY/+kbZe/ RGtAileyMy1i+S48GiEmkxHX7esL9e6iwzpPcLsWUgLPEhjxVOMMMebakXM6STpuVBEW+RPq4oOc5 Ziqt3TBKdnG4P+6mBToqfLYS+CmmSJUeSCQVzpPzFCXO7bjIer+31/R/p9Uw3gmPwnoIVxUoZh2T7 DL1kizMauNiNmAVSuT6tdOp6V+cKnwqi/SX8G8fGlRSl2HERQ6qbenSNYUsroptTFcRKKKdUh5vHn Ls+mrpzyYsuXozjFPYrBmB3Y3/pMiQ9IZf/d2O41yaIRctFm7RRg/JzgpCuP0OZ9SPglxroF2R32N Bb3Q00I3g==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:44768) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k00iE-0002kY-A8; Mon, 27 Jul 2020 11:50:30 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1k00iD-0003av-UM; Mon, 27 Jul 2020 11:50:29 +0100 Date: Mon, 27 Jul 2020 11:50:29 +0100 From: Russell King - ARM Linux admin To: Codrin.Ciubotariu@microchip.com Cc: wsa@kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, robh+dt@kernel.org, Ludovic.Desroches@microchip.com, Nicolas.Ferre@microchip.com, alexandre.belloni@bootlin.com, kamel.bouhara@bootlin.com Subject: Re: [RFC PATCH 1/4] dt-binding: i2c: add generic properties for GPIO bus recovery Message-ID: <20200727105029.GI1551@shell.armlinux.org.uk> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! 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=-5.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,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 76214C433E1 for ; Mon, 27 Jul 2020 10:51:47 +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 3F9572070B for ; Mon, 27 Jul 2020 10:51:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="eg+QRo1S"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="M/MiaHAO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3F9572070B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=armlinux.org.uk 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:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=xejQw5uveN+YpUJXEmIe5cH6R2dRSa4Zxe6Oz+zZZlQ=; b=eg+QRo1Sto9YN8U4dKdHwT3Mj fAzLgKV5oMZOaxIefH0tgSu2oMWyZumwJ1Knfrdz2oPu15oV7cJ+DAxpfdwCaT4o+9/kOK+rekUZh 2+6hA+TI+4U8Ha8iIQqXLypv95fWCPJizDAgQn4EkzC9+vzxtg5/2s8i4qCHRA/pFyZUpqKURNxZs e6e+bRoZ595MYGluhmbKFWrgSk0GS/X9sdtsQZy/9zoKWMd5AKsKmcNCoIhJ+ksQo/AlQL0gf1kqq abFt6vUsxmQAlgQbYg9VTsszt5N4yT/k5M0V+Kaqb2JhSEeZmlSSHITz/VdMoUZbVYNhfu7PfevbZ aslCEuoYQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k00iJ-0006Ri-LC; Mon, 27 Jul 2020 10:50:35 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k00iH-0006N1-88 for linux-arm-kernel@lists.infradead.org; Mon, 27 Jul 2020 10:50:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=sz/TXSzKwrYpkCffdtkbnq911qx5/h9PjyH0klXmmJw=; b=M/MiaHAOnlt9dU1zcY/+kbZe/ RGtAileyMy1i+S48GiEmkxHX7esL9e6iwzpPcLsWUgLPEhjxVOMMMebakXM6STpuVBEW+RPq4oOc5 Ziqt3TBKdnG4P+6mBToqfLYS+CmmSJUeSCQVzpPzFCXO7bjIer+31/R/p9Uw3gmPwnoIVxUoZh2T7 DL1kizMauNiNmAVSuT6tdOp6V+cKnwqi/SX8G8fGlRSl2HERQ6qbenSNYUsroptTFcRKKKdUh5vHn Ls+mrpzyYsuXozjFPYrBmB3Y3/pMiQ9IZf/d2O41yaIRctFm7RRg/JzgpCuP0OZ9SPglxroF2R32N Bb3Q00I3g==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:44768) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k00iE-0002kY-A8; Mon, 27 Jul 2020 11:50:30 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1k00iD-0003av-UM; Mon, 27 Jul 2020 11:50:29 +0100 Date: Mon, 27 Jul 2020 11:50:29 +0100 From: Russell King - ARM Linux admin To: Codrin.Ciubotariu@microchip.com Subject: Re: [RFC PATCH 1/4] dt-binding: i2c: add generic properties for GPIO bus recovery Message-ID: <20200727105029.GI1551@shell.armlinux.org.uk> 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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200727_065033_313603_90D0D0A7 X-CRM114-Status: GOOD ( 21.34 ) 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 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. -- 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