Re: [RFC 1/2] PM / suspend: Add platform_suspend_target_state()

From: Pavel Machek
Date: Sun Jul 16 2017 - 14:23:07 EST


Hi!

> > > So why exactly isn't it reasonable?
> > >
> > > Please use technical arguments. Saying that something is wrong without
> > > explaining the problem you see with it isn't particulatly useful in technical
> > > discussions.
> >
> > Deep in your heart, you should know that having enum listing all the platforms linux
> > runs on is a very bad idea.
>
> Even so, if I'm unable to explain to people why this is a bad idea in technical
> terms, that doesn't mean too much.

I could say something O(#drivers * #platforms) vs. O(#drivers +
#platforms) lines of code -- but I thought it was obvious...?

> > Anyway, there are better solutions, regulator framework already knows if given rail
> > will be powered off or not, and their driver already knows if they are going
> > suspend/standby. They just need to use existing interfaces.
>
> So they need to know what has been passed to suspend_devices_and_enter()
> anyway and currently there's no interface for that. That actually is the source
> of the whole issue.

Yep, I don't like that, but I guess we should give drivers enough
information to ask regulator framework.

Best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Attachment: signature.asc
Description: Digital signature