Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2507615pxp; Sun, 13 Mar 2022 20:50:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzAoSv7tXk8QKtjBse5LMpKO37SzdI4AHjOXPXS+6TYxBPaFpr3ybKEixE3EOW9NFTeBhHe X-Received: by 2002:a05:6402:27ca:b0:418:93fe:da71 with SMTP id c10-20020a05640227ca00b0041893feda71mr170165ede.409.1647229844471; Sun, 13 Mar 2022 20:50:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647229844; cv=none; d=google.com; s=arc-20160816; b=nKRzib4rnU68ZJFHWdg2s8819JPVVRmTkbiKOn4DubeDfBhEq8afWQKtSciC/B4WnN Ff98BPb8U8HCdGfMXVV7IyXXknxCgW3qxEAEvUZhaKMh6jZ43KYSNszDwMQPzIe7n1su yE7+EeF7Bp+4+jI1iIT9vpAMQDrj2aei5sMTJZD6gNtAOBjCIP5N9DCc2pDM3hxucvrd odGmNhEMM/zFFOazwScz5xBs/X8zWhzW7CUuVx4LN1nmtd3KChcN2Ca5PlJ3posWCljn 9K+PK9Hsnqbf8CT0CDKdfcw9wJCYeEE7dlmLYoVoFk/E+BQIILc5UHNUqbHQo12LVL+h Khhw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=r2oDBm7XwTIj1wUIwXGRbsRxYr/b/6msPs1FZKQZKzM=; b=W1rReCP1lKfocZoupsHf4FfKZ1n6WzmcyiEaQ/04z3yHJkWTVgZDjQ7zFG2kAGpEn0 RqGYIq0gmOGlQGk5ZTk5ZfHaNpLBl7dKpjzmWQx6Dsct7G7IfQBkXdYFoTMKK0mjBt6H ZspLk91uDv2xt4ppK/SEuiApm/0LxoOzzfAgXR2mH4PqPukZltV5Mra5dJ9nO0VjO+rP XE9+6vf7d9Wd3uFXrFT6E8fKdDSMVEzB+OSVqeCx8tbGgWDbQhvzBkLUXSc2zoCMne4h 63EkdVF0UegKGUGYd3Kvn8gB031vJP3UFb/rxAf/WKLHJPpkUu8Gxm4j2/PL9EeUgQLm fhuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=NLytNOe5; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l15-20020a056402254f00b0041867d28133si3380993edb.183.2022.03.13.20.50.19; Sun, 13 Mar 2022 20:50:44 -0700 (PDT) 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=@walle.cc header.s=mail2016061301 header.b=NLytNOe5; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234742AbiCMPsB (ORCPT + 99 others); Sun, 13 Mar 2022 11:48:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231959AbiCMPr5 (ORCPT ); Sun, 13 Mar 2022 11:47:57 -0400 Received: from ssl.serverraum.org (ssl.serverraum.org [176.9.125.105]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94EE27DAA0; Sun, 13 Mar 2022 08:46:49 -0700 (PDT) Received: from mwalle01.kontron.local. (unknown [213.135.10.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id E856C223EF; Sun, 13 Mar 2022 16:46:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1647186408; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=r2oDBm7XwTIj1wUIwXGRbsRxYr/b/6msPs1FZKQZKzM=; b=NLytNOe5zPssCpFGvLJFzkNfrDEfqfZhKATbQ3JFt/HU08irDB5TJkSE22YO+Bwsf0nAFG 6mitJHM+XFJKS9kOvtPiDwDxCRTe00tzGviospKIkafyP66UejntLY74u2UQHuiRkXltN1 79SueGK4P9qWiF1LiWTE++W4KsLGrGg= From: Michael Walle To: Linus Walleij , Rob Herring , Krzysztof Kozlowski , Philipp Zabel , Alexandre Belloni , Lars Povlsen Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Horatiu Vultur , Michael Walle Subject: [PATCH RFC v1 2/2] pinctrl: ocelot: add optional shared reset Date: Sun, 13 Mar 2022 16:46:40 +0100 Message-Id: <20220313154640.63813-3-michael@walle.cc> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220313154640.63813-1-michael@walle.cc> References: <20220313154640.63813-1-michael@walle.cc> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On the LAN9668 there is a shared reset line which affects GPIO, SGPIO and the switch core. Add support for this shared reset line. Signed-off-by: Michael Walle --- drivers/pinctrl/pinctrl-ocelot.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.c index 35b213de1af8..d78716533393 100644 --- a/drivers/pinctrl/pinctrl-ocelot.c +++ b/drivers/pinctrl/pinctrl-ocelot.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include "core.h" @@ -1906,6 +1907,7 @@ static int ocelot_pinctrl_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct ocelot_pinctrl *info; + struct reset_control *reset; struct regmap *pincfg; void __iomem *base; int ret; @@ -1921,6 +1923,13 @@ static int ocelot_pinctrl_probe(struct platform_device *pdev) info->desc = (struct pinctrl_desc *)device_get_match_data(dev); + reset = devm_reset_control_get_optional_shared(dev, "switch"); + if (IS_ERR(reset)) { + dev_err(dev, "Failed to get reset\n"); + return PTR_ERR(reset); + } + reset_control_reset(reset); + base = devm_ioremap_resource(dev, platform_get_resource(pdev, IORESOURCE_MEM, 0)); if (IS_ERR(base)) -- 2.30.2