Skip to contentSkip to conversation

usb: otg: OMAP4430: Add phy_suspend function pointer to twl4030_usb_data

PATCH Superseded Hema HK 2 participants 5 messages Feb 3, 2011 – Feb 4, 2011 2 messages not in the archive

Subsystems (3)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Hema HK

author
#0 lore raw

PATCH 4/7 usb: otg: OMAP4430: Add phy_suspend function pointer to twl4030_usb_data

Introduce the .phy_suspend function pointer to twl4030_usb_data structure. assign the function to it for both sdp board and panda boards. This will be used by the twl6030-usb transceiver driver.

Cc Felipe Balbi <[email protected]>
Cc Tony Lindgren <[email protected]>
---
 arch/arm/mach-omap2/board-4430sdp.c    |    1 +
 arch/arm/mach-omap2/board-omap4panda.c |    1 +
 arch/arm/plat-omap/include/plat/usb.h  |    1 +
 include/linux/i2c/twl.h                |    2 ++
 4 files changed, 5 insertions(+)
arch/arm/mach-omap2/board-4430sdp.c +1 -0
Index: linux-2.6/arch/arm/mach-omap2/board-4430sdp.c
===================================================================
@@ -272,6 +272,7 @@ static struct twl4030_usb_data omap4_usb
 	.phy_exit	= omap4430_phy_exit,
 	.phy_power	= omap4430_phy_power,
 	.phy_set_clock	= omap4430_phy_set_clk,
