linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] gpio: xgene: Enable ACPI support for X-Gene GFC GPIO driver
@ 2016-04-30 20:49 Duc Dang
  2016-05-01  8:25 ` Linus Walleij
  0 siblings, 1 reply; 3+ messages in thread
From: Duc Dang @ 2016-04-30 20:49 UTC (permalink / raw)
  To: Linus Walleij, Alexandre Courbot
  Cc: linux-gpio, linux-kernel, patches, Duc Dang

This patch enables ACPI support for X-Gene GFC GPIO driver.

Signed-off-by: Duc Dang <dhdang@apm.com>
---
 drivers/gpio/gpio-xgene.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpio/gpio-xgene.c b/drivers/gpio/gpio-xgene.c
index 0dc9161..c00c408 100644
--- a/drivers/gpio/gpio-xgene.c
+++ b/drivers/gpio/gpio-xgene.c
@@ -17,6 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <linux/acpi.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
@@ -218,10 +219,18 @@ static const struct of_device_id xgene_gpio_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, xgene_gpio_of_match);
 
+#ifdef CONFIG_ACPI
+static const struct acpi_device_id xgene_gpio_acpi_match[] = {
+	{ "APMC0D14", 0 },
+	{ },
+};
+#endif
+
 static struct platform_driver xgene_gpio_driver = {
 	.driver = {
 		.name = "xgene-gpio",
 		.of_match_table = xgene_gpio_of_match,
+		.acpi_match_table = ACPI_PTR(xgene_gpio_acpi_match),
 		.pm     = XGENE_GPIO_PM_OPS,
 	},
 	.probe = xgene_gpio_probe,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] gpio: xgene: Enable ACPI support for X-Gene GFC GPIO driver
  2016-04-30 20:49 [PATCH 1/1] gpio: xgene: Enable ACPI support for X-Gene GFC GPIO driver Duc Dang
@ 2016-05-01  8:25 ` Linus Walleij
  2016-05-03  1:00   ` Duc Dang
  0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2016-05-01  8:25 UTC (permalink / raw)
  To: Duc Dang; +Cc: Alexandre Courbot, linux-gpio, linux-kernel, patches

On Sat, Apr 30, 2016 at 10:49 PM, Duc Dang <dhdang@apm.com> wrote:

> This patch enables ACPI support for X-Gene GFC GPIO driver.
>
> Signed-off-by: Duc Dang <dhdang@apm.com>

Patch applied.

Duc do you have a datasheet for this GPIO controller?

I want to know if it has further abilities, when I see this:

#define GPIO_SET_DR_OFFSET    0x0C
#define GPIO_DATA_OFFSET    0x14
#define GPIO_BANK_STRIDE    0x0C

It seems like there is a whole bunch of registers there that are not
yet utilized.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] gpio: xgene: Enable ACPI support for X-Gene GFC GPIO driver
  2016-05-01  8:25 ` Linus Walleij
@ 2016-05-03  1:00   ` Duc Dang
  0 siblings, 0 replies; 3+ messages in thread
From: Duc Dang @ 2016-05-03  1:00 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Alexandre Courbot, linux-gpio, linux-kernel, patches

On Sun, May 1, 2016 at 1:25 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
> On Sat, Apr 30, 2016 at 10:49 PM, Duc Dang <dhdang@apm.com> wrote:
>
>> This patch enables ACPI support for X-Gene GFC GPIO driver.
>>
>> Signed-off-by: Duc Dang <dhdang@apm.com>
>
> Patch applied.

Thanks, Linus.

>
> Duc do you have a datasheet for this GPIO controller?
>

This controller is simple. We have 3 16-pin sets of GPIO pins (these
pins can be configured as part of the Flash controller pins, or as
GPIO pins).
In GPIO mode, we can configure the pin as output or input. There is no
interrupt support for these GPIO pins.

Regards,
Duc Dang.

> I want to know if it has further abilities, when I see this:
>
> #define GPIO_SET_DR_OFFSET    0x0C
> #define GPIO_DATA_OFFSET    0x14
> #define GPIO_BANK_STRIDE    0x0C
>
> It seems like there is a whole bunch of registers there that are not
> yet utilized.
>
> Yours,
> Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-05-03  1:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-30 20:49 [PATCH 1/1] gpio: xgene: Enable ACPI support for X-Gene GFC GPIO driver Duc Dang
2016-05-01  8:25 ` Linus Walleij
2016-05-03  1:00   ` Duc Dang

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).