summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen/rm31080a_ctrl.c
blob: d11c169ea7080c9db199ed1d447972cf0bb37430 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/*
 * Raydium RM31080 touchscreen driver
 *
 * Copyright (C) 2012-2014, Raydium Semiconductor Corporation.
 * All Rights Reserved.
 * Copyright (C) 2012-2014, NVIDIA Corporation.  All Rights Reserved.
 *
 * This program is free software; you can redistribute  it and/or modify it
 * under  the terms of  the GNU General  Public License as published by the
 * Free Software Foundation;  either version 2 of the  License, or (at your
 * option) any later version.
 *
 */
/*=============================================================================
	INCLUDED FILES
=============================================================================*/
#include <linux/device.h>
#include <linux/uaccess.h>	/* copy_to_user() */
#include <linux/delay.h>
#include <linux/module.h>	/* Module definition */

#include <linux/spi/rm31080a_ts.h>
#include <linux/spi/rm31080a_ctrl.h>

/*=============================================================================
	GLOBAL VARIABLES DECLARATION
=============================================================================*/
struct rm_tch_ctrl_para g_st_ctrl;

/*=============================================================================
	FUNCTION DECLARATION
=============================================================================*/
/*=============================================================================
	Description:

	Input:
			N/A
	Output:
			N/A
=============================================================================*/
void rm_tch_ctrl_init(void)
{
	memset(&g_st_ctrl, 0, sizeof(struct rm_tch_ctrl_para));
}

/*=============================================================================
	Description: To transfer the value to HAL layer

	Input:
			N/A
	Output:
			N/A
=============================================================================*/
unsigned char rm_tch_ctrl_get_idle_mode(u8 *p)
{
	u32 u32Ret;
	u32Ret = copy_to_user(p,
		&g_st_ctrl.u8_idle_mode_check, 1);
	if (u32Ret)
		return RETURN_FAIL;
	return RETURN_OK;
}

/*=============================================================================
	Description:

	Input:
			N/A
	Output:
			N/A
=============================================================================*/
void rm_tch_ctrl_set_parameter(void *arg)
{
	ssize_t missing;
	missing = copy_from_user(&g_st_ctrl,
		arg, sizeof(struct rm_tch_ctrl_para));
	if (missing)
		return;
}

/*===========================================================================*/
MODULE_AUTHOR("xxxxxxxxxx <xxxxxxxx@rad-ic.com>");
MODULE_DESCRIPTION("Raydium touchscreen control functions");
MODULE_LICENSE("GPL");