* [PATCH] ARM: OMAP: Fix usb gadget related compile errors and typo
@ 2007-10-29 19:55 Dirk Behme
2007-10-29 20:11 ` David Brownell
0 siblings, 1 reply; 12+ messages in thread
From: Dirk Behme @ 2007-10-29 19:55 UTC (permalink / raw)
To: linux-omap-open-source
[-- Attachment #1: Type: text/plain, Size: 110 bytes --]
ARM: OMAP: Fix usb gadget related compile errors and typo
Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
[-- Attachment #2: usbgadget_include.txt --]
[-- Type: text/plain, Size: 2419 bytes --]
Index: linux-osk/drivers/i2c/chips/isp1301_omap.c
===================================================================
--- linux-osk.orig/drivers/i2c/chips/isp1301_omap.c
+++ linux-osk/drivers/i2c/chips/isp1301_omap.c
@@ -28,7 +28,7 @@
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/usb/ch9.h>
-#include <linux/usb_gadget.h>
+#include <linux/usb/gadget.h>
#include <linux/usb.h>
#include <linux/usb/otg.h>
#include <linux/i2c.h>
Index: linux-osk/drivers/usb/gadget/omap_udc.c
===================================================================
--- linux-osk.orig/drivers/usb/gadget/omap_udc.c
+++ linux-osk/drivers/usb/gadget/omap_udc.c
@@ -1241,14 +1241,14 @@ static void pullup_enable(struct omap_ud
udc->gadget.dev.parent->power.power_state = PMSG_ON;
udc->gadget.dev.power.power_state = PMSG_ON;
UDC_SYSCON1_REG |= UDC_PULLUP_EN;
- if (!gadget_is_otg(udc->gadget) && !cpu_is_omap15xx())
+ if (!gadget_is_otg(&(udc->gadget)) && !cpu_is_omap15xx())
OTG_CTRL_REG |= OTG_BSESSVLD;
UDC_IRQ_EN_REG = UDC_DS_CHG_IE;
}
static void pullup_disable(struct omap_udc *udc)
{
- if (!gadget_is_otg(udc->gadget) && !cpu_is_omap15xx())
+ if (!gadget_is_otg(&(udc->gadget)) && !cpu_is_omap15xx())
OTG_CTRL_REG &= ~OTG_BSESSVLD;
UDC_IRQ_EN_REG = UDC_DS_CHG_IE;
UDC_SYSCON1_REG &= ~UDC_PULLUP_EN;
@@ -1386,7 +1386,7 @@ static void update_otg(struct omap_udc *
{
u16 devstat;
- if (!gadget_is_otg(udc->gadget))
+ if (!gadget_is_otg(&(udc->gadget)))
return;
if (OTG_CTRL_REG & OTG_ID)
Index: linux-osk/include/linux/usb/gadget.h
===================================================================
--- linux-osk.orig/include/linux/usb/gadget.h
+++ linux-osk/include/linux/usb/gadget.h
@@ -480,7 +480,7 @@ static inline void *get_gadget_data (str
/**
- * gadget_is_dualspeed - return true iff the hardware handles high speed
+ * gadget_is_dualspeed - return true if the hardware handles high speed
* @g: controller that might support both high and full speeds
*/
static inline int gadget_is_dualspeed(struct usb_gadget *g)
@@ -496,7 +496,7 @@ static inline int gadget_is_dualspeed(st
}
/**
- * gadget_is_otg - return true iff the hardware is OTG-ready
+ * gadget_is_otg - return true if the hardware is OTG-ready
* @g: controller that might have a Mini-AB connector
*
* This is a runtime test, since kernels with a USB-OTG stack sometimes
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH] ARM: OMAP: Fix usb gadget related compile errors and typo
2007-10-29 19:55 [PATCH] ARM: OMAP: Fix usb gadget related compile errors and typo Dirk Behme
@ 2007-10-29 20:11 ` David Brownell
2007-10-29 20:44 ` Felipe Balbi
2007-10-30 16:37 ` Dirk Behme
0 siblings, 2 replies; 12+ messages in thread
From: David Brownell @ 2007-10-29 20:11 UTC (permalink / raw)
To: linux-omap-open-source, dirk.behme
> - * gadget_is_dualspeed - return true iff the hardware handles high speed
> + * gadget_is_dualspeed - return true if the hardware handles high speed
Not a typo; "iff" == "if and only if". NAK to that part.
Re the other, please make those parts match what's upstream;
I think you added extra parens.
Until the version of this code works on both H2 and H3, the
two drivers will stay out of sync. Right now the upstream
version works on H2 (unless someone broke it somehow) and
the one in the OMAP tree works on H3. Sigh. Dunno about
other incarnations of the full speed OTG engines.
- Dave
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] ARM: OMAP: Fix usb gadget related compile errors and typo
2007-10-29 20:11 ` David Brownell
@ 2007-10-29 20:44 ` Felipe Balbi
2007-10-29 21:33 ` David Brownell
2007-10-30 16:37 ` Dirk Behme
1 sibling, 1 reply; 12+ messages in thread
From: Felipe Balbi @ 2007-10-29 20:44 UTC (permalink / raw)
To: David Brownell; +Cc: linux-omap-open-source
Hi Dave,
On 10/29/07, David Brownell <david-b@pacbell.net> wrote:
> > - * gadget_is_dualspeed - return true iff the hardware handles high speed
> > + * gadget_is_dualspeed - return true if the hardware handles high speed
>
> Not a typo; "iff" == "if and only if". NAK to that part.
> Re the other, please make those parts match what's upstream;
> I think you added extra parens.
>
> Until the version of this code works on both H2 and H3, the
> two drivers will stay out of sync. Right now the upstream
> version works on H2 (unless someone broke it somehow) and
> the one in the OMAP tree works on H3. Sigh. Dunno about
> other incarnations of the full speed OTG engines.
is there any plans on upgrading isp1301 driver to the new style i2c
driver also?? how could i help you with that?
tps65010 driver is really better with that i2c_board_info structure in
board files and there's a note to make isp1301 driver work the same
way.
>
> - Dave
>
> _______________________________________________
> Linux-omap-open-source mailing list
> Linux-omap-open-source@linux.omap.com
> http://linux.omap.com/mailman/listinfo/linux-omap-open-source
>
--
Best Regards,
Felipe Balbi
felipebalbi@users.sourceforge.net
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] ARM: OMAP: Fix usb gadget related compile errors and typo
2007-10-29 20:44 ` Felipe Balbi
@ 2007-10-29 21:33 ` David Brownell
2007-10-29 21:45 ` Felipe Balbi
0 siblings, 1 reply; 12+ messages in thread
From: David Brownell @ 2007-10-29 21:33 UTC (permalink / raw)
To: felipebalbi; +Cc: linux-omap-open-source
> is there any plans on upgrading isp1301 driver to the new style i2c
> driver also?? how could i help you with that?
ISTR sending some code like that to the I2C list a while back, but
it's not yet been merged.
You could finish that, if it's not already sitting in Jean's I2C queue.
And if it is, you could maybe get it into the OMAP tree before 2.6.25
merges begin. :)
> tps65010 driver is really better with that i2c_board_info structure in
> board files and there's a note to make isp1301 driver work the same
> way.
Yep. In fact, all the I2C code that OMAP uses should switch
over to new-style drivers ...
That includes the pcf875x i/o expanders found on many TI devel
boards. Making that change involves some updates to the GPIO
framework. I've got some code to address all that, which I'll
be posting in a few days.
- Dave
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] ARM: OMAP: Fix usb gadget related compile errors and typo
2007-10-29 21:33 ` David Brownell
@ 2007-10-29 21:45 ` Felipe Balbi
2007-10-29 22:42 ` David Brownell
0 siblings, 1 reply; 12+ messages in thread
From: Felipe Balbi @ 2007-10-29 21:45 UTC (permalink / raw)
To: David Brownell; +Cc: linux-omap-open-source
On 10/29/07, David Brownell <david-b@pacbell.net> wrote:
> > is there any plans on upgrading isp1301 driver to the new style i2c
> > driver also?? how could i help you with that?
>
> ISTR sending some code like that to the I2C list a while back, but
> it's not yet been merged.
I see...
>
> You could finish that, if it's not already sitting in Jean's I2C queue.
> And if it is, you could maybe get it into the OMAP tree before 2.6.25
> merges begin. :)
do Jean have a gittree in kernel.org, couldn't find search the name...
it would be easier just git-pull from there.. but if there isn't I'll
do it manually and test with omap h2 and omap h3 boards once I'm back
in brazil (next week).
well, in any case, I'll try to get these in sync between i2c/mainline
and linux-omap tree.
>
>
> > tps65010 driver is really better with that i2c_board_info structure in
> > board files and there's a note to make isp1301 driver work the same
> > way.
>
> Yep. In fact, all the I2C code that OMAP uses should switch
> over to new-style drivers ...
>
> That includes the pcf875x i/o expanders found on many TI devel
> boards. Making that change involves some updates to the GPIO
> framework. I've got some code to address all that, which I'll
> be posting in a few days.
ok.. that'll help, could you please cc me so I can get those as soon
as you publish them to apply on linux and test/validate with omap
boards ?
tks in advance
>
> - Dave
>
>
--
Best Regards,
Felipe Balbi
felipebalbi@users.sourceforge.net
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] ARM: OMAP: Fix usb gadget related compile errors and typo
2007-10-29 21:45 ` Felipe Balbi
@ 2007-10-29 22:42 ` David Brownell
2007-10-29 22:52 ` Felipe Balbi
0 siblings, 1 reply; 12+ messages in thread
From: David Brownell @ 2007-10-29 22:42 UTC (permalink / raw)
To: Felipe Balbi; +Cc: linux-omap-open-source
On Monday 29 October 2007, Felipe Balbi wrote:
> On 10/29/07, David Brownell <david-b@pacbell.net> wrote:
> > > is there any plans on upgrading isp1301 driver to the new style i2c
> > > driver also?? how could i help you with that?
> >
> > ISTR sending some code like that to the I2C list a while back, but
> > it's not yet been merged.
>
> I see...
>
> >
> > You could finish that, if it's not already sitting in Jean's I2C queue.
> > And if it is, you could maybe get it into the OMAP tree before 2.6.25
> > merges begin. :)
>
> do Jean have a gittree in kernel.org, couldn't find search the name...
He's got a quilt patch tree. I have it bookmarked as:
http://khali.linux-fr.org/devel/linux-2.6/jdelvare-i2c/?M=A
Seems not to have the isp1301 driver stuff ... that should be in
the i2c list archives.
> it would be easier just git-pull from there.. but if there isn't I'll
> do it manually and test with omap h2 and omap h3 boards once I'm back
> in brazil (next week).
... And it'd be nice if someone could update the H3 support to
include the IRQ used to hook up the tps65013 chip. ;)
> well, in any case, I'll try to get these in sync between i2c/mainline
> and linux-omap tree.
Not straightforward, as I recall. Or it'd be working already.
The issue is that the OTG state machine changed, so that various
transitions (I forget which ones!) behave incompatibly.
> >
> > > tps65010 driver is really better with that i2c_board_info structure in
> > > board files and there's a note to make isp1301 driver work the same
> > > way.
> >
> > Yep. In fact, all the I2C code that OMAP uses should switch
> > over to new-style drivers ...
> >
> > That includes the pcf875x i/o expanders found on many TI devel
> > boards. Making that change involves some updates to the GPIO
> > framework. I've got some code to address all that, which I'll
> > be posting in a few days.
>
> ok.. that'll help, could you please cc me so I can get those as soon
> as you publish them to apply on linux and test/validate with omap
> boards ?
What I'll do is forward the OMAP patches to this list ... both the
generic stuff (affecting the plat-omap/gpio.c code), and board-specific
stuff (affecting debug boards, tps6501x, etc). The board-specific
stuff will need more work, it's not all that current.
- Dave
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] ARM: OMAP: Fix usb gadget related compile errors and typo
2007-10-29 22:42 ` David Brownell
@ 2007-10-29 22:52 ` Felipe Balbi
0 siblings, 0 replies; 12+ messages in thread
From: Felipe Balbi @ 2007-10-29 22:52 UTC (permalink / raw)
To: David Brownell; +Cc: linux-omap-open-source
On 10/30/07, David Brownell <david-b@pacbell.net> wrote:
<snip>
> > do Jean have a gittree in kernel.org, couldn't find search the name...
>
> He's got a quilt patch tree. I have it bookmarked as:
>
> http://khali.linux-fr.org/devel/linux-2.6/jdelvare-i2c/?M=A
tks
>
> Seems not to have the isp1301 driver stuff ... that should be in
> the i2c list archives.
yeah... i'll track down
>
>
> > it would be easier just git-pull from there.. but if there isn't I'll
> > do it manually and test with omap h2 and omap h3 boards once I'm back
> > in brazil (next week).
>
> ... And it'd be nice if someone could update the H3 support to
> include the IRQ used to hook up the tps65013 chip. ;)
hmm... k... I'll check that tomorrow morning.
>
>
> > well, in any case, I'll try to get these in sync between i2c/mainline
> > and linux-omap tree.
>
> Not straightforward, as I recall. Or it'd be working already.
> The issue is that the OTG state machine changed, so that various
> transitions (I forget which ones!) behave incompatibly.
yeah... maybe running opt tests with omap h[23] boards running gadget
zero will help tracking down which issues are we talking about and
hopefully will help fixing it.
<snip>
> > ok.. that'll help, could you please cc me so I can get those as soon
> > as you publish them to apply on linux and test/validate with omap
> > boards ?
>
> What I'll do is forward the OMAP patches to this list ... both the
> generic stuff (affecting the plat-omap/gpio.c code), and board-specific
> stuff (affecting debug boards, tps6501x, etc). The board-specific
> stuff will need more work, it's not all that current.
that's even better so everybody can comment/work on them
--
Best Regards,
Felipe Balbi
felipebalbi@users.sourceforge.net
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] ARM: OMAP: Fix usb gadget related compile errors and typo
2007-10-29 20:11 ` David Brownell
2007-10-29 20:44 ` Felipe Balbi
@ 2007-10-30 16:37 ` Dirk Behme
2007-10-30 17:00 ` David Brownell
1 sibling, 1 reply; 12+ messages in thread
From: Dirk Behme @ 2007-10-30 16:37 UTC (permalink / raw)
To: David Brownell; +Cc: linux-omap-open-source
David Brownell wrote:
>>- * gadget_is_dualspeed - return true iff the hardware handles high speed
>>+ * gadget_is_dualspeed - return true if the hardware handles high speed
>
> Not a typo; "iff" == "if and only if". NAK to that part.
Sorry. Sometimes its hard to be a non-native speaker ;)
> Re the other, please make those parts match what's upstream;
Creating the patch ~3 hours after Tonys "update linux-omap to mainline
tree" I assumed OMAP git was in sync with mainline.
> I think you added extra parens.
Yes. I tried to fix this compilation error:
CC drivers/usb/gadget/omap_udc.o
drivers/usb/gadget/omap_udc.c: In function 'pullup_enable':
drivers/usb/gadget/omap_udc.c:1244: error: incompatible type for
argument 1 of 'gadget_is_otg'
drivers/usb/gadget/omap_udc.c: In function 'pullup_disable':
drivers/usb/gadget/omap_udc.c:1251: error: incompatible type for
argument 1 of 'gadget_is_otg'
drivers/usb/gadget/omap_udc.c: In function 'update_otg':
drivers/usb/gadget/omap_udc.c:1389: error: incompatible type for
argument 1 of 'gadget_is_otg'
gadget_is_otg() is defined as
static inline int gadget_is_otg(struct usb_gadget *g) { ...
and the call is
gadget_is_otg(udc->gadget)
Which fix do you propose for this?
Best regards
Dirk
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH] ARM: OMAP: Fix usb gadget related compile errors and typo
2007-10-30 16:37 ` Dirk Behme
@ 2007-10-30 17:00 ` David Brownell
2007-11-01 9:00 ` Tony Lindgren
0 siblings, 1 reply; 12+ messages in thread
From: David Brownell @ 2007-10-30 17:00 UTC (permalink / raw)
To: Dirk Behme; +Cc: linux-omap-open-source
On Tuesday 30 October 2007, Dirk Behme wrote:
> gadget_is_otg() is defined as
>
> static inline int gadget_is_otg(struct usb_gadget *g) { ...
>
> and the call is
>
> gadget_is_otg(udc->gadget)
>
> Which fix do you propose for this?
http://marc.info/?l=linux-usb-devel&m=119343277601632&w=2
which is in the USB patch queue ... I thought I saw it
get sent to Linus recently, but maybe not. It's not
in the kernel.org tree yet, unfortunately.
- Dave
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH] ARM: OMAP: Fix usb gadget related compile errors and typo
2007-10-30 17:00 ` David Brownell
@ 2007-11-01 9:00 ` Tony Lindgren
2007-11-01 16:28 ` Dirk Behme
0 siblings, 1 reply; 12+ messages in thread
From: Tony Lindgren @ 2007-11-01 9:00 UTC (permalink / raw)
To: David Brownell; +Cc: linux-omap-open-source
* David Brownell <david-b@pacbell.net> [071030 10:15]:
> On Tuesday 30 October 2007, Dirk Behme wrote:
> > gadget_is_otg() is defined as
> >
> > static inline int gadget_is_otg(struct usb_gadget *g) { ...
> >
> > and the call is
> >
> > gadget_is_otg(udc->gadget)
> >
> > Which fix do you propose for this?
>
> http://marc.info/?l=linux-usb-devel&m=119343277601632&w=2
>
> which is in the USB patch queue ... I thought I saw it
> get sent to Linus recently, but maybe not. It's not
> in the kernel.org tree yet, unfortunately.
Pushing Dave's fix today.
Tony
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH] ARM: OMAP: Fix usb gadget related compile errors and typo
2007-11-01 9:00 ` Tony Lindgren
@ 2007-11-01 16:28 ` Dirk Behme
2007-11-15 20:40 ` Tony Lindgren
0 siblings, 1 reply; 12+ messages in thread
From: Dirk Behme @ 2007-11-01 16:28 UTC (permalink / raw)
To: Tony Lindgren; +Cc: linux-omap-open-source
Tony Lindgren wrote:
> * David Brownell <david-b@pacbell.net> [071030 10:15]:
>
>>On Tuesday 30 October 2007, Dirk Behme wrote:
>>
>>>gadget_is_otg() is defined as
>>>
>>>static inline int gadget_is_otg(struct usb_gadget *g) { ...
>>>
>>>and the call is
>>>
>>>gadget_is_otg(udc->gadget)
>>>
>>>Which fix do you propose for this?
>>
>>http://marc.info/?l=linux-usb-devel&m=119343277601632&w=2
>>
>>which is in the USB patch queue ... I thought I saw it
>>get sent to Linus recently, but maybe not. It's not
>>in the kernel.org tree yet, unfortunately.
>
> Pushing Dave's fix today.
And what's about the
-- cut --
--- linux-osk.orig/drivers/i2c/chips/isp1301_omap.c
+++ linux-osk/drivers/i2c/chips/isp1301_omap.c
@@ -28,7 +28,7 @@
...
-#include <linux/usb_gadget.h>
+#include <linux/usb/gadget.h>
...
-- cut --
part of
http://linux.omap.com/pipermail/linux-omap-open-source/2007-October/011804.html
?
Dirk
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH] ARM: OMAP: Fix usb gadget related compile errors and typo
2007-11-01 16:28 ` Dirk Behme
@ 2007-11-15 20:40 ` Tony Lindgren
0 siblings, 0 replies; 12+ messages in thread
From: Tony Lindgren @ 2007-11-15 20:40 UTC (permalink / raw)
To: Dirk Behme; +Cc: linux-omap-open-source
Hi,
* Dirk Behme <dirk.behme@googlemail.com> [071101 09:28]:
> Tony Lindgren wrote:
>> * David Brownell <david-b@pacbell.net> [071030 10:15]:
>>> On Tuesday 30 October 2007, Dirk Behme wrote:
>>>
>>>> gadget_is_otg() is defined as
>>>>
>>>> static inline int gadget_is_otg(struct usb_gadget *g) { ...
>>>>
>>>> and the call is
>>>>
>>>> gadget_is_otg(udc->gadget)
>>>>
>>>> Which fix do you propose for this?
>>>
>>> http://marc.info/?l=linux-usb-devel&m=119343277601632&w=2
>>>
>>> which is in the USB patch queue ... I thought I saw it
>>> get sent to Linus recently, but maybe not. It's not
>>> in the kernel.org tree yet, unfortunately.
>> Pushing Dave's fix today.
>
> And what's about the
>
> -- cut --
> --- linux-osk.orig/drivers/i2c/chips/isp1301_omap.c
> +++ linux-osk/drivers/i2c/chips/isp1301_omap.c
> @@ -28,7 +28,7 @@
> ...
> -#include <linux/usb_gadget.h>
> +#include <linux/usb/gadget.h>
> ...
> -- cut --
>
> part of
>
> http://linux.omap.com/pipermail/linux-omap-open-source/2007-October/011804.html
>
> ?
Oops, sorry I guess I've been a bit behind with mails. I'll push a fix
for that today.
Tony
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2007-11-15 20:40 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-29 19:55 [PATCH] ARM: OMAP: Fix usb gadget related compile errors and typo Dirk Behme
2007-10-29 20:11 ` David Brownell
2007-10-29 20:44 ` Felipe Balbi
2007-10-29 21:33 ` David Brownell
2007-10-29 21:45 ` Felipe Balbi
2007-10-29 22:42 ` David Brownell
2007-10-29 22:52 ` Felipe Balbi
2007-10-30 16:37 ` Dirk Behme
2007-10-30 17:00 ` David Brownell
2007-11-01 9:00 ` Tony Lindgren
2007-11-01 16:28 ` Dirk Behme
2007-11-15 20:40 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox