All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] pinctrl: mediatek: add setting for gpio and eint
@ 2016-02-16 19:16 ` Biao Huang
  0 siblings, 0 replies; 12+ messages in thread
From: Biao Huang @ 2016-02-16 19:16 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-kernel, linux-arm-kernel, linux-mediatek, linux-gpio,
	srv_heupstream, Yingjoe Chen, Hongzhou Yang, Eddie Huang

1. add input-enable setting in gpio_request_enable.
2. add input-enable and direction setting for eint resources.

Biao Huang (2):
  pinctrl: mediatek: add input-enable setting in gpio_request_enable
  pinctrl: mediatek: add input-enable and direction setting for eint
    resources

 drivers/pinctrl/mediatek/pinctrl-mtk-common.c |    5 +++++
 1 file changed, 5 insertions(+)

-- 
1.7.9.5


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

* [PATCH 0/2] pinctrl: mediatek: add setting for gpio and eint
@ 2016-02-16 19:16 ` Biao Huang
  0 siblings, 0 replies; 12+ messages in thread
From: Biao Huang @ 2016-02-16 19:16 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-kernel, linux-arm-kernel, linux-mediatek, linux-gpio,
	srv_heupstream, Yingjoe Chen, Hongzhou Yang, Eddie Huang

1. add input-enable setting in gpio_request_enable.
2. add input-enable and direction setting for eint resources.

Biao Huang (2):
  pinctrl: mediatek: add input-enable setting in gpio_request_enable
  pinctrl: mediatek: add input-enable and direction setting for eint
    resources

 drivers/pinctrl/mediatek/pinctrl-mtk-common.c |    5 +++++
 1 file changed, 5 insertions(+)

-- 
1.7.9.5

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

* [PATCH 0/2] pinctrl: mediatek: add setting for gpio and eint
@ 2016-02-16 19:16 ` Biao Huang
  0 siblings, 0 replies; 12+ messages in thread
From: Biao Huang @ 2016-02-16 19:16 UTC (permalink / raw)
  To: linux-arm-kernel

1. add input-enable setting in gpio_request_enable.
2. add input-enable and direction setting for eint resources.

Biao Huang (2):
  pinctrl: mediatek: add input-enable setting in gpio_request_enable
  pinctrl: mediatek: add input-enable and direction setting for eint
    resources

 drivers/pinctrl/mediatek/pinctrl-mtk-common.c |    5 +++++
 1 file changed, 5 insertions(+)

-- 
1.7.9.5

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

* [PATCH 1/2] pinctrl: mediatek: add input-enable setting in gpio_request_enable
  2016-02-16 19:16 ` Biao Huang
  (?)
@ 2016-02-16 19:16   ` Biao Huang
  -1 siblings, 0 replies; 12+ messages in thread
From: Biao Huang @ 2016-02-16 19:16 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-kernel, linux-arm-kernel, linux-mediatek, linux-gpio,
	srv_heupstream, Yingjoe Chen, Hongzhou Yang, Eddie Huang,
	Biao Huang

Since input-disable cuts off input signal of gpio, add input-enable
setting in .gpio_request_enable implementation to ensure gpio function well

Signed-off-by: Biao Huang <biao.huang@mediatek.com>
---
 drivers/pinctrl/mediatek/pinctrl-mtk-common.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
index 6024483..578897a 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
@@ -764,6 +764,7 @@ static int mtk_pmx_gpio_request_enable(struct pinctrl_dev *pctldev,
 	}
 
 	mtk_pmx_set_mode(pctldev, offset, muxval);
+	mtk_pconf_set_ies_smt(pctl, offset, 1, PIN_CONFIG_INPUT_ENABLE);
 
 	return 0;
 }
-- 
1.7.9.5

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

* [PATCH 1/2] pinctrl: mediatek: add input-enable setting in gpio_request_enable
@ 2016-02-16 19:16   ` Biao Huang
  0 siblings, 0 replies; 12+ messages in thread
From: Biao Huang @ 2016-02-16 19:16 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-kernel, linux-arm-kernel, linux-mediatek, linux-gpio,
	srv_heupstream, Yingjoe Chen, Hongzhou Yang, Eddie Huang,
	Biao Huang

Since input-disable cuts off input signal of gpio, add input-enable
setting in .gpio_request_enable implementation to ensure gpio function well

Signed-off-by: Biao Huang <biao.huang@mediatek.com>
---
 drivers/pinctrl/mediatek/pinctrl-mtk-common.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
index 6024483..578897a 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
@@ -764,6 +764,7 @@ static int mtk_pmx_gpio_request_enable(struct pinctrl_dev *pctldev,
 	}
 
 	mtk_pmx_set_mode(pctldev, offset, muxval);
+	mtk_pconf_set_ies_smt(pctl, offset, 1, PIN_CONFIG_INPUT_ENABLE);
 
 	return 0;
 }
-- 
1.7.9.5

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

