2012-05-11 22:25:46 +08:00
|
|
|
/*
|
|
|
|
* Platform data for the chipidea USB dual role controller
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __LINUX_USB_CHIPIDEA_H
|
|
|
|
#define __LINUX_USB_CHIPIDEA_H
|
|
|
|
|
2012-07-07 22:56:46 +08:00
|
|
|
#include <linux/usb/otg.h>
|
|
|
|
|
2013-06-24 19:46:36 +08:00
|
|
|
struct ci_hdrc;
|
|
|
|
struct ci_hdrc_platform_data {
|
2012-05-11 22:25:46 +08:00
|
|
|
const char *name;
|
|
|
|
/* offset of the capability registers */
|
|
|
|
uintptr_t capoffset;
|
2012-05-11 22:25:55 +08:00
|
|
|
unsigned power_budget;
|
2012-07-07 22:56:46 +08:00
|
|
|
struct usb_phy *phy;
|
2013-06-13 22:59:56 +08:00
|
|
|
enum usb_phy_interface phy_mode;
|
2012-05-11 22:25:46 +08:00
|
|
|
unsigned long flags;
|
2013-06-24 19:46:36 +08:00
|
|
|
#define CI_HDRC_REGS_SHARED BIT(0)
|
|
|
|
#define CI_HDRC_REQUIRE_TRANSCEIVER BIT(1)
|
|
|
|
#define CI_HDRC_PULLUP_ON_VBUS BIT(2)
|
|
|
|
#define CI_HDRC_DISABLE_STREAMING BIT(3)
|
2013-06-13 22:59:57 +08:00
|
|
|
enum usb_dr_mode dr_mode;
|
2013-06-24 19:46:36 +08:00
|
|
|
#define CI_HDRC_CONTROLLER_RESET_EVENT 0
|
|
|
|
#define CI_HDRC_CONTROLLER_STOPPED_EVENT 1
|
|
|
|
void (*notify_event) (struct ci_hdrc *ci, unsigned event);
|
2012-05-11 22:25:46 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Default offset of capability registers */
|
|
|
|
#define DEF_CAPOFFSET 0x100
|
|
|
|
|
2013-06-24 19:46:36 +08:00
|
|
|
/* Add ci hdrc device */
|
|
|
|
struct platform_device *ci_hdrc_add_device(struct device *dev,
|
2012-07-07 22:56:41 +08:00
|
|
|
struct resource *res, int nres,
|
2013-06-24 19:46:36 +08:00
|
|
|
struct ci_hdrc_platform_data *platdata);
|
|
|
|
/* Remove ci hdrc device */
|
|
|
|
void ci_hdrc_remove_device(struct platform_device *pdev);
|
2012-07-07 22:56:41 +08:00
|
|
|
|
2012-05-11 22:25:46 +08:00
|
|
|
#endif
|