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 1007BC433EF for ; Wed, 9 Feb 2022 14:55:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235359AbiBIOzR (ORCPT ); Wed, 9 Feb 2022 09:55:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235310AbiBIOzM (ORCPT ); Wed, 9 Feb 2022 09:55:12 -0500 Received: from unicorn.mansr.com (unicorn.mansr.com [IPv6:2001:8b0:ca0d:8d8e::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 079E3C0613CA for ; Wed, 9 Feb 2022 06:55:14 -0800 (PST) Received: from raven.mansr.com (raven.mansr.com [81.2.72.235]) by unicorn.mansr.com (Postfix) with ESMTPS id C9EFC15360; Wed, 9 Feb 2022 14:55:12 +0000 (GMT) Received: by raven.mansr.com (Postfix, from userid 51770) id 9D22421588D; Wed, 9 Feb 2022 14:55:12 +0000 (GMT) From: Mans Rullgard To: Andrew Lunn , Vivien Didelot , Florian Fainelli , "David S. Miller" Cc: Vladimir Oltean , Jakub Kicinski , Juergen Borleis , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] net: dsa: lan9303: fix reset on probe Date: Wed, 9 Feb 2022 14:54:54 +0000 Message-Id: <20220209145454.19749-1-mans@mansr.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The reset input to the LAN9303 chip is active low, and devicetree gpio handles reflect this. Therefore, the gpio should be requested with an initial state of high in order for the reset signal to be asserted. Other uses of the gpio already use the correct polarity. Signed-off-by: Mans Rullgard --- drivers/net/dsa/lan9303-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c index aa1142d6a9f5..2de67708bbd2 100644 --- a/drivers/net/dsa/lan9303-core.c +++ b/drivers/net/dsa/lan9303-core.c @@ -1301,7 +1301,7 @@ static int lan9303_probe_reset_gpio(struct lan9303 *chip, struct device_node *np) { chip->reset_gpio = devm_gpiod_get_optional(chip->dev, "reset", - GPIOD_OUT_LOW); + GPIOD_OUT_HIGH); if (IS_ERR(chip->reset_gpio)) return PTR_ERR(chip->reset_gpio); -- 2.35.1