mmc: core: parse voltage from device-tree

Add function to support getting voltage from device-tree.
If voltage-range is specified in device-tree node, this function
will parse it and return the available voltage mask.

Signed-off-by: Haijun Zhang <haijun.zhang@freescale.com>
Acked-by: Anton Vorontsov <anton@enomsg.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
This commit is contained in:
Haijun Zhang 2013-08-26 09:19:22 +08:00 committed by Chris Ball
parent bcf24e1daa
commit 6e9e318b30
3 changed files with 50 additions and 0 deletions

View file

@ -208,6 +208,8 @@ static inline void mmc_claim_host(struct mmc_host *host)
__mmc_claim_host(host, NULL);
}
struct device_node;
extern u32 mmc_vddrange_to_ocrmask(int vdd_min, int vdd_max);
extern int mmc_of_parse_voltage(struct device_node *np, u32 *mask);
#endif /* LINUX_MMC_CORE_H */