Heikki Krogerus | 289fcff | 2015-05-13 15:26:42 +0300 | [diff] [blame] | 1 | #ifndef __LINUX_ULPI_INTERFACE_H |
| 2 | #define __LINUX_ULPI_INTERFACE_H |
| 3 | |
| 4 | #include <linux/types.h> |
| 5 | |
| 6 | struct ulpi; |
Tal Shorer | 042b0f3 | 2016-08-16 19:04:51 +0300 | [diff] [blame^] | 7 | struct device; |
Heikki Krogerus | 289fcff | 2015-05-13 15:26:42 +0300 | [diff] [blame] | 8 | |
| 9 | /** |
| 10 | * struct ulpi_ops - ULPI register access |
Heikki Krogerus | 289fcff | 2015-05-13 15:26:42 +0300 | [diff] [blame] | 11 | * @read: read operation for ULPI register access |
| 12 | * @write: write operation for ULPI register access |
| 13 | */ |
| 14 | struct ulpi_ops { |
Tal Shorer | e6f7484 | 2016-08-16 19:04:50 +0300 | [diff] [blame] | 15 | int (*read)(struct device *dev, u8 addr); |
| 16 | int (*write)(struct device *dev, u8 addr, u8 val); |
Heikki Krogerus | 289fcff | 2015-05-13 15:26:42 +0300 | [diff] [blame] | 17 | }; |
| 18 | |
| 19 | struct ulpi *ulpi_register_interface(struct device *, struct ulpi_ops *); |
| 20 | void ulpi_unregister_interface(struct ulpi *); |
| 21 | |
| 22 | #endif /* __LINUX_ULPI_INTERFACE_H */ |