Skip to content

Commit 6a06093

Browse files
committed
ARM: at91: pm: add at91_suspend_entering_backup()
Add at91_suspend_entering_backup() to check if platform enters backup and self-refresh mode. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
1 parent 8c58813 commit 6a06093

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

  • arch/arm/mach-at91
  • include/linux/platform_data

arch/arm/mach-at91/pm.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,12 @@ int at91_suspend_entering_slow_clock(void)
149149
}
150150
EXPORT_SYMBOL(at91_suspend_entering_slow_clock);
151151

152+
int at91_suspend_entering_backup(void)
153+
{
154+
return (pm_data.mode == AT91_PM_BACKUP);
155+
}
156+
EXPORT_SYMBOL(at91_suspend_entering_backup);
157+
152158
static void (*at91_suspend_sram_fn)(struct at91_pm_data *);
153159
extern void at91_pm_suspend_in_sram(struct at91_pm_data *pm_data);
154160
extern u32 at91_pm_suspend_in_sram_sz;

include/linux/platform_data/atmel.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,16 @@ struct at91_cf_data {
2222
/* FIXME: this needs a better location, but gets stuff building again */
2323
#ifdef CONFIG_ATMEL_PM
2424
extern int at91_suspend_entering_slow_clock(void);
25+
extern int at91_suspend_entering_backup(void);
2526
#else
2627
static inline int at91_suspend_entering_slow_clock(void)
2728
{
2829
return 0;
2930
}
31+
static inline int at91_suspend_entering_backup(void)
32+
{
33+
return 0;
34+
}
3035
#endif
3136

3237
#endif /* __ATMEL_H__ */

0 commit comments

Comments
 (0)