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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A923C04FDF for ; Wed, 16 Aug 2023 09:46:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243486AbjHPJqV (ORCPT ); Wed, 16 Aug 2023 05:46:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243543AbjHPJqK (ORCPT ); Wed, 16 Aug 2023 05:46:10 -0400 Received: from mx4.sionneau.net (mx4.sionneau.net [51.15.250.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 597E2E74; Wed, 16 Aug 2023 02:46:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sionneau.net; s=selectormx4; t=1692179164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mRCEFKwx/2j2MnXJTRWsju404KtQoZROl0rEb/btkc8=; b=AQiUCLa6aYqr9Stk6+Z3tb1JxL6bH/6aptFWrxVHsTrhacid568VyHPlkH8j40TPM/KX9B 0XECvgUQGJUPvvVvoMQXD+B/6eEvO9pmFaGnBU4oWyrwp0oqGCRwFeEL5c1ZsdlJ8xFrO4 QPPi4upRUvo7JRRW+/EHjXtEkfGVPmo= Received: from [10.125.4.51] ( [109.190.253.11]) by mx4.sionneau.net (OpenSMTPD) with ESMTPSA id fc590364 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 16 Aug 2023 09:46:04 +0000 (UTC) Message-ID: <8f3e12e2-7e0f-3c25-2c7a-7cc7c32b5f36@sionneau.net> Date: Wed, 16 Aug 2023 11:46:02 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH] i2c: designware: add support for pinctrl for recovery To: Andy Shevchenko Cc: Jarkko Nikula , Mika Westerberg , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Yann Sionneau References: <20230811135201.23046-1-yann@sionneau.net> Content-Language: en-US From: Yann Sionneau In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 11/08/2023 à 16:36, Andy Shevchenko a écrit : > On Fri, Aug 11, 2023 at 03:52:01PM +0200, Yann Sionneau wrote: >> From: Yann Sionneau >> >> Currently if the SoC needs pinctrl to switch the scl and sda > SCL > SDA ack > >> from hw function to gpio function, the recovery won't work. > from the I2C > > GPIO ack >> #include >> #include >> #include >> +#include > Keep this in order. Ok > > ... > >> + rinfo->pinctrl = devm_pinctrl_get(dev->dev); >> + if (!rinfo->pinctrl || IS_ERR(rinfo->pinctrl)) { > It's not possible to have it NULL, why a dead code? Woops, I thought NULL was possible, you are right: it's impossible. I will also add handling of -EPROBE_DEFER error. Thanks for the review. Regards, -- Yann