diff options
author | Kory Maincent (Dent Project) <kory.maincent@bootlin.com> | 2024-04-17 16:39:50 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-04-18 18:27:01 -0700 |
commit | 47e0dd53c5eb9dab66689592523f31ea39fc32fa (patch) | |
tree | 28a3c319823cddebdbdec9f6aad26b0958eaeb87 /drivers/net/pse-pd/pse_core.c | |
parent | b58be8db6327b21e0c7fbee559b8eb47f5110efe (diff) |
net: pse-pd: Introduce PSE types enumeration
Introduce an enumeration to define PSE types (C33 or PoDL),
utilizing a bitfield for potential future support of both types.
Include 'pse_get_types' helper for external access to PSE type info.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Link: https://lore.kernel.org/r/20240417-feature_poe-v9-2-242293fd1900@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/pse-pd/pse_core.c')
-rw-r--r-- | drivers/net/pse-pd/pse_core.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/pse-pd/pse_core.c b/drivers/net/pse-pd/pse_core.c index 146b81f08a89..fed006cbc185 100644 --- a/drivers/net/pse-pd/pse_core.c +++ b/drivers/net/pse-pd/pse_core.c @@ -312,3 +312,15 @@ int pse_ethtool_set_config(struct pse_control *psec, return err; } EXPORT_SYMBOL_GPL(pse_ethtool_set_config); + +bool pse_has_podl(struct pse_control *psec) +{ + return psec->pcdev->types & ETHTOOL_PSE_PODL; +} +EXPORT_SYMBOL_GPL(pse_has_podl); + +bool pse_has_c33(struct pse_control *psec) +{ + return psec->pcdev->types & ETHTOOL_PSE_C33; +} +EXPORT_SYMBOL_GPL(pse_has_c33); |