lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPBZ5Qf6T1=1+Xc_hea5zbPSs7th7F7pSLg+5dqmiPBnb6m8=g@mail.gmail.com>
Date:   Wed, 24 Aug 2016 23:35:57 -0500
From:   Andy Gross <andy.gross@...aro.org>
To:     Pramod Gurav <pramod.gurav@...aro.org>
Cc:     linux-arm-msm <linux-arm-msm@...r.kernel.org>,
        linux-serial@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jslaby@...e.com>,
        David Brown <david.brown@...aro.org>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        Linux Kernel list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] tty: serial: msm: Add runtime PM and system sleep support

On 17 June 2016 at 05:16, Pramod Gurav <pramod.gurav@...aro.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