/* Do whatever is necessary for the hwmods underlying omap_device @od to be accessible and ready to operate. This generally involves enabling clocks, setting SYSCONFIG registers; and in the future may involve remuxing pins. Device drivers should call this function (through platform_data function pointers) where they would normally enable clocks, etc. Returns -EINVAL if called when the omap_device is already enabled, or passes along the return value of _omap_device_activate().  */
int omap_device_enable(struct platform_device *pdev)
/* Do whatever is necessary for the hwmods underlying omap_device @od to be accessible and ready to operate. This generally involves enabling clocks, setting SYSCONFIG registers; and in the future may involve remuxing pins. Device drivers should call this function (through platform_data function pointers) where they would normally enable clocks, etc. Returns -EINVAL if called when the omap_device is already enabled, or passes along the return value of _omap_device_activate().  */
int omap_device_enable(struct platform_device *pdev)
{
	int ret;
	struct omap_device *od;
	od = _find_by_pdev(pdev);
	if (od->_state == OMAP_DEVICE_STATE_ENABLED) {
		WARN(1, "omap_device: %s.%d: omap_device_enable() called from "
		     "invalid state\n", od->pdev.name, od->pdev.id);
		return -EINVAL;
	}
	if (od->_state == OMAP_DEVICE_STATE_UNKNOWN)
		od->pm_lat_level = od->pm_lats_cnt;
	ret = _omap_device_activate(od, IGNORE_WAKEUP_LAT);
	od->dev_wakeup_lat = 0;
	od->_dev_wakeup_lat_limit = UINT_MAX;
	od->_state = OMAP_DEVICE_STATE_ENABLED;
	return ret;
}