Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
b26a95d4
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
b26a95d4
编写于
1月 21, 2016
作者:
D
Dmitry Torokhov
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'next' into for-linus
Prepare second round of input updates for 4.5 merge window.
上级
009f7738
809d9516
变更
4
展开全部
隐藏空白更改
内联
并排
Showing
4 changed file
with
456 addition
and
210 deletion
+456
-210
Documentation/devicetree/bindings/input/gpio-keys.txt
Documentation/devicetree/bindings/input/gpio-keys.txt
+1
-0
drivers/input/joystick/xpad.c
drivers/input/joystick/xpad.c
+425
-166
drivers/input/keyboard/gpio_keys.c
drivers/input/keyboard/gpio_keys.c
+4
-2
drivers/input/touchscreen/atmel_mxt_ts.c
drivers/input/touchscreen/atmel_mxt_ts.c
+26
-42
未找到文件。
Documentation/devicetree/bindings/input/gpio-keys.txt
浏览文件 @
b26a95d4
...
...
@@ -6,6 +6,7 @@ Required properties:
Optional properties:
- autorepeat: Boolean, Enable auto repeat feature of Linux input
subsystem.
- label: String, name of the input device.
Each button (key) is represented as a sub-node of "gpio-keys":
Subnode properties:
...
...
drivers/input/joystick/xpad.c
浏览文件 @
b26a95d4
此差异已折叠。
点击以展开。
drivers/input/keyboard/gpio_keys.c
浏览文件 @
b26a95d4
...
...
@@ -630,7 +630,7 @@ gpio_keys_get_devtree_pdata(struct device *dev)
if
(
!
node
)
return
ERR_PTR
(
-
ENODEV
);
nbuttons
=
of_get_child_count
(
node
);
nbuttons
=
of_get_
available_
child_count
(
node
);
if
(
nbuttons
==
0
)
return
ERR_PTR
(
-
ENODEV
);
...
...
@@ -645,8 +645,10 @@ gpio_keys_get_devtree_pdata(struct device *dev)
pdata
->
rep
=
!!
of_get_property
(
node
,
"autorepeat"
,
NULL
);
of_property_read_string
(
node
,
"label"
,
&
pdata
->
name
);
i
=
0
;
for_each_child_of_node
(
node
,
pp
)
{
for_each_
available_
child_of_node
(
node
,
pp
)
{
enum
of_gpio_flags
flags
;
button
=
&
pdata
->
buttons
[
i
++
];
...
...
drivers/input/touchscreen/atmel_mxt_ts.c
浏览文件 @
b26a95d4
...
...
@@ -113,8 +113,8 @@ struct t7_config {
#define MXT_T9_DETECT (1 << 7)
struct
t9_range
{
u
16
x
;
u
16
y
;
__le
16
x
;
__le
16
y
;
}
__packed
;
/* MXT_TOUCH_MULTI_T9 orient */
...
...
@@ -216,6 +216,7 @@ struct mxt_data {
unsigned
int
irq
;
unsigned
int
max_x
;
unsigned
int
max_y
;
bool
xy_switch
;
bool
in_bootloader
;
u16
mem_size
;
u8
t100_aux_ampl
;
...
...
@@ -1665,8 +1666,8 @@ static int mxt_read_t9_resolution(struct mxt_data *data)
if
(
error
)
return
error
;
le16_to_cpus
(
&
range
.
x
);
le16_to_cpus
(
&
range
.
y
);
data
->
max_x
=
get_unaligned_le16
(
&
range
.
x
);
data
->
max_y
=
get_unaligned_le16
(
&
range
.
y
);
error
=
__mxt_read_reg
(
client
,
object
->
start_address
+
MXT_T9_ORIENT
,
...
...
@@ -1674,23 +1675,7 @@ static int mxt_read_t9_resolution(struct mxt_data *data)
if
(
error
)
return
error
;
/* Handle default values */
if
(
range
.
x
==
0
)
range
.
x
=
1023
;
if
(
range
.
y
==
0
)
range
.
y
=
1023
;
if
(
orient
&
MXT_T9_ORIENT_SWITCH
)
{
data
->
max_x
=
range
.
y
;
data
->
max_y
=
range
.
x
;
}
else
{
data
->
max_x
=
range
.
x
;
data
->
max_y
=
range
.
y
;
}
dev_dbg
(
&
client
->
dev
,
"Touchscreen size X%uY%u
\n
"
,
data
->
max_x
,
data
->
max_y
);
data
->
xy_switch
=
orient
&
MXT_T9_ORIENT_SWITCH
;
return
0
;
}
...
...
@@ -1708,13 +1693,14 @@ static int mxt_read_t100_config(struct mxt_data *data)
if
(
!
object
)
return
-
EINVAL
;
/* read touchscreen dimensions */
error
=
__mxt_read_reg
(
client
,
object
->
start_address
+
MXT_T100_XRANGE
,
sizeof
(
range_x
),
&
range_x
);
if
(
error
)
return
error
;
le16_to_cpus
(
&
range_x
);
data
->
max_x
=
get_unaligned_le16
(
&
range_x
);
error
=
__mxt_read_reg
(
client
,
object
->
start_address
+
MXT_T100_YRANGE
,
...
...
@@ -1722,36 +1708,24 @@ static int mxt_read_t100_config(struct mxt_data *data)
if
(
error
)
return
error
;
le16_to_cpus
(
&
range_y
);
data
->
max_y
=
get_unaligned_le16
(
&
range_y
);
/* read orientation config */
error
=
__mxt_read_reg
(
client
,
object
->
start_address
+
MXT_T100_CFG1
,
1
,
&
cfg
);
if
(
error
)
return
error
;
data
->
xy_switch
=
cfg
&
MXT_T100_CFG_SWITCHXY
;
/* allocate aux bytes */
error
=
__mxt_read_reg
(
client
,
object
->
start_address
+
MXT_T100_TCHAUX
,
1
,
&
tchaux
);
if
(
error
)
return
error
;
/* Handle default values */
if
(
range_x
==
0
)
range_x
=
1023
;
if
(
range_y
==
0
)
range_y
=
1023
;
if
(
cfg
&
MXT_T100_CFG_SWITCHXY
)
{
data
->
max_x
=
range_y
;
data
->
max_y
=
range_x
;
}
else
{
data
->
max_x
=
range_x
;
data
->
max_y
=
range_y
;
}
/* allocate aux bytes */
aux
=
6
;
if
(
tchaux
&
MXT_T100_TCHAUX_VECT
)
...
...
@@ -1767,9 +1741,6 @@ static int mxt_read_t100_config(struct mxt_data *data)
"T100 aux mappings vect:%u ampl:%u area:%u
\n
"
,
data
->
t100_aux_vect
,
data
->
t100_aux_ampl
,
data
->
t100_aux_area
);
dev_info
(
&
client
->
dev
,
"T100 Touchscreen size X%uY%u
\n
"
,
data
->
max_x
,
data
->
max_y
);
return
0
;
}
...
...
@@ -1828,6 +1799,19 @@ static int mxt_initialize_input_device(struct mxt_data *data)
return
-
EINVAL
;
}
/* Handle default values and orientation switch */
if
(
data
->
max_x
==
0
)
data
->
max_x
=
1023
;
if
(
data
->
max_y
==
0
)
data
->
max_y
=
1023
;
if
(
data
->
xy_switch
)
swap
(
data
->
max_x
,
data
->
max_y
);
dev_info
(
dev
,
"Touchscreen size X%uY%u
\n
"
,
data
->
max_x
,
data
->
max_y
);
/* Register input device */
input_dev
=
input_allocate_device
();
if
(
!
input_dev
)
{
dev_err
(
dev
,
"Failed to allocate memory
\n
"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录