Re: [PATCH 3/6] Regulator: Use common regulator supplies and init data structs

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

 



On Fri, Jan 8, 2010 at 7:57 PM, Anuj Aggarwal <anuj.aggarwal@xxxxxx> wrote:
> Common TWL4030 specific regulator supplies and init data structs are
> used instead of platform specific ones. Only one copy of the common
> structs will be included in the image, built for multiple OMAP3 based
> platforms.
>
> Signed-off-by: Anuj Aggarwal <anuj.aggarwal@xxxxxx>
> ---
>  arch/arm/mach-omap2/board-3430sdp.c          |   32 +++++++++++++++++--------
>  arch/arm/mach-omap2/board-cm-t35.c           |   14 ++++++++---
>  arch/arm/mach-omap2/board-igep0020.c         |    7 ++++-
>  arch/arm/mach-omap2/board-ldp.c              |    7 ++++-
>  arch/arm/mach-omap2/board-omap3beagle.c      |   14 ++++++++---
>  arch/arm/mach-omap2/board-omap3evm.c         |   25 +++++++++++++-------
>  arch/arm/mach-omap2/board-omap3pandora.c     |   14 ++++++++---
>  arch/arm/mach-omap2/board-omap3touchbook.c   |   14 ++++++++---
>  arch/arm/mach-omap2/board-overo.c            |    8 +++++-
>  arch/arm/mach-omap2/board-zoom-peripherals.c |   21 +++++++++++-----
>  10 files changed, 108 insertions(+), 48 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
> index 2951029..b1267eb 100644
> --- a/arch/arm/mach-omap2/board-3430sdp.c
> +++ b/arch/arm/mach-omap2/board-3430sdp.c
> @@ -55,6 +55,18 @@
>
>  #define TWL4030_MSECURE_GPIO 22
>
> +extern struct regulator_consumer_supply twl4030_vmmc1_supply;
> +extern struct regulator_consumer_supply twl4030_vmmc2_supply;
> +extern struct regulator_consumer_supply twl4030_vsim_supply;
> +
> +extern struct regulator_init_data vaux1_data;
> +extern struct regulator_init_data vaux2_data;
> +extern struct regulator_init_data vaux3_data;
> +extern struct regulator_init_data vaux4_data;
> +extern struct regulator_init_data vmmc1_data;
> +extern struct regulator_init_data vmmc2_data;
> +extern struct regulator_init_data vsim_data;

Have you tried running your patches through ./scripts/checkpatch.pl?

WARNING: externs should be avoided in .c files
#75: FILE: arch/arm/mach-omap2/board-3430sdp.c:58:
+extern struct regulator_consumer_supply twl4030_vmmc1_supply;

<snip>

> diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
> index 4a24d94..98b46ef 100644
> --- a/arch/arm/mach-omap2/board-omap3pandora.c
> +++ b/arch/arm/mach-omap2/board-omap3pandora.c

<snip>

> @@ -258,8 +264,8 @@ static struct twl4030_platform_data omap3pandora_twldata = {
>        .gpio           = &omap3pandora_gpio_data,
>        .usb            = &omap3pandora_usb_data,
>        .codec          = &omap3pandora_codec_data,
> -       .vmmc1          = &pandora_vmmc1,
> -       .vmmc2          = &pandora_vmmc2,
> +       .vmmc1          = &vmmc1_data,
> +       .vmmc2          = &vmmc2_data,

Your common supply file has VMMC2 supply configured for 1.8V which is
wrong for pandora (it uses 3.1V because it has a transceiver attached
to MMC2 that handles level shifting transparently).

I think you should leave pandora board file alone, because it uses
many supplies differently than your common file configures them
(VAUX1-VAUX4, VSIM differ, only VMMC1, VDAC and VPLL2 match, which is
not that much duplication).
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux