All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Heiko Stübner" <heiko@sntech.de>
To: zyw@rock-chips.com
Cc: Mike Turquette <mturquette@linaro.org>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	dianders@chromium.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, Kumar Gala <galak@codeaurora.org>,
	Russell King <linux@arm.linux.org.uk>,
	linux-rockchip@lists.infradead.org,
	Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	linux-arm-kernel@lists.infradead.org,
	Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [PATCH v3 1/6] pinctrl: rockchip: add suspend/resume functions
Date: Tue, 21 Oct 2014 23:20:11 +0200	[thread overview]
Message-ID: <3477070.K1aFAOaaEU@diego> (raw)
In-Reply-To: <1413862968-2691-1-git-send-email-zyw@rock-chips.com>

Hi Chris,

Am Montag, 20. Oktober 2014, 20:42:48 schrieb zyw@rock-chips.com:
> From: Chris <zyw@rock-chips.com>

Please use your full name like "Chris Zhong"

> 
> support suspend/resume of pinctrl, it allows handling sleep mode
> for hogged pins in pinctrl
> 
> Signed-off-by: Chris <zyw@rock-chips.com>
> Signed-off-by: Chris Zhong <zyw@rock-chips.com>

also, please use only one Signed-off-by line for yourself :-)


> ---
> 
> Changes in v3: None
> Changes in v2: None
> 
>  drivers/pinctrl/pinctrl-rockchip.c |   29 +++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
> 
> diff --git a/drivers/pinctrl/pinctrl-rockchip.c
> b/drivers/pinctrl/pinctrl-rockchip.c index d0f3c18..d384d99 100644
> --- a/drivers/pinctrl/pinctrl-rockchip.c
> +++ b/drivers/pinctrl/pinctrl-rockchip.c
> @@ -1795,6 +1795,31 @@ static struct rockchip_pin_ctrl
> *rockchip_pinctrl_get_soc_data( return ctrl;
>  }
> 
> +#ifdef CONFIG_PM
> +static int rockchip_pinctrl_suspend(struct platform_device *pdev,
> +				    pm_message_t state)
> +{
> +	struct rockchip_pinctrl *info;
> +
> +	info = platform_get_drvdata(pdev);
> +	if (!info)
> +		return -EINVAL;
> +
> +	return pinctrl_force_sleep(info->pctl_dev);
> +}
> +
> +static int rockchip_pinctrl_resume(struct platform_device *pdev)
> +{
> +	struct rockchip_pinctrl *info;
> +
> +	info = platform_get_drvdata(pdev);
> +	if (!info)
> +		return -EINVAL;
> +
> +	return pinctrl_force_default(info->pctl_dev);
> +}
> +#endif
> +
>  static int rockchip_pinctrl_probe(struct platform_device *pdev)
>  {
>  	struct rockchip_pinctrl *info;
> @@ -2010,6 +2035,10 @@ static struct platform_driver rockchip_pinctrl_driver
> = { .owner	= THIS_MODULE,
>  		.of_match_table = rockchip_pinctrl_dt_match,
>  	},
> +	#ifdef CONFIG_PM
> +	.suspend = rockchip_pinctrl_suspend,
> +	.resume = rockchip_pinctrl_resume,
> +	#endif

as Dmitry already pointed out, this is the legacy suspend interface and should 
not be used anymore.


>  };
> 
>  static int __init rockchip_pinctrl_drv_register(void)


WARNING: multiple messages have this Message-ID (diff)
From: heiko@sntech.de (Heiko Stübner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 1/6] pinctrl: rockchip: add suspend/resume functions
Date: Tue, 21 Oct 2014 23:20:11 +0200	[thread overview]
Message-ID: <3477070.K1aFAOaaEU@diego> (raw)
In-Reply-To: <1413862968-2691-1-git-send-email-zyw@rock-chips.com>

Hi Chris,

Am Montag, 20. Oktober 2014, 20:42:48 schrieb zyw at rock-chips.com:
> From: Chris <zyw@rock-chips.com>

Please use your full name like "Chris Zhong"

> 
> support suspend/resume of pinctrl, it allows handling sleep mode
> for hogged pins in pinctrl
> 
> Signed-off-by: Chris <zyw@rock-chips.com>
> Signed-off-by: Chris Zhong <zyw@rock-chips.com>

also, please use only one Signed-off-by line for yourself :-)


