• H
    usb: add bus type for USB ULPI · 289fcff4
    Heikki Krogerus 提交于
    UTMI+ Low Pin Interface (ULPI) is a commonly used PHY
    interface for USB 2.0. The ULPI specification describes a
    standard set of registers which the vendors can extend for
    their specific needs. ULPI PHYs provide often functions
    such as charger detection and ADP sensing and probing.
    
    There are two major issues that the bus type is meant to
    tackle:
    
    Firstly, ULPI registers are accessed from the controller.
    The bus provides convenient method for the controller
    drivers to share that access with the actual PHY drivers.
    
    Secondly, there are already platforms that assume ULPI PHYs
    are runtime detected, such as many Intel Baytrail based
    platforms. They do not provide any kind of hardware
    description for the ULPI PHYs like separate ACPI device
    object that could be used to enumerate a device from.
    Signed-off-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com>
    Acked-by: NDavid Cohen <david.a.cohen@linux.intel.com>
    Signed-off-by: NFelipe Balbi <balbi@ti.com>
    289fcff4
interface.h 593 字节
#ifndef __LINUX_ULPI_INTERFACE_H
#define __LINUX_ULPI_INTERFACE_H

#include <linux/types.h>

struct ulpi;

/**
 * struct ulpi_ops - ULPI register access
 * @dev: the interface provider
 * @read: read operation for ULPI register access
 * @write: write operation for ULPI register access
 */
struct ulpi_ops {
	struct device *dev;
	int (*read)(struct ulpi_ops *ops, u8 addr);
	int (*write)(struct ulpi_ops *ops, u8 addr, u8 val);
};

struct ulpi *ulpi_register_interface(struct device *, struct ulpi_ops *);
void ulpi_unregister_interface(struct ulpi *);

#endif /* __LINUX_ULPI_INTERFACE_H */
反馈
建议
客服 返回
顶部