lkml.org 
[lkml]   [2012]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/3] pch_udc: Specifies GPI port number at configuration.
Date
Problem:
The GPIO ports used for detecting VBUS may be different
on each platform.
This should be easily modifiable.

Solution:
In configuration, GPI port number is specified.

Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
---
drivers/usb/gadget/Kconfig | 12 ++++++++++++
drivers/usb/gadget/pch_udc.c | 2 +-
2 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index 23a4473..cd0ec15 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -491,6 +491,18 @@ config USB_EG20T
ML7213/ML7831 is companion chip for Intel Atom E6xx series.
ML7213/ML7831 is completely compatible for Intel EG20T PCH.

+config USB_VBUS_GPIO_PORT
+ int "GPIO pin used for detecting VBUS"
+ depends on USB_EG20T
+ default "-1"
+ help
+ Enter the GPIO port number used for detecting VBUS state.
+ If not used, specify -1(default).
+
+ If not used, this driver does not support USB suspend state.
+ If the GPIO port number that VBUS is not connected to is specified,
+ the USB device may not work.
+
config USB_CI13XXX_MSM
tristate "MIPS USB CI13xxx for MSM"
depends on ARCH_MSM
diff --git a/drivers/usb/gadget/pch_udc.c b/drivers/usb/gadget/pch_udc.c
index 942fe92..44a86fc 100644
--- a/drivers/usb/gadget/pch_udc.c
+++ b/drivers/usb/gadget/pch_udc.c
@@ -18,7 +18,7 @@
#include <linux/gpio.h>

/* GPIO port for VBUS detecting */
-static int vbus_gpio_port = -1; /* GPIO port number (-1:Not used) */
+static int vbus_gpio_port = CONFIG_USB_VBUS_GPIO_PORT;

#define PCH_VBUS_PERIOD 3000 /* VBUS polling period (msec) */
#define PCH_VBUS_INTERVAL 10 /* VBUS polling interval (msec) */
--
1.7.7.6


\
 
 \ /
  Last update: 2012-02-03 08:09    [W:0.064 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site