|
@@ -157,6 +157,7 @@ static void sharpsl_battery_thread(struct work_struct *private_)
|
|
dev_dbg(sharpsl_pm.dev, "Battery: voltage: %d, status: %d, percentage: %d, time: %ld\n", voltage,
|
|
dev_dbg(sharpsl_pm.dev, "Battery: voltage: %d, status: %d, percentage: %d, time: %ld\n", voltage,
|
|
sharpsl_pm.battstat.mainbat_status, sharpsl_pm.battstat.mainbat_percent, jiffies);
|
|
sharpsl_pm.battstat.mainbat_status, sharpsl_pm.battstat.mainbat_percent, jiffies);
|
|
|
|
|
|
|
|
+#ifdef CONFIG_BACKLIGHT_CORGI
|
|
/* If battery is low. limit backlight intensity to save power. */
|
|
/* If battery is low. limit backlight intensity to save power. */
|
|
if ((sharpsl_pm.battstat.ac_status != APM_AC_ONLINE)
|
|
if ((sharpsl_pm.battstat.ac_status != APM_AC_ONLINE)
|
|
&& ((sharpsl_pm.battstat.mainbat_status == APM_BATTERY_STATUS_LOW) ||
|
|
&& ((sharpsl_pm.battstat.mainbat_status == APM_BATTERY_STATUS_LOW) ||
|
|
@@ -169,6 +170,7 @@ static void sharpsl_battery_thread(struct work_struct *private_)
|
|
sharpsl_pm.machinfo->backlight_limit(0);
|
|
sharpsl_pm.machinfo->backlight_limit(0);
|
|
sharpsl_pm.flags &= ~SHARPSL_BL_LIMIT;
|
|
sharpsl_pm.flags &= ~SHARPSL_BL_LIMIT;
|
|
}
|
|
}
|
|
|
|
+#endif
|
|
|
|
|
|
/* Suspend if critical battery level */
|
|
/* Suspend if critical battery level */
|
|
if ((sharpsl_pm.battstat.ac_status != APM_AC_ONLINE)
|
|
if ((sharpsl_pm.battstat.ac_status != APM_AC_ONLINE)
|