Re: [PATCH RFC 0/2] simplefb: Add regulator handling support
From: Hans de Goede <hidden>
Date: 2015-10-19 07:59:38
Also in:
linux-arm-kernel, linux-fbdev, lkml
Hi, On 18-10-15 21:57, Mark Brown wrote:
On Wed, Oct 14, 2015 at 01:31:52PM +0200, Hans de Goede wrote:quoted
I like your idea in your other mail where you suggest to actually use foo-supply and bar-supply names in the simplefb node, and then have some code simple iterate over all the properties and check for *-supply properties, so that the proper, schematic matching names can be used.quoted
But surely if we go this way having a helper for this so that others can re-use that likely not entirely trivial code is a good idea ?Yeah. It's trying to come up with a way to do this that is easy to avoid abuse that's tricky.quoted
One user which comes to mind immediately here is the generic mmc-pwrseq driver.quoted
I agree that we need to be careful to not use a helper like this too much, but I do believe it will make sense to have it in some rare cases. We can put a big warning in both the header declaring it and above the implementation to use it scarcely.I'd rather have something that was visible in the code, not everyone reads the documentation especially not subsystem maintainers reviewing drivers that use APIs they're not familiar with.
I'm afraid there is not really a good way to do this though, so a big fat warning in the header declaring the function is really the bets we can do IMHO. Regards, Hans -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html