1 #ifndef __LINUX_ULPI_DRIVER_H
2 #define __LINUX_ULPI_DRIVER_H
4 #include <linux/mod_devicetable.h>
6 #include <linux/device.h>
11 * struct ulpi - describes ULPI PHY device
12 * @id: vendor and product ids for ULPI device
14 * @dev: device interface
17 struct ulpi_device_id id
;
22 #define to_ulpi_dev(d) container_of(d, struct ulpi, dev)
24 static inline void ulpi_set_drvdata(struct ulpi
*ulpi
, void *data
)
26 dev_set_drvdata(&ulpi
->dev
, data
);
29 static inline void *ulpi_get_drvdata(struct ulpi
*ulpi
)
31 return dev_get_drvdata(&ulpi
->dev
);
35 * struct ulpi_driver - describes a ULPI PHY driver
36 * @id_table: array of device identifiers supported by this driver
37 * @probe: binds this driver to ULPI device
38 * @remove: unbinds this driver from ULPI device
39 * @driver: the name and owner members must be initialized by the drivers
42 const struct ulpi_device_id
*id_table
;
43 int (*probe
)(struct ulpi
*ulpi
);
44 void (*remove
)(struct ulpi
*ulpi
);
45 struct device_driver driver
;
48 #define to_ulpi_driver(d) container_of(d, struct ulpi_driver, driver)
50 int ulpi_register_driver(struct ulpi_driver
*drv
);
51 void ulpi_unregister_driver(struct ulpi_driver
*drv
);
53 #define module_ulpi_driver(__ulpi_driver) \
54 module_driver(__ulpi_driver, ulpi_register_driver, \
55 ulpi_unregister_driver)
57 int ulpi_read(struct ulpi
*ulpi
, u8 addr
);
58 int ulpi_write(struct ulpi
*ulpi
, u8 addr
, u8 val
);
60 #endif /* __LINUX_ULPI_DRIVER_H */
This page took 0.058713 seconds and 6 git commands to generate.