All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Put in supportframework for PR785 board.
@ 2008-12-04 10:23 Manikandan Pillai
  2008-12-04 11:14 ` Felipe Balbi
  2008-12-04 18:10 ` David Brownell
  0 siblings, 2 replies; 7+ messages in thread
From: Manikandan Pillai @ 2008-12-04 10:23 UTC (permalink / raw)
  To: linux-omap; +Cc: Manikandan Pillai

Resending this patch with fixes for comments:
This patch provides the support framework for PR785 boards.
More patches will follow that will allow complete programming
support for PR785 boards.
The board-omap3evm.c contains the I2C devices to be supported.
CONFIG_PR785 is configuration used for the PR785 boards. This patch
provides support for TPS6235x devices on PR785 through I2C2 bus.
Support for I2C2 or I2C4 and selection between them will be given in
subsequent patches.

The selection of TWL4030 or PR785 is for now through compile time
option since a real time check is not clear.

Signed-off-by: Manikandan Pillai <mani.pillai@ti.com>
---
 arch/arm/mach-omap2/board-omap3evm.c |   22 +++++++++++++++++++++-
 arch/arm/mach-omap2/mmc-twl4030.c    |    5 +++--
 drivers/mfd/Kconfig                  |   14 ++++++++++++++
 drivers/video/omap/lcd_omap3evm.c    |    4 ++++
 4 files changed, 42 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 8a1b86e..22ac2e9 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -42,7 +42,6 @@
 #include "twl4030-generic-scripts.h"
 #include "mmc-twl4030.h"
 
