Hi Simon, >> This sadly needs to get in, there have been 3 or 4 reports already, as >> many boards are broken. We need to find another way to add refcounting >> (otherwise some imx8* features will stay broken), but it requires more >> thinking time. >> >> Acked-by: Miquel Raynal <miquel.ray...@bootlin.com> > > We had this discussion on your patch and you ended up with a > 'low-level' function to provide the base functionality. But it would > be easier if you retained the current behaviour and then added > ref-counting to two new functions. Then people can migrate.
It's not the fact that people are using refcounting which breaks. It is the fact that the device model does not support well the fact that one DT node might be used to picture several devices. The clock subsystem handles that by registering all clocks manually, and at some point abuses one of the uclass internal structures (there is a FIXME about that). It's not even the drivers that break. > Of course, people perhaps won't migrate. This sort of thing is quite > tricky. But I still think this would be an easier route. You could > perhaps even add a Kconfig option like POWER_DOMAIN_NO_REF_COUNT which > uses the current behaviour. I now have an idea how to improve the power domain uclass to make it fit, let's see if that works, otherwise I might fallback to this solution indeed. Thanks, Miquèl