/** * union phy_configure_opts - Opaque generic phy configuration * * @mipi_dphy: Configuration set applicable for phys supporting * the MIPI_DPHY phy mode. * @dp: Configuration set applicable for phys supporting * the DisplayPort protocol. * @lvds: Configuration set applicable for phys supporting * the LVDS phy mode. * @hdmi: Configuration set applicable for phys supporting * the HDMI phy mode.
*/ union phy_configure_opts { struct phy_configure_opts_mipi_dphy mipi_dphy; struct phy_configure_opts_dp dp; struct phy_configure_opts_lvds lvds; struct phy_configure_opts_hdmi hdmi;
};
/** * struct phy_ops - set of function pointers for performing phy operations * @init: operation to be performed for initializing phy * @exit: operation to be performed while exiting * @power_on: powering on the phy * @power_off: powering off the phy * @set_mode: set the mode of the phy * @set_media: set the media type of the phy (optional) * @set_speed: set the speed of the phy (optional) * @reset: resetting the phy * @calibrate: calibrate the phy * @release: ops to be performed while the consumer relinquishes the PHY * @owner: the module owner containing the ops
*/ 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 submode); int (*set_media)(struct phy *phy, enum phy_media media); int (*set_speed)(struct phy *phy, int speed);
/** * @configure: * * Optional. * * Used to change the PHY parameters. phy_init() must have * been called on the phy. * * Returns: 0 if successful, an negative error code otherwise
*/ int (*configure)(struct phy *phy, union phy_configure_opts *opts);
/** * @validate: * * Optional. * * Used to check that the current set of parameters can be * handled by the phy. Implementations are free to tune the * parameters passed as arguments if needed by some * implementation detail or constraints. It must not change * any actual configuration of the PHY, so calling it as many * times as deemed fit by the consumer must have no side * effect. * * Returns: 0 if the configuration can be applied, an negative * error code otherwise
*/ int (*validate)(struct phy *phy, enum phy_mode mode, int submode, union phy_configure_opts *opts); int (*reset)(struct phy *phy); int (*calibrate)(struct phy *phy);
/* notify phy connect status change */ int (*connect)(struct phy *phy, int port); int (*disconnect)(struct phy *phy, int port);
/** * struct phy_attrs - represents phy attributes * @bus_width: Data path width implemented by PHY * @max_link_rate: Maximum link rate supported by PHY (units to be decided by producer and consumer) * @mode: PHY mode
*/ struct phy_attrs {
u32 bus_width;
u32 max_link_rate; enum phy_mode mode;
};
/** * struct phy - represents the phy device * @dev: phy device * @id: id of the phy device * @ops: function pointers for performing phy operations * @mutex: mutex to protect phy_ops * @lockdep_key: lockdep information for this mutex * @init_count: used to protect when the PHY is used by multiple consumers * @power_count: used to protect when the PHY is used by multiple consumers * @attrs: used to specify PHY specific attributes * @pwr: power regulator associated with the phy * @debugfs: debugfs directory
*/ struct phy { struct device dev; int id; conststruct phy_ops *ops; struct mutex mutex; struct lock_class_key lockdep_key; int init_count; int power_count; struct phy_attrs attrs; struct regulator *pwr; struct dentry *debugfs;
};
/** * struct phy_provider - represents the phy provider * @dev: phy provider device * @children: can be used to override the default (dev->of_node) child node * @owner: the module owner having of_xlate * @list: to maintain a linked list of PHY providers * @of_xlate: function pointer to obtain phy instance from phy pointer
*/ struct phy_provider { struct device *dev; struct device_node *children; struct module *owner; struct list_head list; struct phy * (*of_xlate)(struct device *dev, conststruct of_phandle_args *args);
};
/** * struct phy_lookup - PHY association in list of phys managed by the phy driver * @node: list node * @dev_id: the device of the association * @con_id: connection ID string on device * @phy: the phy of the association
*/ struct phy_lookup { struct list_head node; constchar *dev_id; constchar *con_id; struct phy *phy;
};
#if IS_ENABLED(CONFIG_GENERIC_PHY) int phy_pm_runtime_get(struct phy *phy); int phy_pm_runtime_get_sync(struct phy *phy); int phy_pm_runtime_put(struct phy *phy); int phy_pm_runtime_put_sync(struct phy *phy); int phy_init(struct phy *phy); int phy_exit(struct phy *phy); int phy_power_on(struct phy *phy); int phy_power_off(struct phy *phy); int phy_set_mode_ext(struct phy *phy, enum phy_mode mode, int submode); #define phy_set_mode(phy, mode) \
phy_set_mode_ext(phy, mode, 0) int phy_set_media(struct phy *phy, enum phy_media media); int phy_set_speed(struct phy *phy, int speed); int phy_configure(struct phy *phy, union phy_configure_opts *opts); int phy_validate(struct phy *phy, enum phy_mode mode, int submode, union phy_configure_opts *opts);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.