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] [day] [month] [year] [list]
Date:   Thu, 8 Sep 2016 08:31:32 -0700
From:   Guenter Roeck <groeck@...gle.com>
To:     Chris Zhong <zyw@...k-chips.com>
Cc:     Kishon Vijay Abraham I <kishon@...com>,
        Guenter Roeck <groeck@...omium.org>,
        wulf <wulf@...k-chips.com>,
        Brian Norris <briannorris@...omium.org>,
        Heiko Stübner <heiko@...ech.de>,
        Douglas Anderson <dianders@...omium.org>,
        Kever Yang <kever.yang@...k-chips.com>,
        "open list:ARM/Rockchip SoC..." <linux-rockchip@...ts.infradead.org>,
        linux-arm-kernel@...ts.infradead.org,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [RESEND PATCH v3 1/2] phy: rockchip-typec: add pm runtime support

On Wed, Sep 7, 2016 at 10:57 PM, Chris Zhong <zyw@...k-chips.com> wrote:
> Adds pm_runtime support for rockchip Type-C, so that power domain is
> enabled only when there is a transaction going on to help save power.
>
> Signed-off-by: Chris Zhong <zyw@...k-chips.com>
> ---
>
> Changes in v3:
> - use phy_core pm_runtime
>
> Changes in v2:
> - add pm_runtime_put_sync in err case
>
>  drivers/phy/phy-rockchip-typec.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/drivers/phy/phy-rockchip-typec.c b/drivers/phy/phy-rockchip-typec.c
> index fb58a27..7cfb0f8 100644
> --- a/drivers/phy/phy-rockchip-typec.c
> +++ b/drivers/phy/phy-rockchip-typec.c
> @@ -960,6 +960,8 @@ static int rockchip_typec_phy_probe(struct platform_device *pdev)
>                 return PTR_ERR(tcphy->extcon);
>         }
>
> +       pm_runtime_enable(dev);
> +

Does this now need a matching pm_runtime_disable() in error cases ?

Guenter

>         for_each_available_child_of_node(np, child_np) {
>                 struct phy *phy;
>
> @@ -990,6 +992,13 @@ static int rockchip_typec_phy_probe(struct platform_device *pdev)
>         return 0;
>  }
>
> +static int rockchip_typec_phy_remove(struct platform_device *pdev)
> +{
> +       pm_runtime_disable(&pdev->dev);
> +
> +       return 0;
> +}
> +
>  static const struct of_device_id rockchip_typec_phy_dt_ids[] = {
>         { .compatible = "rockchip,rk3399-typec-phy" },
>         {}
> @@ -999,6 +1008,7 @@ MODULE_DEVICE_TABLE(of, rockchip_typec_phy_dt_ids);
>
>  static struct platform_driver rockchip_typec_phy_driver = {
>         .probe          = rockchip_typec_phy_probe,
> +       .remove         = rockchip_typec_phy_remove,
>         .driver         = {
>                 .name   = "rockchip-typec-phy",
>                 .of_match_table = rockchip_typec_phy_dt_ids,
> --
> 1.9.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