forked from mirrors/linux
		
	 e09bf86f3d
			
		
	
	
		e09bf86f3d
		
	
	
	
	
		
			
			Here is the big set of USB and Thunderbolt changes for 6.9-rc1.  Lots of
 tiny changes and forward progress to support new hardware and better
 support for existing devices.  Included in here are:
   - Thunderbolt (i.e. USB4) updates for newer hardware and uses as more
     people start to use the hardware
   - default USB authentication mode Kconfig and documentation update to
     make it more obvious what is going on
   - USB typec updates and enhancements
   - usual dwc3 driver updates
   - usual xhci driver updates
   - function USB (i.e. gadget) driver updates and additions
   - new device ids for lots of drivers
   - loads of other small updates, full details in the shortlog
 
 All of these, including a "last minute regression fix" have been in
 linux-next with no reported issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCZfwpzA8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ymS9QCdEuF6KJFLOrDrGS4NbZNSUPIVF6oAn350r4NX
 CMZah37Dfr1VDCOOV4gQ
 =HACL
 -----END PGP SIGNATURE-----
Merge tag 'usb-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB / Thunderbolt updates from Greg KH:
 "Here is the big set of USB and Thunderbolt changes for 6.9-rc1. Lots
  of tiny changes and forward progress to support new hardware and
  better support for existing devices. Included in here are:
   - Thunderbolt (i.e. USB4) updates for newer hardware and uses as more
     people start to use the hardware
   - default USB authentication mode Kconfig and documentation update to
     make it more obvious what is going on
   - USB typec updates and enhancements
   - usual dwc3 driver updates
   - usual xhci driver updates
   - function USB (i.e. gadget) driver updates and additions
   - new device ids for lots of drivers
   - loads of other small updates, full details in the shortlog
  All of these, including a "last minute regression fix" have been in
  linux-next with no reported issues"
* tag 'usb-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (185 commits)
  usb: usb-acpi: Fix oops due to freeing uninitialized pld pointer
  usb: gadget: net2272: Use irqflags in the call to net2272_probe_fin
  usb: gadget: tegra-xudc: Fix USB3 PHY retrieval logic
  phy: tegra: xusb: Add API to retrieve the port number of phy
  USB: gadget: pxa27x_udc: Remove unused of_gpio.h
  usb: gadget/snps_udc_plat: Remove unused of_gpio.h
  usb: ohci-pxa27x: Remove unused of_gpio.h
  usb: sl811-hcd: only defined function checkdone if QUIRK2 is defined
  usb: Clarify expected behavior of dev_bin_attrs_are_visible()
  xhci: Allow RPM on the USB controller (1022:43f7) by default
  usb: isp1760: remove SLAB_MEM_SPREAD flag usage
  usb: misc: onboard_hub: use pointer consistently in the probe function
  usb: gadget: fsl: Increase size of name buffer for endpoints
  usb: gadget: fsl: Add of device table to enable module autoloading
  usb: typec: tcpm: add support to set tcpc connector orientatition
  usb: typec: tcpci: add generic tcpci fallback compatible
  dt-bindings: usb: typec-tcpci: add tcpci fallback binding
  usb: gadget: fsl-udc: Replace custom log wrappers by dev_{err,warn,dbg,vdbg}
  usb: core: Set connect_type of ports based on DT node
  dt-bindings: usb: Add downstream facing ports to realtek binding
  ...
		
	
			
		
			
				
	
	
		
			563 lines
		
	
	
	
		
			14 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			563 lines
		
	
	
	
		
			14 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
| /* SPDX-License-Identifier: GPL-2.0-or-later */
 | |
| /*
 | |
|  * phy.h -- generic phy header file
 | |
|  *
 | |
|  * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com
 | |
|  *
 | |
|  * Author: Kishon Vijay Abraham I <kishon@ti.com>
 | |
|  */
 | |
| 
 | |
| #ifndef __DRIVERS_PHY_H
 | |
| #define __DRIVERS_PHY_H
 | |
| 
 | |
| #include <linux/err.h>
 | |
