All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Mika Westerberg <mika.westerberg@linux.intel.com>,
	Linus Walleij <linus.walleij@linaro.org>
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Hans de Goede <hdegoede@redhat.com>, Takashi Iwai <tiwai@suse.de>,
	linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/3] pinctrl: Align Cannon Lake GPIO number space with Windows
Date: Tue, 28 Nov 2017 23:52:24 +0200	[thread overview]
Message-ID: <1511905944.25007.471.camel@linux.intel.com> (raw)
In-Reply-To: <20171127135444.66735-1-mika.westerberg@linux.intel.com>

On Mon, 2017-11-27 at 16:54 +0300, Mika Westerberg wrote:
> Hi,
> 
> It turns out that the Cannon Lake GPIO driver in Windows uses
> different
> GPIO numbering scheme than what Linux uses. Instead of hardware
> numbers it
> has "banks" of 32 pins even if the hardware group actually does not
> have
> that many pins. This is problematic for Linux because BIOS uses the
> same
> Windows numbering scheme in ACPI GpioIo/GpioInt resources, making
> Linux to
> pick a wrong pin.
> 
> For example the SD card detection GPIO resource in BIOS ACPI tables
> looks
> like:
> 
>   GpioInt (...) {231} // vSD3_CD_B
> 
> Where the real hardware number would be 180 instead of 231.
> 
> Unfortunately changing the BIOS and the Windows driver is not possible
> for
> Cannon Lake anymore so we need to handle it in Linux instead. This
> should
> be done properly in future platforms.
> 
> The patch series updates the Intel pinctrl driver to allow passing
> custom
> GPIO number space, taking advantage of pin ranges supported by the
> pinctrl
> core. However, before we can add these pin ranges we need to drop the
> custom Cherryview GPIO/ACPI translation first and make the driver to
> use
> direct mapping instead (which turns out to be much simpler).
> 
> Once that is done we update the Cannon Lake pinctrl driver to align
> with
> the Windows GPIO driver numbering scheme.

For all three:

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> 
> Mika Westerberg (3):
>   gpio / ACPI: Drop unnecessary ACPI GPIO to Linux GPIO translation
>   pinctrl: intel: Allow custom GPIO base for pad groups
>   pinctrl: cannonlake: Align GPIO number space with Windows
> 
>  drivers/gpio/gpiolib-acpi.c                |  75 +-------------
>  drivers/pinctrl/intel/pinctrl-cannonlake.c |  65 ++++++------
>  drivers/pinctrl/intel/pinctrl-cherryview.c |  59 ++++-------
>  drivers/pinctrl/intel/pinctrl-intel.c      | 156
> +++++++++++++++++++++--------
>  drivers/pinctrl/intel/pinctrl-intel.h      |   3 +
>  5 files changed, 176 insertions(+), 182 deletions(-)
> 

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

  parent reply	other threads:[~2017-11-28 21:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-27 13:54 [PATCH 0/3] pinctrl: Align Cannon Lake GPIO number space with Windows Mika Westerberg
2017-11-27 13:54 ` [PATCH 1/3] gpio / ACPI: Drop unnecessary ACPI GPIO to Linux GPIO translation Mika Westerberg
2017-11-28 21:05   ` Rafael J. Wysocki
2017-11-29 12:43   ` Linus Walleij
2017-11-27 13:54 ` [PATCH 2/3] pinctrl: intel: Allow custom GPIO base for pad groups Mika Westerberg
2017-11-29 12:46   ` Linus Walleij
2017-11-27 13:54 ` [PATCH 3/3] pinctrl: cannonlake: Align GPIO number space with Windows Mika Westerberg
2017-11-28 21:52 ` Andy Shevchenko [this message]
2017-11-29 12:49 ` [PATCH 0/3] pinctrl: Align Cannon Lake " Linus Walleij
2017-11-29 13:09   ` Mika Westerberg

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=1511905944.25007.471.camel@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=hdegoede@redhat.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=rjw@rjwysocki.net \
    --cc=tiwai@suse.de \
    /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.