public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: yingjoe.chen@mediatek.com (Yingjoe Chen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 4/5] pinctrl: mediatek: Add Pinctrl/GPIO/EINT driver for mt2701
Date: Mon, 28 Dec 2015 16:07:46 +0800	[thread overview]
Message-ID: <1451290066.11129.4.camel@mtksdaap41> (raw)
In-Reply-To: <1451286546-5920-5-git-send-email-biao.huang@mediatek.com>

On Mon, 2015-12-28 at 15:09 +0800, Biao Huang wrote:
> Add mt2701 support using mediatek common pinctrl driver.
> MT2701 have some special pins need an extra setting register
> than other ICs, so adding this support to common code.
> 
> Signed-off-by: Biao Huang <biao.huang@mediatek.com>
> Acked-by: Yingjoe Chen <yingjoe.chen@mediatek.com>
<...>
> +
> +static struct platform_driver mtk_pinctrl_driver = {
> +	.probe = mt2701_pinctrl_probe,
> +	.driver = {
> +		.name = "mediatek-mt2701-pinctrl",
> +		.owner = THIS_MODULE,
> +		.of_match_table = mt2701_pctrl_match,
> +	},
> +};
> +
> +static int __init mtk_pinctrl_init(void)
> +{
> +	return platform_driver_register(&mtk_pinctrl_driver);
> +}
> +
> +arch_initcall(mtk_pinctrl_init);


As discussed in
http://lists.infradead.org/pipermail/linux-mediatek/2015-December/003350.html
we should use subsys_initcall() instead.


> diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
> index f307f1d..76279f0 100644
> --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
> +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
<...>
> @@ -347,6 +352,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 +360,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:

This change is not directly related to adding mt2710 support and change
behavior for all MTK pinctrl drivers, please create a separate patch for
this.

Joe.C

  reply	other threads:[~2015-12-28  8:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-28  7:09 [PATCH v3 0/5] pinctrl: mediatek: add pinctrl/GPIO/EINT driver for mt2701 Biao Huang
2015-12-28  7:09 ` [PATCH v3 1/5] ARM: mediatek: Add MT2701 config options for mediatek SoCs Biao Huang
2015-12-28  7:09 ` [PATCH v3 2/5] dt-bindings: mediatek: Modify pinctrl bindings for mt2701 Biao Huang
2015-12-29 18:34   ` Rob Herring
2015-12-31 11:14   ` Matthias Brugger
2016-01-07 10:11   ` Linus Walleij
2015-12-28  7:09 ` [PATCH v3 3/5] pinctrl: dt bindings: Add pinfunc header file " Biao Huang
2015-12-28  7:09 ` [PATCH v3 4/5] pinctrl: mediatek: Add Pinctrl/GPIO/EINT driver " Biao Huang
2015-12-28  8:07   ` Yingjoe Chen [this message]
2016-02-04 13:48     ` Matthias Brugger
2016-02-04 13:57       ` Yingjoe Chen
2015-12-28  7:09 ` [PATCH v3 5/5] arm: dts: Add pinctrl/GPIO/EINT node " Biao Huang
2015-12-31 11:23   ` Matthias Brugger
2016-01-07 10:14     ` Linus Walleij
2016-02-11 23:27       ` Matthias Brugger

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=1451290066.11129.4.camel@mtksdaap41 \
    --to=yingjoe.chen@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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