summaryrefslogtreecommitdiff
path: root/include/generic-phy.h
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-02-10 07:56:57 -0500
committerTom Rini <trini@konsulko.com>2021-02-10 07:56:57 -0500
commitc7182c02cefb11431a79a8abb4d8a821e4a478b5 (patch)
tree0339726f49427443a47683125a57b6db6fc1d7d5 /include/generic-phy.h
parent8398d95ec238b9267b46d007d9a248c917b6fd3d (diff)
parent8bc780106c1399bd263c4283a8747889a613ca5d (diff)
Merge tag 'u-boot-amlogic-20210210' of https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic
- Add configuration helpers for MIPI D-PHY - generic-phy: add configure op - Add Amlogic AXG MIPI D-PHY driver & MIPI PCIe Analog PHY driver - odroid: add runtime detection of the N2/N2+/C4/HC4 variants
Diffstat (limited to 'include/generic-phy.h')
-rw-r--r--include/generic-phy.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/generic-phy.h b/include/generic-phy.h
index 5ab34cda03d..a17d900e4bd 100644
--- a/include/generic-phy.h
+++ b/include/generic-phy.h
@@ -122,6 +122,20 @@ struct phy_ops {
* @return 0 if OK, or a negative error code
*/
int (*power_off)(struct phy *phy);
+
+ /**
+ * configure - configure a PHY device
+ *
+ * @phy: PHY port to be configured
+ * @params: PHY Parameters, underlying data is specific to the PHY function
+ *
+ * During runtime, the PHY may need to be configured for it's main function.
+ * This function configures the PHY for it's main function following
+ * power_on/off() after beeing initialized.
+ *
+ * @return 0 if OK, or a negative error code
+ */
+ int (*configure)(struct phy *phy, void *params);
};
/**
@@ -183,6 +197,15 @@ int generic_phy_power_on(struct phy *phy);
*/
int generic_phy_power_off(struct phy *phy);
+/**
+ * generic_phy_configure() - configure a PHY device
+ *
+ * @phy: PHY port to be configured
+ * @params: PHY Parameters, underlying data is specific to the PHY function
+ * @return 0 if OK, or a negative error code
+ */
+int generic_phy_configure(struct phy *phy, void *params);
+
/**
* generic_phy_get_by_index() - Get a PHY device by integer index.