mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
usb: add bus type for USB ULPI
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: Heikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by: David Cohen <david.a.cohen@linux.intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
parent
3521a399da
commit
289fcff4bc
11 changed files with 521 additions and 132 deletions
23
include/linux/ulpi/interface.h
Normal file
23
include/linux/ulpi/interface.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
#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 */
|
Loading…
Add table
Add a link
Reference in a new issue