24 static unsigned long db1x_pm_sleep_secs;
25 static unsigned long db1x_pm_wakemsk;
26 static unsigned long db1x_pm_last_wakesrc;
30 unsigned short bcsrs[16];
45 alchemy_gpio1_input_enable();
92 if (!db1x_pm_wakemsk) {
100 static void db1x_pm_end(
void)
115 .begin = db1x_pm_begin,
116 .enter = db1x_pm_enter,
120 #define ATTRCMP(x) (0 == strcmp(attr->attr.name, #x))
129 return sprintf(buf,
"%lu\n", db1x_pm_sleep_secs);
136 return sprintf(buf,
"%lu\n", db1x_pm_last_wakesrc);
141 idx = (attr->
attr.name)[4] -
'0';
146 return sprintf(buf,
"%08lx\n", db1x_pm_wakemsk);
165 db1x_pm_sleep_secs =
l;
176 tmp = (attr->
attr.name)[4] -
'0';
177 if (instr[0] !=
'0') {
188 db1x_pm_wakemsk = l & 0x0000003f;
197 static struct kobj_attribute x##_attribute = \
198 __ATTR(x, 0664, db1x_pmattr_show, \
214 #define ATTR_LIST(x) & x ## _attribute.attr
215 static struct attribute *db1x_pmattrs[] = {
233 .attrs = db1x_pmattrs,
239 static int __init pm_init(
void)