Lines Matching +full:otg +full:- +full:id

1 // SPDX-License-Identifier: GPL-2.0+
17 #include <linux/usb/otg.h>
22 unsigned int id; member
29 .id = (_id), \
47 if (phy->flags & ULPI_OTG_ID_PULLUP) in ulpi_set_otg_flags()
54 if (phy->flags & ULPI_OTG_DP_PULLDOWN_DIS) in ulpi_set_otg_flags()
57 if (phy->flags & ULPI_OTG_DM_PULLDOWN_DIS) in ulpi_set_otg_flags()
60 if (phy->flags & ULPI_OTG_EXTVBUSIND) in ulpi_set_otg_flags()
74 if (phy->flags & ULPI_FC_HS) in ulpi_set_fc_flags()
76 else if (phy->flags & ULPI_FC_LS) in ulpi_set_fc_flags()
78 else if (phy->flags & ULPI_FC_FS4LS) in ulpi_set_fc_flags()
83 if (phy->flags & ULPI_FC_TERMSEL) in ulpi_set_fc_flags()
90 if (phy->flags & ULPI_FC_OP_NODRV) in ulpi_set_fc_flags()
92 else if (phy->flags & ULPI_FC_OP_DIS_NRZI) in ulpi_set_fc_flags()
94 else if (phy->flags & ULPI_FC_OP_NSYNC_NEOP) in ulpi_set_fc_flags()
112 if (phy->flags & ULPI_IC_AUTORESUME) in ulpi_set_ic_flags()
115 if (phy->flags & ULPI_IC_EXTVBUS_INDINV) in ulpi_set_ic_flags()
118 if (phy->flags & ULPI_IC_IND_PASSTHRU) in ulpi_set_ic_flags()
121 if (phy->flags & ULPI_IC_PROTECT_DIS) in ulpi_set_ic_flags()
158 return -ENODEV; in ulpi_check_integrity()
174 ret = usb_phy_io_read(phy, ULPI_PRODUCT_ID_HIGH - i); in ulpi_init()
182 pr_info("ULPI transceiver vendor/product ID 0x%04x/0x%04x\n", vid, pid); in ulpi_init()
185 if (ulpi_ids[i].id == ULPI_ID(vid, pid)) { in ulpi_init()
199 static int ulpi_set_host(struct usb_otg *otg, struct usb_bus *host) in ulpi_set_host() argument
201 struct usb_phy *phy = otg->usb_phy; in ulpi_set_host()
205 otg->host = NULL; in ulpi_set_host()
209 otg->host = host; in ulpi_set_host()
215 if (phy->flags & ULPI_IC_6PIN_SERIAL) in ulpi_set_host()
217 else if (phy->flags & ULPI_IC_3PIN_SERIAL) in ulpi_set_host()
219 else if (phy->flags & ULPI_IC_CARKIT) in ulpi_set_host()
225 static int ulpi_set_vbus(struct usb_otg *otg, bool on) in ulpi_set_vbus() argument
227 struct usb_phy *phy = otg->usb_phy; in ulpi_set_vbus()
233 if (phy->flags & ULPI_OTG_DRVVBUS) in ulpi_set_vbus()
236 if (phy->flags & ULPI_OTG_DRVVBUS_EXT) in ulpi_set_vbus()
243 static void otg_ulpi_init(struct usb_phy *phy, struct usb_otg *otg, in otg_ulpi_init() argument
247 phy->label = "ULPI"; in otg_ulpi_init()
248 phy->flags = flags; in otg_ulpi_init()
249 phy->io_ops = ops; in otg_ulpi_init()
250 phy->otg = otg; in otg_ulpi_init()
251 phy->init = ulpi_init; in otg_ulpi_init()
253 otg->usb_phy = phy; in otg_ulpi_init()
254 otg->set_host = ulpi_set_host; in otg_ulpi_init()
255 otg->set_vbus = ulpi_set_vbus; in otg_ulpi_init()
263 struct usb_otg *otg; in otg_ulpi_create() local
269 otg = kzalloc(sizeof(*otg), GFP_KERNEL); in otg_ulpi_create()
270 if (!otg) { in otg_ulpi_create()
275 otg_ulpi_init(phy, otg, ops, flags); in otg_ulpi_create()
287 struct usb_otg *otg; in devm_otg_ulpi_create() local
293 otg = devm_kzalloc(dev, sizeof(*otg), GFP_KERNEL); in devm_otg_ulpi_create()
294 if (!otg) { in devm_otg_ulpi_create()
299 otg_ulpi_init(phy, otg, ops, flags); in devm_otg_ulpi_create()