]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - include/linux/usb/gpio_vbus.h
Merge tag 'drm-fixes-for-v4.15-rc8' of git://people.freedesktop.org/~airlied/linux
[mirror_ubuntu-bionic-kernel.git] / include / linux / usb / gpio_vbus.h
CommitLineData
5fd54ace 1// SPDX-License-Identifier: GPL-2.0
6084f1bf
PZ
2/*
3 * A simple GPIO VBUS sensing driver for B peripheral only devices
4 * with internal transceivers.
5 * Optionally D+ pullup can be controlled by a second GPIO.
6 *
7 * Copyright (c) 2008 Philipp Zabel <philipp.zabel@gmail.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 *
13 */
14
15/**
16 * struct gpio_vbus_mach_info - configuration for gpio_vbus
17 * @gpio_vbus: VBUS sensing GPIO
18 * @gpio_pullup: optional D+ or D- pullup GPIO (else negative/invalid)
19 * @gpio_vbus_inverted: true if gpio_vbus is active low
20 * @gpio_pullup_inverted: true if gpio_pullup is active low
7cbb062a 21 * @wakeup: configure gpio_vbus as a wake-up source
6084f1bf
PZ
22 *
23 * The VBUS sensing GPIO should have a pulldown, which will normally be
24 * part of a resistor ladder turning a 4.0V-5.25V level on VBUS into a
25 * value the GPIO detects as active. Some systems will use comparators.
26 */
27struct gpio_vbus_mach_info {
28 int gpio_vbus;
29 int gpio_pullup;
30 bool gpio_vbus_inverted;
31 bool gpio_pullup_inverted;
7cbb062a 32 bool wakeup;
6084f1bf 33};