* [PATCH 1/2] pinctrl: mediatek: add input-enable setting in gpio_request_enable
@ 2016-02-16 19:16   ` Biao Huang
  0 siblings, 0 replies; 12+ messages in thread
From: Biao Huang @ 2016-02-16 19:16 UTC (permalink / raw)
  To: linux-arm-kernel

Since input-disable cuts off input signal of gpio, add input-enable
setting in .gpio_request_enable implementation to ensure gpio function well

Signed-off-by: Biao Huang <biao.huang@mediatek.com>
---
 drivers/pinctrl/mediatek/pinctrl-mtk-common.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
index 6024483..578897a 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
@@ -764,6 +764,7 @@ static int mtk_pmx_gpio_request_enable(struct pinctrl_dev *pctldev,
 	}
 
 	mtk_pmx_set_mode(pctldev, offset, muxval);
+	mtk_pconf_set_ies_smt(pctl, offset, 1, PIN_CONFIG_INPUT_ENABLE);
 
 	return 0;
 }
-- 
1.7.9.5

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

* [PATCH 2/2] pinctrl: mediatek: add input-enable and direction setting for eint resources
  2016-02-16 19:16 ` Biao Huang
  (?)
@ 2016-02-16 19:16   ` Biao Huang
  -1 siblings, 0 replies; 12+ messages in thread
From: Biao Huang @ 2016-02-16 19:16 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-kernel, linux-arm-kernel, linux-mediatek, linux-gpio,
	srv_heupstream, Yingjoe Chen, Hongzhou Yang, Eddie Huang,
	Biao Huang

To use pin as eint, user should make sure that:
1. pin is set to right mode, this is done in .irq_request_resources
implementation already.
2. direction of the pin is input, which should call GPIO API to set
pin to input gpio.
We add what step 2 do to .irq_request_resources so that user doesn't
need call GPIO API any more when pin for eint usage.

Signed-off-by: Biao Huang <biao.huang@mediatek.com>
---
 drivers/pinctrl/mediatek/pinctrl-mtk-common.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
index 578897a..342d85b 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
@@ -863,6 +863,10 @@ static int mtk_pinctrl_irq_request_resources(struct irq_data *d)
 
 	/* set mux to INT mode */
 	mtk_pmx_set_mode(pctl->pctl_dev, pin->pin.number, pin->eint.eintmux);
+	/* set gpio direction to input */
+	mtk_pmx_gpio_set_direction(pctl->pctl_dev, NULL, pin->pin.number, true);
+	/* set input-enable */
+	mtk_pconf_set_ies_smt(pctl, pin->pin.number, 1, PIN_CONFIG_INPUT_ENABLE);
 
 	return 0;
 }
-- 
1.7.9.5

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

* [PATCH 2/2] pinctrl: mediatek: add input-enable and direction setting for eint resources
@ 2016-02-16 19:16   ` Biao Huang
  0 siblings, 0 replies; 12+ messages in thread
From: Biao Huang @ 2016-02-16 19:16 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-kernel, linux-arm-kernel, linux-mediatek, linux-gpio,
	srv_heupstream, Yingjoe Chen, Hongzhou Yang, Eddie Huang,
	Biao Huang

To use pin as eint, user should make sure that:
1. pin is set to right mode, this is done in .irq_request_resources
implementation already.
2. direction of the pin is input, which should call GPIO API to set
pin to input gpio.
We add what step 2 do to .irq_request_resources so that user doesn't
need call GPIO API any more when pin for eint usage.

Signed-off-by: Biao Huang <biao.huang@mediatek.com>
---
 drivers/pinctrl/mediatek/pinctrl-mtk-common.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
index 578897a..342d85b 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
@@ -863,6 +863,10 @@ static int mtk_pinctrl_irq_request_resources(struct irq_data *d)
 
 	/* set mux to INT mode */
 	mtk_pmx_set_mode(pctl->pctl_dev, pin->pin.number, pin->eint.eintmux);
+	/* set gpio direction to input */
+	mtk_pmx_gpio_set_direction(pctl->pctl_dev, NULL, pin->pin.number, true);
+	/* set input-enable */
+	mtk_pconf_set_ies_smt(pctl, pin->pin.number, 1, PIN_CONFIG_INPUT_ENABLE);
 
 	return 0;
 }
-- 
1.7.9.5

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

* [PATCH 2/2] pinctrl: mediatek: add input-enable and direction setting for eint resources
@ 2016-02-16 19:16   ` Biao Huang
  0 siblings, 0 replies; 12+ messages in thread
From: Biao Huang @ 2016-02-16 19:16 UTC (permalink / raw)
  To: linux-arm-kernel

To use pin as eint, user should make sure that:
1. pin is set to right mode, this is done in .irq_request_resources
implementation already.
2. direction of the pin is input, which should call GPIO API to set
pin to input gpio.
We add what step 2 do to .irq_request_resources so that user doesn't
need call GPIO API any more when pin for eint usage.

Signed-off-by: Biao Huang <biao.huang@mediatek.com>
---
 drivers/pinctrl/mediatek/pinctrl-mtk-common.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
index 578897a..342d85b 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
@@ -863,6 +863,10 @@ static int mtk_pinctrl_irq_request_resources(struct irq_data *d)
 
 	/* set mux to INT mode */
 	mtk_pmx_set_mode(pctl->pctl_dev, pin->pin.number, pin->eint.eintmux);
+	/* set gpio direction to input */
+	mtk_pmx_gpio_set_direction(pctl->pctl_dev, NULL, pin->pin.number, true);
+	/* set input-enable */
+	mtk_pconf_set_ies_smt(pctl, pin->pin.number, 1, PIN_CONFIG_INPUT_ENABLE);
 
 	return 0;
 }
-- 
1.7.9.5

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

* Re: [PATCH 2/2] pinctrl: mediatek: add input-enable and direction setting for eint resources
  2016-02-16 19:16   ` Biao Huang
  (?)
@ 2016-02-18 23:31     ` Linus Walleij
  -1 siblings, 0 replies; 12+ messages in thread
From: Linus Walleij @ 2016-02-18 23:31 UTC (permalink / raw)
  To: Biao Huang
  Cc: linux-kernel, linux-arm-kernel,
	moderated list:ARM/Mediatek SoC support, linux-gpio,
	srv_heupstream, Yingjoe Chen, Hongzhou Yang, Eddie Huang

On Tue, Feb 16, 2016 at 8:16 PM, Biao Huang <biao.huang@mediatek.com> wrote:

> To use pin as eint, user should make sure that:
> 1. pin is set to right mode, this is done in .irq_request_resources
> implementation already.
> 2. direction of the pin is input, which should call GPIO API to set
> pin to input gpio.
> We add what step 2 do to .irq_request_resources so that user doesn't
> need call GPIO API any more when pin for eint usage.
>
> Signed-off-by: Biao Huang <biao.huang@mediatek.com>

Patch applied.

Yours,
Linus Walleij

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

* Re: [PATCH 2/2] pinctrl: mediatek: add input-enable and direction setting for eint resources
@ 2016-02-18 23:31     ` Linus Walleij
  0 siblings, 0 replies; 12+ messages in thread
From: Linus Walleij @ 2016-02-18 23:31 UTC (permalink / raw)
  To: Biao Huang
  Cc: linux-kernel, linux-arm-kernel,
	moderated list:ARM/Mediatek SoC support, linux-gpio,
	srv_heupstream, Yingjoe Chen, Hongzhou Yang, Eddie Huang

On Tue, Feb 16, 2016 at 8:16 PM, Biao Huang <biao.huang@mediatek.com> wrote:

> To use pin as eint, user should make sure that:
> 1. pin is set to right mode, this is done in .irq_request_resources
> implementation already.
> 2. direction of the pin is input, which should call GPIO API to set
> pin to input gpio.
> We add what step 2 do to .irq_request_resources so that user doesn't
> need call GPIO API any more when pin for eint usage.
>
> Signed-off-by: Biao Huang <biao.huang@mediatek.com>

Patch applied.

Yours,
Linus Walleij

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

* [PATCH 2/2] pinctrl: mediatek: add input-enable and direction setting for eint resources
@ 2016-02-18 23:31     ` Linus Walleij
  0 siblings, 0 replies; 12+ messages in thread
From: Linus Walleij @ 2016-02-18 23:31 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Feb 16, 2016 at 8:16 PM, Biao Huang <biao.huang@mediatek.com> wrote:

> To use pin as eint, user should make sure that:
> 1. pin is set to right mode, this is done in .irq_request_resources
> implementation already.
> 2. direction of the pin is input, which should call GPIO API to set
> pin to input gpio.
> We add what step 2 do to .irq_request_resources so that user doesn't
> need call GPIO API any more when pin for eint usage.
>
> Signed-off-by: Biao Huang <biao.huang@mediatek.com>

Patch applied.

Yours,
Linus Walleij

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

end of thread, other threads:[~2016-02-18 23:36 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-16 19:16 [PATCH 0/2] pinctrl: mediatek: add setting for gpio and eint Biao Huang
2016-02-16 19:16 ` Biao Huang
2016-02-16 19:16 ` Biao Huang
2016-02-16 19:16 ` [PATCH 1/2] pinctrl: mediatek: add input-enable setting in gpio_request_enable Biao Huang
2016-02-16 19:16   ` Biao Huang
2016-02-16 19:16   ` Biao Huang
2016-02-16 19:16 ` [PATCH 2/2] pinctrl: mediatek: add input-enable and direction setting for eint resources Biao Huang
2016-02-16 19:16   ` Biao Huang
2016-02-16 19:16   ` Biao Huang
2016-02-18 23:31   ` Linus Walleij
2016-02-18 23:31     ` Linus Walleij
2016-02-18 23:31     ` Linus Walleij

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.