Thread (119 messages) 119 messages, 7 authors, 2021-08-26

Re: [PATCH v8 07/34] clk: tegra: Support runtime PM and power domain

From: Dmitry Osipenko <digetx@gmail.com>
Date: 2021-08-21 17:46:03
Also in: dri-devel, linux-clk, linux-devicetree, linux-media, linux-mmc, linux-pm, linux-pwm, linux-spi, linux-tegra, linux-usb, lkml

20.08.2021 16:08, Ulf Hansson пишет:
...
quoted
I suppose if there's really no good way of doing this other than
providing a struct device, then so be it. I think the cleaned up sysfs
shown in the summary above looks much better than what the original
would've looked like.

Perhaps an additional tweak to that would be to not create platform
devices. Instead, just create struct device. Those really have
everything you need (.of_node, and can be used with RPM and GENPD). As I
mentioned earlier, platform device implies a CPU-memory-mapped bus,
which this clearly isn't. It's kind of a separate "bus" if you want, so
just using struct device directly seems more appropriate.
Just a heads up. If you don't use a platform device or have a driver
associated with it for probing, you need to manage the attachment to
genpd yourself. That means calling one of the dev_pm_domain_attach*()
APIs, but that's perfectly fine, ofcourse.
quoted
We did something similar for XUSB pads, see drivers/phy/tegra/xusb.[ch]
for an example of how that was done. I think you can do something
similar here.
We need a platform device because we have a platform device driver that
must be bound to the device, otherwise PMC driver state won't be synced
since it it's synced after all drivers of devices that reference PMC
node in DT are probed.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help