struct omap_device_pad *pad = hmux->pads_dynamic[i];
int val = -EINVAL;
- pad->flags |= OMAP_DEVICE_PAD_IDLE;
val = pad->idle;
omap_mux_write(pad->partition, val,
pad->mux->reg_offset);
}
/* Runtime enabling of dynamic pads */
- if ((state == _HWMOD_STATE_ENABLED) && hmux->pads_dynamic) {
- int idled = 0;
-
+ if ((state == _HWMOD_STATE_ENABLED) && hmux->pads_dynamic
+ && hmux->enabled) {
for (i = 0; i < hmux->nr_pads_dynamic; i++) {
struct omap_device_pad *pad = hmux->pads_dynamic[i];
int val = -EINVAL;
- if (!(pad->flags & OMAP_DEVICE_PAD_IDLE))
- continue;
-
- pad->flags &= ~OMAP_DEVICE_PAD_IDLE;
val = pad->enable;
omap_mux_write(pad->partition, val,
pad->mux->reg_offset);
- idled++;
}
- if (idled)
- return;
+ return;
}
/* Enabling or disabling of all pads */
pad->name, val);
break;
case _HWMOD_STATE_DISABLED:
- default:
/* Use safe mode unless OMAP_DEVICE_PAD_REMUX */
if (flags & OMAP_DEVICE_PAD_REMUX)
val = pad->off;
val = OMAP_MUX_MODE7;
pr_debug("%s: Disabling %s %x\n", __func__,
pad->name, val);
+ break;
+ default:
+ /* Nothing to be done */
+ break;
};
if (val >= 0) {
u16 value;
};
-#define OMAP_DEVICE_PAD_IDLE BIT(7) /* Not needed for board-*.c */
#define OMAP_DEVICE_PAD_REMUX BIT(1) /* Dynamically remux a pad,
needs enable, idle and off
values */