[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180726191637.GI10686@lunn.ch>
Date: Thu, 26 Jul 2018 21:16:37 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Arun Parameswaran <arun.parameswaran@...adcom.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Florian Fainelli <f.fainelli@...il.com>,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Ray Jui <rjui@...adcom.com>,
Scott Branden <sbranden@...adcom.com>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>, netdev@...r.kernel.org,
devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, bcm-kernel-feedback-list@...adcom.com
Subject: Re: [PATCH 6/7] net: phy: Add pm support to Broadcom iProc mdio mux
driver
On Thu, Jul 26, 2018 at 11:36:23AM -0700, Arun Parameswaran wrote:
> Add support for suspend and resume to the Broadcom iProc mdio
> mux driver.
> +#ifdef CONFIG_PM_SLEEP
> +static int mdio_mux_iproc_suspend(struct device *dev)
> +{
> + int i;
> + struct iproc_mdiomux_desc *md = dev_get_drvdata(dev);
> +
> + for (i = 0; i < MDIO_NUM_OF_REGS_TO_RESTORE; i++)
> + md->restore_regs[i] = readl(md->base +
> + restore_reg_offsets[i]);
> +
> + return 0;
> +}
> +
> +static int mdio_mux_iproc_resume(struct device *dev)
> +{
> + int i;
> + struct iproc_mdiomux_desc *md = dev_get_drvdata(dev);
> +
> + for (i = 0; i < MDIO_NUM_OF_REGS_TO_RESTORE; i++)
> + writel(md->restore_regs[i],
> + md->base + restore_reg_offsets[i]);
> +
> + return 0;
> +}
Hi Arun
Would it not be simpler to just call mdio_mux_iproc_config_clk() on
resume?
Andrew
Powered by blists - more mailing lists