diff options
| author | Vinod Koul <vkoul@kernel.org> | 2026-01-14 18:52:57 +0530 |
|---|---|---|
| committer | Vinod Koul <vkoul@kernel.org> | 2026-01-14 18:52:57 +0530 |
| commit | a699808928937000e550a7cd5355db93ef99e236 (patch) | |
| tree | 95ac832821553ac811652bf1ddfe78795db3cf06 /include | |
| parent | be9d2cf10b46bc2c177aa9cb27b71d665d1e0e7e (diff) | |
| parent | e7556b59ba65179612bce3fa56bb53d1b4fb20db (diff) | |
Merge tag 'phy_common_properties' into next
phy common properties
Vladimir Oltean <vladimir.oltean@nxp.com> wrote:
Introduce "rx-polarity" and "tx-polarity" device tree properties with
Kunit tests
Diffstat (limited to 'include')
| -rw-r--r-- | include/dt-bindings/phy/phy.h | 4 | ||||
| -rw-r--r-- | include/linux/phy/phy-common-props.h | 32 |
2 files changed, 36 insertions, 0 deletions
diff --git a/include/dt-bindings/phy/phy.h b/include/dt-bindings/phy/phy.h index d77b372d302f..979b5dfd8353 100644 --- a/include/dt-bindings/phy/phy.h +++ b/include/dt-bindings/phy/phy.h @@ -25,4 +25,8 @@ #define PHY_TYPE_USXGMII 12 #define PHY_TYPE_XAUI 13 +#define PHY_POL_NORMAL 0 +#define PHY_POL_INVERT 1 +#define PHY_POL_AUTO 2 + #endif /* _DT_BINDINGS_PHY */ diff --git a/include/linux/phy/phy-common-props.h b/include/linux/phy/phy-common-props.h new file mode 100644 index 000000000000..680e13de4558 --- /dev/null +++ b/include/linux/phy/phy-common-props.h @@ -0,0 +1,32 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * phy-common-props.h -- Common properties for generic PHYs + * + * Copyright 2025 NXP + */ + +#ifndef __PHY_COMMON_PROPS_H +#define __PHY_COMMON_PROPS_H + +#include <dt-bindings/phy/phy.h> + +struct fwnode_handle; + +int __must_check phy_get_rx_polarity(struct fwnode_handle *fwnode, + const char *mode_name, + unsigned int supported, + unsigned int default_val, + unsigned int *val); +int __must_check phy_get_tx_polarity(struct fwnode_handle *fwnode, + const char *mode_name, + unsigned int supported, + unsigned int default_val, + unsigned int *val); +int __must_check phy_get_manual_rx_polarity(struct fwnode_handle *fwnode, + const char *mode_name, + unsigned int *val); +int __must_check phy_get_manual_tx_polarity(struct fwnode_handle *fwnode, + const char *mode_name, + unsigned int *val); + +#endif /* __PHY_COMMON_PROPS_H */ |
