static int charge_full = 1;\r
static int charge_now = 0;\r
\r
+//#define DEBUG_MARU_POWER_SUPPLY
+
static ssize_t show_capacity(struct device *dev, struct device_attribute *attr, char *buf) \r
{\r
+#ifdef DEBUG_MARU_POWER_SUPPLY
printk("[%s] \n", __FUNCTION__);\r
+#endif
return snprintf(buf, PAGE_SIZE, "%d", capacity);\r
}\r
\r
static ssize_t store_capacity(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) \r
{\r
+#ifdef DEBUG_MARU_POWER_SUPPLY
printk("[%s] \n", __FUNCTION__);\r
+#endif
sscanf(buf, "%d", &capacity);\r
return strnlen(buf, PAGE_SIZE);\r
}\r
\r
static ssize_t show_charge_full(struct device *dev, struct device_attribute *attr, char *buf) \r
{\r
+#ifdef DEBUG_MARU_POWER_SUPPLY
printk("[%s] \n", __FUNCTION__);\r
+#endif
return snprintf(buf, PAGE_SIZE, "%d", charge_full);\r
}\r
\r
static ssize_t store_charge_full(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) \r
{\r
+#ifdef DEBUG_MARU_POWER_SUPPLY
printk("[%s] \n", __FUNCTION__);\r
+#endif
sscanf(buf, "%d", &charge_full);\r
return strnlen(buf, PAGE_SIZE);\r
}\r
\r
static ssize_t show_charge_now(struct device *dev, struct device_attribute *attr, char *buf) \r
{\r
+#ifdef DEBUG_MARU_POWER_SUPPLY
printk("[%s] \n", __FUNCTION__);\r
+#endif
return snprintf(buf, PAGE_SIZE, "%d", charge_now);\r
}\r
\r
static ssize_t store_charge_now(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) \r
{\r
+#ifdef DEBUG_MARU_POWER_SUPPLY
printk("[%s] \n", __FUNCTION__);\r
+#endif
sscanf(buf, "%d", &charge_now);\r
return strnlen(buf, PAGE_SIZE);\r
}\r