Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2547039rdb; Wed, 21 Feb 2024 10:57:07 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU4TO7RAsZtPAQX+9YqALYp0IkvnAS+1YUG8VUmNvbO+K6pkd9kUk9P95uTFdqzmiPs2onfU1eE5YeRixsB8trLk32mEsHXrAKd+QSSkw== X-Google-Smtp-Source: AGHT+IHyzSACI6UCJP6f/28ArtsMGp33Y6gG+L7ZEr4kI35vdjx+HKSBZCzLF7SHcFX6EATLyB+k X-Received: by 2002:ac8:5714:0:b0:42d:c7bc:aeb4 with SMTP id 20-20020ac85714000000b0042dc7bcaeb4mr22806882qtw.37.1708541826897; Wed, 21 Feb 2024 10:57:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708541826; cv=pass; d=google.com; s=arc-20160816; b=b2FKt71iIH/kc/+RdIQL0XqZ3fHYoNGHI7IDGYKv9TUD6Btkn2ykalV6OmZENn+leW +f/Y0N67uJ2eKKmnJgk7iZuZ3pWJ40D/sj6uvYb3fbZh/XDARaA6duck3SnkUMB9sleT HL/dA6V+EX0Q01f8wDMHVgZAffB2RvdvCjsO5WVmqS3kbV+LPR81ZlRjNDq7ug9dVWV5 8OZ6gaSL67ckXOLItYmPXqTTwf5TzFXo2zxNhIyJIkGefRPEipWl2h3+fhkKk/p9cg3y hoiBkkDLArFvToH1CbtIhcvXKhyhWlT21y9Y+MTvGvt0rl/1lZTOBwG23peP7OYdHSeb w/hA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=date:message-id:user-agent:cc:to:references:in-reply-to:from :subject:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=thNgYF1uxNyyDz5DKS6QukZ5IMTEpWiXbBHLponoWnw=; fh=Nk+BeRK45d0lJstU+8XdvNiMh7yQLh9jqLW5xG3r8sY=; b=K1HSfd3c1BfUVN8Ue6CP+9j8WuDU9deePnMwRARsqdt0qSDzH7td9aY790HZHMmPeM x5ORfI0by8pc5JucZD+0ZQYLFDXE2vNTAx/TLXOR2cpYFQU7LCUe7fBISo1l1Kd727Xn 0P/WrqH/kyPV9xGhhQg5I+YwkiZsuCVHI3mP0za2RUWC+133dLCu9O92ZZDo/XT3MSxu n6mgYRtcVjjENR8INihMLE2CNZ1M+gD/uu8fKgD7mCHD49XeVtS61Z48qB396SAyG4hU L0XR1mjKXs/ivDA2rwAzW0I4g2dzbdPsRnFSu8X83by12JsWWwshqiCQsLiNJ6xXaiEY EF9A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jm2Cxvib; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-75337-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75337-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id c26-20020ac853da000000b0042c41cfd192si10995793qtq.205.2024.02.21.10.57.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 10:57:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-75337-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jm2Cxvib; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-75337-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75337-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id A3A481C209AB for ; Wed, 21 Feb 2024 18:57:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BE0BA85952; Wed, 21 Feb 2024 18:56:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jm2Cxvib" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E576885642; Wed, 21 Feb 2024 18:56:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708541816; cv=none; b=LzPKpzLCO8XWefNDcazTw8LsykL88Lu1Vzuo2Q7UTqoDgbxS+y1UFuhehbIyRT2sCsNVPbCpOvaPdikq7F4QMgJJ4dy3R8DsL8xIAcA9FaMeA0STpHBFdWs2rHHuJMFsVGMV6uktK6TlAWCDuuf1w6qFanM0msX/XOZa9QgZCMs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708541816; c=relaxed/simple; bh=x/lhlI51yb6yH2YUoCrdyfz4kHTWX+g1FJ7xY4yHJ5g=; h=Content-Type:MIME-Version:Subject:From:In-Reply-To:References:To: Cc:Message-ID:Date; b=bTzLK5J9CGyaPqTuwhzDXJTlLdBe05a7zVcLl5GyPozJBuVEz8HsGN2AYHO2W+ZFxAiGbNGdGK0TiEscVsh5k/HGiDUZzj+WixFrfukfP1xPXNRxbpsjYXDRVC0pS67IyN98qxxuLCBOsXi2R62jf/tnHL3d8OS13xWpQDtHuoI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jm2Cxvib; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0B11C43390; Wed, 21 Feb 2024 18:56:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708541815; bh=x/lhlI51yb6yH2YUoCrdyfz4kHTWX+g1FJ7xY4yHJ5g=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=jm2CxvibFpZ4eNyMCS/LTN877w6WRQjclIGZ/aKILm0jFuKJvKVkj0KzszedcwVcn p9Rru7KLs0Gb0yenqLuAC9Napf2tHXYjmFURtlG5AHUbbC6b+A7KyZqYjFTNDIKtu4 swrx+vZN9F6eThgd5cgmuUmBasIUpq10KSA/bMsp3nlcJL957n2EGqC8lojq/B2VAM K0zC4GiROBBQpScoqLZ9gekdDmmcvaAX+dQbGj0Tclpr3QILlRy2Kc7idgZeCymwaJ /HqAVZujRkMzHQH2L1Fn+GSAZim058Ot6npcC1GiyMAXCVVeZU/3LillNEW421jq1R SKOngIKnPsN5A== Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [PATCH v2] wifi: wilc1000: revert reset line logic flip From: Kalle Valo In-Reply-To: <20240217-wilc_1000_reset_line-v2-1-b216f433d7d5@bootlin.com> References: <20240217-wilc_1000_reset_line-v2-1-b216f433d7d5@bootlin.com> To: =?utf-8?q?Alexis_Lothor=C3=A9?= Cc: linux-wireless@vger.kernel.org, Ajay Singh , Claudiu Beznea , David Mosberger-Tang , Thomas Petazzoni , linux-kernel@vger.kernel.org, Conor Dooley , =?utf-8?q?Alexis_Lothor=C3=A9?= User-Agent: pwcli/0.1.1-git (https://github.com/kvalo/pwcli/) Python/3.11.2 Message-ID: <170854181192.1918455.14748300319931361175.kvalo@kernel.org> Date: Wed, 21 Feb 2024 18:56:53 +0000 (UTC) Alexis Lothoré wrote: > This reverts commit fcf690b0b47494df51d214db5c5a714a400b0257. > > When using a wilc1000 chip over a spi bus, users can optionally define a > reset gpio and a chip enable gpio. The reset line of wilc1000 is active > low, so to hold the chip in reset, a low (physical) value must be applied. > > The corresponding device tree binding documentation was introduced by > commit f31ee3c0a555 ("wilc1000: Document enable-gpios and reset-gpios > properties") and correctly indicates that the reset line is an active-low > signal. The corresponding driver part, brought by commit ec031ac4792c > ("wilc1000: Add reset/enable GPIO support to SPI driver") was applying the > correct logic. But commit fcf690b0b474 ("wifi: wilc1000: use correct > sequence of RESET for chip Power-UP/Down") eventually flipped this logic > and started misusing the gpiod APIs, applying an inverted logic when > powering up/down the chip (for example, setting the reset line to a logic > "1" during power up, which in fact asserts the reset line when device tree > describes the reset line as GPIO_ACTIVE_LOW). As a consequence, any > platform currently using the driver in SPI mode must use a faulty reset > line description in device tree, or else chip will be maintained in reset > and will not even allow to bring up the chip. > > Fix reset line usage by inverting back the gpiod APIs usage, setting the > reset line to the logic value "0" when powering the chip, and the logic > value "1" when powering off the chip. > > Fixes: fcf690b0b474 ("wifi: wilc1000: use correct sequence of RESET for chip Power-UP/Down") > Signed-off-by: Alexis Lothoré > Acked-by: Conor Dooley > Acked-by: Ajay Singh Patch applied to wireless-next.git, thanks. f3ec64394763 wifi: wilc1000: revert reset line logic flip -- https://patchwork.kernel.org/project/linux-wireless/patch/20240217-wilc_1000_reset_line-v2-1-b216f433d7d5@bootlin.com/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches