예제 #1
0
static int write_to_8820(struct dst_state *state, struct ca_msg *hw_buffer, u8 length, u8 reply)
{
	if ((dst_put_ci(state, hw_buffer->msg, length, hw_buffer->msg, reply)) < 0) {
		dprintk(verbose, DST_CA_ERROR, 1, " DST-CI Command failed.");
		dprintk(verbose, DST_CA_NOTICE, 1, " Resetting DST.");
		rdc_reset_state(state);
		return -1;
	}
	dprintk(verbose, DST_CA_NOTICE, 1, " DST-CI Command succes.");

	return 0;
}
예제 #2
0
파일: dst.c 프로젝트: 020gzh/linux
int dst_comm_init(struct dst_state *state)
{
	dprintk(verbose, DST_INFO, 1, "Initializing DST.");
	if ((dst_pio_enable(state)) < 0) {
		dprintk(verbose, DST_ERROR, 1, "PIO Enable Failed");
		return -1;
	}
	if ((rdc_reset_state(state)) < 0) {
		dprintk(verbose, DST_ERROR, 1, "RDC 8820 State RESET Failed.");
		return -1;
	}
	if (state->type_flags & DST_TYPE_HAS_FW_1)
		msleep(100);
	else
		msleep(5);

	return 0;
}
예제 #3
0
파일: dst.c 프로젝트: Anjali05/linux
int dst_comm_init(struct dst_state *state)
{
	dprintk(2, "Initializing DST.\n");
	if ((dst_pio_enable(state)) < 0) {
		pr_err("PIO Enable Failed\n");
		return -1;
	}
	if ((rdc_reset_state(state)) < 0) {
		pr_err("RDC 8820 State RESET Failed.\n");
		return -1;
	}
	if (state->type_flags & DST_TYPE_HAS_FW_1)
		msleep(100);
	else
		msleep(5);

	return 0;
}