|
@@ -526,7 +526,8 @@ int pwrdm_read_next_pwrst(struct powerdomain *pwrdm)
|
|
|
*
|
|
|
* Return the powerdomain @pwrdm's current power state. Returns -EINVAL
|
|
|
* if the powerdomain pointer is null or returns the current power state
|
|
|
- * upon success.
|
|
|
+ * upon success. Note that if the power domain only supports the ON state
|
|
|
+ * then just return ON as the current state.
|
|
|
*/
|
|
|
int pwrdm_read_pwrst(struct powerdomain *pwrdm)
|
|
|
{
|
|
@@ -535,6 +536,9 @@ int pwrdm_read_pwrst(struct powerdomain *pwrdm)
|
|
|
if (!pwrdm)
|
|
|
return -EINVAL;
|
|
|
|
|
|
+ if (pwrdm->pwrsts == PWRSTS_ON)
|
|
|
+ return PWRDM_POWER_ON;
|
|
|
+
|
|
|
if (arch_pwrdm && arch_pwrdm->pwrdm_read_pwrst)
|
|
|
ret = arch_pwrdm->pwrdm_read_pwrst(pwrdm);
|
|
|
|