Пример #1
0
/**
* omap_hsi_wakeup_disable - Disable HSI wakeup feature from RET/OFF mode
*
* @hsi_port - reference to the HSI port onto which disable wakeup feature.
*
*/
static int omap_hsi_wakeup_disable(struct hsi_dev *hsi_ctrl, int hsi_port)
{
	dev_dbg(hsi_ctrl->dev, "%s\n", __func__);

	if (omap_hsi_is_io_pad_hsi())
		omap_mux_disable_wakeup(OMAP_HSI_PADCONF_CAWAKE_PIN);
	else
		dev_warn(hsi_ctrl->dev, "Trying to disable HSI IO wakeup on non"
					" HSI board\n");

	/* TODO: handle hsi_port param and use it to find the correct Pad */

	return 0;
}
Пример #2
0
/**
* omap_hsi_wakeup_disable - Disable HSI wakeup feature from RET/OFF mode
*
* @hsi_port - reference to the HSI port onto which disable wakeup feature.
*	      Range [0, 1]
*
* Return value :* 0 if CAWAKE has been configured to not wakeup platform
*		* -ENODEV if CAWAKE is not muxed on padconf
*/
static int omap_hsi_wakeup_disable(int hsi_port)
{
	int ret = -ENODEV;

	if (omap_hsi_is_io_pad_hsi())
		ret = omap_mux_disable_wakeup(OMAP_HSI_PADCONF_CAWAKE_PIN);
	else
		pr_debug("Trying to disable HSI IO wakeup on non HSI board\n");


	/* TODO: handle hsi_port param and use it to find the correct Pad */

	return ret;
}
Пример #3
0
/**
* omap_hsi_wakeup_disable - Disable HSI wakeup feature from RET/OFF mode
*
* @hsi_port - reference to the HSI port onto which disable wakeup feature.
*	      Range [1, 2]
*
* Return value :* 0 if CAWAKE has been configured to not wakeup platform
*		* -ENODEV if CAWAKE is not muxed on padconf
*/
static int omap_hsi_wakeup_disable(int hsi_port)
{
	struct hsi_port_ctx *port_ctx;
	int ret = -ENODEV;

	if (omap_hsi_is_io_pad_hsi(hsi_port)) {
		port_ctx = hsi_get_hsi_port_ctx_data(hsi_port);
		ret = omap_mux_disable_wakeup(port_ctx->cawake_padconf_name);
		omap4_trigger_ioctrl();
	} else {
		pr_debug("HSI port %d not muxed, failed to disable IO wakeup\n",
			 hsi_port);
	}

	return ret;
}
Пример #4
0
/**
* omap_hsi_prepare_suspend - Prepare HSI for suspend mode (OFF)
*
* Return value : -ENODEV if HSI controller has not been found, else 0.
*
*/
int omap_hsi_prepare_suspend(void)
{
	struct platform_device *pdev;
	struct hsi_dev *hsi_ctrl;

	pdev = hsi_get_hsi_platform_device();
	hsi_ctrl = hsi_get_hsi_controller_data(pdev);

	if (!hsi_ctrl)
		return -ENODEV;

	if (device_may_wakeup(&pdev->dev))
		omap_mux_enable_wakeup(OMAP_HSI_PADCONF_CAWAKE_PIN);
	else
		omap_mux_disable_wakeup(OMAP_HSI_PADCONF_CAWAKE_PIN);

	return 0;
}