Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp846228pxb; Fri, 22 Apr 2022 12:27:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDNBk3mGrgGYbXkAwwywqIWY8SLovLJVm051MVhVOTUbTsiclIw2weQfs9umCH1qRqnF6C X-Received: by 2002:a17:90b:4b4e:b0:1d2:fe21:4ce5 with SMTP id mi14-20020a17090b4b4e00b001d2fe214ce5mr17801446pjb.241.1650655645291; Fri, 22 Apr 2022 12:27:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650655645; cv=none; d=google.com; s=arc-20160816; b=C+L+nL0Ykiyb118X8oK8BwBkWa5E53/RYUT/jJC26Usf3mQs7bk4GNcezkpXDfgKqo 7e7ucTcdIGZ9DUCRU1pRgnMou6nP0UFxjgiAENh4QUHM3ucu+qtCNQDPaMCQnE70txmx ljONp+xC13YUV0Bs9R9RQKpe3q+f7ftBMNsZAwBBUkqpJAfy7tJOVIGvJUrQsr/RaJfd 2F0mKV7Y2s5oU8K35Qm83drNOb7ONSyh3veGeYwKFVtdAKAZnYetLx2TH0yq/uyTsI/l HnveQxJasuHeMX0Yw6UhC+AmlxymvairoicXu1WQTNjBoSLgpCc38cgbclFZW0CcE8nP 8HDA== 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=5nUDiuC5jlPYztqB/jf/79JO4aaNqPyVA96EPXebqV4=; b=ZLerKkaxpZnrWjNYvf0dIDRvkVDUD7uFNKXclPi9C8mL5dgxRkdo3rCbtJr1rTVkUs P1qkZhaYFhZke5+8Tr01O7JsYZub75dqmwEdNtKXLSCybOuC6XlPR0Xo9etZBqTF0Rl7 MbIZoEo2j9wWA+ZGbYvj629QhItY1m9hiQbQiKjacoIyItHGuG7O36QUWrhQ5TY5r4HY hFDxqzX+eGkp1BYHZd8+lEi9WdfzBGI95w0k7QqRf1CE33IjyxfbTAvt149DKGRx1Eor tmnDTbxYzgdd+rUo8WYdu9xr7+Qc+Ytbkx/gtUV4nByONe6WmnCIFPMeiprPZolr5N0C /kFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=T47MFtAL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id n12-20020a170902f60c00b0015448e01af7si9440510plg.96.2022.04.22.12.27.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 12:27:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=T47MFtAL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C06C815CEA6; Fri, 22 Apr 2022 11:38:24 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358406AbiDSXGU (ORCPT + 99 others); Tue, 19 Apr 2022 19:06:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355423AbiDSXGQ (ORCPT ); Tue, 19 Apr 2022 19:06:16 -0400 Received: from ssl.serverraum.org (ssl.serverraum.org [176.9.125.105]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC7B126139; Tue, 19 Apr 2022 16:03:32 -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 049782224D; Wed, 20 Apr 2022 01:03:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1650409411; 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=5nUDiuC5jlPYztqB/jf/79JO4aaNqPyVA96EPXebqV4=; b=T47MFtALaTdWyjIbdZAijetlCO/qg4WHJbAjc6jDcfao48NYimtTGo4XUl899//Iz/ItmX VA8UoqMcTIBvY9Yivw90PHGN3cJuzabr98JHBgIfL1QBTbE3Fh3iINF+OeXdlQHy76MI7M gGv1OsJlAhcY/no+ik0ao0d1A715bjI= 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 v2 2/2] pinctrl: ocelot: add optional shared reset Date: Wed, 20 Apr 2022 01:03:24 +0200 Message-Id: <20220419230324.3221779-3-michael@walle.cc> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220419230324.3221779-1-michael@walle.cc> References: <20220419230324.3221779-1-michael@walle.cc> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=no 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 1bdced67464b..b25eb04e4e1d 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" @@ -1912,6 +1913,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; @@ -1927,6 +1929,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