static int mhl_rap_recv(struct mhl_tx_ctrl *mhl_ctrl, u8 action_code)
{
	u8 error_code;
	bool tmds_en;

	tmds_en = mhl_check_tmds_enabled(mhl_ctrl);
	switch (action_code) {
	case MHL_RAP_POLL:
		if (tmds_en)
			error_code = MHL_RAPK_NO_ERROR;
		else
			error_code = MHL_RAPK_UNSUPPORTED_ACTION_CODE;
		break;
	case MHL_RAP_CONTENT_ON:
	case MHL_RAP_CONTENT_OFF:
		if (tmds_en) {
			mhl_rap_action(mhl_ctrl, action_code);
			error_code = MHL_RAPK_NO_ERROR;
		} else {
			error_code = MHL_RAPK_UNSUPPORTED_ACTION_CODE;
		}
		break;
	default:
		error_code = MHL_RAPK_UNRECOGNIZED_ACTION_CODE;
		break;
	}
	/* prior send rapk */
	return mhl_msc_send_prior_msc_msg(
		mhl_ctrl,
		MHL_MSC_MSG_RAPK,
		error_code);
}
static int mhl_rap_recv(struct mhl_tx_ctrl *mhl_ctrl, u8 action_code)
{
	u8 error_code;

	switch (action_code) {
	case MHL_RAP_POLL:
	case MHL_RAP_CONTENT_ON:
	case MHL_RAP_CONTENT_OFF:
		if (action_code == MHL_RAP_CONTENT_ON
			|| mhl_ctrl->screen_mode) {
			mhl_rap_action(mhl_ctrl, action_code);
			error_code = MHL_RAPK_NO_ERROR;
		} else
			error_code = MHL_RAPK_UNSUPPORTED_ACTION_CODE;
		break;
	default:
		error_code = MHL_RAPK_UNRECOGNIZED_ACTION_CODE;
		break;
	}
	/* prior send rapk */
	return mhl_msc_send_prior_msc_msg(
		mhl_ctrl,
		MHL_MSC_MSG_RAPK,
		error_code);
}
Exemple #3
0
static int mhl_rap_recv(u8 action_code)
{
	u8 error_code;

	switch (action_code) {
	/*case MHL_RAP_POLL:*/
	case MHL_RAP_CONTENT_ON:
	case MHL_RAP_CONTENT_OFF:
		mhl_rap_action(action_code);
		error_code = MHL_RAPK_NO_ERROR;
		/* notify userspace */
		break;
	default:
		error_code = MHL_RAPK_UNRECOGNIZED_ACTION_CODE;
		break;
	}
	/* prior send rapk */
	return mhl_msc_send_msc_msg(
		MHL_MSC_MSG_RAPK,
		error_code);
}
static int mhl_rap_recv(u8 action_code)
{
	u8 error_code;

	switch (action_code) {
	
	case MHL_RAP_CONTENT_ON:
	case MHL_RAP_CONTENT_OFF:
		mhl_rap_action(action_code);
		error_code = MHL_RAPK_NO_ERROR;
		
		break;
	default:
		error_code = MHL_RAPK_UNRECOGNIZED_ACTION_CODE;
		break;
	}
	
	return mhl_msc_send_msc_msg(
		MHL_MSC_MSG_RAPK,
		error_code);
}