| #include <linux/of.h>
 | |
| #include <linux/device.h>
 | |
| #include <linux/pm_runtime.h>
 | |
| #include <linux/regulator/consumer.h>
 | |
| 
 | |
| #include <linux/phy/phy-dp.h>
 | |
| #include <linux/phy/phy-lvds.h>
 | |
| #include <linux/phy/phy-mipi-dphy.h>
 | |
| 
 | |
| struct phy;
 | |
| 
 | |
| 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_UFS_HS_A,
 | |
| 	PHY_MODE_UFS_HS_B,
 | |
| 	PHY_MODE_PCIE,
 | |
| 	PHY_MODE_ETHERNET,
 | |
| 	PHY_MODE_MIPI_DPHY,
 | |
| 	PHY_MODE_SATA,
 | |
| 	PHY_MODE_LVDS,
 | |
| 	PHY_MODE_DP
 | |
| };
 | |
| 
 | |
| enum phy_media {
 | |
| 	PHY_MEDIA_DEFAULT,
 | |
| 	PHY_MEDIA_SR,
 | |
| 	PHY_MEDIA_DAC,
 | |
| };
 | |
| 
 | |
| /**
 | |
|  * 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.
 | |
|  */
 | |
| 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_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);
 | |
| 
 | |
| 	void	(*release)(struct phy *phy);
 | |
| 	struct module *owner;
 | |
| };
 | |
| 
 | |
| /**
 | |
|  * 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
 | |
|  * @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;
 | |
| 	const struct phy_ops	*ops;
 | |
| 	struct mutex		mutex;
 | |
| 	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,
 | |
| 				 const struct 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;
 | |
| 	const char *dev_id;
 | |
| 	const char *con_id;
 | |
| 	struct phy *phy;
 | |
| };
 | |
| 
 | |
| #define	to_phy(a)	(container_of((a), struct phy, dev))
 | |
| 
 | |
| #define	of_phy_provider_register(dev, xlate)	\
 | |
| 	__of_phy_provider_register((dev), NULL, THIS_MODULE, (xlate))
 | |
| 
 | |
| #define	devm_of_phy_provider_register(dev, xlate)	\
 | |
| 	__devm_of_phy_provider_register((dev), NULL, THIS_MODULE, (xlate))
 | |
| 
 | |
| #define of_phy_provider_register_full(dev, children, xlate) \
 | |
| 	__of_phy_provider_register(dev, children, THIS_MODULE, xlate)
 | |
| 
 | |
| #define devm_of_phy_provider_register_full(dev, children, xlate) \
 | |
| 	__devm_of_phy_provider_register(dev, children, THIS_MODULE, xlate)
 | |
| 
 | |
| static inline void phy_set_drvdata(struct phy *phy, void *data)
 | |
| {
 | |
| 	dev_set_drvdata(&phy->dev, data);
 | |
| }
 | |
| 
 | |
| static inline void *phy_get_drvdata(struct phy *phy)
 | |
| {
 | |
| 	return dev_get_drvdata(&phy->dev);
 | |
| }
 | |
| 
 | |
| #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);
 | |
| void phy_pm_runtime_allow(struct phy *phy);
 | |
| void phy_pm_runtime_forbid(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);
 | |
| 
 | |
| static inline enum phy_mode phy_get_mode(struct phy *phy)
 | |
| {
 | |
| 	return phy->attrs.mode;
 | |
| }
 | |
| int phy_reset(struct phy *phy);
 | |
| int phy_calibrate(struct phy *phy);
 | |
| int phy_notify_connect(struct phy *phy, int port);
 | |
| int phy_notify_disconnect(struct phy *phy, int port);
 | |
| static inline int phy_get_bus_width(struct phy *phy)
 | |
| {
 | |
| 	return phy->attrs.bus_width;
 | |
| }
 | |
| static inline void phy_set_bus_width(struct phy *phy, int bus_width)
 | |
| {
 | |
| 	phy->attrs.bus_width = bus_width;
 | |
| }
 | |
| struct phy *phy_get(struct device *dev, const char *string);
 | |
| struct phy *devm_phy_get(struct device *dev, const char *string);
 | |
| struct phy *devm_phy_optional_get(struct device *dev, const char *string);
 | |
| struct phy *devm_of_phy_get(struct device *dev, struct device_node *np,
 | |
| 			    const char *con_id);
 | |
| struct phy *devm_of_phy_optional_get(struct device *dev, struct device_node *np,
 | |
| 				     const char *con_id);
 | |
| struct phy *devm_of_phy_get_by_index(struct device *dev, struct device_node *np,
 | |
| 				     int index);
 | |
| void of_phy_put(struct phy *phy);
 | |
| void phy_put(struct device *dev, struct phy *phy);
 | |
| void devm_phy_put(struct device *dev, struct phy *phy);
 | |
| struct phy *of_phy_get(struct device_node *np, const char *con_id);
 | |
| struct phy *of_phy_simple_xlate(struct device *dev,
 | |
| 				const struct of_phandle_args *args);
 | |
| struct phy *phy_create(struct device *dev, struct device_node *node,
 | |
| 		       const struct phy_ops *ops);
 | |
| struct phy *devm_phy_create(struct device *dev, struct device_node *node,
 | |
| 			    const struct phy_ops *ops);
 | |
| void phy_destroy(struct phy *phy);
 | |
| void devm_phy_destroy(struct device *dev, struct phy *phy);
 | |
| struct phy_provider *__of_phy_provider_register(struct device *dev,
 | |
| 	struct device_node *children, struct module *owner,
 | |
| 	struct phy * (*of_xlate)(struct device *dev,
 | |
| 				 const struct of_phandle_args *args));
 | |
| struct phy_provider *__devm_of_phy_provider_register(struct device *dev,
 | |
| 	struct device_node *children, struct module *owner,
 | |
| 	struct phy * (*of_xlate)(struct device *dev,
 | |
| 				 const struct of_phandle_args *args));
 | |
| void of_phy_provider_unregister(struct phy_provider *phy_provider);
 | |
| void devm_of_phy_provider_unregister(struct device *dev,
 | |
| 	struct phy_provider *phy_provider);
 | |
| int phy_create_lookup(struct phy *phy, const char *con_id, const char *dev_id);
 | |
| void phy_remove_lookup(struct phy *phy, const char *con_id, const char *dev_id);
 | |
| #else
 | |
| static inline int phy_pm_runtime_get(struct phy *phy)
 | |
| {
 | |
| 	if (!phy)
 | |
| 		return 0;
 | |
| 	return -ENOSYS;
 | |
| }
 | |
| 
 | |
| static inline int phy_pm_runtime_get_sync(struct phy *phy)
 | |
| {
 | |
| 	if (!phy)
 | |
| 		return 0;
 | |
| 	return -ENOSYS;
 | |
| }
 | |
| 
 | |
| static inline int phy_pm_runtime_put(struct phy *phy)
 | |
| {
 | |
| 	if (!phy)
 | |
| 		return 0;
 | |
| 	return -ENOSYS;
 | |
| }
 | |
| 
 | |
| static inline int phy_pm_runtime_put_sync(struct phy *phy)
 | |
| {
 | |
| 	if (!phy)
 | |
| 		return 0;
 | |
| 	return -ENOSYS;
 | |
| }
 | |
| 
 | |
| static inline void phy_pm_runtime_allow(struct phy *phy)
 | |
| {
 | |
| 	return;
 | |
| }
 | |
| 
 | |
| static inline void phy_pm_runtime_forbid(struct phy *phy)
 | |
| {
 | |
| 	return;
 | |
| }
 | |
| 
 | |
| static inline int phy_init(struct phy *phy)
 | |
| {
 | |
| 	if (!phy)
 | |
| 		return 0;
 | |
| 	return -ENOSYS;
 | |
| }
 | |
| 
 | |
| static inline int phy_exit(struct phy *phy)
 | |
| {
 | |
| 	if (!phy)
 | |
| 		return 0;
 | |
| 	return -ENOSYS;
 | |
| }
 | |
| 
 | |
| static inline int phy_power_on(struct phy *phy)
 | |
| {
 | |
| 	if (!phy)
 | |
| 		return 0;
 | |
| 	return -ENOSYS;
 | |
| }
 | |
| 
 | |
| static inline int phy_power_off(struct phy *phy)
 | |
| {
 | |
| 	if (!phy)
 | |
| 		return 0;
 | |
| 	return -ENOSYS;
 | |
| }
 | |
| 
 | |
| static inline int phy_set_mode_ext(struct phy *phy, enum phy_mode mode,
 | |
| 				   int submode)
 | |
| {
 | |
| 	if (!phy)
 | |
| 		return 0;
 | |
| 	return -ENOSYS;
 | |
| }
 | |
| 
 | |
| #define phy_set_mode(phy, mode) \
 | |
| 	phy_set_mode_ext(phy, mode, 0)
 | |
| 
 | |
| static inline int phy_set_media(struct phy *phy, enum phy_media media)
 | |
| {
 | |
| 	if (!phy)
 | |
| 		return 0;
 | |
| 	return -ENODEV;
 | |
| }
 | |
| 
 | |
| static inline int phy_set_speed(struct phy *phy, int speed)
 | |
| {
 | |
| 	if (!phy)
 | |
| 		return 0;
 | |
| 	return -ENODEV;
 | |
| }
 | |
| 
 | |
| static inline enum phy_mode phy_get_mode(struct phy *phy)
 | |
| {
 | |
| 	return PHY_MODE_INVALID;
 | |
| }
 | |
| 
 | |
| static inline int phy_reset(struct phy *phy)
 | |
| {
 | |
| 	if (!phy)
 | |
| 		return 0;
 | |
| 	return -ENOSYS;
 | |
| }
 | |
| 
 | |
| static inline int phy_calibrate(struct phy *phy)
 | |
| {
 | |
| 	if (!phy)
 | |
| 		return 0;
 | |
| 	return -ENOSYS;
 | |
| }
 | |
| 
 | |
| static inline int phy_notify_connect(struct phy *phy, int index)
 | |
| {
 | |
| 	if (!phy)
 | |
| 		return 0;
 | |
| 	return -ENOSYS;
 | |
| }
 | |
| 
 | |
| static inline int phy_notify_disconnect(struct phy *phy, int index)
 | |
| {
 | |
| 	if (!phy)
 | |
| 		return 0;
 | |
| 	return -ENOSYS;
 | |
| }
 | |
| 
 | |
| static inline int phy_configure(struct phy *phy,
 | |
| 				union phy_configure_opts *opts)
 | |
| {
 | |
| 	if (!phy)
 | |
| 		return 0;
 | |
| 
 | |
| 	return -ENOSYS;
 | |
| }
 | |
| 
 | |
| static inline int phy_validate(struct phy *phy, enum phy_mode mode, int submode,
 | |
| 			       union phy_configure_opts *opts)
 | |
| {
 | |
| 	if (!phy)
 | |
| 		return 0;
 | |
| 
 | |
| 	return -ENOSYS;
 | |
| }
 | |
| 
 | |
| static inline int phy_get_bus_width(struct phy *phy)
 | |
| {
 | |
| 	return -ENOSYS;
 | |
| }
 | |
| 
 | |
| static inline void phy_set_bus_width(struct phy *phy, int bus_width)
 | |
| {
 | |
| 	return;
 | |
| }
 | |
| 
 | |
| static inline struct phy *phy_get(struct device *dev, const char *string)
 | |
| {
 | |
| 	return ERR_PTR(-ENOSYS);
 | |
| }
 | |
| 
 | |
| static inline struct phy *devm_phy_get(struct device *dev, const char *string)
 | |
| {
 | |
| 	return ERR_PTR(-ENOSYS);
 | |
| }
 | |
| 
 | |
| static inline struct phy *devm_phy_optional_get(struct device *dev,
 | |
| 						const char *string)
 | |
| {
 | |
| 	return NULL;
 | |
| }
 | |
| 
 | |
| static inline struct phy *devm_of_phy_get(struct device *dev,
 | |
| 					  struct device_node *np,
 | |
| 					  const char *con_id)
 | |
| {
 | |
| 	return ERR_PTR(-ENOSYS);
 | |
| }
 | |
| 
 | |
| static inline struct phy *devm_of_phy_optional_get(struct device *dev,
 | |
| 						   struct device_node *np,
 | |
| 						   const char *con_id)
 | |
| {
 | |
| 	return NULL;
 | |
| }
 | |
| 
 | |
| static inline struct phy *devm_of_phy_get_by_index(struct device *dev,
 | |
| 						   struct device_node *np,
 | |
| 						   int index)
 | |
| {
 | |
| 	return ERR_PTR(-ENOSYS);
 | |
| }
 | |
| 
 | |
| static inline void of_phy_put(struct phy *phy)
 | |
| {
 | |
| }
 | |
| 
 | |
| static inline void phy_put(struct device *dev, struct phy *phy)
 | |
| {
 | |
| }
 | |
| 
 | |
| static inline void devm_phy_put(struct device *dev, struct phy *phy)
 | |
| {
 | |
| }
 | |
| 
 | |
| static inline struct phy *of_phy_get(struct device_node *np, const char *con_id)
 | |
| {
 | |
| 	return ERR_PTR(-ENOSYS);
 | |
| }
 | |
| 
 | |
| static inline struct phy *of_phy_simple_xlate(struct device *dev,
 | |
| 					      const struct of_phandle_args *args)
 | |
| {
 | |
| 	return ERR_PTR(-ENOSYS);
 | |
| }
 | |
| 
 | |
| static inline struct phy *phy_create(struct device *dev,
 | |
| 				     struct device_node *node,
 | |
| 				     const struct phy_ops *ops)
 | |
| {
 | |
| 	return ERR_PTR(-ENOSYS);
 | |
| }
 | |
| 
 | |
| static inline struct phy *devm_phy_create(struct device *dev,
 | |
| 					  struct device_node *node,
 | |
| 					  const struct phy_ops *ops)
 | |
| {
 | |
| 	return ERR_PTR(-ENOSYS);
 | |
| }
 | |
| 
 | |
| static inline void phy_destroy(struct phy *phy)
 | |
| {
 | |
| }
 | |
| 
 | |
| static inline void devm_phy_destroy(struct device *dev, struct phy *phy)
 | |
| {
 | |
| }
 | |
| 
 | |
| static inline struct phy_provider *__of_phy_provider_register(
 | |
| 	struct device *dev, struct device_node *children, struct module *owner,
 | |
| 	struct phy * (*of_xlate)(struct device *dev,
 | |
| 				 const struct of_phandle_args *args))
 | |
| {
 | |
| 	return ERR_PTR(-ENOSYS);
 | |
| }
 | |
| 
 | |
| static inline struct phy_provider *__devm_of_phy_provider_register(struct device
 | |
| 	*dev, struct device_node *children, struct module *owner,
 | |
| 	struct phy * (*of_xlate)(struct device *dev,
 | |
| 				 const struct of_phandle_args *args))
 | |
| {
 | |
| 	return ERR_PTR(-ENOSYS);
 | |
| }
 | |
| 
 | |
| static inline void of_phy_provider_unregister(struct phy_provider *phy_provider)
 | |
| {
 | |
| }
 | |
| 
 | |
| static inline void devm_of_phy_provider_unregister(struct device *dev,
 | |
| 	struct phy_provider *phy_provider)
 | |
| {
 | |
| }
 | |
| static inline int
 | |
| phy_create_lookup(struct phy *phy, const char *con_id, const char *dev_id)
 | |
| {
 | |
| 	return 0;
 | |
| }
 | |
| static inline void phy_remove_lookup(struct phy *phy, const char *con_id,
 | |
| 				     const char *dev_id) { }
 | |
| #endif
 | |
| 
 | |
| #endif /* __DRIVERS_PHY_H */
 |