Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp627920lqb; Wed, 29 May 2024 06:19:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVCKOUBbRxWJn/tojdWZSTJpH0y8/shO7pS89t7YBGISka2eLQL9wHkLxCfdOHFLNCuyyjFZ6R+IiAhjJV3GyRMyd03FUuGaTyyRZ0hKw== X-Google-Smtp-Source: AGHT+IGFWJuH1zrcN7H7inK6jl7lobL4thEZn0JRM+CTBPOzQcwlQFn5ArQ2BtWOfbJGHVgcXUoo X-Received: by 2002:a17:902:e549:b0:1f4:9e69:a8f9 with SMTP id d9443c01a7336-1f49e69ad3dmr90073305ad.62.1716988785797; Wed, 29 May 2024 06:19:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716988785; cv=pass; d=google.com; s=arc-20160816; b=mApnJfFYOwyAEmhIZX3kNxkByA/tI0y6dVQDzdMxjuyMPjrOqZeNqB1CyUfLm41ybS ar08sKrt6OLsB94ZxCVaTRUDlKa9HximfOLd815yQtYOGDBglvFqgRTqWMgBF+37JpaT vtbrDfyjsGHq1oYQ6HMC6WHJX7gV3GSpwn10Kpf2KWK0FVhEzeI1Umwr4LRK/vlnUiEE kEgCxFbDvXgG7lWbSbhhR1WE/teSsvVb51bTApSZlWxOYocMLvooGnibAeMWUFXzhMKA 5IDE8h6xhNRNBbWe7FkCbpqkURtWAypLP3axintUZLiQOATFKyi+fu+/ZJ2IBQg6iT+N BoYw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=xnE9vffLRlk7aV3EBT3ZqGMhr112Rbrx+aAfPAOBvFA=; fh=NMmWcqJ/xwLyzf5zOx67HD6crkEOJ5ysIwLZKMliKpY=; b=H78SKY7Msgdxkg6y6rXXU7ThuIKlDEzI0y5V13xof2ur7ABQGor00EtTI0pcPI2nMO vkSeH4We8yF5tN3sgUZ+Uiq5uvlR+poFSW8WSroh2tb/Wq7y7bK7dyKeH0dTbfAhNuhx 05OvMHTOeZ1rbAEX2U7PFFBmy0NEAEwRoo/PBfXVjxSyAt9zPnXjz2Hfwdwi3lc9mBon rFiqe1lxT4GiE0Ce1LGI/pjFC1hKgcJlXDeO8Lq/teZcnqUlhq0X5YFLw4t+IOlZdlYA EnujynwaMAeZty68x1aLPwEOzt8f30MkvOpDNph5gpPKdQPmVn9u4FmP2spC8N5HNRq5 SmWQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=r+sSY9x2; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-194143-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194143-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f44c9dfc8asi101071905ad.533.2024.05.29.06.19.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 06:19:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194143-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=r+sSY9x2; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-194143-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194143-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 42CECB2562A for ; Wed, 29 May 2024 13:15:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EC61511184; Wed, 29 May 2024 13:15:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="r+sSY9x2" 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 1A7F82572; Wed, 29 May 2024 13:15:23 +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=1716988524; cv=none; b=oO4ekYH6aOfyn8LUwnpO2YGNkzfAmnq1Cyh/r1Cc7IQC5WxgXXxEcrbyCZDGi2c7d5E+5b+mlr7v3pmNWDxkwlVIYEAEfOET3kw8BRmRbfD4aJtzTXzvozfKmVeXvBbO3YtfASIHUy9PR+XnUMlnGwzRj+yfsUAlkLnQjEMQgHM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716988524; c=relaxed/simple; bh=ujzhhXCydAwZXc7rS5LhBrMDvamEvdGbdaBp/U8b0oM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=JUnIkfyKWDDxnqoh5q/PzCgpMKKPDiCjZBZsU4wSZm6Mt35vnc8t7nGeB/lWG147e3uMC8cFpJcg6ft7e9OY7liDhMhTmRfEdk/rslRKcjzT68rZGOLNUsoAlafFEMvTw5wEA+bWHOHhuE9TR6uZh94yXFGvH3/xtguAS0qqNhw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=r+sSY9x2; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F58AC2BD10; Wed, 29 May 2024 13:15:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716988523; bh=ujzhhXCydAwZXc7rS5LhBrMDvamEvdGbdaBp/U8b0oM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=r+sSY9x2Yr9SOckTZ0mrTp0XctmZIan7I1jgy+rBnVb5Y5LKO6/8i5FTX7h1XGmQW 5SCmmxjYTmk5S1d47S946+DXlDncD8ytFzgK9f/MXx/IswC8zZjqrzfY+j8G5wP+fk e+aNg6gR91SaPXD4YuqMskL5j3iuYXwNmDU/BqZL3hLSZLzWK6hYlzKUBO/0FZUEAZ cC5tDEhR2efhjkE6CwlXIV3CLpAT3WWTUb3QDEZklkBmcmJCgoYXY6PhjcNr+GsyTo Y5nrN8wZjcxZSZBVJNNwtatUfwKJTUWf37s5ru8ZVVDDKaQjVi6C2bpEsOhMxcPz8N P/zxR/ZW0I7mw== Date: Wed, 29 May 2024 14:15:18 +0100 From: Mark Brown To: Geert Uytterhoeven Cc: Liam Girdwood , Linus Walleij , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Marek Szyprowski , devicetree@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] regulator: gpio: Correct default GPIO state to LOW Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="U4bdCLzVLSiyC7ix" Content-Disposition: inline In-Reply-To: X-Cookie: Everybody gets free BORSCHT! --U4bdCLzVLSiyC7ix Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, May 29, 2024 at 11:49:51AM +0200, Geert Uytterhoeven wrote: > According to the GPIO regulator DT bindings[1], the default GPIO state > is LOW. However, the driver defaults to HIGH. > Before the conversion to descriptors in commit d6cd33ad71029a3f > ("regulator: gpio: Convert to use descriptors"), the default state used > by the driver was rather ill-defined, too: That was 4 years ago... > I have no idea if this has any impact. > I guess most/all DTS files have proper gpios-states properties? That seems optimistic, and a grep in mainline shows some users but not really as many as I'd intuitively expect. > - /* Default to high per specification */ > + /* Default to low per specification */ > if (ret) > - config->gflags[i] = GPIOD_OUT_HIGH; > + config->gflags[i] = GPIOD_OUT_LOW; > else The risk here is that we start glitching the power where previously we didn't. This does make me nervous. --U4bdCLzVLSiyC7ix Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmZXKmUACgkQJNaLcl1U h9B9Gwf/R2iAIKgEctcw6myFMUeu271otHOu/guyQ+Ko2nLT21+UkH3EiiU5p4b3 cY20iuEK4tmSJPUueJDiwdXAlPOZhQ8JFxIZvXPm0ZIMWDNdMECgb/LkRjJFTN46 WAjtna5x94CON+5t0Bx+OMpM/obwIYqvYWhAZPR8boURfOULjQed3Qs4UzB5O7A2 c9QLLGmeAcCjknN1Xc9OJgVe7sfHp86mwyivy5/5QAvmYPCDJYbt8dPFqg34Rjec Xk2lJxw1LE6kD0xYg/60lxTEWeiuBJAsX7aVXdxHf8+dP5Y1qgTWwoYY8f9ww81W X/EozJGbyVxrkmP6w29IaAXV1Ol0Kg== =DNcl -----END PGP SIGNATURE----- --U4bdCLzVLSiyC7ix--