All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juha Yrjola <juha.yrjola@solidboot.com>
To: Jani Nikula <ext-jani.1.nikula@nokia.com>
Cc: ext Kainan Cha <thezha@gmail.com>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: Re: [PATCH] ARM: OMAP: Fix GPIO switch initial output state	handling
Date: Wed, 11 Mar 2009 13:35:01 +0200	[thread overview]
Message-ID: <49B7A1E5.9060403@solidboot.com> (raw)
In-Reply-To: <1236762213.2365.64.camel@jani-desktop>

Jani Nikula wrote:

>> INIT_HIGH indicates the state of the gpio, not the state of the
>> switch. Why not ignore the OMAP_GPIO_SWITCH_FLAG_INVERTED all together
>> when setting up the switch. This way, the user does not have to think
>> twice. :)
> 
> The INVERTED flag can't be ignored, since sw->state must be the opposite
> of the GPIO if the flag is set. The only question is, should INIT_HIGH
> flag refer to the GPIO or the switch.
> 
> I did think about this, and the patch is as I intended it to be, i.e.
> INIT_HIGH refers to the switch. I thought this would be less confusing.
> If INVERTED is set, it's inverted *everywhere* - why not also when
> setting the initial value?

How about INIT_ACTIVE to reduce possible confusion? HIGH does imply an 
electrical level, as opposed to a more abstract activation level.

Cheers,
Juha

  reply	other threads:[~2009-03-11 11:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1236677181-16601-1-git-send-email-ext-jani.1.nikula@nokia.com>
2009-03-10 14:25 ` [PATCH] ARM: OMAP: Fix GPIO switch initial output state handling Kainan Cha
2009-03-11  9:03   ` Jani Nikula
2009-03-11 11:35     ` Juha Yrjola [this message]
2009-03-11 13:07       ` [PATCH v2] " Jani Nikula
2009-03-11 13:35         ` Kainan Cha
2009-03-11 16:38         ` [APPLIED] " Tony Lindgren

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=49B7A1E5.9060403@solidboot.com \
    --to=juha.yrjola@solidboot.com \
    --cc=ext-jani.1.nikula@nokia.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=thezha@gmail.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 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.