sdhci_am654 and runtime-pm issues

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

 



Hello,

I looked at the sdhci_am654's probe function and concerning runtime-pm
this is at least unconvential:

It does

	clk_xin = devm_clk_get(dev, "clk_xin");
	if (IS_ERR(clk_xin))
		...

	/* Clocks are enabled using pm_runtime */
	pm_runtime_enable(dev);
	ret = pm_runtime_resume_and_get(dev);
	...

I'm not fluent in runtime-pm stuff (so I added Rafael to Cc), but I
thought it is to be used the other way around, i.e. put the device in
operational state and then runtime-pm cares to suspend the device under
some conditions (e.g. CONFIG_PM being enabled).

With CONFIG_PM unset the driver is broken for sure, as then
pm_runtime_enable() and pm_runtime_resume_and_get() have no effect. So
the clk stays off.

I don't have the hardware, so I cannot test. But I guess someone with
interest in this driver might want to take a look.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux