9
0
Fork 0

mc13xxx: Added dummy definitions if CONFIG_MFD_MC13XXX is not set

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Alexander Shiyan 2012-07-21 08:50:07 +04:00 committed by Sascha Hauer
parent 8bb52bd827
commit ff03034eb7
2 changed files with 22 additions and 3 deletions

View File

@ -126,7 +126,6 @@ static inline uint32_t get_pll_spctl10(void)
*/
static int pcm038_power_init(void)
{
#ifdef CONFIG_MFD_MC13XXX
uint32_t spctl0 = get_pll_spctl10();
struct mc13xxx *mc13xxx = mc13xxx_get();
@ -176,7 +175,6 @@ static int pcm038_power_init(void)
printf("Failed to initialize PMIC. Will continue with low CPU speed\n");
}
}
#endif
/* clock gating enable */
GPCR = 0x00050f08;

View File

@ -163,10 +163,31 @@ struct mc13xxx {
int revision;
};
#ifdef CONFIG_MFD_MC13XXX
extern struct mc13xxx *mc13xxx_get(void);
extern int mc13xxx_reg_read(struct mc13xxx *mc13xxx, u8 reg, u32 *val);
extern int mc13xxx_reg_write(struct mc13xxx *mc13xxx, u8 reg, u32 val);
extern int mc13xxx_set_bits(struct mc13xxx *mc13xxx, u8 reg, u32 mask, u32 val);
#else
static inline struct mc13xxx *mc13xxx_get(void)
{
return NULL;
}
static inline int mc13xxx_reg_read(struct mc13xxx *mc13xxx, u8 reg, u32 *val)
{
return -ENODEV;
}
static inline int mc13xxx_reg_write(struct mc13xxx *mc13xxx, u8 reg, u32 val)
{
return -ENODEV;
}
static inline int mc13xxx_set_bits(struct mc13xxx *mc13xxx, u8 reg, u32 mask, u32 val)
{
return -ENODEV;
}
#endif
#endif /* __MFD_MC13XXX_H */