Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1113074rwb; Wed, 14 Dec 2022 06:43:40 -0800 (PST) X-Google-Smtp-Source: AA0mqf7XEKgR4PfuuXFFCDETrZuM5V1ovdp0uFpIjICA/GLWIdfDi4srJuekrqDh7hX8QI7qtKpV X-Received: by 2002:a17:906:5e0f:b0:7c0:d1cb:2165 with SMTP id n15-20020a1709065e0f00b007c0d1cb2165mr22312719eju.56.1671029020665; Wed, 14 Dec 2022 06:43:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671029020; cv=none; d=google.com; s=arc-20160816; b=D0/YA/bKpun4pajvAoMb8K89t/iDNUYMjgeIY9ix/wQ+dHEQ7HWmOk0G2G0W6SEU3u jSnmPNkWDpWLgwNhKYwsXS7+eRTjvQq1J6mqaHAYODFzWJapjmOI6W9i2GyFJXNocrG9 e8s74JXByBcZWVU0IPrQuyl+0SlczWGojs9SeAR196fpOjrslzaHrqj111HSzjr76P0C PE0C4ExUcbGgwD+vq0LEe2FQ9amgU6HXnZaECEqnkr5sePfxDKcrBkdLyBTj/sZfDF04 6hoU28Loh2+oaC5Dk9DYsDZXq+YKcHBzrgdw7jtB49Ittzq4REH7CSBX6qdSOd3PytL7 24Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=fL+AZqtI/OizDHZ32Aoz+NaxJOOlRyuKcjjV58uebV4=; b=qSNYh5oxIz10azyt7O/9nqxs7fM8EQtx6QH/gmVtxoje+B84XVCvI+fUQ2oYW1At0b X6SpIotFCLipcmDj0E+5pAR616CaAc0+jL5tJ/rLKQIady/nhOu0NU8tpRZZco0u5yAt emjN7SQ83Ge8pi9fYYJ2KlzYpxvphg9xfHGiSQ3Kv5EPCtsaLGKO4kcoqvLdIVwak35k inNpctSaWiBcUyzj+uWLQzIpd2XDyYUdn/senh5Ej2dmGLheJpcHnVQegCMOlgcNuUuz Cd+aJul1RqlP30ritNyk+pzG7b2SYH5ptvboCqJUdkHOgbqAjbKzyZWbM/rno2Y7lkhi Tr3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=vboji1Pq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i10-20020a170906264a00b007c12e783651si8915366ejc.12.2022.12.14.06.43.23; Wed, 14 Dec 2022 06:43:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=vboji1Pq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238748AbiLNO2S (ORCPT + 70 others); Wed, 14 Dec 2022 09:28:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238672AbiLNO1v (ORCPT ); Wed, 14 Dec 2022 09:27:51 -0500 Received: from smtp-fw-80007.amazon.com (smtp-fw-80007.amazon.com [99.78.197.218]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60B9D275FB; Wed, 14 Dec 2022 06:27:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1671028060; x=1702564060; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=fL+AZqtI/OizDHZ32Aoz+NaxJOOlRyuKcjjV58uebV4=; b=vboji1PqKxnkZVIMgJzGFRItFNNtG5NSCzeeiKJqvzW671WjN2TyVcQi RmofCZoWAGqiHDb9cp8KbdLMF9p8P+X3vFcTcmkCy8SH49CzhiMV43OFp bwxnr3o2RJUFndFWSZ4qS+JNvt2S/qZ5Wb3qfCYp0S5iO8JnLUUwm9xpO M=; X-IronPort-AV: E=Sophos;i="5.96,244,1665446400"; d="scan'208";a="161371394" Received: from pdx4-co-svc-p1-lb2-vlan3.amazon.com (HELO email-inbound-relay-pdx-2a-m6i4x-21d8d9f4.us-west-2.amazon.com) ([10.25.36.214]) by smtp-border-fw-80007.pdx80.corp.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Dec 2022 14:27:36 +0000 Received: from EX13D31EUA001.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan2.pdx.amazon.com [10.236.137.194]) by email-inbound-relay-pdx-2a-m6i4x-21d8d9f4.us-west-2.amazon.com (Postfix) with ESMTPS id A5B6B81CF0; Wed, 14 Dec 2022 14:27:34 +0000 (UTC) Received: from EX19D019EUA002.ant.amazon.com (10.252.50.84) by EX13D31EUA001.ant.amazon.com (10.43.165.15) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 14 Dec 2022 14:27:33 +0000 Received: from dev-dsk-hhhawa-1b-84e0d7ff.eu-west-1.amazon.com (10.43.161.114) by EX19D019EUA002.ant.amazon.com (10.252.50.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.1118.20; Wed, 14 Dec 2022 14:27:28 +0000 From: Hanna Hawa To: , , , CC: , , , , , , , , , , Hanna Hawa Subject: [PATCH v2 1/1] i2c: designware: set pinctrl recovery information from device pinctrl Date: Wed, 14 Dec 2022 14:27:25 +0000 Message-ID: <20221214142725.23881-1-hhhawa@amazon.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.43.161.114] X-ClientProxiedBy: EX13D22UWC004.ant.amazon.com (10.43.162.198) To EX19D019EUA002.ant.amazon.com (10.252.50.84) X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The current implementation of designware recovery mechanism fit for specific device (Intel / Altera Cyclone V SOC) which have two separated "wired" GPIOs to the i2c bus via the SOC FPGA for the i2c recovery. Make pinctrl recovery information to points to the device pinctrl by setting the rinfo->pinctrl to dev->pins->p. Change Log v1->v2: - set the rinfo->pinctrl to dev->pins->p instead calling devm_pinctrl_get(). Signed-off-by: Hanna Hawa --- drivers/i2c/busses/i2c-designware-master.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/i2c/busses/i2c-designware-master.c b/drivers/i2c/busses/i2c-designware-master.c index dc3c5a15a95b..16a4cd68567c 100644 --- a/drivers/i2c/busses/i2c-designware-master.c +++ b/drivers/i2c/busses/i2c-designware-master.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -832,6 +833,9 @@ static int i2c_dw_init_recovery_info(struct dw_i2c_dev *dev) struct i2c_adapter *adap = &dev->adapter; struct gpio_desc *gpio; + if (dev->dev->pins && dev->dev->pins->p) + rinfo->pinctrl = dev->dev->pins->p; + gpio = devm_gpiod_get_optional(dev->dev, "scl", GPIOD_OUT_HIGH); if (IS_ERR_OR_NULL(gpio)) return PTR_ERR_OR_ZERO(gpio); -- 2.38.1