if (pin->type == GLOBAL_CTRL_PIN &&
param == SPRD_PIN_CONFIG_CONTROL) {
arg = reg;
- } else if (pin->type == COMMON_PIN) {
+ } else if (pin->type == COMMON_PIN || pin->type == MISC_PIN) {
switch (param) {
case SPRD_PIN_CONFIG_SLEEP_MODE:
arg = (reg >> SLEEP_MODE_SHIFT) & SLEEP_MODE_MASK;
case PIN_CONFIG_OUTPUT:
arg = reg & SLEEP_OUTPUT_MASK;
break;
- case PIN_CONFIG_SLEEP_HARDWARE_STATE:
- arg = 0;
- break;
- default:
- return -ENOTSUPP;
- }
- } else if (pin->type == MISC_PIN) {
- switch (param) {
case PIN_CONFIG_DRIVE_STRENGTH:
arg = (reg >> DRIVE_STRENGTH_SHIFT) &
DRIVE_STRENGTH_MASK;
if (pin->type == GLOBAL_CTRL_PIN &&
param == SPRD_PIN_CONFIG_CONTROL) {
val = arg;
- } else if (pin->type == COMMON_PIN) {
+ } else if (pin->type == COMMON_PIN || pin->type == MISC_PIN) {
switch (param) {
case SPRD_PIN_CONFIG_SLEEP_MODE:
if (arg & AP_SLEEP)
shift = SLEEP_OUTPUT_SHIFT;
}
break;
- case PIN_CONFIG_SLEEP_HARDWARE_STATE:
- continue;
- default:
- return -ENOTSUPP;
- }
- } else if (pin->type == MISC_PIN) {
- switch (param) {
case PIN_CONFIG_DRIVE_STRENGTH:
if (arg < 2 || arg > 60)
return -EINVAL;