-
 static struct resource omap3evm_smc911x_resources[] = {
 	[0] =	{
 		.start  = OMAP3EVM_ETHR_START,
@@ -90,6 +89,7 @@ static struct omap_uart_config omap3_evm_uart_config __initdata = {
 	.enabled_uarts	= ((1 << 0) | (1 << 1) | (1 << 2)),
 };
 
+#if defined(CONFIG_TWL4030_CORE)
 static struct twl4030_gpio_platform_data omap3evm_gpio_data = {
 	.gpio_base	= OMAP_MAX_GPIO_LINES,
 	.irq_base	= TWL4030_GPIO_IRQ_BASE,
@@ -151,11 +151,31 @@ static struct i2c_board_info __initdata omap3evm_i2c_boardinfo[] = {
 		.platform_data = &omap3evm_twldata,
 	},
 };
+#endif
+
+#if defined(CONFIG_PR785)
+static struct i2c_board_info __initdata tps_6235x_i2c_board_info[] = {
+	{
+		I2C_BOARD_INFO("tps62352", 0x4A),
+		.flags = I2C_CLIENT_WAKE,
+	},
+	{
+		I2C_BOARD_INFO("tps62353", 0x48),
+		.flags = I2C_CLIENT_WAKE,
+	},
+};
+#endif
 
 static int __init omap3_evm_i2c_init(void)
 {
+#if defined(CONFIG_PR785)
+	omap_register_i2c_bus(1, 2600, tps_6235x_i2c_board_info,
+		ARRAY_SIZE(tps_6235x_i2c_board_info));
+#endif
+#if defined(CONFIG_TWL4030_CORE)
 	omap_register_i2c_bus(1, 2600, omap3evm_i2c_boardinfo,
 			ARRAY_SIZE(omap3evm_i2c_boardinfo));
+#endif
 	omap_register_i2c_bus(2, 400, NULL, 0);
 	omap_register_i2c_bus(3, 400, NULL, 0);
 	return 0;
diff --git a/arch/arm/mach-omap2/mmc-twl4030.c b/arch/arm/mach-omap2/mmc-twl4030.c
index 626d668..daf10f3 100644
--- a/arch/arm/mach-omap2/mmc-twl4030.c
+++ b/arch/arm/mach-omap2/mmc-twl4030.c
@@ -167,7 +167,7 @@ static int twl_mmc_resume(struct device *dev, int slot)
  */
 static int twl_mmc_set_voltage(struct twl_mmc_controller *c, int vdd)
 {
-	int ret;
+	int ret = 0;
 	u8 vmmc, dev_grp_val;
 
 	switch (1 << vdd) {
@@ -222,6 +222,7 @@ static int twl_mmc_set_voltage(struct twl_mmc_controller *c, int vdd)
 	else
 		dev_grp_val = LDO_CLR;		/* Power down */
 
+#if defined(CONFIG_TWL4030_CORE)
 	ret = twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
 					dev_grp_val, c->twl_vmmc_dev_grp);
 	if (ret)
@@ -229,7 +230,7 @@ static int twl_mmc_set_voltage(struct twl_mmc_controller *c, int vdd)
 
 	ret = twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
 					vmmc, c->twl_mmc_dedicated);
-
+#endif
 	return ret;
 }
 
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 650b51c..3fee589 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -61,6 +61,8 @@ config UCB1400_CORE
 	  To compile this driver as a module, choose M here: the
 	  module will be called ucb1400_core.
 
+menu "Texas Instruments Power board Support"
+
 config TWL4030_CORE
 	bool "Texas Instruments TWL4030/TPS659x0 Support"
 	depends on I2C=y && GENERIC_HARDIRQS
@@ -84,6 +86,18 @@ config TWL4030_POWER
 	  oscillators are switched off or on or reset when a sleep, wakeup
 	  or warm reset event occurs.
 
+config PR785
+	bool "A Texas Instruments TPS6235X based Power Module"
+	depends on I2C=y && MACH_OMAP3EVM=y && GENERIC_GPIO && (ARCH_OMAP3)
+	default n
+	help
+	Say yes here if you are using the TPS6235x based PR785 Power Module
+	for the EVM boards. This core driver provides register access and IRQ
+	handling facilities, and registers devices for the various functions
+	so that function-specific drivers can bind to them.
+
+endmenu
+
 config MFD_TMIO
 	bool
 	default n
diff --git a/drivers/video/omap/lcd_omap3evm.c b/drivers/video/omap/lcd_omap3evm.c
index 1c3d814..ff3a3ed 100644
--- a/drivers/video/omap/lcd_omap3evm.c
+++ b/drivers/video/omap/lcd_omap3evm.c
@@ -66,9 +66,11 @@ static int omap3evm_panel_init(struct lcd_panel *panel,
 	gpio_direction_output(LCD_PANEL_LR, 1);
 	gpio_direction_output(LCD_PANEL_UD, 1);
 
+#if !defined(CONFIG_PR785)
 	twl4030_i2c_write_u8(TWL4030_MODULE_LED, 0x11, TWL_LED_LEDEN);
 	twl4030_i2c_write_u8(TWL4030_MODULE_PWMA, 0x01, TWL_PWMA_PWMAON);
 	twl4030_i2c_write_u8(TWL4030_MODULE_PWMA, 0x02, TWL_PWMA_PWMAOFF);
+#endif
 	bklight_level = 100;
 
 	return 0;
@@ -97,12 +99,14 @@ static unsigned long omap3evm_panel_get_caps(struct lcd_panel *panel)
 static int omap3evm_bklight_setlevel(struct lcd_panel *panel,
 						unsigned int level)
 {
+#if !defined(CONFIG_PR785)
 	u8 c;
 	if ((level >= 0) && (level <= 100)) {
 		c = (125 * (100 - level)) / 100 + 2;
 		twl4030_i2c_write_u8(TWL4030_MODULE_PWMA, c, TWL_PWMA_PWMAOFF);
 		bklight_level = level;
 	}
+#endif
 	return 0;
 }
 
-- 
1.5.6


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] Put in supportframework for PR785 board.
  2008-12-04 10:23 [PATCH 1/2] Put in supportframework for PR785 board Manikandan Pillai
@ 2008-12-04 11:14 ` Felipe Balbi
  2008-12-04 11:30   ` Pillai, Manikandan
  2008-12-04 18:10 ` David Brownell
  1 sibling, 1 reply; 7+ messages in thread
From: Felipe Balbi @ 2008-12-04 11:14 UTC (permalink / raw)
  To: ext Manikandan Pillai; +Cc: linux-omap

On Thu, Dec 04, 2008 at 03:53:26PM +0530, ext Manikandan Pillai wrote:
> Resending this patch with fixes for comments:
> This patch provides the support framework for PR785 boards.
> More patches will follow that will allow complete programming
> support for PR785 boards.
> The board-omap3evm.c contains the I2C devices to be supported.
> CONFIG_PR785 is configuration used for the PR785 boards. This patch
> provides support for TPS6235x devices on PR785 through I2C2 bus.
> Support for I2C2 or I2C4 and selection between them will be given in
> subsequent patches.
> 
> The selection of TWL4030 or PR785 is for now through compile time
> option since a real time check is not clear.
> 
> Signed-off-by: Manikandan Pillai <mani.pillai@ti.com>
> ---
>  arch/arm/mach-omap2/board-omap3evm.c |   22 +++++++++++++++++++++-
>  arch/arm/mach-omap2/mmc-twl4030.c    |    5 +++--
>  drivers/mfd/Kconfig                  |   14 ++++++++++++++
>  drivers/video/omap/lcd_omap3evm.c    |    4 ++++
>  4 files changed, 42 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
> index 8a1b86e..22ac2e9 100644
> --- a/arch/arm/mach-omap2/board-omap3evm.c
> +++ b/arch/arm/mach-omap2/board-omap3evm.c
> @@ -42,7 +42,6 @@
>  #include "twl4030-generic-scripts.h"
>  #include "mmc-twl4030.h"
>  
> -
>  static struct resource omap3evm_smc911x_resources[] = {
>  	[0] =	{
>  		.start  = OMAP3EVM_ETHR_START,
> @@ -90,6 +89,7 @@ static struct omap_uart_config omap3_evm_uart_config __initdata = {
>  	.enabled_uarts	= ((1 << 0) | (1 << 1) | (1 << 2)),
>  };
>  
> +#if defined(CONFIG_TWL4030_CORE)
>  static struct twl4030_gpio_platform_data omap3evm_gpio_data = {
>  	.gpio_base	= OMAP_MAX_GPIO_LINES,
>  	.irq_base	= TWL4030_GPIO_IRQ_BASE,
> @@ -151,11 +151,31 @@ static struct i2c_board_info __initdata omap3evm_i2c_boardinfo[] = {
>  		.platform_data = &omap3evm_twldata,
>  	},
>  };
> +#endif
> +
> +#if defined(CONFIG_PR785)
> +static struct i2c_board_info __initdata tps_6235x_i2c_board_info[] = {
> +	{
> +		I2C_BOARD_INFO("tps62352", 0x4A),
> +		.flags = I2C_CLIENT_WAKE,
> +	},
> +	{
> +		I2C_BOARD_INFO("tps62353", 0x48),
> +		.flags = I2C_CLIENT_WAKE,
> +	},
> +};
> +#endif
>  
>  static int __init omap3_evm_i2c_init(void)
>  {
> +#if defined(CONFIG_PR785)
> +	omap_register_i2c_bus(1, 2600, tps_6235x_i2c_board_info,
> +		ARRAY_SIZE(tps_6235x_i2c_board_info));
> +#endif
> +#if defined(CONFIG_TWL4030_CORE)
>  	omap_register_i2c_bus(1, 2600, omap3evm_i2c_boardinfo,
>  			ARRAY_SIZE(omap3evm_i2c_boardinfo));
> +#endif
>  	omap_register_i2c_bus(2, 400, NULL, 0);
>  	omap_register_i2c_bus(3, 400, NULL, 0);
>  	return 0;
> diff --git a/arch/arm/mach-omap2/mmc-twl4030.c b/arch/arm/mach-omap2/mmc-twl4030.c
> index 626d668..daf10f3 100644
> --- a/arch/arm/mach-omap2/mmc-twl4030.c
> +++ b/arch/arm/mach-omap2/mmc-twl4030.c

it doesn't make sense to build this file if you don't have twl4030 in
the board. Better to have something like mmc-tps6235x.c or something
like that.

> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> index 650b51c..3fee589 100644
> --- a/drivers/mfd/Kconfig
> +++ b/drivers/mfd/Kconfig
> @@ -61,6 +61,8 @@ config UCB1400_CORE
>  	  To compile this driver as a module, choose M here: the
>  	  module will be called ucb1400_core.
>  
> +menu "Texas Instruments Power board Support"
> +
>  config TWL4030_CORE
>  	bool "Texas Instruments TWL4030/TPS659x0 Support"
>  	depends on I2C=y && GENERIC_HARDIRQS
> @@ -84,6 +86,18 @@ config TWL4030_POWER
>  	  oscillators are switched off or on or reset when a sleep, wakeup
>  	  or warm reset event occurs.
>  
> +config PR785
> +	bool "A Texas Instruments TPS6235X based Power Module"
> +	depends on I2C=y && MACH_OMAP3EVM=y && GENERIC_GPIO && (ARCH_OMAP3)
> +	default n
> +	help
> +	Say yes here if you are using the TPS6235x based PR785 Power Module
> +	for the EVM boards. This core driver provides register access and IRQ
> +	handling facilities, and registers devices for the various functions
> +	so that function-specific drivers can bind to them.
> +
> +endmenu

where's the driver for it ??

-- 
balbi

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH 1/2] Put in supportframework for PR785 board.
  2008-12-04 11:14 ` Felipe Balbi
@ 2008-12-04 11:30   ` Pillai, Manikandan
  2008-12-04 11:39     ` Felipe Balbi
  2008-12-04 17:59     ` David Brownell
  0 siblings, 2 replies; 7+ messages in thread
From: Pillai, Manikandan @ 2008-12-04 11:30 UTC (permalink / raw)
  To: felipe.balbi@nokia.com; +Cc: linux-omap@vger.kernel.org

Hi,

Pls find my comments inlined.

-----Original Message-----
From: Felipe Balbi [mailto:felipe.balbi@nokia.com] 
Sent: Thursday, December 04, 2008 4:44 PM
To: Pillai, Manikandan
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH 1/2] Put in supportframework for PR785 board.

On Thu, Dec 04, 2008 at 03:53:26PM +0530, ext Manikandan Pillai wrote:
> Resending this patch with fixes for comments:
> This patch provides the support framework for PR785 boards.
> More patches will follow that will allow complete programming
> support for PR785 boards.
> The board-omap3evm.c contains the I2C devices to be supported.
> CONFIG_PR785 is configuration used for the PR785 boards. This patch
> provides support for TPS6235x devices on PR785 through I2C2 bus.
> Support for I2C2 or I2C4 and selection between them will be given in
> subsequent patches.
> 
> The selection of TWL4030 or PR785 is for now through compile time
> option since a real time check is not clear.
> 
> Signed-off-by: Manikandan Pillai <mani.pillai@ti.com>
> ---
>  arch/arm/mach-omap2/board-omap3evm.c |   22 +++++++++++++++++++++-
>  arch/arm/mach-omap2/mmc-twl4030.c    |    5 +++--
>  drivers/mfd/Kconfig                  |   14 ++++++++++++++
>  drivers/video/omap/lcd_omap3evm.c    |    4 ++++
>  4 files changed, 42 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
> index 8a1b86e..22ac2e9 100644
> --- a/arch/arm/mach-omap2/board-omap3evm.c
> +++ b/arch/arm/mach-omap2/board-omap3evm.c
> @@ -42,7 +42,6 @@
>  #include "twl4030-generic-scripts.h"
>  #include "mmc-twl4030.h"
>  
> -
>  static struct resource omap3evm_smc911x_resources[] = {
>  	[0] =	{
>  		.start  = OMAP3EVM_ETHR_START,
> @@ -90,6 +89,7 @@ static struct omap_uart_config omap3_evm_uart_config __initdata = {
>  	.enabled_uarts	= ((1 << 0) | (1 << 1) | (1 << 2)),
>  };
>  
> +#if defined(CONFIG_TWL4030_CORE)
>  static struct twl4030_gpio_platform_data omap3evm_gpio_data = {
>  	.gpio_base	= OMAP_MAX_GPIO_LINES,
>  	.irq_base	= TWL4030_GPIO_IRQ_BASE,
> @@ -151,11 +151,31 @@ static struct i2c_board_info __initdata omap3evm_i2c_boardinfo[] = {
>  		.platform_data = &omap3evm_twldata,
>  	},
>  };
> +#endif
> +
> +#if defined(CONFIG_PR785)
> +static struct i2c_board_info __initdata tps_6235x_i2c_board_info[] = {
> +	{
> +		I2C_BOARD_INFO("tps62352", 0x4A),
> +		.flags = I2C_CLIENT_WAKE,
> +	},
> +	{
> +		I2C_BOARD_INFO("tps62353", 0x48),
> +		.flags = I2C_CLIENT_WAKE,
> +	},
> +};
> +#endif
>  
>  static int __init omap3_evm_i2c_init(void)
>  {
> +#if defined(CONFIG_PR785)
> +	omap_register_i2c_bus(1, 2600, tps_6235x_i2c_board_info,
> +		ARRAY_SIZE(tps_6235x_i2c_board_info));
> +#endif
> +#if defined(CONFIG_TWL4030_CORE)
>  	omap_register_i2c_bus(1, 2600, omap3evm_i2c_boardinfo,
>  			ARRAY_SIZE(omap3evm_i2c_boardinfo));
> +#endif
>  	omap_register_i2c_bus(2, 400, NULL, 0);
>  	omap_register_i2c_bus(3, 400, NULL, 0);
>  	return 0;
> diff --git a/arch/arm/mach-omap2/mmc-twl4030.c b/arch/arm/mach-omap2/mmc-twl4030.c
> index 626d668..daf10f3 100644
> --- a/arch/arm/mach-omap2/mmc-twl4030.c
> +++ b/arch/arm/mach-omap2/mmc-twl4030.c

it doesn't make sense to build this file if you don't have twl4030 in
the board. Better to have something like mmc-tps6235x.c or something
like that.
[Pillai, Manikandan] This would be provided in a latter patch that provides support for MMC1. I have created another file mmc-pr785.c in this patch. I am
currently testing and shall send it soon.

> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> index 650b51c..3fee589 100644
> --- a/drivers/mfd/Kconfig
> +++ b/drivers/mfd/Kconfig
> @@ -61,6 +61,8 @@ config UCB1400_CORE
>  	  To compile this driver as a module, choose M here: the
>  	  module will be called ucb1400_core.
>  
> +menu "Texas Instruments Power board Support"
> +
>  config TWL4030_CORE
>  	bool "Texas Instruments TWL4030/TPS659x0 Support"
>  	depends on I2C=y && GENERIC_HARDIRQS
> @@ -84,6 +86,18 @@ config TWL4030_POWER
>  	  oscillators are switched off or on or reset when a sleep, wakeup
>  	  or warm reset event occurs.
>  
> +config PR785
> +	bool "A Texas Instruments TPS6235X based Power Module"
> +	depends on I2C=y && MACH_OMAP3EVM=y && GENERIC_GPIO && (ARCH_OMAP3)
> +	default n
> +	help
> +	Say yes here if you are using the TPS6235x based PR785 Power Module
> +	for the EVM boards. This core driver provides register access and IRQ
> +	handling facilities, and registers devices for the various functions
> +	so that function-specific drivers can bind to them.
> +
> +endmenu

where's the driver for it ??
[Pillai, Manikandan] The PATCH 2/2 contains the driver file. This has only
the framework

-- 
balbi


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] Put in supportframework for PR785 board.
  2008-12-04 11:30   ` Pillai, Manikandan
@ 2008-12-04 11:39     ` Felipe Balbi
  2008-12-04 18:00       ` David Brownell
  2008-12-04 17:59     ` David Brownell
  1 sibling, 1 reply; 7+ messages in thread
From: Felipe Balbi @ 2008-12-04 11:39 UTC (permalink / raw)
  To: ext Pillai, Manikandan; +Cc: felipe.balbi@nokia.com, linux-omap@vger.kernel.org

On Thu, Dec 04, 2008 at 05:00:14PM +0530, ext Pillai, Manikandan wrote:
> Hi,
> 
> Pls find my comments inlined.
> 
> -----Original Message-----
> From: Felipe Balbi [mailto:felipe.balbi@nokia.com] 
> Sent: Thursday, December 04, 2008 4:44 PM
> To: Pillai, Manikandan
> Cc: linux-omap@vger.kernel.org
> Subject: Re: [PATCH 1/2] Put in supportframework for PR785 board.
> 
> On Thu, Dec 04, 2008 at 03:53:26PM +0530, ext Manikandan Pillai wrote:
> > Resending this patch with fixes for comments:
> > This patch provides the support framework for PR785 boards.
> > More patches will follow that will allow complete programming
> > support for PR785 boards.
> > The board-omap3evm.c contains the I2C devices to be supported.
> > CONFIG_PR785 is configuration used for the PR785 boards. This patch
> > provides support for TPS6235x devices on PR785 through I2C2 bus.
> > Support for I2C2 or I2C4 and selection between them will be given in
> > subsequent patches.
> > 
> > The selection of TWL4030 or PR785 is for now through compile time
> > option since a real time check is not clear.
> > 
> > Signed-off-by: Manikandan Pillai <mani.pillai@ti.com>
> > ---
> >  arch/arm/mach-omap2/board-omap3evm.c |   22 +++++++++++++++++++++-
> >  arch/arm/mach-omap2/mmc-twl4030.c    |    5 +++--
> >  drivers/mfd/Kconfig                  |   14 ++++++++++++++
> >  drivers/video/omap/lcd_omap3evm.c    |    4 ++++
> >  4 files changed, 42 insertions(+), 3 deletions(-)
> > 
> > diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
> > index 8a1b86e..22ac2e9 100644
> > --- a/arch/arm/mach-omap2/board-omap3evm.c
> > +++ b/arch/arm/mach-omap2/board-omap3evm.c
> > @@ -42,7 +42,6 @@
> >  #include "twl4030-generic-scripts.h"
> >  #include "mmc-twl4030.h"
> >  
> > -
> >  static struct resource omap3evm_smc911x_resources[] = {
> >  	[0] =	{
> >  		.start  = OMAP3EVM_ETHR_START,
> > @@ -90,6 +89,7 @@ static struct omap_uart_config omap3_evm_uart_config __initdata = {
> >  	.enabled_uarts	= ((1 << 0) | (1 << 1) | (1 << 2)),
> >  };
> >  
> > +#if defined(CONFIG_TWL4030_CORE)
> >  static struct twl4030_gpio_platform_data omap3evm_gpio_data = {
> >  	.gpio_base	= OMAP_MAX_GPIO_LINES,
> >  	.irq_base	= TWL4030_GPIO_IRQ_BASE,
> > @@ -151,11 +151,31 @@ static struct i2c_board_info __initdata omap3evm_i2c_boardinfo[] = {
> >  		.platform_data = &omap3evm_twldata,
> >  	},
> >  };
> > +#endif
> > +
> > +#if defined(CONFIG_PR785)
> > +static struct i2c_board_info __initdata tps_6235x_i2c_board_info[] = {
> > +	{
> > +		I2C_BOARD_INFO("tps62352", 0x4A),
> > +		.flags = I2C_CLIENT_WAKE,
> > +	},
> > +	{
> > +		I2C_BOARD_INFO("tps62353", 0x48),
> > +		.flags = I2C_CLIENT_WAKE,
> > +	},
> > +};
> > +#endif
> >  
> >  static int __init omap3_evm_i2c_init(void)
> >  {
> > +#if defined(CONFIG_PR785)
> > +	omap_register_i2c_bus(1, 2600, tps_6235x_i2c_board_info,
> > +		ARRAY_SIZE(tps_6235x_i2c_board_info));
> > +#endif
> > +#if defined(CONFIG_TWL4030_CORE)
> >  	omap_register_i2c_bus(1, 2600, omap3evm_i2c_boardinfo,
> >  			ARRAY_SIZE(omap3evm_i2c_boardinfo));
> > +#endif
> >  	omap_register_i2c_bus(2, 400, NULL, 0);
> >  	omap_register_i2c_bus(3, 400, NULL, 0);
> >  	return 0;
> > diff --git a/arch/arm/mach-omap2/mmc-twl4030.c b/arch/arm/mach-omap2/mmc-twl4030.c
> > index 626d668..daf10f3 100644
> > --- a/arch/arm/mach-omap2/mmc-twl4030.c
> > +++ b/arch/arm/mach-omap2/mmc-twl4030.c
> 
> it doesn't make sense to build this file if you don't have twl4030 in
> the board. Better to have something like mmc-tps6235x.c or something
> like that.
> [Pillai, Manikandan] This would be provided in a latter patch that provides support for MMC1. I have created another file mmc-pr785.c in this patch. I am
> currently testing and shall send it soon.
> 
> > diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> > index 650b51c..3fee589 100644
> > --- a/drivers/mfd/Kconfig
> > +++ b/drivers/mfd/Kconfig
> > @@ -61,6 +61,8 @@ config UCB1400_CORE
> >  	  To compile this driver as a module, choose M here: the
> >  	  module will be called ucb1400_core.
> >  
> > +menu "Texas Instruments Power board Support"
> > +
> >  config TWL4030_CORE
> >  	bool "Texas Instruments TWL4030/TPS659x0 Support"
> >  	depends on I2C=y && GENERIC_HARDIRQS
> > @@ -84,6 +86,18 @@ config TWL4030_POWER
> >  	  oscillators are switched off or on or reset when a sleep, wakeup
> >  	  or warm reset event occurs.
> >  
> > +config PR785
> > +	bool "A Texas Instruments TPS6235X based Power Module"
> > +	depends on I2C=y && MACH_OMAP3EVM=y && GENERIC_GPIO && (ARCH_OMAP3)
> > +	default n
> > +	help
> > +	Say yes here if you are using the TPS6235x based PR785 Power Module
> > +	for the EVM boards. This core driver provides register access and IRQ
> > +	handling facilities, and registers devices for the various functions
> > +	so that function-specific drivers can bind to them.
> > +
> > +endmenu
> 
> where's the driver for it ??
> [Pillai, Manikandan] The PATCH 2/2 contains the driver file. This has only
> the framework

so the Kconfig for that driver should be together with the driver.

-- 
balbi

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] Put in supportframework for PR785 board.
  2008-12-04 11:30   ` Pillai, Manikandan
  2008-12-04 11:39     ` Felipe Balbi
@ 2008-12-04 17:59     ` David Brownell
  1 sibling, 0 replies; 7+ messages in thread
From: David Brownell @ 2008-12-04 17:59 UTC (permalink / raw)
  To: Pillai, Manikandan; +Cc: felipe.balbi@nokia.com, linux-omap@vger.kernel.org

On Thursday 04 December 2008, Pillai, Manikandan wrote:
> > > --- a/arch/arm/mach-omap2/mmc-twl4030.c
> > > +++ b/arch/arm/mach-omap2/mmc-twl4030.c
> 
> > it doesn't make sense to build this file if you don't have twl4030 in
> > the board. Better to have something like mmc-tps6235x.c or something
> > like that.
>
> [Pillai, Manikandan] This would be provided in a latter patch that
> provides support for MMC1. I have created another file mmc-pr785.c in
> this patch. I am currently testing and shall send it soon.

Note that current plans for mmc-twl4030.c include
converting it to use the regulator framework after
the current stuff get submitted for mainline.

That should be the last remnant of the twl4030-specific
support in that driver glue.  Ideally there will be no
need for an mmc-pr785 ... so maybe mmc-twl4030.c should
get renamed (again!) to be generic.

Or better yet, your work for pr785 can produce that
fully genericized version.  :)

- Dave


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] Put in supportframework for PR785 board.
  2008-12-04 11:39     ` Felipe Balbi
@ 2008-12-04 18:00       ` David Brownell
  0 siblings, 0 replies; 7+ messages in thread
