regulator: Allow modular build of mc13xxx-core

Since the MFD core for this device and the regulator drivers for these
devices can be built modular we should also support modular build of
the shared code for the regulator drivers, otherwise we try to link
built in code against modular code with unfortunate results.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
This commit is contained in:
Mark Brown 2010-12-15 14:10:25 +00:00 committed by Liam Girdwood
parent 5e428d5cec
commit 4d7071f1fd
2 changed files with 8 additions and 1 deletions

View file

@ -187,7 +187,7 @@ config REGULATOR_PCAP
PCAP2 PMIC. PCAP2 PMIC.
config REGULATOR_MC13XXX_CORE config REGULATOR_MC13XXX_CORE
bool tristate
config REGULATOR_MC13783 config REGULATOR_MC13783
tristate "Support regulators on Freescale MC13783 PMIC" tristate "Support regulators on Freescale MC13783 PMIC"

View file

@ -89,6 +89,7 @@ int mc13xxx_regulator_list_voltage(struct regulator_dev *rdev,
return mc13xxx_regulators[id].voltages[selector]; return mc13xxx_regulators[id].voltages[selector];
} }
EXPORT_SYMBOL_GPL(mc13xxx_regulator_list_voltage);
int mc13xxx_get_best_voltage_index(struct regulator_dev *rdev, int mc13xxx_get_best_voltage_index(struct regulator_dev *rdev,
int min_uV, int max_uV) int min_uV, int max_uV)
@ -123,6 +124,7 @@ int mc13xxx_get_best_voltage_index(struct regulator_dev *rdev,
} }
return bestindex; return bestindex;
} }
EXPORT_SYMBOL_GPL(mc13xxx_get_best_voltage_index);
static int mc13xxx_regulator_set_voltage(struct regulator_dev *rdev, int min_uV, static int mc13xxx_regulator_set_voltage(struct regulator_dev *rdev, int min_uV,
int max_uV, unsigned *selector) int max_uV, unsigned *selector)
@ -185,6 +187,7 @@ struct regulator_ops mc13xxx_regulator_ops = {
.set_voltage = mc13xxx_regulator_set_voltage, .set_voltage = mc13xxx_regulator_set_voltage,
.get_voltage = mc13xxx_regulator_get_voltage, .get_voltage = mc13xxx_regulator_get_voltage,
}; };
EXPORT_SYMBOL_GPL(mc13xxx_regulator_ops);
int mc13xxx_fixed_regulator_set_voltage(struct regulator_dev *rdev, int min_uV, int mc13xxx_fixed_regulator_set_voltage(struct regulator_dev *rdev, int min_uV,
int max_uV, unsigned *selector) int max_uV, unsigned *selector)
@ -202,6 +205,7 @@ int mc13xxx_fixed_regulator_set_voltage(struct regulator_dev *rdev, int min_uV,
else else
return -EINVAL; return -EINVAL;
} }
EXPORT_SYMBOL_GPL(mc13xxx_fixed_regulator_set_voltage);
int mc13xxx_fixed_regulator_get_voltage(struct regulator_dev *rdev) int mc13xxx_fixed_regulator_get_voltage(struct regulator_dev *rdev)
{ {
@ -213,6 +217,7 @@ int mc13xxx_fixed_regulator_get_voltage(struct regulator_dev *rdev)
return mc13xxx_regulators[id].voltages[0]; return mc13xxx_regulators[id].voltages[0];
} }
EXPORT_SYMBOL_GPL(mc13xxx_fixed_regulator_get_voltage);
struct regulator_ops mc13xxx_fixed_regulator_ops = { struct regulator_ops mc13xxx_fixed_regulator_ops = {
.enable = mc13xxx_regulator_enable, .enable = mc13xxx_regulator_enable,
@ -222,11 +227,13 @@ struct regulator_ops mc13xxx_fixed_regulator_ops = {
.set_voltage = mc13xxx_fixed_regulator_set_voltage, .set_voltage = mc13xxx_fixed_regulator_set_voltage,
.get_voltage = mc13xxx_fixed_regulator_get_voltage, .get_voltage = mc13xxx_fixed_regulator_get_voltage,
}; };
EXPORT_SYMBOL_GPL(mc13xxx_fixed_regulator_ops);
int mc13xxx_sw_regulator_is_enabled(struct regulator_dev *rdev) int mc13xxx_sw_regulator_is_enabled(struct regulator_dev *rdev)
{ {
return 1; return 1;
} }
EXPORT_SYMBOL_GPL(mc13xxx_sw_regulator_is_enabled);
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Yong Shen <yong.shen@linaro.org>"); MODULE_AUTHOR("Yong Shen <yong.shen@linaro.org>");