blob: 837bba604a0b7112f9acd63e41125dbedcbb5c53 [file] [log] [blame]
Philipp Zabel6084f1b2008-11-24 12:00:01 -08001/*
2 * A simple GPIO VBUS sensing driver for B peripheral only devices
3 * with internal transceivers.
4 * Optionally D+ pullup can be controlled by a second GPIO.
5 *
6 * Copyright (c) 2008 Philipp Zabel <philipp.zabel@gmail.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 */
13
14/**
15 * struct gpio_vbus_mach_info - configuration for gpio_vbus
16 * @gpio_vbus: VBUS sensing GPIO
17 * @gpio_pullup: optional D+ or D- pullup GPIO (else negative/invalid)
18 * @gpio_vbus_inverted: true if gpio_vbus is active low
19 * @gpio_pullup_inverted: true if gpio_pullup is active low
Shinya Kuribayashi7cbb0622012-05-17 20:11:06 +090020 * @wakeup: configure gpio_vbus as a wake-up source
Philipp Zabel6084f1b2008-11-24 12:00:01 -080021 *
22 * The VBUS sensing GPIO should have a pulldown, which will normally be
23 * part of a resistor ladder turning a 4.0V-5.25V level on VBUS into a
24 * value the GPIO detects as active. Some systems will use comparators.
25 */
26struct gpio_vbus_mach_info {
27 int gpio_vbus;
28 int gpio_pullup;
29 bool gpio_vbus_inverted;
30 bool gpio_pullup_inverted;
Shinya Kuribayashi7cbb0622012-05-17 20:11:06 +090031 bool wakeup;
Philipp Zabel6084f1b2008-11-24 12:00:01 -080032};