From: David Brownell @ 2008-12-04 18:00 UTC (permalink / raw)
  To: felipe.balbi, ext Pillai, Manikandan; +Cc: linux-omap@vger.kernel.org

On Thursday 04 December 2008, Felipe Balbi wrote:
> > > --- a/drivers/mfd/Kconfig
> > > +++ b/drivers/mfd/Kconfig
> > > @@ -61,6 +61,8 @@ config UCB1400_CORE
> > >       To compile this driver as a module, choose M here: the
> > >       module will be called ucb1400_core.
> > >  
> > > +menu "Texas Instruments Power board Support"
> > > +
> > >  config TWL4030_CORE
> > >     bool "Texas Instruments TWL4030/TPS659x0 Support"
> > >     depends on I2C=y && GENERIC_HARDIRQS
> > > @@ -84,6 +86,18 @@ config TWL4030_POWER
> > >       oscillators are switched off or on or reset when a sleep, wakeup
> > >       or warm reset event occurs.
> > >  
> > > +config PR785
> > > +   bool "A Texas Instruments TPS6235X based Power Module"
> > > +   depends on I2C=y && MACH_OMAP3EVM=y && GENERIC_GPIO && (ARCH_OMAP3)
> > > +   default n
> > > +   help
> > > +   Say yes here if you are using the TPS6235x based PR785 Power Module
> > > +   for the EVM boards. This core driver provides register access and IRQ
> > > +   handling facilities, and registers devices for the various functions
> > > +   so that function-specific drivers can bind to them.
> > > +
> > > +endmenu
> > 
> > where's the driver for it ??
> > [Pillai, Manikandan] The PATCH 2/2 contains the driver file. This has only
> > the framework
> 
> so the Kconfig for that driver should be together with the driver.

