Commit 05732d7e authored by Eric Miao's avatar Eric Miao

[ARM] pxa: use generic gpio_get_value() instead of READ_GPIO_BIT()

READ_GPIO_BIT() is no way generic by accessing GPIO registers directly,
replace it with gpio_get_value().
Signed-off-by: default avatarEric Miao <eric.y.miao@gmail.com>
parent 0eefe718
...@@ -134,11 +134,11 @@ unsigned long corgipm_read_devdata(int type) ...@@ -134,11 +134,11 @@ unsigned long corgipm_read_devdata(int type)
case SHARPSL_STATUS_ACIN: case SHARPSL_STATUS_ACIN:
return ((GPLR(CORGI_GPIO_AC_IN) & GPIO_bit(CORGI_GPIO_AC_IN)) != 0); return ((GPLR(CORGI_GPIO_AC_IN) & GPIO_bit(CORGI_GPIO_AC_IN)) != 0);
case SHARPSL_STATUS_LOCK: case SHARPSL_STATUS_LOCK:
return READ_GPIO_BIT(sharpsl_pm.machinfo->gpio_batlock); return gpio_get_value(sharpsl_pm.machinfo->gpio_batlock);
case SHARPSL_STATUS_CHRGFULL: case SHARPSL_STATUS_CHRGFULL:
return READ_GPIO_BIT(sharpsl_pm.machinfo->gpio_batfull); return gpio_get_value(sharpsl_pm.machinfo->gpio_batfull);
case SHARPSL_STATUS_FATAL: case SHARPSL_STATUS_FATAL:
return READ_GPIO_BIT(sharpsl_pm.machinfo->gpio_fatal); return gpio_get_value(sharpsl_pm.machinfo->gpio_fatal);
case SHARPSL_ACIN_VOLT: case SHARPSL_ACIN_VOLT:
return sharpsl_pm_pxa_read_max1111(MAX1111_ACIN_VOLT); return sharpsl_pm_pxa_read_max1111(MAX1111_ACIN_VOLT);
case SHARPSL_BATT_TEMP: case SHARPSL_BATT_TEMP:
......
...@@ -178,11 +178,11 @@ unsigned long spitzpm_read_devdata(int type) ...@@ -178,11 +178,11 @@ unsigned long spitzpm_read_devdata(int type)
case SHARPSL_STATUS_ACIN: case SHARPSL_STATUS_ACIN:
return (((~GPLR(SPITZ_GPIO_AC_IN)) & GPIO_bit(SPITZ_GPIO_AC_IN)) != 0); return (((~GPLR(SPITZ_GPIO_AC_IN)) & GPIO_bit(SPITZ_GPIO_AC_IN)) != 0);
case SHARPSL_STATUS_LOCK: case SHARPSL_STATUS_LOCK:
return READ_GPIO_BIT(sharpsl_pm.machinfo->gpio_batlock); return gpio_get_value(sharpsl_pm.machinfo->gpio_batlock);
case SHARPSL_STATUS_CHRGFULL: case SHARPSL_STATUS_CHRGFULL:
return READ_GPIO_BIT(sharpsl_pm.machinfo->gpio_batfull); return gpio_get_value(sharpsl_pm.machinfo->gpio_batfull);
case SHARPSL_STATUS_FATAL: case SHARPSL_STATUS_FATAL:
return READ_GPIO_BIT(sharpsl_pm.machinfo->gpio_fatal); return gpio_get_value(sharpsl_pm.machinfo->gpio_fatal);
case SHARPSL_ACIN_VOLT: case SHARPSL_ACIN_VOLT:
return sharpsl_pm_pxa_read_max1111(MAX1111_ACIN_VOLT); return sharpsl_pm_pxa_read_max1111(MAX1111_ACIN_VOLT);
case SHARPSL_BATT_TEMP: case SHARPSL_BATT_TEMP:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment