From: Maciej Purski <m.purski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> To: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Liam Girdwood <lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>, Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>, Marek Szyprowski <m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>, Bartlomiej Zolnierkiewicz <b.zolnierkie-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>, Maciej Purski <m.purski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> Subject: [PATCH v3 0/4] Add coupled regulators mechanism Date: Thu, 07 Dec 2017 10:46:11 +0100 [thread overview] Message-ID: <1512639975-22241-1-git-send-email-m.purski@samsung.com> (raw) In-Reply-To: <CGME20171207094720eucas1p1eb1c8c2d0e222082ce6918807c4ad492@eucas1p1.samsung.com> Hi all, this patchset adds a new mechanism to the framework - regulators' coupling. On Odroid XU3/4 and other Exynos5422 based boards there is a case, that different devices on the board are supplied by different regulators with non-fixed voltages. If one of these devices temporarily requires higher voltage, there might occur a situation that the spread between devices' voltages is so high, that there is a risk of changing 'high' and 'low' states on the interconnection between devices powered by those regulators. Algorithmicaly the problem was solved by: Inderpal Singh <inderpal.s-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> Doug Anderson <dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> The discussion on that subject can be found here: https://lkml.org/lkml/2014/4/29/28 Therefore this patchset is an attempt to apply the idea to regulators core as concluded in the discussion by Mark Brown and Doug Anderson. This feature is required to enable support for generic CPUfreq and devfreq drivers for the mentioned boards. Note on the locking model: When balancing voltage of a group of coupled regulators, we lock all of them for the whole operation. When voltage of an individual regulator is about to change, its suppliers are additionally locked. Best regards, Maciej Purski --- Changes in v3: - move dts parsing code to of_regulator.c, in order to the so, add a new commit in which of_regulator_find_by_node() is moved to of_regulator.c as well - improve error messages - move max_spread variable to constraints - perform resolving of coupled regulators under a list mutex - remove useless locking functions - some minor refactorization - improve commit messages Changes in RFC v2: - allow coupling n regulators (in fact up to constant value, now set to 10) - change algorithm to be more readable - introduce better locking - add more comments - split first patch into two - update commit messages - change sequence of the patches Maciej Purski (4): regulator: core: Move of_find_regulator_by_node() to of_regulator.c regulator: bindings: Add properties for coupled regulators regulator: core: Parse coupled regulators properties regulator: core: Balance coupled regulators voltages .../devicetree/bindings/regulator/regulator.txt | 5 + drivers/regulator/core.c | 424 +++++++++++++++++++-- drivers/regulator/internal.h | 16 + drivers/regulator/of_regulator.c | 74 ++++ include/linux/regulator/driver.h | 16 + include/linux/regulator/machine.h | 4 + 6 files changed, 501 insertions(+), 38 deletions(-) -- 2.7.4 -- 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
next parent reply other threads:[~2017-12-07 9:46 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <CGME20171207094720eucas1p1eb1c8c2d0e222082ce6918807c4ad492@eucas1p1.samsung.com> 2017-12-07 9:46 ` Maciej Purski [this message] [not found] ` <CGME20171207094751eucas1p1c10de599329e2c7ece77c8a5ed939401@eucas1p1.samsung.com> 2017-12-07 9:46 ` [PATCH v3 1/4] regulator: core: Move of_find_regulator_by_node() to of_regulator.c Maciej Purski 2018-01-26 17:35 ` Applied "regulator: core: Move of_find_regulator_by_node() to of_regulator.c" to the regulator tree Mark Brown [not found] ` <CGME20171207094753eucas1p27b835787f92a1da8c46b9a2692376288@eucas1p2.samsung.com> 2017-12-07 9:46 ` [PATCH v3 3/4] regulator: core: Parse coupled regulators properties Maciej Purski [not found] ` <1512639975-22241-4-git-send-email-m.purski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> 2017-12-12 11:35 ` Mark Brown 2017-12-21 10:08 ` Maciej Purski [not found] ` <4866dd1c-e9bb-24e4-9b4a-294d01edde78-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> 2017-12-21 12:02 ` Mark Brown [not found] ` <CGME20171207094752eucas1p2ca38d1197d8057cb92b33a81a9942915@eucas1p2.samsung.com> [not found] ` <1512639975-22241-1-git-send-email-m.purski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> 2017-12-07 9:46 ` [PATCH v3 2/4] regulator: bindings: Add properties for coupled regulators Maciej Purski 2017-12-07 23:30 ` Rob Herring 2018-03-02 12:55 ` Applied "regulator: bindings: Add properties for coupled regulators" to the regulator tree Mark Brown 2017-12-07 9:46 ` [PATCH v3 4/4] regulator: core: Balance coupled regulators voltages Maciej Purski [not found] ` <1512639975-22241-5-git-send-email-m.purski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> 2017-12-12 11:54 ` Mark Brown 2017-12-13 9:25 ` Maciej Purski 2017-12-15 15:19 ` Mark Brown 2017-12-21 13:29 ` Maciej Purski [not found] ` <d7555270-5be3-a104-233c-ac0e6383f41b-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> 2017-12-21 13:34 ` Mark Brown
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1512639975-22241-1-git-send-email-m.purski@samsung.com \ --to=m.purski-sze3o3uu22jbdgjk7y7tuq@public.gmane.org \ --cc=b.zolnierkie-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \ --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \ --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \ --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \ --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \ --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \ --subject='Re: [PATCH v3 0/4] Add coupled regulators mechanism' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).