From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Alexandre Courbot <gnurou@gmail.com>,
linux-gpio@vger.kernel.org,
David Cohen <david.a.cohen@linux.intel.com>,
stable@vger.kernel.org, #@black.fi.intel.com,
v3.13+@black.fi.intel.com
Subject: Re: [PATCH v1 1/2] gpio: intel-mid: Remove potentially harmful code
Date: Fri, 08 Jul 2016 12:10:54 +0300 [thread overview]
Message-ID: <1467969054.30123.503.camel@linux.intel.com> (raw)
In-Reply-To: <20160708082040.GW23527@lahna.fi.intel.com>
On Fri, 2016-07-08 at 11:20 +0300, Mika Westerberg wrote:
> On Wed, Jul 06, 2016 at 12:50:12PM +0300, Andy Shevchenko wrote:
> > The commit d56d6b3d7d69 ("gpio: langwell: add Intel Merrifield
> > support")
> > doesn't look at all as a proper support for Intel Merrifield and I
> > dare to say
> > that it distorts the behaviour of the hardware.
> >
> > The register map is different on Intel Merrifield, i.e. only 6 out
> > of 8
> > register have the same purpose but none of them has same location in
> > the
> > address space. The current case potentially harmful to existing
> > hardware since
> > it's poking registers on wrong offsets and may set some pin to be
> > GPIO output
> > when connected hardware doesn't expect such.
> >
> > Besides the above GPIO and pinctrl on Intel Merrifield have been
> > located in
> > different IP blocks. The functionality has been extended as well,
> > i.e. added
> > support of level interrupts, special registers for wake capable
> > sources and
> > thus, in my opinion, requires a completele separate driver.
> >
> >
> If it is truely poking wrong registers, this is certainly right thing
> to
> do.
Yes, you might check it yourself, GPIO registers starts with offset 4,
instead of 0, and there are couple of w/o registers in the area to set
pin state. It means potentially you may find the case where suddenly one
pin not that one user asked for) might change direction followed by
voltage.
>
> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
>
> I take it we are getting a driver which is using the correct registers
> soon ;-)
It should be in your mailbox already.
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
next prev parent reply other threads:[~2016-07-08 9:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-06 9:50 [PATCH v1 1/2] gpio: intel-mid: Remove potentially harmful code Andy Shevchenko
2016-07-06 9:50 ` [PATCH v1 2/2] gpio: intel-mid: Sort header block alphabetically Andy Shevchenko
2016-07-08 8:22 ` Mika Westerberg
2016-07-08 9:11 ` Andy Shevchenko
2016-07-11 8:56 ` Linus Walleij
2016-07-08 8:20 ` [PATCH v1 1/2] gpio: intel-mid: Remove potentially harmful code Mika Westerberg
2016-07-08 9:10 ` Andy Shevchenko [this message]
2016-07-11 8:54 ` 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=1467969054.30123.503.camel@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=#@black.fi.intel.com \
--cc=david.a.cohen@linux.intel.com \
--cc=gnurou@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=stable@vger.kernel.org \
--cc=v3.13+@black.fi.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).