Re: [PATCH 6/7] net: phy: Add pm support to Broadcom iProc mdio mux driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux