Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp54171lqz; Fri, 29 Mar 2024 08:19:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV89SvJFg2EGnO7/7VfIo7E3/Hd9MNCruWrAcnWNNpoFnQKYkBmaL1NfqNee0tsS+rn14/i8Wu7/c2fl2cooFZQ7BA5bvJBn5BKoypJMQ== X-Google-Smtp-Source: AGHT+IH1zEJy+IksaNhdU/WfPD9GWA/DLZF0n1P0/2Frq+B74GdvOz2JnQiL3fJzeSR+8R151ABp X-Received: by 2002:a50:9987:0:b0:56c:1f33:84d7 with SMTP id m7-20020a509987000000b0056c1f3384d7mr1773814edb.37.1711725596958; Fri, 29 Mar 2024 08:19:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711725596; cv=pass; d=google.com; s=arc-20160816; b=e9uw+G+hp/fIJ6UfyLVt/ArSwcDwRM1/vy37JlHJf42sM5VqsbZa490IRJZoj8WLya EqqNcnV9NEOqZBtaiDvPa4dVg5XkB8bCD73Dj2+ho71W3pG5EgtNxSDNtyzb9xQ7rUFt gClkxgxA2VnsCkKglOWzHPS3EYgWJ+nXeMv4gybyhAoxGwJ6xGxlMIbW/Vvz0+HuYNNa BR2vwQOMK2ZLrqEiyd6FaJF2D+N/2J5KjFAdeSx9rJbqDB/D7KHprmGMEZt0zbIueKmK IS6Jz8qkZtkwaIsDt1qDEx38M6ffdpVbroGwyqGhat809rxAyDsjFwW2ia0FFb3+4c+S WPPA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date:dkim-signature; bh=QPr73epDnfNI9hRAKDsQGY9i3JJUvUIidZoLlIKWyZk=; fh=kEXFBVq4KCiB1oJgzHoxxmZmGtm4JxQIWE/k394nvlk=; b=I8S/VojHMgmI+hGqtZNeV0TyBO2h24dGb1XUcU4Ke+scSNVniG+XzBdb5epRPZTkuh 5lk4FUyrQmsRImVBswBKXmRlcJdQtTMUZVzTmufufSh3rLF3ks+v14lOn7NW+y/jHndB fJLH4A1XKE/2R/saT3ndQ2llx5bzvtHwIpYpgZTtgOXCSI7JDqAUtoi+oD4G5bFMFPmY TWlyF00/C6/eyhvxY14GacqnWpXmBDy+h3SkS/lTPMXBetN/fN1c72bQTaAucbuR56Jf V3rgBS8cA6ebpgUtorgnXeD9bN33Ed/+lVLnYv5pQlfy0/vyCBnQqplGjUMXfxqbLcAZ P7rA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=LsNdJ1Lt; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-125107-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125107-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id m26-20020a50c19a000000b0056bf41eec4bsi1881395edf.681.2024.03.29.08.19.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 08:19:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-125107-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=LsNdJ1Lt; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-125107-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125107-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id C14FC1F228AB for ; Fri, 29 Mar 2024 15:19:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9DB1B85C74; Fri, 29 Mar 2024 15:04:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="LsNdJ1Lt" Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) (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 55F791C0DF0; Fri, 29 Mar 2024 15:04:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711724694; cv=none; b=IlZH3657twegKr73ekRtNroEIRjp/1k7GwLGw9jDr3HWg0c3fzZPi0Hk8HVAO9npYi+gM1oqkar4Jqncwk04Lo9yxTPWdLnyivvUv7sOblI1dfaM2r+sRPGRvigYC9Wr4928LedyudjEvB/zg7Mc1CK1BW/Y+XmLNBcZmljXk48= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711724694; c=relaxed/simple; bh=QPr73epDnfNI9hRAKDsQGY9i3JJUvUIidZoLlIKWyZk=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=jtu/NgmqF5wDafDcNp5CmDOBcNoQ4+VzsxcGLz9eYF/Kk9EWoiTVaioN44VxcRfWBuJxCaBZniy6IjxMt5c0RgFdWLTvgqaCVQn/xZ5tMCA25u0wvmVROgetk78RoLty5IOhB/CxRNeRuuJ/mjxVdR1zW1PoTOc1fYojQBTbOng= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=LsNdJ1Lt; arc=none smtp.client-ip=217.70.183.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 2FD9560007; Fri, 29 Mar 2024 15:04:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1711724684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QPr73epDnfNI9hRAKDsQGY9i3JJUvUIidZoLlIKWyZk=; b=LsNdJ1Lt0oJ9z0mqz6TlbRI8l1mbDgKIJ5zzl1ossv03wcL9woRWFh0Gs6Y9IS6u8yP+Px feUGQi6RcodKm4JuX4SmPB6VcliyuE8qbxiqqaIHt3T59gAu2qHrmZ8rsGWDECrKXCecX4 VDS/Cs+qOCwzdBYXDm4frT8frQL1XzXx3xsMYhvop37l58/1Ler289gm9xR+nPBn+ZPAhY I08bFEm98VVZuCNWibrS/bcgr+Y+tzdLCAz6IJQG6ok0viZfUfY60mGt1R+8jjseSb432x E/FLe3PPXfkaBmFlgNtS+QIckH/IyKpmto5Y6MPAUPKBXNLYMlmzdSNGZHPgXw== Date: Fri, 29 Mar 2024 16:04:42 +0100 From: Kory Maincent To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Luis Chamberlain , Russ Weight , Greg Kroah-Hartman , "Rafael J. Wysocki" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Oleksij Rempel , Mark Brown , Frank Rowand , Andrew Lunn , Heiner Kallweit , Russell King Cc: Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, devicetree@vger.kernel.org, Dent Project Subject: Re: [PATCH net-next v6 13/17] net: pse-pd: Use regulator framework within PSE framework Message-ID: <20240329160442.0333a117@kmaincent-XPS-13-7390> In-Reply-To: <20240326-feature_poe-v6-13-c1011b6ea1cb@bootlin.com> References: <20240326-feature_poe-v6-0-c1011b6ea1cb@bootlin.com> <20240326-feature_poe-v6-13-c1011b6ea1cb@bootlin.com> Organization: bootlin X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: kory.maincent@bootlin.com On Tue, 26 Mar 2024 15:04:50 +0100 Kory Maincent wrote: > From: Kory Maincent (Dent Project) >=20 > Integrate the regulator framework to the PSE framework for enhanced > access to features such as voltage, power measurement, and limits, which > are akin to regulators. Additionally, PSE features like port priorities > could potentially enhance the regulator framework. Note that this > integration introduces some implementation complexity, including wrapper > callbacks, but the potential benefits make it worthwhile. >=20 > Regulator are using enable counter with specific behavior. > Two calls to regulator_disable will trigger kernel warnings. > If the counter exceeds one, regulator_disable call won't disable the > PSE PI. These behavior isn't suitable for PSE control. > Added a boolean 'enabled' state to prevent multiple calls to > regulator_enable/disable. These calls will only be called from PSE > framework as it won't have any regulator children, therefore no mutex are > needed to safeguards this boolean. >=20 > regulator_get needs the consumer device pointer. Use PSE as regulator > provider and consumer device until we have RJ45 ports represented in > the Kernel. Oleksij, could you verify this patch does not break pse_regulator driver? Regards, --=20 K=C3=B6ry Maincent, Bootlin Embedded Linux and kernel engineering https://bootlin.com