mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Biao Huang <biao.huang@mediatek.com>
To: Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	Russell King <linux@arm.linux.org.uk>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Erin Lo <erin.lo@mediatek.com>
Cc: <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>,
	<linux-gpio@vger.kernel.org>, <srv_heupstream@mediatek.com>,
	Yingjoe Chen <yingjoe.chen@mediatek.com>,
	Hongzhou Yang <hongzhou.yang@mediatek.com>,
	Biao Huang <biao.huang@mediatek.com>
Subject: [PATCH v4 1/5] pinctrl: mediatek: fix direction control issue
Date: Wed, 27 Jan 2016 09:24:39 +0800	[thread overview]
Message-ID: <1453857883-28436-2-git-send-email-biao.huang@mediatek.com> (raw)
In-Reply-To: <1453857883-28436-1-git-send-email-biao.huang@mediatek.com>

Since input-enable/disable and input-schmitt-enable/disable are
workable when gpio direction is input, so add direction setting
when do input-enable/disable and input-schmitt-enable/disable
properties.

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

diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
index 16d48a4..e96e86d 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
@@ -347,6 +347,7 @@ static int mtk_pconf_parse_conf(struct pinctrl_dev *pctldev,
 		ret = mtk_pconf_set_pull_select(pctl, pin, true, false, arg);
 		break;
 	case PIN_CONFIG_INPUT_ENABLE:
+		mtk_pmx_gpio_set_direction(pctldev, NULL, pin, true);
 		ret = mtk_pconf_set_ies_smt(pctl, pin, arg, param);
 		break;
 	case PIN_CONFIG_OUTPUT:
@@ -354,6 +355,7 @@ static int mtk_pconf_parse_conf(struct pinctrl_dev *pctldev,
 		ret = mtk_pmx_gpio_set_direction(pctldev, NULL, pin, false);
 		break;
 	case PIN_CONFIG_INPUT_SCHMITT_ENABLE:
+		mtk_pmx_gpio_set_direction(pctldev, NULL, pin, true);
 		ret = mtk_pconf_set_ies_smt(pctl, pin, arg, param);
 		break;
 	case PIN_CONFIG_DRIVE_STRENGTH:
-- 
1.7.9.5

  reply	other threads:[~2016-01-27  9:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-27  1:24 [PATCH v4 0/5] pinctrl: mediatek: add pinctrl/GPIO/EINT driver for mt2701 Biao Huang
2016-01-27  1:24 ` Biao Huang [this message]
2016-01-27  1:24 ` [PATCH v4 2/5] ARM: mediatek: Add MT2701 config options for mediatek SoCs Biao Huang
2016-01-27  1:24 ` [PATCH v4 3/5] pinctrl: dt bindings: Add pinfunc header file for mt2701 Biao Huang
2016-01-28 10:13   ` Linus Walleij
2016-01-27  1:24 ` [PATCH v4 4/5] pinctrl: mediatek: Add Pinctrl/GPIO/EINT driver " Biao Huang
2016-01-28 10:15   ` Linus Walleij
2016-01-27  1:24 ` [PATCH v4 5/5] arm: dts: Add pinctrl/GPIO/EINT node " Biao Huang
2016-02-11 10:55   ` Matthias Brugger
2016-01-28 10:20 ` [PATCH v4 0/5] pinctrl: mediatek: add pinctrl/GPIO/EINT driver " Linus Walleij
2016-01-28 22:08   ` biao huang
2016-02-05 13:59     ` Linus Walleij

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=1453857883-28436-2-git-send-email-biao.huang@mediatek.com \
    --to=biao.huang@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=erin.lo@mediatek.com \
    --cc=galak@codeaurora.org \
    --cc=hongzhou.yang@mediatek.com \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=matthias.bgg@gmail.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=srv_heupstream@mediatek.com \
    --cc=yingjoe.chen@mediatek.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®