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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8B1DCC0015E for ; Wed, 19 Jul 2023 21:21:01 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C5A7186719; Wed, 19 Jul 2023 23:20:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kwiboo.se Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kwiboo.se header.i=@kwiboo.se header.b="DVRtszKN"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B8CEA84768; Wed, 19 Jul 2023 23:20:57 +0200 (CEST) Received: from s.wrqvtbkv.outbound-mail.sendgrid.net (s.wrqvtbkv.outbound-mail.sendgrid.net [149.72.123.24]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 884928475C for ; Wed, 19 Jul 2023 23:20:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kwiboo.se Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bounces+31435339-7456-u-boot=lists.denx.de@em2124.kwiboo.se DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kwiboo.se; h=from:subject:mime-version:to:cc:content-transfer-encoding: content-type:cc:content-type:from:subject:to; s=s1; bh=WGScmv8qQln1aTDx3JkCdw836bqMYoURU3QuEEZJ8Uk=; b=DVRtszKNSriRkwWywjkHwrfztqEEmSdX1hWlP6y3lYzz46cSADLQ1sVDPphw4ER6TYPH V74adndSf+sF31gdQm4WgL+BWs1PCkjqkWyE1LE3Q0Sy7MdTI22docpQitmnQ2uMWnEIjm Q8BPKkARm0rSBW6D7WPJDiDkg3vVc2RFHpqLC6UQYPuyq6Gyy2TF+GD+5cAbsJHnYwQ3BA Tqe+uq4/i+RSp+ayl1iaqwCikyCtfFrQDRV5SoH/GwQdoVRhbCDdmri7EypGGZ2+XoMHR3 EzUlFNFqUy2dCrr5ts/fDzUZMXkWCQFpPj5RfTL209RWiGKNGhuTXR96mzOl6M1Q== Received: by filterdrecv-65f68489c8-lsfh9 with SMTP id filterdrecv-65f68489c8-lsfh9-1-64B853B5-2C 2023-07-19 21:20:53.707443156 +0000 UTC m=+6039894.539544676 Received: from bionic.localdomain (unknown) by geopod-ismtpd-1 (SG) with ESMTP id KJSR68eQT7mTdmJiLAgJ9Q Wed, 19 Jul 2023 21:20:53.377 +0000 (UTC) From: Jonas Karlman Subject: [PATCH 0/5] Keep fixed/gpio regulator enable count in balance Date: Wed, 19 Jul 2023 21:20:53 +0000 (UTC) Message-ID: <20230719212049.709358-1-jonas@kwiboo.se> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-SG-EID: =?us-ascii?Q?TdbjyGynYnRZWhH+7lKUQJL+ZxmxpowvO2O9SQF5CwCVrYgcwUXgU5DKUU3QxA?= =?us-ascii?Q?fZekEeQsTe+RrMu3cja6a0h27ARCgfaNZugG6W6?= =?us-ascii?Q?5uZV=2FYC823X=2FV4UZHDtLiJwjn+OjtApK=2FwfY6=2FG?= =?us-ascii?Q?sKV0v77LpX=2FcUpL27dlriRNzmv+d6tvKBuAu3WC?= =?us-ascii?Q?6T73MmYBkL+sKXGfcZhAtK9lJj7g4yDUwZs8RC8?= =?us-ascii?Q?vCdWwbnAwIrylCNjhS2TVDJ8C483LJuT7fRARp?= To: Simon Glass , Marek Vasut , Peng Fan , Jaehoon Chung , Patrice Chotard Cc: Eugen Hristev , Svyatoslav Ryhel , u-boot@lists.denx.de, Jonas Karlman X-Entity-ID: P7KYpSJvGCELWjBME/J5tg== Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean The commit 4fcba5d556b4 ("regulator: implement basic reference counter") have made it more important to keep fixed/gpio regulators enable/disable state in balance. This series fixes an inbalance in the mmc_dw driver and changes to use the more relaxed regulator_set_enable_if_allowed function for a few other drivers. The regulator_set_enable_if_allowed function is more relaxed and will return ENOSYS if the provided regulator is NULL or when DM_REGULATOR was disabled. Using the following call convention should be safe: ret = regulator_set_enable_if_allowed(, ); if (ret && ret != -ENOSYS) return ret; Jonas Karlman (5): adc: Use regulator_set_enable_if_allowed usb: dwc2: Use regulator_set_enable_if_allowed usb: ehci-generic: Use regulator_set_enable_if_allowed mmc: Use regulator_set_enable_if_allowed mmc: dw_mmc: Keep vqmmc-supply enable count in balance drivers/adc/adc-uclass.c | 22 ++++++++++------------ drivers/mmc/dw_mmc.c | 4 ++++ drivers/mmc/mmc.c | 10 ++++++---- drivers/usb/host/dwc2.c | 14 ++++++-------- drivers/usb/host/ehci-generic.c | 23 +++++++++++------------ 5 files changed, 37 insertions(+), 36 deletions(-) -- 2.41.0