All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5] pinctrl: mediatek: add EINT support to virtual GPIOs
@ 2019-01-03  3:37 ` chuanjia.liu
  0 siblings, 0 replies; 7+ messages in thread
From: chuanjia.liu @ 2019-01-03  3:37 UTC (permalink / raw)
  To: sean.wang, linus.walleij, matthias.bgg, linux-mediatek,
	linux-gpio, linux-arm-kernel, linux-kernel
  Cc: youlin.pei, zhiyong.tao, eddie.huang, hailong.fan, chuanjia.liu

From: "chuanjia.liu" <Chuanjia.Liu@mediatek.com>

Virtual gpio only used inside SOC and not being exported to outside SOC.
Some modules use virtual gpio as eint and doesn't need SMT.
So this patch add EINT support to virtual GPIOs.

Signed-off-by: chuanjia.liu <Chuanjia.Liu@mediatek.com>
---
change note:
v5: This patch is the same as v4,re-upload due to
      mail permissions issues	 
---
 drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
index 4a9e0d4c2bbc..b1c368455d30 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
@@ -290,7 +290,13 @@ static int mtk_xt_set_gpio_as_eint(void *data, unsigned long eint_n)
 		return err;
 
 	err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_SMT, MTK_ENABLE);
-	if (err)
+	/* SMT is supposed to be supported by every real GPIO and doesn't
+	 * support virtual GPIOs, so the extra condition err != -ENOTSUPP
+	 * is just for adding EINT support to these virtual GPIOs. It should
+	 * add an extra flag in the pin descriptor when more pins with
+	 * distinctive characteristic come out.
+	 */
+	if (err && err != -ENOTSUPP)
 		return err;
 
 	return 0;
-- 
2.19.1

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

* [PATCH v5] pinctrl: mediatek: add EINT support to virtual GPIOs
@ 2019-01-03  3:37 ` chuanjia.liu
  0 siblings, 0 replies; 7+ messages in thread
From: chuanjia.liu @ 2019-01-03  3:37 UTC (permalink / raw)
  To: sean.wang, linus.walleij, matthias.bgg, linux-mediatek,
	linux-gpio, linux-arm-kernel, linux-kernel
  Cc: youlin.pei, zhiyong.tao, eddie.huang, hailong.fan, chuanjia.liu

From: "chuanjia.liu" <Chuanjia.Liu@mediatek.com>

Virtual gpio only used inside SOC and not being exported to outside SOC.
Some modules use virtual gpio as eint and doesn't need SMT.
So this patch add EINT support to virtual GPIOs.

Signed-off-by: chuanjia.liu <Chuanjia.Liu@mediatek.com>
---
change note:
v5: This patch is the same as v4,re-upload due to
      mail permissions issues	 
---
 drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
index 4a9e0d4c2bbc..b1c368455d30 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
@@ -290,7 +290,13 @@ static int mtk_xt_set_gpio_as_eint(void *data, unsigned long eint_n)
 		return err;
 
 	err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_SMT, MTK_ENABLE);
-	if (err)
+	/* SMT is supposed to be supported by every real GPIO and doesn't
+	 * support virtual GPIOs, so the extra condition err != -ENOTSUPP
+	 * is just for adding EINT support to these virtual GPIOs. It should
+	 * add an extra flag in the pin descriptor when more pins with
+	 * distinctive characteristic come out.
+	 */
+	if (err && err != -ENOTSUPP)
 		return err;
 
 	return 0;
-- 
2.19.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v5] pinctrl: mediatek: add EINT support to virtual GPIOs
  2019-01-03  3:37 ` chuanjia.liu
@ 2019-01-04 10:26   ` Sean Wang
  -1 siblings, 0 replies; 7+ messages in thread
From: Sean Wang @ 2019-01-04 10:26 UTC (permalink / raw)
  To: Chuanjia Liu (柳传嘉)
  Cc: Linus Walleij, Matthias Brugger, linux-mediatek, linux-gpio,
	linux-arm-kernel, linux-kernel, youlin.pei,
	Eddie Huang (黃智傑),
	Zhiyong Tao, hailong.fan

On Wed, Jan 2, 2019 at 7:38 PM <chuanjia.liu@mediatek.com> wrote:
>
> From: "chuanjia.liu" <Chuanjia.Liu@mediatek.com>
>
> Virtual gpio only used inside SOC and not being exported to outside SOC.
> Some modules use virtual gpio as eint and doesn't need SMT.
> So this patch add EINT support to virtual GPIOs.
>
> Signed-off-by: chuanjia.liu <Chuanjia.Liu@mediatek.com>

Acked-by: Sean Wang <sean.wang@kernel.org>

BTW, if you were worried about a patch is lost, you could use RESEND
in the tag is fine.

> ---
> change note:
> v5: This patch is the same as v4,re-upload due to
>       mail permissions issues
> ---
>  drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
> index 4a9e0d4c2bbc..b1c368455d30 100644
> --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
> +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
> @@ -290,7 +290,13 @@ static int mtk_xt_set_gpio_as_eint(void *data, unsigned long eint_n)
>                 return err;
>
>         err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_SMT, MTK_ENABLE);
> -       if (err)
> +       /* SMT is supposed to be supported by every real GPIO and doesn't
> +        * support virtual GPIOs, so the extra condition err != -ENOTSUPP
> +        * is just for adding EINT support to these virtual GPIOs. It should
> +        * add an extra flag in the pin descriptor when more pins with
> +        * distinctive characteristic come out.
> +        */
> +       if (err && err != -ENOTSUPP)
>                 return err;
>
>         return 0;
> --
> 2.19.1
>

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

* Re: [PATCH v5] pinctrl: mediatek: add EINT support to virtual GPIOs
@ 2019-01-04 10:26   ` Sean Wang
  0 siblings, 0 replies; 7+ messages in thread
From: Sean Wang @ 2019-01-04 10:26 UTC (permalink / raw)
  To: Chuanjia Liu (柳传嘉)
  Cc: youlin.pei, Zhiyong Tao, Linus Walleij, linux-kernel, linux-gpio,
	linux-mediatek, hailong.fan, Matthias Brugger,
	Eddie Huang (黃智傑),
	linux-arm-kernel

On Wed, Jan 2, 2019 at 7:38 PM <chuanjia.liu@mediatek.com> wrote:
>
> From: "chuanjia.liu" <Chuanjia.Liu@mediatek.com>
>
> Virtual gpio only used inside SOC and not being exported to outside SOC.
> Some modules use virtual gpio as eint and doesn't need SMT.
> So this patch add EINT support to virtual GPIOs.
>
> Signed-off-by: chuanjia.liu <Chuanjia.Liu@mediatek.com>

Acked-by: Sean Wang <sean.wang@kernel.org>

BTW, if you were worried about a patch is lost, you could use RESEND
in the tag is fine.

> ---
> change note:
> v5: This patch is the same as v4,re-upload due to
>       mail permissions issues
> ---
>  drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
> index 4a9e0d4c2bbc..b1c368455d30 100644
> --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
> +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
> @@ -290,7 +290,13 @@ static int mtk_xt_set_gpio_as_eint(void *data, unsigned long eint_n)
>                 return err;
>
>         err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_SMT, MTK_ENABLE);
> -       if (err)
> +       /* SMT is supposed to be supported by every real GPIO and doesn't
> +        * support virtual GPIOs, so the extra condition err != -ENOTSUPP
> +        * is just for adding EINT support to these virtual GPIOs. It should
> +        * add an extra flag in the pin descriptor when more pins with
> +        * distinctive characteristic come out.
> +        */
> +       if (err && err != -ENOTSUPP)
>                 return err;
>
>         return 0;
> --
> 2.19.1
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v5] pinctrl: mediatek: add EINT support to virtual GPIOs
  2019-01-03  3:37 ` chuanjia.liu
  (?)
