Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3030706rwb; Mon, 15 Aug 2022 16:29:55 -0700 (PDT) X-Google-Smtp-Source: AA6agR4wn7CFZtEA/cobUBy1cNQwz+IWLrgDeM/rSL7Kk9yKL/zRMHf2AbvxlLnLZ5TpGfq/OyOl X-Received: by 2002:a05:6402:d06:b0:440:3e9d:77d with SMTP id eb6-20020a0564020d0600b004403e9d077dmr15653257edb.286.1660606195287; Mon, 15 Aug 2022 16:29:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660606195; cv=none; d=google.com; s=arc-20160816; b=ftYy8rPZ3VrZWzAmm9f1eeAGhsA/P4X5KJVyZs7Q0cS7dcrpiyhbrPnEBYkqqZPfaM fsz7i6hA8fSRvv5T0IK+k0CUtjWTtwHwEax/rYTAKCT1RKX80krPgk30yqr/LpE9pyuW grtQSMyPOm9g+2DPS+6v47heAFdkJPTFr06hEWVKr6l5xbrBXPSNilBO8iC0BEi9tTgk AviJmTWxbdL9PdAGK/cU0eXof32Cl3KYX82c/KZpAGb9O06M9YInPTBsRLwHk84ARycf WoJlKWM1/iSXg6gPGjvTLqevqa7xRpZ45Nd2rZMbo0To0gzcFi2NQ+Nfm8PmKz3N/F6z ygsw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=B3vg08CxB08lGxv3O+UwW2iGtbjBJrgu3PDXElEzdL8=; b=zp7K19i+QTMrUZDy40nJrz0p55wMB/VQh+hSFwOeUEDBt0qYDg5RQMQVhG9gj5twQR JdzUbuA50lQaAycSLDNMaW/Y5aCC9ZSYpVX+oCWSFd+h68x+Dk21oClvj/3TB65X8N9u f2r+PK6zlfYfppPC4TOwlyY9Cs7oSLptIz5RWt2UcpOXpRYcyM5MkUbUKqN/+0GQpz8r vRJUXuNs3H8+rMVG7m+AYe3GbCCMK9+xm9IhlQEgCZAfpnd+JxQCh81ctNnSThWR8j/j Xtdb9Pl+yDpE8ZoMCB+A2mPo2ODP8k7rYnNO1BqOAkgBg2+cTTuI1NjoSbzFfonZHG10 U0ZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pWitRIZa; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x25-20020a50d619000000b0044300fd7587si8362270edi.364.2022.08.15.16.29.15; Mon, 15 Aug 2022 16:29:55 -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=@linuxfoundation.org header.s=korg header.b=pWitRIZa; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233109AbiHOXUN (ORCPT + 99 others); Mon, 15 Aug 2022 19:20:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353188AbiHOXQJ (ORCPT ); Mon, 15 Aug 2022 19:16:09 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3C3F146CDB; Mon, 15 Aug 2022 13:02:59 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 092106068D; Mon, 15 Aug 2022 20:02:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0F2B0C433D6; Mon, 15 Aug 2022 20:02:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660593778; bh=z0WCtzWyS+jOwGpNrrIHrFVwGek7uF+4CfKOIqfi9QQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pWitRIZa3SPLE5hmpCK6K3v1MfG+Jl1R+jTP4IH3d2uZUWfAoX6i4CRV/EZ1R9SVs iZxkN9nDfsZ0xuX6m63+JVY5Qg+mMdZnuEQ7HysZjuzT7wj/6czmZXyD2eQftMZUtb qkIsEuGbmuSPU9cbhUmcFvZYPzdKT1KNJ8XMw0LY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ajay Singh , Kalle Valo , Sasha Levin Subject: [PATCH 5.19 0324/1157] wifi: wilc1000: use correct sequence of RESET for chip Power-UP/Down Date: Mon, 15 Aug 2022 19:54:40 +0200 Message-Id: <20220815180452.618596240@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 From: Ajay Singh [ Upstream commit fcf690b0b47494df51d214db5c5a714a400b0257 ] For power-up sequence, WILC expects RESET set to high 5ms after making chip_en(enable) so corrected chip power-up sequence by making RESET high. For Power-Down sequence, the correct sequence make RESET and CHIP_EN low without any extra delay. Fixes: ec031ac4792c ("wilc1000: Add reset/enable GPIO support to SPI driver") Signed-off-by: Ajay Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220524120606.9675-1-ajay.kathat@microchip.com Signed-off-by: Sasha Levin --- drivers/net/wireless/microchip/wilc1000/spi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/microchip/wilc1000/spi.c b/drivers/net/wireless/microchip/wilc1000/spi.c index 18420e954402..2ae8dd3411ac 100644 --- a/drivers/net/wireless/microchip/wilc1000/spi.c +++ b/drivers/net/wireless/microchip/wilc1000/spi.c @@ -191,11 +191,11 @@ static void wilc_wlan_power(struct wilc *wilc, bool on) /* assert ENABLE: */ gpiod_set_value(gpios->enable, 1); mdelay(5); - /* deassert RESET: */ - gpiod_set_value(gpios->reset, 0); - } else { /* assert RESET: */ gpiod_set_value(gpios->reset, 1); + } else { + /* deassert RESET: */ + gpiod_set_value(gpios->reset, 0); /* deassert ENABLE: */ gpiod_set_value(gpios->enable, 0); } -- 2.35.1