blob: a2011a919eb61f39a1d1be6e01159b29b0e71113 [file] [log] [blame]
Heikki Krogerus289fcff2015-05-13 15:26:42 +03001#ifndef __LINUX_ULPI_INTERFACE_H
2#define __LINUX_ULPI_INTERFACE_H
3
4#include <linux/types.h>
5
6struct ulpi;
Tal Shorer042b0f32016-08-16 19:04:51 +03007struct device;
Heikki Krogerus289fcff2015-05-13 15:26:42 +03008
9/**
10 * struct ulpi_ops - ULPI register access
Heikki Krogerus289fcff2015-05-13 15:26:42 +030011 * @read: read operation for ULPI register access
12 * @write: write operation for ULPI register access
13 */
14struct ulpi_ops {
Tal Shorere6f74842016-08-16 19:04:50 +030015 int (*read)(struct device *dev, u8 addr);
16 int (*write)(struct device *dev, u8 addr, u8 val);
Heikki Krogerus289fcff2015-05-13 15:26:42 +030017};
18
Tal Shorerb9454f92016-08-16 19:04:52 +030019struct ulpi *ulpi_register_interface(struct device *, const struct ulpi_ops *);
Heikki Krogerus289fcff2015-05-13 15:26:42 +030020void ulpi_unregister_interface(struct ulpi *);
21
22#endif /* __LINUX_ULPI_INTERFACE_H */