+	.phy_suspend	= omap4430_phy_suspend,
 };
 
 static struct omap2_hsmmc_info mmc[] = {
arch/arm/mach-omap2/board-omap4panda.c +1 -0
Index: linux-2.6/arch/arm/mach-omap2/board-omap4panda.c
===================================================================
@@ -153,6 +153,7 @@ static struct twl4030_usb_data omap4_usb
 	.phy_exit	= omap4430_phy_exit,
 	.phy_power	= omap4430_phy_power,
 	.phy_set_clock	= omap4430_phy_set_clk,
+	.phy_suspend	= omap4430_phy_suspend,
 };
 
 static struct omap2_hsmmc_info mmc[] = {
arch/arm/plat-omap/include/plat/usb.h +1 -0
Index: linux-2.6/arch/arm/plat-omap/include/plat/usb.h
===================================================================
@@ -88,6 +88,7 @@ extern int omap4430_phy_power(struct dev
 extern int omap4430_phy_set_clk(struct device *dev, int on);
 extern int omap4430_phy_init(struct device *dev);
 extern int omap4430_phy_exit(struct device *dev);
+extern int omap4430_phy_suspend(struct device *dev, int suspend);
 
 #endif
 
include/linux/i2c/twl.h +2 -0
Index: linux-2.6/include/linux/i2c/twl.h
===================================================================
@@ -600,6 +600,8 @@ struct twl4030_usb_data {
 	int		(*phy_power)(struct device *dev, int iD, int on);
 	/* enable/disable  phy clocks */
 	int		(*phy_set_clock)(struct device *dev, int on);
+	/* suspend/resume of phy */
+	int		(*phy_suspend)(struct device *dev, int suspend);
 };
 
 struct twl4030_ins {

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#1 lore raw

Hello.

Quoted 13 lines · Hema HK

Introduce the .phy_suspend function pointer to twl4030_usb_data structure. assign the function to it for both sdp board and panda boards. This will be used by the twl6030-usb transceiver driver.

Cc Felipe Balbi<[email protected]>
Cc Tony Lindgren<[email protected]>

Index: linux-2.6/arch/arm/plat-omap/include/plat/usb.h
===================================================================

arch/arm/plat-omap/include/plat/usb.h extern int omap4430_phy_power(struct dev · line 91

Quoted 4 lines
arch/arm/plat-omap/include/plat/usb.h +1 -0
@@ -88,6 +88,7 @@ extern int omap4430_phy_power(struct dev
  extern int omap4430_phy_set_clk(struct device *dev, int on);
  extern int omap4430_phy_init(struct device *dev);
  extern int omap4430_phy_exit(struct device *dev);
+extern int omap4430_phy_suspend(struct device *dev, int suspend);

And where it it defined? Why this doesn't happen in this patch?

WBR, Sergei

#4 lore raw
In reply to Hema HK

Hello.

Quoted 7 lines · Hema HK

Introduce the .phy_suspend function pointer to twl4030_usb_data structure. assign the function to it for both sdp board and panda boards. This will be used by the twl6030-usb transceiver driver.

Cc Felipe Balbi<[email protected]>
Cc Tony Lindgren<[email protected]>

[...]

Quoted 41 lines

Index: linux-2.6/arch/arm/mach-omap2/board-4430sdp.c
===================================================================

arch/arm/mach-omap2/board-4430sdp.c +1 -0
@@ -272,6 +272,7 @@ static struct twl4030_usb_data omap4_usb
  	.phy_exit	= omap4430_phy_exit,
  	.phy_power	= omap4430_phy_power,
  	.phy_set_clock	= omap4430_phy_set_clk,
+	.phy_suspend	= omap4430_phy_suspend,
  };
 
  static struct omap2_hsmmc_info mmc[] = {

Index: linux-2.6/arch/arm/mach-omap2/board-omap4panda.c
===================================================================

arch/arm/mach-omap2/board-omap4panda.c +1 -0
@@ -153,6 +153,7 @@ static struct twl4030_usb_data omap4_usb
  	.phy_exit	= omap4430_phy_exit,
  	.phy_power	= omap4430_phy_power,
  	.phy_set_clock	= omap4430_phy_set_clk,
+	.phy_suspend	= omap4430_phy_suspend,
  };
 
  static struct omap2_hsmmc_info mmc[] = {

Index: linux-2.6/arch/arm/plat-omap/include/plat/usb.h
===================================================================

arch/arm/plat-omap/include/plat/usb.h +1 -0
@@ -88,6 +88,7 @@ extern int omap4430_phy_power(struct dev
  extern int omap4430_phy_set_clk(struct device *dev, int on);
  extern int omap4430_phy_init(struct device *dev);
  extern int omap4430_phy_exit(struct device *dev);
+extern int omap4430_phy_suspend(struct device *dev, int suspend);
 
  #endif
 

Index: linux-2.6/include/linux/i2c/twl.h
===================================================================

include/linux/i2c/twl.h struct twl4030_usb_data { · line 605

Quoted 6 lines
include/linux/i2c/twl.h +2 -0
@@ -600,6 +600,8 @@ struct twl4030_usb_data {
  	int		(*phy_power)(struct device *dev, int iD, int on);
  	/* enable/disable  phy clocks */
  	int		(*phy_set_clock)(struct device *dev, int on);
+	/* suspend/resume of phy */
+	int		(*phy_suspend)(struct device *dev, int suspend);
  };

I think this patch should contain only this change, and the initializers
and 'extern' declaration should be merged to the previous patch.
Also, where do you call this method? Ah, I see, in the next patch. I think
it should be merged to this one then.

WBR, Sergei

#3 lore raw
In reply to a message not in the archive

Hi,

Quoted 22 lines

-----Original Message-----
From: Sergei Shtylyov [mailto:[email protected]]
Sent: Thursday, February 03, 2011 7:16 PM
To: Hema HK
Cc: [email protected]; [email protected]; Felipe Balbi; Tony Lindgren
Subject: Re: [PATCH 4/7] usb: otg: OMAP4430: Add phy_suspend
function pointer to twl4030_usb_data

Hello.

Quoted 1 line · Hema HK

Introduce the .phy_suspend function pointer to

twl4030_usb_data structure.

Quoted 6 lines

assign the function to it for both sdp board and panda boards. This will be used by the twl6030-usb transceiver driver.

Cc Felipe Balbi<[email protected]>
Cc Tony Lindgren<[email protected]>
Quoted 12 lines

arch/arm/plat-omap/include/plat/usb.h extern int omap4430_phy_power(struct dev · line 91

Quoted 9 lines

Index: linux-2.6/arch/arm/plat-omap/include/plat/usb.h
===================================================================

arch/arm/plat-omap/include/plat/usb.h +1 -0
@@ -88,6 +88,7 @@ extern int omap4430_phy_power(struct dev
  extern int omap4430_phy_set_clk(struct device *dev, int on);
  extern int omap4430_phy_init(struct device *dev);
  extern int omap4430_phy_exit(struct device *dev);
+extern int omap4430_phy_suspend(struct device *dev, int suspend);

And where it it defined? Why this doesn't happen in this patch?

This is defined in the previous patch. This could have been done in previous patch
also, but it is just that extern is done only when using.

Regards,
Hema

Quoted 2 lines

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#6 lore raw
In reply to a message not in the archive

Hi,

Quoted 66 lines

-----Original Message-----
From: Sergei Shtylyov [mailto:[email protected]]
Sent: Thursday, February 03, 2011 7:20 PM
To: Hema HK
Cc: [email protected]; [email protected]; Felipe Balbi; Tony Lindgren
Subject: Re: [PATCH 4/7] usb: otg: OMAP4430: Add phy_suspend
function pointer to twl4030_usb_data

Hello.

Quoted 1 line · Hema HK

Introduce the .phy_suspend function pointer to

twl4030_usb_data structure.

Quoted 6 lines

assign the function to it for both sdp board and panda boards. This will be used by the twl6030-usb transceiver driver.

Cc Felipe Balbi<[email protected]>
Cc Tony Lindgren<[email protected]>

[...]

Quoted 41 lines

Index: linux-2.6/arch/arm/mach-omap2/board-4430sdp.c
===================================================================

arch/arm/mach-omap2/board-4430sdp.c +1 -0
@@ -272,6 +272,7 @@ static struct twl4030_usb_data omap4_usb
  	.phy_exit	= omap4430_phy_exit,
  	.phy_power	= omap4430_phy_power,
  	.phy_set_clock	= omap4430_phy_set_clk,
+	.phy_suspend	= omap4430_phy_suspend,
  };
 
  static struct omap2_hsmmc_info mmc[] = {

Index: linux-2.6/arch/arm/mach-omap2/board-omap4panda.c
===================================================================

arch/arm/mach-omap2/board-omap4panda.c +1 -0
@@ -153,6 +153,7 @@ static struct twl4030_usb_data omap4_usb
  	.phy_exit	= omap4430_phy_exit,
  	.phy_power	= omap4430_phy_power,
  	.phy_set_clock	= omap4430_phy_set_clk,
+	.phy_suspend	= omap4430_phy_suspend,
  };
 
  static struct omap2_hsmmc_info mmc[] = {

Index: linux-2.6/arch/arm/plat-omap/include/plat/usb.h
===================================================================

arch/arm/plat-omap/include/plat/usb.h +1 -0
@@ -88,6 +88,7 @@ extern int omap4430_phy_power(struct dev
  extern int omap4430_phy_set_clk(struct device *dev, int on);
  extern int omap4430_phy_init(struct device *dev);
  extern int omap4430_phy_exit(struct device *dev);
+extern int omap4430_phy_suspend(struct device *dev, int suspend);
 
  #endif
 

Index: linux-2.6/include/linux/i2c/twl.h
===================================================================

include/linux/i2c/twl.h struct twl4030_usb_data { · line 600

Quoted 1 line
include/linux/i2c/twl.h +0 -0
@@ -600,6 +600,8 @@ struct twl4030_usb_data {
  	int		(*phy_power)(struct device *dev, int

iD, int on);

Quoted 12 lines

include/linux/i2c/twl.h struct twl4030_usb_data { · line 605

Quoted 5 lines
include/linux/i2c/twl.h +2 -0
  	/* enable/disable  phy clocks */
  	int		(*phy_set_clock)(struct device *dev, int on);
+	/* suspend/resume of phy */
+	int		(*phy_suspend)(struct device *dev, int suspend);
  };

I think this patch should contain only this change, and
the initializers
and 'extern' declaration should be merged to the previous patch.
Also, where do you call this method? Ah, I see, in the
next patch. I think
it should be merged to this one then.

No. if I do that git bisect fails.
Initializer does not make any sense without function poointer declaration. Only extern can be moved to previous patch but, I think it is OK to extern it
while using.

Regards,
Hema

Quoted 3 lines

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html