]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
gpio: intel-mid: Remove potentially harmful code
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 6 Jul 2016 09:50:12 +0000 (12:50 +0300)
committerSasha Levin <alexander.levin@verizon.com>
Mon, 22 Aug 2016 16:23:16 +0000 (12:23 -0400)
commitf9fef43a3266d385fabe8f63e6eabf54e3ea6bcc
tree817fd6229470c502b0e35bffad231272c4bdd220
parent7b37bc27c5c15495e601569bbe22e90744b13467
gpio: intel-mid: Remove potentially harmful code

[ Upstream commit 3dbd3212f81b2b410a34a922055e2da792864829 ]

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 someone wondering the existing gpio-intel-mid.c would be converted to actual
pinctrl (which by the fact it is now), though I wouldn't be a volunteer to do
that.

Fixes: d56d6b3d7d69 ("gpio: langwell: add Intel Merrifield support")
Cc: stable@vger.kernel.org # v3.13+
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
drivers/gpio/gpio-intel-mid.c