Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
5e7fe820
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5e7fe820
编写于
11月 24, 2012
作者:
D
Dmitry Torokhov
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'for-linus' into next
Bring in changes to ads7846 to avoid mereg conflicts.
上级
037db524
0a0d6285
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
34 addition
and
19 deletion
+34
-19
arch/arm/mach-omap2/common-board-devices.c
arch/arm/mach-omap2/common-board-devices.c
+20
-14
drivers/input/input-mt.c
drivers/input/input-mt.c
+4
-0
drivers/input/mousedev.c
drivers/input/mousedev.c
+2
-2
drivers/input/touchscreen/ads7846.c
drivers/input/touchscreen/ads7846.c
+5
-1
include/linux/spi/ads7846.h
include/linux/spi/ads7846.h
+3
-2
未找到文件。
arch/arm/mach-omap2/common-board-devices.c
浏览文件 @
5e7fe820
...
...
@@ -64,30 +64,36 @@ void __init omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce,
struct
spi_board_info
*
spi_bi
=
&
ads7846_spi_board_info
;
int
err
;
err
=
gpio_request_one
(
gpio_pendown
,
GPIOF_IN
,
"TSPenDown"
);
if
(
err
)
{
pr_err
(
"Couldn't obtain gpio for TSPenDown: %d
\n
"
,
err
);
return
;
}
/*
* If a board defines get_pendown_state() function, request the pendown
* GPIO and set the GPIO debounce time.
* If a board does not define the get_pendown_state() function, then
* the ads7846 driver will setup the pendown GPIO itself.
*/
if
(
board_pdata
&&
board_pdata
->
get_pendown_state
)
{
err
=
gpio_request_one
(
gpio_pendown
,
GPIOF_IN
,
"TSPenDown"
);
if
(
err
)
{
pr_err
(
"Couldn't obtain gpio for TSPenDown: %d
\n
"
,
err
);
return
;
}
if
(
gpio_debounce
)
gpio_set_debounce
(
gpio_pendown
,
gpio_debounce
);
if
(
gpio_debounce
)
gpio_set_debounce
(
gpio_pendown
,
gpio_debounce
);
gpio_export
(
gpio_pendown
,
0
);
}
spi_bi
->
bus_num
=
bus_num
;
spi_bi
->
irq
=
gpio_to_irq
(
gpio_pendown
);
ads7846_config
.
gpio_pendown
=
gpio_pendown
;
if
(
board_pdata
)
{
board_pdata
->
gpio_pendown
=
gpio_pendown
;
board_pdata
->
gpio_pendown_debounce
=
gpio_debounce
;
spi_bi
->
platform_data
=
board_pdata
;
if
(
board_pdata
->
get_pendown_state
)
gpio_export
(
gpio_pendown
,
0
);
}
else
{
ads7846_config
.
gpio_pendown
=
gpio_pendown
;
}
if
(
!
board_pdata
||
(
board_pdata
&&
!
board_pdata
->
get_pendown_state
))
gpio_free
(
gpio_pendown
);
spi_register_board_info
(
&
ads7846_spi_board_info
,
1
);
}
#else
...
...
drivers/input/input-mt.c
浏览文件 @
5e7fe820
...
...
@@ -26,10 +26,14 @@ static void copy_abs(struct input_dev *dev, unsigned int dst, unsigned int src)
* input_mt_init_slots() - initialize MT input slots
* @dev: input device supporting MT events and finger tracking
* @num_slots: number of slots used by the device
* @flags: mt tasks to handle in core
*
* This function allocates all necessary memory for MT slot handling
* in the input device, prepares the ABS_MT_SLOT and
* ABS_MT_TRACKING_ID events for use and sets up appropriate buffers.
* Depending on the flags set, it also performs pointer emulation and
* frame synchronization.
*
* May be called repeatedly. Returns -EINVAL if attempting to
* reinitialize with a different number of slots.
*/
...
...
drivers/input/mousedev.c
浏览文件 @
5e7fe820
...
...
@@ -12,8 +12,8 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#define MOUSEDEV_MINOR_BASE 32
#define MOUSEDEV_MINORS 3
2
#define MOUSEDEV_MIX
31
#define MOUSEDEV_MINORS 3
1
#define MOUSEDEV_MIX
63
#include <linux/sched.h>
#include <linux/slab.h>
...
...
drivers/input/touchscreen/ads7846.c
浏览文件 @
5e7fe820
...
...
@@ -955,7 +955,8 @@ static int ads7846_resume(struct device *dev)
static
SIMPLE_DEV_PM_OPS
(
ads7846_pm
,
ads7846_suspend
,
ads7846_resume
);
static
int
__devinit
ads7846_setup_pendown
(
struct
spi_device
*
spi
,
struct
ads7846
*
ts
)
static
int
__devinit
ads7846_setup_pendown
(
struct
spi_device
*
spi
,
struct
ads7846
*
ts
)
{
struct
ads7846_platform_data
*
pdata
=
spi
->
dev
.
platform_data
;
int
err
;
...
...
@@ -981,6 +982,9 @@ static int __devinit ads7846_setup_pendown(struct spi_device *spi, struct ads784
ts
->
gpio_pendown
=
pdata
->
gpio_pendown
;
if
(
pdata
->
gpio_pendown_debounce
)
gpio_set_debounce
(
pdata
->
gpio_pendown
,
pdata
->
gpio_pendown_debounce
);
}
else
{
dev_err
(
&
spi
->
dev
,
"no get_pendown_state nor gpio_pendown?
\n
"
);
return
-
EINVAL
;
...
...
include/linux/spi/ads7846.h
浏览文件 @
5e7fe820
...
...
@@ -46,8 +46,9 @@ struct ads7846_platform_data {
u16
debounce_rep
;
/* additional consecutive good readings
* required after the first two */
int
gpio_pendown
;
/* the GPIO used to decide the pendown
* state if get_pendown_state == NULL
*/
* state if get_pendown_state == NULL */
int
gpio_pendown_debounce
;
/* platform specific debounce time for
* the gpio_pendown */
int
(
*
get_pendown_state
)(
void
);
int
(
*
filter_init
)
(
const
struct
ads7846_platform_data
*
pdata
,
void
**
filter_data
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录