public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: "Premi, Sanjeev" <premi@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: Re: Query on new mux usage
Date: Tue, 29 Dec 2009 10:23:38 -0800	[thread overview]
Message-ID: <20091229182338.GY3512@atomide.com> (raw)
In-Reply-To: <B85A65D85D7EB246BE421B3FB0FBB59301E1C30C1E@dbde02.ent.ti.com>

* Premi, Sanjeev <premi@ti.com> [091229 05:41]:
> Hi,
>  
> I am trying to define the mux settings for keypad on the omap3evm.
> I had a few queries on the same.
>  
> 1) Is it enough to me this change:
>  
>  static struct omap_board_mux board_mux[] __initdata = {
> +
> +       /* SYS_NIRQ */
> +       OMAP3_MUX(SYS_NIRQ, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP |
> +						OMAP_PIN_OFF_INPUT_PULLUP),
> +
>  	{ .reg_offset = OMAP_MUX_TERMINATOR },

This will do the trick for board specific things. If you want, you can
dump the whole mux table set by the bootloader via debugfs if you cat
/sys/kernel/debug/omap_mux. Then you can check and edit the table as
needed.
 
> 2) Or should I follow with this (in the evm init code):
>  
> +	omap_mux_init_signal("af26", OMAP_PIN_INPUT_PULLUP |
> +						OMAP_PIN_OFF_INPUT_PULLUP);

This can be used too if you prefer. The mux_init_gpio and mux_init_signal
functions are mostly intended for platform init functions for common
hardware, like MMC, USB etc. For board specific pins, I'd go with
#1 abobve.

> 3) OR is this a better(or worse)
> 
>  static struct omap_board_mux board_mux[] __initdata = {
> +
> +       /* SYS_NIRQ */
> +       OMAP3_MUX(SYS_NIRQ, OMAP_MUX_MODE0),
> +
>  	{ .reg_offset = OMAP_MUX_TERMINATOR },
> 
> ..and later
>  
> +	omap_mux_init_signal("af26", OMAP_PIN_INPUT_PULLUP |
> +						OMAP_PIN_OFF_INPUT_PULLUP);
> 

Then you're doing it twice, which is not needed.

Eventually we should have common init functions using hwmod for all
the omap internal devices and do the muxing there too. But some
board specific muxing will always be still needed.

Regards,

Tony

      reply	other threads:[~2009-12-29 18:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-29 13:42 Query on new mux usage Premi, Sanjeev
2009-12-29 18:23 ` Tony Lindgren [this message]

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=20091229182338.GY3512@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=premi@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