Lines Matching refs:flags
44 unsigned int flags = ULPI_OTG_CTRL_DP_PULLDOWN | in ulpi_set_otg_flags() local
47 if (phy->flags & ULPI_OTG_ID_PULLUP) in ulpi_set_otg_flags()
48 flags |= ULPI_OTG_CTRL_ID_PULLUP; in ulpi_set_otg_flags()
54 if (phy->flags & ULPI_OTG_DP_PULLDOWN_DIS) in ulpi_set_otg_flags()
55 flags &= ~ULPI_OTG_CTRL_DP_PULLDOWN; in ulpi_set_otg_flags()
57 if (phy->flags & ULPI_OTG_DM_PULLDOWN_DIS) in ulpi_set_otg_flags()
58 flags &= ~ULPI_OTG_CTRL_DM_PULLDOWN; in ulpi_set_otg_flags()
60 if (phy->flags & ULPI_OTG_EXTVBUSIND) in ulpi_set_otg_flags()
61 flags |= ULPI_OTG_CTRL_EXTVBUSIND; in ulpi_set_otg_flags()
63 return usb_phy_io_write(phy, flags, ULPI_OTG_CTRL); in ulpi_set_otg_flags()
68 unsigned int flags = 0; in ulpi_set_fc_flags() local
74 if (phy->flags & ULPI_FC_HS) in ulpi_set_fc_flags()
75 flags |= ULPI_FUNC_CTRL_HIGH_SPEED; in ulpi_set_fc_flags()
76 else if (phy->flags & ULPI_FC_LS) in ulpi_set_fc_flags()
77 flags |= ULPI_FUNC_CTRL_LOW_SPEED; in ulpi_set_fc_flags()
78 else if (phy->flags & ULPI_FC_FS4LS) in ulpi_set_fc_flags()
79 flags |= ULPI_FUNC_CTRL_FS4LS; in ulpi_set_fc_flags()
81 flags |= ULPI_FUNC_CTRL_FULL_SPEED; in ulpi_set_fc_flags()
83 if (phy->flags & ULPI_FC_TERMSEL) in ulpi_set_fc_flags()
84 flags |= ULPI_FUNC_CTRL_TERMSELECT; in ulpi_set_fc_flags()
90 if (phy->flags & ULPI_FC_OP_NODRV) in ulpi_set_fc_flags()
91 flags |= ULPI_FUNC_CTRL_OPMODE_NONDRIVING; in ulpi_set_fc_flags()
92 else if (phy->flags & ULPI_FC_OP_DIS_NRZI) in ulpi_set_fc_flags()
93 flags |= ULPI_FUNC_CTRL_OPMODE_DISABLE_NRZI; in ulpi_set_fc_flags()
94 else if (phy->flags & ULPI_FC_OP_NSYNC_NEOP) in ulpi_set_fc_flags()
95 flags |= ULPI_FUNC_CTRL_OPMODE_NOSYNC_NOEOP; in ulpi_set_fc_flags()
97 flags |= ULPI_FUNC_CTRL_OPMODE_NORMAL; in ulpi_set_fc_flags()
103 flags |= ULPI_FUNC_CTRL_SUSPENDM; in ulpi_set_fc_flags()
105 return usb_phy_io_write(phy, flags, ULPI_FUNC_CTRL); in ulpi_set_fc_flags()
110 unsigned int flags = 0; in ulpi_set_ic_flags() local
112 if (phy->flags & ULPI_IC_AUTORESUME) in ulpi_set_ic_flags()
113 flags |= ULPI_IFC_CTRL_AUTORESUME; in ulpi_set_ic_flags()
115 if (phy->flags & ULPI_IC_EXTVBUS_INDINV) in ulpi_set_ic_flags()
116 flags |= ULPI_IFC_CTRL_EXTERNAL_VBUS; in ulpi_set_ic_flags()
118 if (phy->flags & ULPI_IC_IND_PASSTHRU) in ulpi_set_ic_flags()
119 flags |= ULPI_IFC_CTRL_PASSTHRU; in ulpi_set_ic_flags()
121 if (phy->flags & ULPI_IC_PROTECT_DIS) in ulpi_set_ic_flags()
122 flags |= ULPI_IFC_CTRL_PROTECT_IFC_DISABLE; in ulpi_set_ic_flags()
124 return usb_phy_io_write(phy, flags, ULPI_IFC_CTRL); in ulpi_set_ic_flags()
202 unsigned int flags = usb_phy_io_read(phy, ULPI_IFC_CTRL); in ulpi_set_host() local
211 flags &= ~(ULPI_IFC_CTRL_6_PIN_SERIAL_MODE | in ulpi_set_host()
215 if (phy->flags & ULPI_IC_6PIN_SERIAL) in ulpi_set_host()
216 flags |= ULPI_IFC_CTRL_6_PIN_SERIAL_MODE; in ulpi_set_host()
217 else if (phy->flags & ULPI_IC_3PIN_SERIAL) in ulpi_set_host()
218 flags |= ULPI_IFC_CTRL_3_PIN_SERIAL_MODE; in ulpi_set_host()
219 else if (phy->flags & ULPI_IC_CARKIT) in ulpi_set_host()
220 flags |= ULPI_IFC_CTRL_CARKITMODE; in ulpi_set_host()
222 return usb_phy_io_write(phy, flags, ULPI_IFC_CTRL); in ulpi_set_host()
228 unsigned int flags = usb_phy_io_read(phy, ULPI_OTG_CTRL); in ulpi_set_vbus() local
230 flags &= ~(ULPI_OTG_CTRL_DRVVBUS | ULPI_OTG_CTRL_DRVVBUS_EXT); in ulpi_set_vbus()
233 if (phy->flags & ULPI_OTG_DRVVBUS) in ulpi_set_vbus()
234 flags |= ULPI_OTG_CTRL_DRVVBUS; in ulpi_set_vbus()
236 if (phy->flags & ULPI_OTG_DRVVBUS_EXT) in ulpi_set_vbus()
237 flags |= ULPI_OTG_CTRL_DRVVBUS_EXT; in ulpi_set_vbus()
240 return usb_phy_io_write(phy, flags, ULPI_OTG_CTRL); in ulpi_set_vbus()
245 unsigned int flags) in otg_ulpi_init() argument
248 phy->flags = flags; in otg_ulpi_init()
260 unsigned int flags) in otg_ulpi_create() argument
275 otg_ulpi_init(phy, otg, ops, flags); in otg_ulpi_create()
284 unsigned int flags) in devm_otg_ulpi_create() argument
299 otg_ulpi_init(phy, otg, ops, flags); in devm_otg_ulpi_create()