> ---
> 
> Changes in v3: None
> Changes in v2: None
> 
>  drivers/pinctrl/pinctrl-rockchip.c |   29 +++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
> 
> diff --git a/drivers/pinctrl/pinctrl-rockchip.c
> b/drivers/pinctrl/pinctrl-rockchip.c index d0f3c18..d384d99 100644
> --- a/drivers/pinctrl/pinctrl-rockchip.c
> +++ b/drivers/pinctrl/pinctrl-rockchip.c
> @@ -1795,6 +1795,31 @@ static struct rockchip_pin_ctrl
> *rockchip_pinctrl_get_soc_data( return ctrl;
>  }
> 
> +#ifdef CONFIG_PM
> +static int rockchip_pinctrl_suspend(struct platform_device *pdev,
> +				    pm_message_t state)
> +{
> +	struct rockchip_pinctrl *info;
> +
> +	info = platform_get_drvdata(pdev);
> +	if (!info)
> +		return -EINVAL;
> +
> +	return pinctrl_force_sleep(info->pctl_dev);
> +}
> +
> +static int rockchip_pinctrl_resume(struct platform_device *pdev)
> +{
> +	struct rockchip_pinctrl *info;
> +
> +	info = platform_get_drvdata(pdev);
> +	if (!info)
> +		return -EINVAL;
> +
> +	return pinctrl_force_default(info->pctl_dev);
> +}
> +#endif
> +
>  static int rockchip_pinctrl_probe(struct platform_device *pdev)
>  {
>  	struct rockchip_pinctrl *info;
> @@ -2010,6 +2035,10 @@ static struct platform_driver rockchip_pinctrl_driver
> = { .owner	= THIS_MODULE,
>  		.of_match_table = rockchip_pinctrl_dt_match,
>  	},
> +	#ifdef CONFIG_PM
> +	.suspend = rockchip_pinctrl_suspend,
> +	.resume = rockchip_pinctrl_resume,
> +	#endif

as Dmitry already pointed out, this is the legacy suspend interface and should 
not be used anymore.


>  };
> 
>  static int __init rockchip_pinctrl_drv_register(void)

  parent reply	other threads:[~2014-10-21 21:17 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-21  3:41 [PATCH v3 0/6] add suspend support for RK3288 zyw
2014-10-21  3:41 ` zyw at rock-chips.com
2014-10-21  3:41 ` zyw-TNX95d0MmH7DzftRWevZcw
2014-10-21  3:42 ` [PATCH v3 1/6] pinctrl: rockchip: add suspend/resume functions zyw
2014-10-21  3:42   ` zyw at rock-chips.com
2014-10-21 16:50   ` Dmitry Torokhov
2014-10-21 16:50     ` Dmitry Torokhov
2014-10-21 21:20   ` Heiko Stübner [this message]
2014-10-21 21:20     ` Heiko Stübner
2014-10-21  3:43 ` [PATCH v3 2/6] pinctrl: rockchip: save and restore gpio6_c6 pinmux in suspend/resume zyw
2014-10-21  3:43   ` zyw at rock-chips.com
2014-10-28 15:52   ` Linus Walleij
2014-10-28 15:52     ` Linus Walleij
2014-10-28 15:52     ` Linus Walleij
2014-10-28 16:05     ` Doug Anderson
2014-10-28 16:05       ` Doug Anderson
2014-10-28 16:05       ` Doug Anderson
2014-10-21  3:44 ` [PATCH v3 3/6] clk: rockchip: RK3288: add suspend and resume zyw
2014-10-21  3:44   ` zyw at rock-chips.com
2014-10-21  3:44 ` [PATCH v3 4/6] ARM: rockchip: add suspend and resume for RK3288 zyw
2014-10-21  3:44   ` zyw at rock-chips.com
2014-10-24 21:47   ` Kevin Hilman
2014-10-24 21:47     ` Kevin Hilman
2014-10-24 21:47     ` Kevin Hilman
2014-10-27 17:42     ` Doug Anderson
2014-10-27 17:42       ` Doug Anderson
2014-10-27 17:42       ` Doug Anderson
2014-10-21  3:44 ` [PATCH v3 5/6] ARM: rockchip: Add pmu-sram binding zyw
2014-10-21  3:44   ` zyw at rock-chips.com
2014-10-21  3:45 ` [PATCH v3 6/6] ARM: dts: add RK3288 suspend support zyw
2014-10-21  3:45   ` zyw at rock-chips.com

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=3477070.K1aFAOaaEU@diego \
    --to=heiko@sntech.de \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=mturquette@linaro.org \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=zyw@rock-chips.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 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.