msm8660: Turn off LDO2 and Set backlight to Zero
CRs-Fixed: 434942
Change-Id: I5259f484c1b349b7529e04f5b5a25ef69ba0708b
diff --git a/platform/msm8x60/panel.c b/platform/msm8x60/panel.c
index 73b4b3d..9dad93d 100644
--- a/platform/msm8x60/panel.c
+++ b/platform/msm8x60/panel.c
@@ -1,5 +1,5 @@
/*
- * * Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
+ * * Copyright (c) 2010-2013, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -10,7 +10,7 @@
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
- * * Neither the name of Code Aurora Forum, Inc. nor the names of its
+ * * Neither the name of The Linux Foundation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
@@ -173,10 +173,10 @@
/* Enable PMR for LDO L2 */
buffer = 0x7F;
mask = 0x7F;
- if ((ret = pm8901_read(&prev_val, 1, PM8901_PMR_7))) {
+ if ((ret = pm8901_read(&prev_val, 1, PM8901_PMR_REG(LDO_L2)))) {
return ret;
}
- ret = pm8901_vreg_write(&buffer, mask, PM8901_PMR_7, prev_val);
+ ret = pm8901_vreg_write(&buffer, mask, PM8901_PMR_REG(LDO_L2), prev_val);
return ret;
}
@@ -242,7 +242,7 @@
int rc = -1;
uint32_t duty_us, period_us;
- if ((bt_level <= 0) || (bt_level > 15)) {
+ if ((bt_level < 0) || (bt_level > 15)) {
dprintf(CRITICAL, "Error in brightness level (1-15 allowed)\n");
goto bail_out;
}