Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp417456rdb; Thu, 25 Jan 2024 22:12:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IHk9LMK8tMoiskTqpqjRP24W/Awzev0y3DkEcS8AgM3WDP6yZGBgWaPfuZPKBtShpX+5LoS X-Received: by 2002:a17:903:2343:b0:1d7:787:19ad with SMTP id c3-20020a170903234300b001d7078719admr538136plh.3.1706249574164; Thu, 25 Jan 2024 22:12:54 -0800 (PST) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id l2-20020a170902d34200b001d720012ba0si573776plk.128.2024.01.25.22.12.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 22:12:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-39643-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-39643-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39643-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 9D07928319C for ; Fri, 26 Jan 2024 06:12:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EBCCA125B7; Fri, 26 Jan 2024 06:07:38 +0000 (UTC) Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8F76C11712 for ; Fri, 26 Jan 2024 06:07:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706249258; cv=none; b=CEQAJBJJYpR8uabZaALbn6ZjcQAn9AA8k8+ZPLrleXPecG/+wNSrqxum6mCf3b6ADzPIN+CI7z+YWivkHq9whMYRuUPeB4Uw88PLQPnoNV3ri5aK2StaLEd5WlEOTOS1eieCuYxXw1NU1O0UfmUsruq5mNP7H1P6aJDRdvDSkTQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706249258; c=relaxed/simple; bh=HuHGp3d4m9h+723TGTSdEUd9edN48dSr2KiqSS8JsYU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RUTljOKS3Kn/JvIO26XDYFAVsjccoPyH1cS9NFEfEre4wU8N0x3tNWMyiZkfWjbzCn/BVS21FzDZVW2TJNQV3SNCDxyAnVCM7Bptux0ikWnHv+jeEpEiblaiVDh72JFiu/h+egJcEoHtCE5W08aoIvjjeYI+bNW0KPrEJD8oCD4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rTFN5-0006cg-5S; Fri, 26 Jan 2024 07:07:23 +0100 Received: from [2a0a:edc0:2:b01:1d::c0] (helo=ptx.whiteo.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rTFN1-002S0p-Ly; Fri, 26 Jan 2024 07:07:19 +0100 Received: from ore by ptx.whiteo.stw.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1rTFN1-001rth-IN; Fri, 26 Jan 2024 07:07:19 +0100 Date: Fri, 26 Jan 2024 07:07:19 +0100 From: Oleksij Rempel To: Esben Haabendal Cc: linux-i2c@vger.kernel.org, Gregor Herburger , Pengutronix Kernel Team , Andi Shyti , Shawn Guo , Sascha Hauer , Fabio Estevam , NXP Linux Team , linux-kernel@vger.kernel.org, Jinjie Ruan , Alexander Stein , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] i2c: imx: move to generic GPIO recovery Message-ID: <20240126060719.GD381737@pengutronix.de> References: <01abf8ccc0af74b4fb0124977ed6bdfb9d7107b6.1706190706.git.esben@geanix.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <01abf8ccc0af74b4fb0124977ed6bdfb9d7107b6.1706190706.git.esben@geanix.com> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Hi, On Thu, Jan 25, 2024 at 02:56:36PM +0100, Esben Haabendal wrote: > Starting with > commit 75820314de26 ("i2c: core: add generic I2C GPIO recovery") > GPIO bus recovery is supported by the I2C core, so we can remove the > driver implementation and use that one instead. > > As a nice side-effect, pinctrl becomes optional, allowing bus recovery on > LS1021A, which does not have such luxury, but can be wired up to use extra > fixed GPIO pins. > > Note: The previous error messages about bus recovery not being supported is > dropped with this change. Given that it is perfectly possible to have platforms > where bus recovery works without pinctrl support, I happen to work on one such, > both error messages does not really make sense in those cases. And I don't see > how to know if this is the case or not. > > Signed-off-by: Esben Haabendal Thank you for your work. > --- ... > + struct i2c_bus_recovery_info *bri = &i2c_imx->rinfo; > > - dev_dbg(&pdev->dev, "using scl%s for recovery\n", > - rinfo->sda_gpiod ? ",sda" : ""); > + bri->pinctrl = devm_pinctrl_get(&pdev->dev); > + if (IS_ERR(bri->pinctrl)) > + return PTR_ERR(bri->pinctrl); According to the commit message - "pinctrl becomes optional", but this code stops probe if pinctrl will fail for one or another reason. I do not see any place returning NULL on fail. Do I'm missing something? Regards, Oleksij -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |