touch: raydium touch driver upgrade
Upgrading raydium tech touch driver code from kernel 5.4 to kernel 5.15. Change-Id: I051065cadad60ea9428f38eb18bedbcb3af47797 Signed-off-by: ppadasal <quic_ppadasal@quicinc.com>
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
*
|
||||
* Raydium TouchScreen driver.
|
||||
*
|
||||
* This file is provided under a dual BSD/GPLv2 license. When using or
|
||||
* redistributing this file, you may do so under either license.
|
||||
* Qualcomm Innovation Center, Inc. chooses to use it under GPLv2
|
||||
* Copyright (c) 2021 Raydium tech Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -14,8 +17,36 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* BSD LICENSE
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the name of Google Inc. or Linaro Ltd. nor the names of
|
||||
* its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written
|
||||
* permission.
|
||||
* * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
|
||||
#include <linux/delay.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/unistd.h>
|
||||
@@ -69,17 +100,15 @@ int self_test_save_to_file(char *file_name, char *p_string, short len)
|
||||
struct file *filp = NULL;
|
||||
mm_segment_t old_fs;
|
||||
|
||||
filp = filp_open(file_name, O_RDWR | O_CREAT | O_APPEND, 0666);
|
||||
filp = filp_open_block(file_name, O_RDWR | O_CREAT | O_APPEND, 0666);
|
||||
if (IS_ERR(filp)) {
|
||||
DEBUGOUT("can't open file:%s\n", RM_SELF_TEST_LOGFILE);
|
||||
return 0;
|
||||
}
|
||||
old_fs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
old_fs = force_uaccess_begin();
|
||||
filp->f_op->write(filp, p_string, len, &filp->f_pos);
|
||||
set_fs(old_fs);
|
||||
force_uaccess_end(old_fs);
|
||||
filp_close(filp, NULL);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user