Searched refs:gpio_vbus (Results 1 - 17 of 17) sorted by relevance

/linux-4.4.14/drivers/usb/phy/
H A Dphy-gpio-vbus-usb.c23 #include <linux/usb/gpio_vbus.h>
60 static void set_vbus_draw(struct gpio_vbus_data *gpio_vbus, unsigned mA) set_vbus_draw() argument
62 struct regulator *vbus_draw = gpio_vbus->vbus_draw; set_vbus_draw()
69 enabled = gpio_vbus->vbus_draw_enabled; set_vbus_draw()
76 gpio_vbus->vbus_draw_enabled = 1; set_vbus_draw()
83 gpio_vbus->vbus_draw_enabled = 0; set_vbus_draw()
86 gpio_vbus->mA = mA; set_vbus_draw()
93 vbus = gpio_get_value(pdata->gpio_vbus); is_vbus_powered()
102 struct gpio_vbus_data *gpio_vbus = gpio_vbus_work() local
104 struct gpio_vbus_mach_info *pdata = dev_get_platdata(gpio_vbus->dev); gpio_vbus_work()
107 if (!gpio_vbus->phy.otg->gadget) gpio_vbus_work()
111 if ((vbus ^ gpio_vbus->vbus) == 0) gpio_vbus_work()
113 gpio_vbus->vbus = vbus; gpio_vbus_work()
124 gpio_vbus->phy.otg->state = OTG_STATE_B_PERIPHERAL; gpio_vbus_work()
125 gpio_vbus->phy.last_event = status; gpio_vbus_work()
126 usb_gadget_vbus_connect(gpio_vbus->phy.otg->gadget); gpio_vbus_work()
129 set_vbus_draw(gpio_vbus, 100); gpio_vbus_work()
135 atomic_notifier_call_chain(&gpio_vbus->phy.notifier, gpio_vbus_work()
136 status, gpio_vbus->phy.otg->gadget); gpio_vbus_work()
137 usb_phy_set_event(&gpio_vbus->phy, USB_EVENT_ENUMERATED); gpio_vbus_work()
143 set_vbus_draw(gpio_vbus, 0); gpio_vbus_work()
145 usb_gadget_vbus_disconnect(gpio_vbus->phy.otg->gadget); gpio_vbus_work()
147 gpio_vbus->phy.otg->state = OTG_STATE_B_IDLE; gpio_vbus_work()
148 gpio_vbus->phy.last_event = status; gpio_vbus_work()
150 atomic_notifier_call_chain(&gpio_vbus->phy.notifier, gpio_vbus_work()
151 status, gpio_vbus->phy.otg->gadget); gpio_vbus_work()
152 usb_phy_set_event(&gpio_vbus->phy, USB_EVENT_NONE); gpio_vbus_work()
161 struct gpio_vbus_data *gpio_vbus = platform_get_drvdata(pdev); gpio_vbus_irq() local
162 struct usb_otg *otg = gpio_vbus->phy.otg; gpio_vbus_irq()
169 schedule_delayed_work(&gpio_vbus->work, msecs_to_jiffies(100)); gpio_vbus_irq()
180 struct gpio_vbus_data *gpio_vbus; gpio_vbus_set_peripheral() local
185 gpio_vbus = container_of(otg->usb_phy, struct gpio_vbus_data, phy); gpio_vbus_set_peripheral()
186 pdev = to_platform_device(gpio_vbus->dev); gpio_vbus_set_peripheral()
187 pdata = dev_get_platdata(gpio_vbus->dev); gpio_vbus_set_peripheral()
198 set_vbus_draw(gpio_vbus, 0); gpio_vbus_set_peripheral()
211 gpio_vbus->vbus = 0; /* start with disconnected */ gpio_vbus_set_peripheral()
212 gpio_vbus_irq(gpio_vbus->irq, pdev); gpio_vbus_set_peripheral()
219 struct gpio_vbus_data *gpio_vbus; gpio_vbus_set_power() local
221 gpio_vbus = container_of(phy, struct gpio_vbus_data, phy); gpio_vbus_set_power()
224 set_vbus_draw(gpio_vbus, mA); gpio_vbus_set_power()
231 struct gpio_vbus_data *gpio_vbus; gpio_vbus_set_suspend() local
233 gpio_vbus = container_of(phy, struct gpio_vbus_data, phy); gpio_vbus_set_suspend()
241 return gpio_vbus_set_power(phy, suspend ? 0 : gpio_vbus->mA); gpio_vbus_set_suspend()
249 struct gpio_vbus_data *gpio_vbus; gpio_vbus_probe() local
254 if (!pdata || !gpio_is_valid(pdata->gpio_vbus)) gpio_vbus_probe()
256 gpio = pdata->gpio_vbus; gpio_vbus_probe()
258 gpio_vbus = devm_kzalloc(&pdev->dev, sizeof(struct gpio_vbus_data), gpio_vbus_probe()
260 if (!gpio_vbus) gpio_vbus_probe()
263 gpio_vbus->phy.otg = devm_kzalloc(&pdev->dev, sizeof(struct usb_otg), gpio_vbus_probe()
265 if (!gpio_vbus->phy.otg) gpio_vbus_probe()
268 platform_set_drvdata(pdev, gpio_vbus); gpio_vbus_probe()
269 gpio_vbus->dev = &pdev->dev; gpio_vbus_probe()
270 gpio_vbus->phy.label = "gpio-vbus"; gpio_vbus_probe()
271 gpio_vbus->phy.dev = gpio_vbus->dev; gpio_vbus_probe()
272 gpio_vbus->phy.set_power = gpio_vbus_set_power; gpio_vbus_probe()
273 gpio_vbus->phy.set_suspend = gpio_vbus_set_suspend; gpio_vbus_probe()
275 gpio_vbus->phy.otg->state = OTG_STATE_UNDEFINED; gpio_vbus_probe()
276 gpio_vbus->phy.otg->usb_phy = &gpio_vbus->phy; gpio_vbus_probe()
277 gpio_vbus->phy.otg->set_peripheral = gpio_vbus_set_peripheral; gpio_vbus_probe()
296 gpio_vbus->irq = irq; gpio_vbus_probe()
319 INIT_DELAYED_WORK(&gpio_vbus->work, gpio_vbus_work); gpio_vbus_probe()
321 gpio_vbus->vbus_draw = devm_regulator_get(&pdev->dev, "vbus_draw"); gpio_vbus_probe()
322 if (IS_ERR(gpio_vbus->vbus_draw)) { gpio_vbus_probe()
324 PTR_ERR(gpio_vbus->vbus_draw)); gpio_vbus_probe()
325 gpio_vbus->vbus_draw = NULL; gpio_vbus_probe()
329 err = usb_add_phy(&gpio_vbus->phy, USB_PHY_TYPE_USB2); gpio_vbus_probe()
343 struct gpio_vbus_data *gpio_vbus = platform_get_drvdata(pdev); gpio_vbus_remove() local
346 cancel_delayed_work_sync(&gpio_vbus->work); gpio_vbus_remove()
348 usb_remove_phy(&gpio_vbus->phy); gpio_vbus_remove()
356 struct gpio_vbus_data *gpio_vbus = dev_get_drvdata(dev); gpio_vbus_pm_suspend() local
359 enable_irq_wake(gpio_vbus->irq); gpio_vbus_pm_suspend()
366 struct gpio_vbus_data *gpio_vbus = dev_get_drvdata(dev); gpio_vbus_pm_resume() local
369 disable_irq_wake(gpio_vbus->irq); gpio_vbus_pm_resume()
/linux-4.4.14/include/linux/usb/
H A Dgpio_vbus.h15 * struct gpio_vbus_mach_info - configuration for gpio_vbus
16 * @gpio_vbus: VBUS sensing GPIO
18 * @gpio_vbus_inverted: true if gpio_vbus is active low
20 * @wakeup: configure gpio_vbus as a wake-up source
27 int gpio_vbus; member in struct:gpio_vbus_mach_info
/linux-4.4.14/arch/arm/mach-pxa/
H A Dcolibri-pxa320.c19 #include <linux/usb/gpio_vbus.h>
151 .gpio_vbus = mfp_to_gpio(MFP_PIN_GPIO96), colibri_pxa320_init_eth()
H A Dgumstix.c29 #include <linux/usb/gpio_vbus.h>
111 .gpio_vbus = GPIO_GUMSTIX_USB_GPIOn,
H A Dhx4700.c40 #include <linux/usb/gpio_vbus.h>
585 .gpio_vbus = GPIOD14_nUSBC_DETECT,
589 static struct platform_device gpio_vbus = { variable in typeref:struct:platform_device
838 &gpio_vbus,
H A Dmagician.c33 #include <linux/usb/gpio_vbus.h>
514 .gpio_vbus = EGPIO_MAGICIAN_CABLE_VBUS,
517 static struct platform_device gpio_vbus = { variable in typeref:struct:platform_device
868 &gpio_vbus,
H A Dmioa701.c40 #include <linux/usb/gpio_vbus.h>
386 .gpio_vbus = GPIO13_nUSB_DETECT,
686 MIO_SIMPLE_DEV(gpio_vbus, "gpio-vbus", &gpio_vbus_data);
698 &gpio_vbus,
H A Dpalmt5.c30 #include <linux/usb/gpio_vbus.h>
H A Dpalm27x.c23 #include <linux/usb/gpio_vbus.h>
184 palm27x_udc_info.gpio_vbus = vbus; palm27x_udc_init()
H A Dpalmtc.c29 #include <linux/usb/gpio_vbus.h>
315 .gpio_vbus = GPIO_NR_PALMTC_USB_DETECT_N, palmtc_mkp_init()
H A Dpalmte2.c29 #include <linux/usb/gpio_vbus.h>
198 .gpio_vbus = GPIO_NR_PALMTE2_USB_DETECT_N,
H A Deseries.c25 #include <linux/usb/gpio_vbus.h>
55 .gpio_vbus = GPIO_E7XX_USB_DISC,
892 .gpio_vbus = GPIO_E800_USB_DISC,
H A Dvpac270.c19 #include <linux/usb/gpio_vbus.h>
349 .gpio_vbus = GPIO41_VPAC270_UDC_DETECT, vpac270_uhc_init()
H A Dtosa.c39 #include <linux/usb/gpio_vbus.h>
248 .gpio_vbus = TOSA_GPIO_USB_IN,
H A Dpalmtx.c30 #include <linux/usb/gpio_vbus.h>
H A Dpalmz72.c32 #include <linux/usb/gpio_vbus.h>
/linux-4.4.14/arch/arm/mach-s3c64xx/
H A Dmach-smartq.c22 #include <linux/usb/gpio_vbus.h>
133 .gpio_vbus = S3C64XX_GPL(9),

Completed in 176 milliseconds