File: gpio_vbus.h

package info (click to toggle)
linux-2.6 2.6.32-48squeeze6
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 492,732 kB
  • ctags: 1,415,173
  • sloc: ansic: 7,636,125; asm: 225,072; xml: 32,978; makefile: 19,313; perl: 11,533; sh: 3,561; cpp: 3,365; yacc: 2,964; python: 2,893; lex: 1,824; lisp: 218; pascal: 116; awk: 109; sed: 30
file content (30 lines) | stat: -rw-r--r-- 1,051 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
 * A simple GPIO VBUS sensing driver for B peripheral only devices
 * with internal transceivers.
 * Optionally D+ pullup can be controlled by a second GPIO.
 *
 * Copyright (c) 2008 Philipp Zabel <philipp.zabel@gmail.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 */

/**
 * struct gpio_vbus_mach_info - configuration for gpio_vbus
 * @gpio_vbus: VBUS sensing GPIO
 * @gpio_pullup: optional D+ or D- pullup GPIO (else negative/invalid)
 * @gpio_vbus_inverted: true if gpio_vbus is active low
 * @gpio_pullup_inverted: true if gpio_pullup is active low
 *
 * The VBUS sensing GPIO should have a pulldown, which will normally be
 * part of a resistor ladder turning a 4.0V-5.25V level on VBUS into a
 * value the GPIO detects as active.  Some systems will use comparators.
 */
struct gpio_vbus_mach_info {
	int gpio_vbus;
	int gpio_pullup;
	bool gpio_vbus_inverted;
	bool gpio_pullup_inverted;
};