Google
  Web www.spinics.net

patch usb-s3c2410-gadget-ensure-vbus-pin-in-input-mode-during-read.patch added to gregkh-2.6 tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


This is a note to let you know that I've just added the patch titled

     Subject: USB: s3c2410 gadget: ensure vbus pin in input mode during read

to my gregkh-2.6 tree.  Its filename is

     usb-s3c2410-gadget-ensure-vbus-pin-in-input-mode-during-read.patch

This tree can be found at 
    http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/


>From ben-linux@xxxxxxxxx  Mon Nov 26 23:07:05 2007
From: Ben Dooks <ben-linux@xxxxxxxxx>
Date: Mon, 19 Nov 2007 22:28:15 +0000
Subject: USB: s3c2410 gadget: ensure vbus pin in input mode during read
To: Linux USB Devel <linux-usb-devel@xxxxxxxxxxxxxxxxxxxxx>
Cc: vince@xxxxxxxxxxxx, Greg KH <greg@xxxxxxxxx>, Ben Dooks <ben-linux@xxxxxxxxx>
Message-ID: <20071119222847.239944382@xxxxxxxxx>


Some CPUs in the S3C24XX series do not support readback of the
value of a pin when the pin has been configured to an IRQ.

Signed-off-by: Ben Dooks <ben-linux@xxxxxxxxx>
Acked-by: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
 drivers/usb/gadget/s3c2410_udc.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/drivers/usb/gadget/s3c2410_udc.c
+++ b/drivers/usb/gadget/s3c2410_udc.c
@@ -1511,7 +1511,11 @@ static irqreturn_t s3c2410_udc_vbus_irq(
 	unsigned int		value;
 
 	dprintk(DEBUG_NORMAL, "%s()\n", __func__);
+
+	/* some cpus cannot read from an line configured to IRQ! */
+	s3c2410_gpio_cfgpin(udc_info->vbus_pin, S3C2410_GPIO_INPUT);
 	value = s3c2410_gpio_getpin(udc_info->vbus_pin);
+	s3c2410_gpio_cfgpin(udc_info->vbus_pin, S3C2410_GPIO_SFN2);
 
 	if (udc_info->vbus_pin_inverted)
 		value = !value;


Patches currently in gregkh-2.6 which might be from ben-linux@xxxxxxxxx are

usb/usb-s3c2410-gadget-allow-sharing-of-vbus-irq.patch
usb/usb-s3c2410-gadget-ensure-vbus-pin-in-input-mode-during-read.patch
usb/usb-s3c2410-gadget-header-move-fixups.patch

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
linux-usb-devel@xxxxxxxxxxxxxxxxxxxxx
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

[Home]     [Video for Linux]     [Photo]     [Yosemite Forum]     [Yosemite Photos]    [Video Projectors]     [PDAs]     [Hacking TiVo]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Devices]     [Big List of Linux Books]     [Free Dating]

  Powered by Linux