mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "'Mika Westerberg'" <mika.westerberg@linux.intel.com>
To: "Chang, Rebecca Swee Fun" <rebecca.swee.fun.chang@intel.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] gpio: sch: Consolidate similar algorithms
Date: Wed, 24 Sep 2014 12:50:52 +0300	[thread overview]
Message-ID: <20140924095052.GZ1786@lahna.fi.intel.com> (raw)
In-Reply-To: <50B33AC5ED75F74F991980326F1C438D0FBDBA92@PGSMSX108.gar.corp.intel.com>

On Wed, Sep 24, 2014 at 12:55:07AM +0000, Chang, Rebecca Swee Fun wrote:
> > > The register values are required when it comes to IRQ handling. By
> > > passing in the registers values, we can make full use of the
> > > algorithms without introducing extra/similar algorithms to compute
> > > other register offset values.
> > > For example, we have other offset values to handle such as:-
> > > GTPE	0x0C
> > > GTNE	0x10
> > > GGPE	0x14
> > > GSMI	0x18
> > > GTS	0x1C
> > > CGNMIEN	0x40
> > > RGNMIEN	0x44
> > 
> > Well, can we at least call it something else than sch_gpio_enable()?
> > Perhaps sch_gpio_set_value() or so?
> 
> sch_gpio_set_value() sounds good. After think twice, I intend to merge
> sch_gpio_enable() and sch_gpio_disable() into one functions. Using
> variable "enable" as an indicator, I can control whether to enable or
> disable when calling the function. Here is my draft:

Actually sch_gpio_set_value() is too close to sch_gpio_set() which sets
the GPIO to 1 or 0. How about sch_gpio_register_set() or something along
those lines?

And I don't think it is good idea to add yet another functionality, like
enable there. Please leave sch_gpio_enable()/sch_gpio_disable() as is.

  reply	other threads:[~2014-09-24  9:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-17  8:49 [PATCH 0/3] Enable Quark X1000 support in gpio-sch Chang Rebecca Swee Fun
2014-09-17  8:49 ` [PATCH 1/3] gpio: sch: Consolidate similar algorithms Chang Rebecca Swee Fun
2014-09-18 11:17   ` Mika Westerberg
2014-09-22  5:43     ` Chang, Rebecca Swee Fun
2014-09-22  9:25       ` 'Mika Westerberg'
2014-09-24  0:55         ` Chang, Rebecca Swee Fun
2014-09-24  9:50           ` 'Mika Westerberg' [this message]
2014-09-26  1:35             ` Chang, Rebecca Swee Fun
2014-09-17  8:49 ` [PATCH 2/3] gpio: sch: Add support for Intel Quark X1000 SoC Chang Rebecca Swee Fun
2014-09-18 11:22   ` Mika Westerberg
2014-09-22  0:16     ` Chang, Rebecca Swee Fun
2014-09-17  8:49 ` [PATCH 3/3] gpio: sch: Enable IRQ support for Quark X1000 Chang Rebecca Swee Fun
2014-09-18 11:31   ` Mika Westerberg
2014-09-26  9:14     ` Chang, Rebecca Swee Fun
2014-09-26  9:18       ` 'Mika Westerberg'
2014-09-26  9:36         ` Chang, Rebecca Swee Fun
2014-10-15  6:55         ` Linus Walleij
2014-09-23 15:33 ` [PATCH 0/3] Enable Quark X1000 support in gpio-sch Linus Walleij

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=20140924095052.GZ1786@lahna.fi.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rebecca.swee.fun.chang@intel.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

Powered by JetHome