All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: alsa-devel@alsa-project.org, linux-gpio@vger.kernel.org,
	Erik Schmauss <erik.schmauss@intel.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	"Rafael J . Wysocki" <rjw@rjwysocki.net>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	linux-acpi@vger.kernel.org, Mark Brown <broonie@kernel.org>,
	Mika Westerberg <mika.westerberg@linux.intel.com>
Subject: Applied "gpio: merrifield: Add support of ACPI enabled platforms" to the asoc tree
Date: Fri, 12 Jan 2018 20:01:22 +0000	[thread overview]
Message-ID: <E1ea5Vy-0008R8-Hz@debutante> (raw)
In-Reply-To: <20180105160935.48588-3-andriy.shevchenko@linux.intel.com>

The patch

   gpio: merrifield: Add support of ACPI enabled platforms

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From dd1dbf94d2826a045fbbe2649d84b27d48620d56 Mon Sep 17 00:00:00 2001
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: Fri, 5 Jan 2018 18:09:34 +0200
Subject: [PATCH] gpio: merrifield: Add support of ACPI enabled platforms

The driver needs the pin control device name for ACPI.

We are looking through ACPI namespace and return first found device
based on ACPI HID for Intel Merrifield FLIS (pin control device).

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/gpio/gpio-merrifield.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-merrifield.c b/drivers/gpio/gpio-merrifield.c
index dd67a31ac337..c38624ea0251 100644
--- a/drivers/gpio/gpio-merrifield.c
+++ b/drivers/gpio/gpio-merrifield.c
@@ -9,6 +9,7 @@
  * published by the Free Software Foundation.
  */
 
+#include <linux/acpi.h>
 #include <linux/bitops.h>
 #include <linux/gpio/driver.h>
 #include <linux/init.h>
@@ -380,9 +381,16 @@ static void mrfld_irq_init_hw(struct mrfld_gpio *priv)
 	}
 }
 
+static const char *mrfld_gpio_get_pinctrl_dev_name(void)
+{
+	const char *dev_name = acpi_dev_get_first_match_name("INTC1002", NULL, -1);
+	return dev_name ? dev_name : "pinctrl-merrifield";
+}
+
 static int mrfld_gpio_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 {
 	const struct mrfld_gpio_pinrange *range;
+	const char *pinctrl_dev_name;
 	struct mrfld_gpio *priv;
 	u32 gpio_base, irq_base;
 	void __iomem *base;
@@ -439,10 +447,11 @@ static int mrfld_gpio_probe(struct pci_dev *pdev, const struct pci_device_id *id
 		return retval;
 	}
 
+	pinctrl_dev_name = mrfld_gpio_get_pinctrl_dev_name();
 	for (i = 0; i < ARRAY_SIZE(mrfld_gpio_ranges); i++) {
 		range = &mrfld_gpio_ranges[i];
 		retval = gpiochip_add_pin_range(&priv->chip,
-						"pinctrl-merrifield",
+						pinctrl_dev_name,
 						range->gpio_base,
 						range->pin_base,
 						range->npins);
-- 
2.15.1

  parent reply	other threads:[~2018-01-12 20:01 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-05 16:09 [PATCH v3 0/3] ACPI, ASoC, gpio: Add and use acpi_dev_get_first_match_name() Andy Shevchenko
2018-01-05 16:09 ` [PATCH v3 1/3] ACPI / utils: Introduce acpi_dev_get_first_match_name() Andy Shevchenko
2018-01-05 23:27   ` Rafael J. Wysocki
2018-01-08 13:09     ` Andy Shevchenko
2018-01-09  0:18       ` Rafael J. Wysocki
2018-01-09 13:34         ` Linus Walleij
2018-01-09 15:54       ` Mark Brown
2018-01-12 13:22         ` Rafael J. Wysocki
2018-01-12 20:01   ` Applied "ACPI: utils: Introduce acpi_dev_get_first_match_name()" to the asoc tree Mark Brown
2018-01-05 16:09 ` [PATCH v3 2/3] gpio: merrifield: Add support of ACPI enabled platforms Andy Shevchenko
2018-01-06  9:32   ` Mika Westerberg
2018-01-09 13:37   ` Linus Walleij
2018-01-12 20:01   ` Mark Brown [this message]
2018-01-05 16:09 ` [PATCH v3 3/3] ASoC: Intel - Convert to use acpi_dev_get_first_match_name() Andy Shevchenko
2018-01-12 19:03   ` Mark Brown
2018-01-12 20:21     ` Andy Shevchenko
2018-01-12 21:01       ` Mark Brown
2018-01-12 21:03       ` Mark Brown
2018-01-05 16:13 ` [PATCH v3 0/3] ACPI, ASoC, gpio: Add and " Pierre-Louis Bossart
2018-01-05 17:08   ` Andy Shevchenko
2018-01-12 13:24 ` Rafael J. Wysocki
2018-01-12 14:00   ` Andy Shevchenko

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=E1ea5Vy-0008R8-Hz@debutante \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=erik.schmauss@intel.com \
    --cc=lgirdwood@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rjw@rjwysocki.net \
    /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.