linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: mythripk@ti.com
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH 1/2] OMAPDSS: HDMI: Move duplicate code from boardfile to
Date: Fri, 21 Oct 2011 14:12:41 +0300	[thread overview]
Message-ID: <1319195561.2870.75.camel@deskari> (raw)
In-Reply-To: <1319189211-10991-1-git-send-email-mythripk@ti.com>

On Fri, 2011-10-21 at 14:56 +0530, mythripk@ti.com wrote:
> From: Mythri P K <mythripk@ti.com>
> 
> Move duplicate HDMI mux_init code from omap4 and panda board file
> to display file.

The subject is again broken.

> Signed-off-by: Mythri P K <mythripk@ti.com>
> ---
>  arch/arm/mach-omap2/board-4430sdp.c    |   15 ---------------
>  arch/arm/mach-omap2/board-omap4panda.c |   16 ----------------
>  arch/arm/mach-omap2/display.c          |   25 +++++++++++++++++++++++++
>  3 files changed, 25 insertions(+), 31 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
> index 6d16306..4fcdf38 100644
> --- a/arch/arm/mach-omap2/board-4430sdp.c
> +++ b/arch/arm/mach-omap2/board-4430sdp.c
> @@ -601,20 +601,6 @@ static void __init omap_sfh7741prox_init(void)
>  			__func__, OMAP4_SFH7741_ENABLE_GPIO, error);
>  }
>  
> -static void sdp4430_hdmi_mux_init(void)
> -{
> -	/* PAD0_HDMI_HPD_PAD1_HDMI_CEC */
> -	omap_mux_init_signal("hdmi_hpd",
> -			OMAP_PIN_INPUT_PULLUP);
> -	omap_mux_init_signal("hdmi_cec",
> -			OMAP_PIN_INPUT_PULLUP);
> -	/* PAD0_HDMI_DDC_SCL_PAD1_HDMI_DDC_SDA */
> -	omap_mux_init_signal("hdmi_ddc_scl",
> -			OMAP_PIN_INPUT_PULLUP);
> -	omap_mux_init_signal("hdmi_ddc_sda",
> -			OMAP_PIN_INPUT_PULLUP);
> -}
> -
>  static struct gpio sdp4430_hdmi_gpios[] = {
>  	{ HDMI_GPIO_HPD,	GPIOF_OUT_INIT_HIGH,	"hdmi_gpio_hpd"   },
>  	{ HDMI_GPIO_LS_OE,	GPIOF_OUT_INIT_HIGH,	"hdmi_gpio_ls_oe" },
> @@ -844,7 +830,6 @@ static void omap_4430sdp_display_init(void)
>  		pr_err("%s: Could not get display_sel GPIO\n", __func__);
>  
>  	sdp4430_lcd_init();
> -	sdp4430_hdmi_mux_init();
>  	sdp4430_picodlp_init();
>  	omap_display_init(&sdp4430_dss_data);
>  }
> diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
> index a38ed273..bb5fca2 100644
> --- a/arch/arm/mach-omap2/board-omap4panda.c
> +++ b/arch/arm/mach-omap2/board-omap4panda.c
> @@ -484,21 +484,6 @@ int __init omap4_panda_dvi_init(void)
>  	return r;
>  }
>  
> -
> -static void omap4_panda_hdmi_mux_init(void)
> -{
> -	/* PAD0_HDMI_HPD_PAD1_HDMI_CEC */
> -	omap_mux_init_signal("hdmi_hpd",
> -			OMAP_PIN_INPUT_PULLUP);
> -	omap_mux_init_signal("hdmi_cec",
> -			OMAP_PIN_INPUT_PULLUP);
> -	/* PAD0_HDMI_DDC_SCL_PAD1_HDMI_DDC_SDA */
> -	omap_mux_init_signal("hdmi_ddc_scl",
> -			OMAP_PIN_INPUT_PULLUP);
> -	omap_mux_init_signal("hdmi_ddc_sda",
> -			OMAP_PIN_INPUT_PULLUP);
> -}
> -
>  static struct gpio panda_hdmi_gpios[] = {
>  	{ HDMI_GPIO_HPD,	GPIOF_OUT_INIT_HIGH, "hdmi_gpio_hpd"   },
>  	{ HDMI_GPIO_LS_OE,	GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" },
> @@ -550,7 +535,6 @@ void omap4_panda_display_init(void)
>  	if (r)
>  		pr_err("error initializing panda DVI\n");
>  
> -	omap4_panda_hdmi_mux_init();
>  	omap_display_init(&omap4_panda_dss_data);
>  }
>  
> diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
> index 94a96ce..f6590b9 100644
> --- a/arch/arm/mach-omap2/display.c
> +++ b/arch/arm/mach-omap2/display.c
> @@ -28,6 +28,7 @@
>  #include <plat/omap-pm.h>
>  #include <plat/common.h>
>  
> +#include "mux.h"
>  #include "control.h"
>  #include "display.h"
>  
> @@ -103,6 +104,20 @@ static const struct omap_dss_hwmod_data omap4_dss_hwmod_data[] __initdata = {
>  	{ "dss_hdmi", "omapdss_hdmi", -1 },
>  };
>  
> +static void omap4_hdmi_mux_pads(void)
> +{
> +	/* PAD0_HDMI_HPD_PAD1_HDMI_CEC */
> +	omap_mux_init_signal("hdmi_hpd",
> +			OMAP_PIN_INPUT_PULLUP);
> +	omap_mux_init_signal("hdmi_cec",
> +			OMAP_PIN_INPUT_PULLUP);
> +	/* PAD0_HDMI_DDC_SCL_PAD1_HDMI_DDC_SDA */
> +	omap_mux_init_signal("hdmi_ddc_scl",
> +			OMAP_PIN_INPUT_PULLUP);
> +	omap_mux_init_signal("hdmi_ddc_sda",
> +			OMAP_PIN_INPUT_PULLUP);
> +}
> +
>  static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes)
>  {
>  	u32 enable_mask, enable_shift;
> @@ -136,6 +151,14 @@ static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes)
>  	return 0;
>  }
>  
> +static int omap_hdmi_enable_pads(void)
> +{
> +	if (cpu_is_omap44xx())
> +		omap4_hdmi_mux_pads();
> +
> +	return 0;
> +}
> +
>  static int omap_dsi_enable_pads(int dsi_id, unsigned lane_mask)
>  {
>  	if (cpu_is_omap44xx())
> @@ -172,6 +195,8 @@ int __init omap_display_init(struct omap_dss_board_info *board_data)
>  		oh_count = ARRAY_SIZE(omap4_dss_hwmod_data);
>  	}
>  
> +	omap_hdmi_enable_pads();

Now this would be done for all boards, even those without HDMI. I don't
think that's right, as the HDMI pins can probably be used for something
else.

Should there be similar system than for DSI, so an enable and disable
function for the pads, called from the hdmi driver?

However, for DSI we need to change the pins during runtime, so that's
why the functions for DSI are required. If the HDMI configuration is
more static, and needs to be done only once at boot time, perhaps the
display_init function could go through the displays from the board_data,
and if there's an HDMI display defined, do the muxing.

So is there ever need to change the hdmi pins after they have been
configured? I guess the pins could be changed to safe mode when not in
use, preserving some power, but I don't know if that difference is
noticeable.

 Tomi



  reply	other threads:[~2011-10-21 11:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-21  9:26 [PATCH 1/2] OMAPDSS: HDMI: Move duplicate code from boardfile to mythripk
2011-10-21 11:12 ` Tomi Valkeinen [this message]
2011-10-25  9:41   ` K, Mythri P
2011-10-26  8:27     ` Tomi Valkeinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1319195561.2870.75.camel@deskari \
    --to=tomi.valkeinen@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=mythripk@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).