@ 2019-01-11 12:15   ` Linus Walleij
  -1 siblings, 0 replies; 7+ messages in thread
From: Linus Walleij @ 2019-01-11 12:15 UTC (permalink / raw)
  To: chuanjia.liu
  Cc: Sean Wang, Matthias Brugger,
	moderated list:ARM/Mediatek SoC support,
	open list:GPIO SUBSYSTEM, Linux ARM, linux-kernel, youlin.pei,
	huang eddie, Zhiyong Tao, hailong.fan

On Thu, Jan 3, 2019 at 4:38 AM <chuanjia.liu@mediatek.com> wrote:

> From: "chuanjia.liu" <Chuanjia.Liu@mediatek.com>
>
> Virtual gpio only used inside SOC and not being exported to outside SOC.
> Some modules use virtual gpio as eint and doesn't need SMT.
> So this patch add EINT support to virtual GPIOs.
>
> Signed-off-by: chuanjia.liu <Chuanjia.Liu@mediatek.com>
> ---
> change note:
> v5: This patch is the same as v4,re-upload due to
>       mail permissions issues

Patch applied with Sean's ACK.

Yours,
Linus Walleij

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

* Re: [PATCH v5] pinctrl: mediatek: add EINT support to virtual GPIOs
@ 2019-01-11 12:15   ` Linus Walleij
  0 siblings, 0 replies; 7+ messages in thread
From: Linus Walleij @ 2019-01-11 12:15 UTC (permalink / raw)
  To: chuanjia.liu
  Cc: Sean Wang, Matthias Brugger,
	moderated list:ARM/Mediatek SoC support,
	open list:GPIO SUBSYSTEM, Linux ARM, linux-kernel, youlin.pei,
	huang eddie, Zhiyong Tao, hailong.fan

On Thu, Jan 3, 2019 at 4:38 AM <chuanjia.liu@mediatek.com> wrote:

> From: "chuanjia.liu" <Chuanjia.Liu@mediatek.com>
>
> Virtual gpio only used inside SOC and not being exported to outside SOC.
> Some modules use virtual gpio as eint and doesn't need SMT.
> So this patch add EINT support to virtual GPIOs.
>
> Signed-off-by: chuanjia.liu <Chuanjia.Liu@mediatek.com>
> ---
> change note:
> v5: This patch is the same as v4,re-upload due to
>       mail permissions issues

Patch applied with Sean's ACK.

Yours,
Linus Walleij

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

* Re: [PATCH v5] pinctrl: mediatek: add EINT support to virtual GPIOs
@ 2019-01-11 12:15   ` Linus Walleij
  0 siblings, 0 replies; 7+ messages in thread
From: Linus Walleij @ 2019-01-11 12:15 UTC (permalink / raw)
  To: chuanjia.liu
  Cc: youlin.pei, Zhiyong Tao, Sean Wang, linux-kernel,
	open list:GPIO SUBSYSTEM,
	moderated list:ARM/Mediatek SoC support, hailong.fan,
	Matthias Brugger, huang eddie, Linux ARM

On Thu, Jan 3, 2019 at 4:38 AM <chuanjia.liu@mediatek.com> wrote:

> From: "chuanjia.liu" <Chuanjia.Liu@mediatek.com>
>
> Virtual gpio only used inside SOC and not being exported to outside SOC.
> Some modules use virtual gpio as eint and doesn't need SMT.
> So this patch add EINT support to virtual GPIOs.
>
> Signed-off-by: chuanjia.liu <Chuanjia.Liu@mediatek.com>
> ---
> change note:
> v5: This patch is the same as v4,re-upload due to
>       mail permissions issues

Patch applied with Sean's ACK.

Yours,
Linus Walleij

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2019-01-11 12:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-03  3:37 [PATCH v5] pinctrl: mediatek: add EINT support to virtual GPIOs chuanjia.liu
2019-01-03  3:37 ` chuanjia.liu
2019-01-04 10:26 ` Sean Wang
2019-01-04 10:26   ` Sean Wang
2019-01-11 12:15 ` Linus Walleij
2019-01-11 12:15   ` Linus Walleij
2019-01-11 12:15   ` 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.