IMO it'd be better to have this Kconfig go in
the arch/arm/mach-omap2/Kconfig, a direct child
of the OMAP3EVM entry ... the menu tree should be

	... other boards
	omap3evm?
		choice of power boards: 
			TWL4030/original
			PR785
	... other boards

That is, unless/until there's some way to detect
the type of board at runtime.

- Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] Put in supportframework for PR785 board.
  2008-12-04 10:23 [PATCH 1/2] Put in supportframework for PR785 board Manikandan Pillai
  2008-12-04 11:14 ` Felipe Balbi
@ 2008-12-04 18:10 ` David Brownell
  1 sibling, 0 replies; 7+ messages in thread
From: David Brownell @ 2008-12-04 18:10 UTC (permalink / raw)
  To: Manikandan Pillai; +Cc: linux-omap

On Thursday 04 December 2008, Manikandan Pillai wrote:
> +config PR785
> +       bool "A Texas Instruments TPS6235X based Power Module"
> +       depends on I2C=y && MACH_OMAP3EVM=y && GENERIC_GPIO && (ARCH_OMAP

One more comment about that symbol:  as well as living in the
mach-omap2/Kconfig file, it should probably look more like 

	config OMAP3EVM_PR785
	depends on MACH_OMAP3EVM

Having the module isn't a function of I2C, and the other dependencies
are implicit in OMAP3 EVM support.  The name "PR785" should be scoped;
in this usage it's specific to that EVM.  Another vendor might have a
board with the same name, let's not confuse things.  :)

- Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-12-04 18:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-04 10:23 [PATCH 1/2] Put in supportframework for PR785 board Manikandan Pillai
2008-12-04 11:14 ` Felipe Balbi
2008-12-04 11:30   ` Pillai, Manikandan
2008-12-04 11:39     ` Felipe Balbi
2008-12-04 18:00       ` David Brownell
2008-12-04 17:59     ` David Brownell
2008-12-04 18:10 ` David Brownell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.