Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ===== Overview ==== Discussion of low-level PHY structures and operations, starting at ''include/linux/phy/phy.h'' and seeing where it goes from there. ===== Structures -- struct phy and associated stuff ===== ==== struct phy ==== <code> struct phy { struct device dev; int id; const struct phy_ops *ops; struct mutex mutex; int init_count; int power_count; struct phy_attrs attrs; struct regulator *pwr; }; </code> ==== struct phy_attrs and PHY mode ==== <code> struct phy_attrs { u32 bus_width; enum phy_mode mode; }; </code> <code> enum phy_mode { PHY_MODE_INVALID, PHY_MODE_USB_HOST, PHY_MODE_USB_HOST_LS, PHY_MODE_USB_HOST_FS, PHY_MODE_USB_HOST_HS, PHY_MODE_USB_HOST_SS, PHY_MODE_USB_DEVICE, PHY_MODE_USB_DEVICE_LS, PHY_MODE_USB_DEVICE_FS, PHY_MODE_USB_DEVICE_HS, PHY_MODE_USB_DEVICE_SS, PHY_MODE_USB_OTG, PHY_MODE_SGMII, PHY_MODE_2500SGMII, PHY_MODE_QSGMII, PHY_MODE_10GKR, PHY_MODE_UFS_HS_A, PHY_MODE_UFS_HS_B, PHY_MODE_PCIE, }; </code> ==== struct phy_ops ==== <code> struct phy_ops { int (*init)(struct phy *phy); int (*exit)(struct phy *phy); int (*power_on)(struct phy *phy); int (*power_off)(struct phy *phy); int (*set_mode)(struct phy *phy, enum phy_mode mode); int (*reset)(struct phy *phy); int (*calibrate)(struct phy *phy); struct module *owner; }; </code> ==== struct phy_provider ==== <code> struct phy_provider { struct device *dev; struct device_node *children; struct module *owner; struct list_head list; struct phy * (*of_xlate)(struct device *dev, struct of_phandle_args *args); }; </code> ==== struct phy_lookup ==== <code> struct phy_lookup { struct list_head node; const char *dev_id; const char *con_id; struct phy *phy; }; </code> phy.h.txt Last modified: 2018/12/27 14:49by rpjday