/**
* hsi_idle_hwmod - This function is a used to workaround the omap_hwmod layer
*			which might sleep when omap_hwmod_idle() is called,
*			and thus cannot be called from atomic context.
*
* @od - reference to the hsi omap_device.
*
* Note : a "normal" .deactivate_func shall be omap_device_idle_hwmods()
*/
static int hsi_idle_hwmod(struct omap_device *od)
{
	/* HSI omap_device only contain one od->hwmods[0], so no need to */
	/* loop for all hwmods */
	_omap_hwmod_idle(od->hwmods[0]);
	return 0;
}
Beispiel #2
0
static int usb_idle_hwmod(struct omap_device *od)
{
	struct omap_hwmod *oh = *od->hwmods;

	if (irqs_disabled())
		_omap_hwmod_idle(oh);
	else
		omap_device_idle_hwmods(od);
	return 0;
}
/**
* hsi_idle_hwmod - This function is a used to workaround the omap_hwmod layer
*			which might sleep when omap_hwmod_idle() is called,
*			and thus cannot be called from atomic context.
*
* @od - reference to the hsi omap_device.
*
* Return value : Passes the value returned by _omap_hwmod_idle
*
* Note : a "normal" .deactivate_func shall be omap_device_idle_hwmods()
*/
static int hsi_idle_hwmod(struct omap_device *od)
{
	int err;
	/* HSI omap_device only contain one od->hwmods[0], so no need to */
	/* loop for all hwmods */
	err = _omap_hwmod_idle(od->hwmods[0]);

	if (err < 0)
		dev_err(&od->pdev.dev, "Cannot idle HSI hwmod\n");

	return err;
}