Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1469801 > unrolled thread

Re: [PATCH] tty: serial: msm: Add runtime PM and system sleep support

Started byAndy Gross <andy.gross@linaro.org>
First post2016-08-25 06:40 +0200
Last post2016-08-25 06:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] tty: serial: msm: Add runtime PM and system sleep support Andy Gross <andy.gross@linaro.org> - 2016-08-25 06:40 +0200
    Re: [PATCH] tty: serial: msm: Add runtime PM and system sleep support Pramod Gurav <pramod.gurav@linaro.org> - 2016-08-25 06:50 +0200

#1469801 — Re: [PATCH] tty: serial: msm: Add runtime PM and system sleep support

FromAndy Gross <andy.gross@linaro.org>
Date2016-08-25 06:40 +0200
SubjectRe: [PATCH] tty: serial: msm: Add runtime PM and system sleep support
Message-ID<s9UCl-4wb-1@gated-at.bofh.it>
On 17 June 2016 at 05:16, Pramod Gurav <pramod.gurav@linaro.org> wrote:

<snip>

> @@ -1635,6 +1732,7 @@ static int msm_serial_remove(struct platform_device *pdev)
>         struct uart_port *port = platform_get_drvdata(pdev);
>
>         uart_remove_one_port(&msm_uart_driver, port);
> +       pm_runtime_disable(&pdev->dev);
>
>         return 0;
>  }
> @@ -1645,12 +1743,67 @@ static const struct of_device_id msm_match_table[] = {
>         {}
>  };
>
> +#ifdef CONFIG_PM
> +static int msm_serial_runtime_suspend(struct device *dev)
> +{
> +       struct uart_port *port = dev_get_drvdata(dev);
> +       struct msm_port *msm_port = UART_TO_MSM(port);
> +
> +       if (msm_port->is_uartdm)
> +               clk_disable(msm_port->pclk);

You don't need to check, just clk_disable it.

> +
> +       return 0;
> +}
> +
> +static int msm_serial_runtime_resume(struct device *dev)
> +{
> +       struct uart_port *port = dev_get_drvdata(dev);
> +       struct msm_port *msm_port = UART_TO_MSM(port);
> +       int ret;
> +
> +       if (msm_port->is_uartdm) {
> +               ret = clk_enable(msm_port->pclk);

Ditto here.

> +               if (ret)
> +                       return ret;
> +       }
> +
> +       return 0;
> +}
> +#endif
> +


Regards,

Andy

[toc] | [next] | [standalone]


#1469820

FromPramod Gurav <pramod.gurav@linaro.org>
Date2016-08-25 06:50 +0200
Message-ID<s9UM2-4BL-9@gated-at.bofh.it>
In reply to#1469801
On 25 August 2016 at 10:05, Andy Gross <andy.gross@linaro.org> wrote:
> On 17 June 2016 at 05:16, Pramod Gurav <pramod.gurav@linaro.org> wrote:
>

<snip>

>> +       if (msm_port->is_uartdm) {
>> +               ret = clk_enable(msm_port->pclk);
>
> Ditto here.

Thanks Andy, will include these two changes in v2.
>
>> +               if (ret)

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web