From 7fcd427465e710d0c4e2737d2f02b2ffa14b9bb3 Mon Sep 17 00:00:00 2001 From: Charles Keepax Date: Tue, 15 Oct 2013 20:14:21 +0100 Subject: mfd: Allow mapping regulator supplies to MFD device from children Occasionally, it is useful to map supplies from a child device onto the MFD device. A typical usecase for this would be if the MFD device is represented as a single node in device tree. All supplies will be defined in device tree as existing on the MFD device. When a child depends on frameworks which might have no knowledge of MFD to lookup supplies on its behalf the supply will not be found. This patch adds a list of supplies that should be looked up on the parent rather than the child as part of the mfd_cell structure. Signed-off-by: Charles Keepax Acked-by: Lee Jones Signed-off-by: Mark Brown --- include/linux/mfd/core.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/linux/mfd') diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h index cebe97ee98b..7314fc4e6d2 100644 --- a/include/linux/mfd/core.h +++ b/include/linux/mfd/core.h @@ -59,6 +59,12 @@ struct mfd_cell { * pm_runtime_no_callbacks(). */ bool pm_runtime_no_callbacks; + + /* A list of regulator supplies that should be mapped to the MFD + * device rather than the child device when requested + */ + const char **parent_supplies; + int num_parent_supplies; }; /* -- cgit v1.2.3-70-g09d2