Message ID | 20240215-feature_poe-v4-12-35bb4c23266c@bootlin.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-67272-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:b825:b0:106:860b:bbdd with SMTP id da37csp505627dyb; Thu, 15 Feb 2024 08:12:18 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVu8/HqEpjGFw754Zf+aNQT8DguO+oG5kvG9dV+OOR704HVYqISj7vTyr7X8FWcAXFTojG6/Sb+37n99MBt6tsRKwEmzw== X-Google-Smtp-Source: AGHT+IFvdK69W4PZKHMHOR5bVTCYkcyTWBkCUk4SOmZfTaIbwUf7iGrsCBh5LPuJCJKY847YVvKO X-Received: by 2002:a17:902:6546:b0:1db:28ae:db44 with SMTP id d6-20020a170902654600b001db28aedb44mr2879311pln.26.1708013538717; Thu, 15 Feb 2024 08:12:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708013538; cv=pass; d=google.com; s=arc-20160816; b=uDcF2NA9H4M3nhL1p0GJ2nmjZBwsLh1YL4+M47R0AUPoTzg72b4BTod6+7FZqU3azg rnpAqVIIk0gh2k8bJsAoanFaAACWr4v/SZTlmUW1VoUviVJQUqmHiUfjQ9CS0NJ8yoGi 9zrPRNP6DUzrLUpIU0JPUUZX5x4fw24wsY/rRMH3vLnoubznco3/2OWjuCRybPe7lDxJ jkR4d6DTc68LDZ5GjAwNbQxGRjoPfqFBPvyKwf9EpA/3sRlqYsJgIfu4YGyfkSFKXVFO lUPs+0uMQEJ1Xt4BaS2Yzodsi4XP8OdWXTQGWmUZel9Q9PDK5PaHJwbzqdDngg0K1zAi sUtQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=xQqskjN/xqjQe87m4lh7bm+8/0PUUsHRlazCTYp5ByI=; fh=7S+YztZcCxZKIOm2mMOwIzm96FjMcKQ7LjGMKaNLlnQ=; b=kIyCHngZIj5sLOGZRUBx45KtPX5tE10LEZRfzwvpJNXdPmfwcyhWMkPqKsSoBmitzP sqnV1grMH2d1nXjjyiXbA9N1MGkLAAmGkfhWZhokUDT0JK6LDBxTr6jcMAXKHZ7dw2kj Xeclvzi8s/aIwYKf/oQBMR/bTKlmITy14ZRAeW0wEyTMayfW16mwV/i4Dyfd36RlO/RU U41dd7MZs2P7JSvhKBigMOWwzgYk/lD1R3l9/Ij5e/oCBoCkV/UMkwdayHplgIEBbap/ TFH62V7t7UjvKz1zuZ2+LxJ/K1FJ1THIWwFs02ZMd8rOgQ4bGAOuqiO1ufLk6drgg9u5 jt9g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="dk/k24uJ"; 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-67272-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67272-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id u3-20020a17090341c300b001d95d1078f7si1325662ple.346.2024.02.15.08.12.18 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 08:12:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67272-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="dk/k24uJ"; 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-67272-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67272-ouuuleilei=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 8ED7F28266C for <ouuuleilei@gmail.com>; Thu, 15 Feb 2024 16:09:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D2A3113AA5C; Thu, 15 Feb 2024 16:03:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="dk/k24uJ" Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) (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 79176139596; Thu, 15 Feb 2024 16:03:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.200 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708013020; cv=none; b=NFqDnqsU7zvObqU2w8KprR9bkEyAdtZ0uGnRzNIaOuXwqkfDEWcZORajCRQsZp2U2ExoRzPHndBvRjFDTZ+hMo+pb2PhVRGAaclZaAygeRKRwsMxbvwAG1M4Oy9VU/OPIOVf2ZkG8c2h7Wsc23ayHDSbKOzNhCDYINk/RojdvbA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708013020; c=relaxed/simple; bh=sevRnps/Jf1AGxhs4ieE6FlD3NCWc1YYLeE6rzxuxOA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=OtqOqAf+SD8J9gd0FH/SjuO74dn8BVmmoxAt/2dR/wZFj/SZtbVeT+P7uC9BWh70T6bchV6khx77lIGuz9jsctlD/n4HIpIjfMmLSdk1oQyZKQDgDF7C7PchC2SsLb3rAuaQNvtV6Ocdf1TyrgGoOx5sRNo01jDquehVc347a9E= 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=dk/k24uJ; arc=none smtp.client-ip=217.70.183.200 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 C2F2220009; Thu, 15 Feb 2024 16:03:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1708013016; 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=xQqskjN/xqjQe87m4lh7bm+8/0PUUsHRlazCTYp5ByI=; b=dk/k24uJUSBGqbwjoB3DN0LQRLx4WgZwD/xfRZdk+9B83iwadoMdUtK9HrcwTyHPILJgKj f7OKT/0gqFdeFrXD9lvW9ufjC6DVC37Z3KPF4FVnRSSksI/L1dxEnIgRVil+5p6+a8kwLg pOw0L2yvgvNvJN2tTRt7nkfS+AnVcf+ooj/JMr6RsuHaZkWZN4GnGFXAvRWFEMycpOzM5e vQEUtsfnuOf9jHWcAEntmWNXwznCaI5ugN7kshxs48fZHbzM7nL0aMAI0R7rA2fLzKTY94 XIAMNp/Jzl1RqHHuWk5SMGRITY0nY5q+vtqXMlzLHL+95cf+ly5bzxqTAbFLWg== From: Kory Maincent <kory.maincent@bootlin.com> Date: Thu, 15 Feb 2024 17:02:53 +0100 Subject: [PATCH net-next v4 12/17] net: pse-pd: Add support for setup_pi_matrix callback Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240215-feature_poe-v4-12-35bb4c23266c@bootlin.com> References: <20240215-feature_poe-v4-0-35bb4c23266c@bootlin.com> In-Reply-To: <20240215-feature_poe-v4-0-35bb4c23266c@bootlin.com> To: "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Jonathan Corbet <corbet@lwn.net>, Luis Chamberlain <mcgrof@kernel.org>, Russ Weight <russ.weight@linux.dev>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, "Rafael J. Wysocki" <rafael@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Oleksij Rempel <o.rempel@pengutronix.de>, Mark Brown <broonie@kernel.org>, Frank Rowand <frowand.list@gmail.com>, Andrew Lunn <andrew@lunn.ch>, Heiner Kallweit <hkallweit1@gmail.com>, Russell King <linux@armlinux.org.uk> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, devicetree@vger.kernel.org, Dent Project <dentproject@linuxfoundation.org>, Kory Maincent <kory.maincent@bootlin.com> X-Mailer: b4 0.12.4 X-GND-Sasl: kory.maincent@bootlin.com X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790982004254329826 X-GMAIL-MSGID: 1790982004254329826 |
Series |
net: Add support for Power over Ethernet (PoE)
|
|
Commit Message
Köry Maincent
Feb. 15, 2024, 4:02 p.m. UTC
Implement setup_pi_matrix callback to configure the PSE PI matrix. This
functionality is invoked before registering the PSE and following the core
parsing of the pse_pis devicetree subnode.
This patch is sponsored by Dent Project <dentproject@linuxfoundation.org>.
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---
Changes in v3:
- New patch
---
drivers/net/pse-pd/pse_core.c | 6 ++++++
include/linux/pse-pd/pse.h | 2 ++
2 files changed, 8 insertions(+)
diff --git a/drivers/net/pse-pd/pse_core.c b/drivers/net/pse-pd/pse_core.c index e03d36793d18..59427c79858c 100644 --- a/drivers/net/pse-pd/pse_core.c +++ b/drivers/net/pse-pd/pse_core.c @@ -178,6 +178,12 @@ int pse_controller_register(struct pse_controller_dev *pcdev) if (ret) return ret; + if (pcdev->ops->setup_pi_matrix) { + ret = pcdev->ops->setup_pi_matrix(pcdev); + if (ret) + return ret; + } + mutex_lock(&pse_list_mutex); list_add(&pcdev->list, &pse_controller_list); mutex_unlock(&pse_list_mutex); diff --git a/include/linux/pse-pd/pse.h b/include/linux/pse-pd/pse.h index 6c48668cebe3..cf0eebb3b0a9 100644 --- a/include/linux/pse-pd/pse.h +++ b/include/linux/pse-pd/pse.h @@ -50,6 +50,7 @@ struct pse_control_status { * * @ethtool_get_status: get PSE control status for ethtool interface * @ethtool_set_config: set PSE control configuration over ethtool interface + * @setup_pi_matrix: setup PI matrix of the PSE controller */ struct pse_controller_ops { int (*ethtool_get_status)(struct pse_controller_dev *pcdev, @@ -58,6 +59,7 @@ struct pse_controller_ops { int (*ethtool_set_config)(struct pse_controller_dev *pcdev, unsigned long id, struct netlink_ext_ack *extack, const struct pse_control_config *config); + int (*setup_pi_matrix)(struct pse_controller_dev *pcdev); }; struct module;