linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	David Cohen <david.a.cohen@linux.intel.com>,
	"Wood, Brian J" <brian.j.wood@intel.com>
Subject: Re: [PATCH v2 1/1] gpio: merrifield: Introduce GPIO driver to support Merrifield
Date: Mon, 11 Jul 2016 12:45:55 +0300	[thread overview]
Message-ID: <1468230355.30123.536.camel@linux.intel.com> (raw)
In-Reply-To: <CACRpkdZVvdTy6VRLEUQ_p_G3Eio-afY8czVaRAhPJn0_cCYw4A@mail.gmail.com>

On Mon, 2016-07-11 at 11:06 +0200, Linus Walleij wrote:
> On Fri, Jul 8, 2016 at 1:08 PM, Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> 
> > Intel Merrifield platform has a special GPIO controller to drive
> > pads when they
> > are muxed in corresponding mode.
> > 
> > Intel Merrifield GPIO IP is slightly different here and there in
> > comparison to
> > the older Intel MID platforms. These differences include in
> > particular the
> > shaked register offsets, specific support of level triggered
> > interrupts and
> > wake capable sources, as well as a pinctrl which is a separate IP.
> > 
> > Instead of uglifying existing driver I decide to provide a new one
> > slightly
> > based on gpio-intel-mid.c. So, anyone can easily compare what
> > changes are
> > happened to be here.
> > 
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> That is a nice driver.
> 
> I'm especially fond of the way you carefully handle the edge vs
> level IRQs, good job.

Thanks!

> 
> > +static const struct mrfld_gpio_pinrange mrfld_gpio_ranges[] = {
> > +       GPIO_PINRANGE(0, 11, 146),
> > +       GPIO_PINRANGE(12, 13, 144),
> > +       GPIO_PINRANGE(14, 15, 35),
> > +       GPIO_PINRANGE(16, 16, 164),
> > +       GPIO_PINRANGE(17, 18, 105),
> > +       GPIO_PINRANGE(19, 22, 101),
> > +       GPIO_PINRANGE(23, 30, 107),
> > +       GPIO_PINRANGE(32, 43, 67),
> > +       GPIO_PINRANGE(44, 63, 195),
> > +       GPIO_PINRANGE(64, 67, 140),
> > +       GPIO_PINRANGE(68, 69, 165),
> > +       GPIO_PINRANGE(70, 71, 65),
> > +       GPIO_PINRANGE(72, 76, 228),
> > +       GPIO_PINRANGE(77, 86, 37),
> > +       GPIO_PINRANGE(87, 87, 48),
> > +       GPIO_PINRANGE(88, 88, 47),
> > +       GPIO_PINRANGE(89, 96, 49),
> > +       GPIO_PINRANGE(97, 97, 34),
> > +       GPIO_PINRANGE(102, 119, 83),
> > +       GPIO_PINRANGE(120, 123, 79),
> > +       GPIO_PINRANGE(124, 135, 115),
> > +       GPIO_PINRANGE(137, 142, 158),
> > +       GPIO_PINRANGE(154, 163, 24),
> > +       GPIO_PINRANGE(164, 176, 215),
> > +       GPIO_PINRANGE(177, 189, 127),
> > +       GPIO_PINRANGE(190, 191, 178),
> > +};
> 
> In device tree we put this into the hardware description (the device
> tree),
> and I'm expecting ACPI to come up with something similar, but I guess
> that
> for a pure PCI device you have no choice but to do it this way.
> 
> And you also do it the elegant way by associating with the gpiochip
> rather than the other way around from the pin controller side.

Unfortunately this all Intel MID era is scary SFI, we have no other
choice for most of the drivers for it.

But for ACPI we would really try hard to do our best and provide
information in some tables/properties.

-- 

Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2016-07-11  9:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-08 11:08 [PATCH v2 1/1] gpio: merrifield: Introduce GPIO driver to support Merrifield Andy Shevchenko
2016-07-08 13:16 ` Mika Westerberg
2016-07-08 16:54 ` Wood, Brian J
2016-07-08 17:05   ` Andy Shevchenko
2016-07-11  9:12   ` Linus Walleij
2016-07-11  4:55 ` Mika Westerberg
2016-07-11  9:13   ` Linus Walleij
2016-07-11  9:43     ` Andy Shevchenko
2016-07-11 10:08       ` Andy Shevchenko
2016-07-11  9:06 ` Linus Walleij
2016-07-11  9:45   ` Andy Shevchenko [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=1468230355.30123.536.camel@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=brian.j.wood@intel.com \
    --cc=david.a.cohen@linux.intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=mika.westerberg@linux.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;
as well as URLs for NNTP newsgroup(s).