Received: by 2002:a05:6358:16cd:b0:dc:6189:e246 with SMTP id r13csp1631847rwl; Fri, 4 Nov 2022 17:01:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6kWHdRa5RVVg2hqqZW9ASnONO4ogVnZC5bebPhKuRUUGbXv9FBOsqIBQ8rwe5Xqj6AVl64 X-Received: by 2002:a17:902:7689:b0:187:48d:d9be with SMTP id m9-20020a170902768900b00187048dd9bemr17946833pll.102.1667606502549; Fri, 04 Nov 2022 17:01:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667606502; cv=none; d=google.com; s=arc-20160816; b=jioxgd5IVkvV+HWUviNNBAa/78nkVWqQVLonnEltjji1sqy78tLn2G40OJCv05JLoh YWT9F1scvFYEEMGr8LJrW2ee4sq7te2hRMqJvQnaUDcqfD9c15jgtrRYte/MZjsdQOCb tZu751P2y8564lzcz0iHXhT/K/BvBNHBqICM7wFSA4dayrikVEstGsIeoXBj1sWm94RC 6hGAyAJ7p3zyBruinAoqDnRTQD4ucHGSVWgNnxT4A0DkdSAQN9PJeM0n0rs/2+aRFCu1 pQgB5Kjb0S/JmWSZarEb14CWDC02l4AqwmUUjknsgmN0WI0QrY4erD+5CAKTiTm2qS0b VcAw== 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 :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=p4lPoKL1RWNuy897FDzE5HGIgTwpr2K0oV8rbjzJsp0=; b=auMNQN0BEB2QFnGGgwtOxnPDWyDltdTHP1qmAy0TIFbvFNo66gus62lBYr2uUxJJBS KyaeNuBEQko88GzxkzwYcyvLLXYS0ZiaootDFJbzy0wQX5lzTAy9ZORas328tnXV2Mpc 29pda/vzUf8NVJ7btPklHkDtioAImhpq+HJRYrSI5gFRytNGDbR60oZ9eQK/HaM6Y67d z932N/HgdrgPnw01XAwT9sAT7Sfm9TDuwXsY9T8q5KDq3+uWUBAT6bCoTBJv5hLe7g84 +KRnXYpS69V8hxCXjdBW/x7S7VScR4icU+eGeT8BoHmNdO47xbHC9Nk/nVr5Lphk456P le7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=oe8xhJj5; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 28-20020a63155c000000b0046ec3bd90bbsi1181065pgv.60.2022.11.04.17.01.29; Fri, 04 Nov 2022 17:01:42 -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=@gmail.com header.s=20210112 header.b=oe8xhJj5; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229781AbiKDXq2 (ORCPT + 98 others); Fri, 4 Nov 2022 19:46:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229617AbiKDXq1 (ORCPT ); Fri, 4 Nov 2022 19:46:27 -0400 Received: from mail-oo1-xc2c.google.com (mail-oo1-xc2c.google.com [IPv6:2607:f8b0:4864:20::c2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BA7E2E9D3; Fri, 4 Nov 2022 16:46:26 -0700 (PDT) Received: by mail-oo1-xc2c.google.com with SMTP id j1-20020a4ad181000000b0049e6e8c13b4so835687oor.1; Fri, 04 Nov 2022 16:46:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:from:to:cc:subject:date:message-id:reply-to; bh=p4lPoKL1RWNuy897FDzE5HGIgTwpr2K0oV8rbjzJsp0=; b=oe8xhJj52G5t5uSB76V7g/ZJQK2/x/1DjqYUl0vSZg9seIiLuR+ySI8fzMioxmY49h 5DkPDEsTpEJTLFwFe1Q6z9YTbfGPeu+n5yyZlgmKW3dR3kUY1YthJGIXNc2+2auO9+e1 TU8d+Sh8Wa4Q5rpbdajZCZYkA4obP0rbL4CL3Vhw4eP0FzUauUpcslcB3TJNK3r4lLt9 n00oQnyTEBRgB9UQtkB3YOZ1g7Z7byVYMmiAFn8LsYSiuiuCxjFWUVHzHn3J9Tki+PFR ztNH+zui12UpLv30OCnof3I7d2Ovq78L+nRKiVKtFiP8jg0TPIH1p+au+REC93mrb1QT jj7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=p4lPoKL1RWNuy897FDzE5HGIgTwpr2K0oV8rbjzJsp0=; b=gXJOIL+SAJvnqsAPd1zOS6Qib0rQNkDxCOvK4tW4FL1s08lf0IprWgjhwSpW/pOnT9 nQ0al1o991L1FHIvE0PG2RypN4vw0oVOgPAyeEsjAPRTtNcjWKwNyd15T5r5gLn57wvp /8qGzhVrl492/tSJZB7v+Qz56XSS7mIg75+y8q8hvP7r2FORWKhkFzr3KNJlzeEk4FzG jtxkmLJTbJ5vn6OpJLrpAgba8TGOGbBgLPF6vPX9EcIElIsQQ4GcMnt+r61lfcFvJf1J 3+9mJsK0MahFPA/Pmz+iywfHJdYrK0oCKQADmOsz46640vRllGiDn7h1k2ZgUp+BUWbR v90g== X-Gm-Message-State: ACrzQf3F20YYujjYdzJdQgPZXmPkevjXKiJb0Gzj5N8HVbBZ3M22RY4T D3v1S2nC9wqDo1tFICIoWA0YsMz7+WE= X-Received: by 2002:a4a:d127:0:b0:49b:2b6f:a074 with SMTP id n7-20020a4ad127000000b0049b2b6fa074mr13006459oor.20.1667605585893; Fri, 04 Nov 2022 16:46:25 -0700 (PDT) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id fp19-20020a056870659300b0013b8b3710bfsm203577oab.13.2022.11.04.16.46.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Nov 2022 16:46:25 -0700 (PDT) Sender: Guenter Roeck From: Guenter Roeck To: linux-hwmon@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Guenter Roeck , Marcello Sylvester Bauer , Zev Weiss Subject: [PATCH] Revert "hwmon: (pmbus) Add regulator supply into macro" Date: Fri, 4 Nov 2022 16:46:22 -0700 Message-Id: <20221104234622.2444747-1-linux@roeck-us.net> X-Mailer: git-send-email 2.36.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no 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 This reverts commit 54cc3dbfc10dc3db7cb1cf49aee4477a8398fbde. Zev Weiss reports that the reverted patch may cause a regulator undercount. Here is his report: ... having regulator-dummy set as a supply on my PMBus regulators (instead of having them as their own top-level regulators without an upstream supply) leads to enable-count underflow errors when disabling them: # echo 0 > /sys/bus/platform/devices/efuse01/state [ 906.094477] regulator-dummy: Underflow of regulator enable count [ 906.100563] Failed to disable vout: -EINVAL [ 136.992676] reg-userspace-consumer efuse01: Failed to configure state: -22 Zev reports that reverting the patch fixes the problem. So let's do that for now. Fixes: 54cc3dbfc10d ("hwmon: (pmbus) Add regulator supply into macro") Cc: Marcello Sylvester Bauer Reported-by: Zev Weiss Signed-off-by: Guenter Roeck --- drivers/hwmon/pmbus/pmbus.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/hwmon/pmbus/pmbus.h b/drivers/hwmon/pmbus/pmbus.h index 7daaf0caf4d3..10fb17879f8e 100644 --- a/drivers/hwmon/pmbus/pmbus.h +++ b/drivers/hwmon/pmbus/pmbus.h @@ -467,7 +467,6 @@ extern const struct regulator_ops pmbus_regulator_ops; #define PMBUS_REGULATOR_STEP(_name, _id, _voltages, _step) \ [_id] = { \ .name = (_name # _id), \ - .supply_name = "vin", \ .id = (_id), \ .of_match = of_match_ptr(_name # _id), \ .regulators_node = of_match_ptr("regulators"), \ -- 2.36.2