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:
parent
8bb52bd827
commit
ff03034eb7
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue