Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
d690b4c4
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
d690b4c4
编写于
11月 16, 2010
作者:
U
Uwe Kleine-König
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ARM: mx3: dynamically allocate imx-keypad devices
Signed-off-by:
N
Uwe Kleine-König
<
u.kleine-koenig@pengutronix.de
>
上级
742269e2
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
21 addition
and
23 deletion
+21
-23
arch/arm/mach-mx3/Kconfig
arch/arm/mach-mx3/Kconfig
+1
-0
arch/arm/mach-mx3/devices-imx31.h
arch/arm/mach-mx3/devices-imx31.h
+4
-0
arch/arm/mach-mx3/devices-imx35.h
arch/arm/mach-mx3/devices-imx35.h
+4
-0
arch/arm/mach-mx3/devices.c
arch/arm/mach-mx3/devices.c
+0
-19
arch/arm/mach-mx3/devices.h
arch/arm/mach-mx3/devices.h
+0
-1
arch/arm/mach-mx3/mach-mx31_3ds.c
arch/arm/mach-mx3/mach-mx31_3ds.c
+2
-3
arch/arm/plat-mxc/devices/platform-imx-keypad.c
arch/arm/plat-mxc/devices/platform-imx-keypad.c
+10
-0
未找到文件。
arch/arm/mach-mx3/Kconfig
浏览文件 @
d690b4c4
...
...
@@ -91,6 +91,7 @@ config MACH_MX31_3DS
select SOC_IMX31
select MXC_DEBUG_BOARD
select IMX_HAVE_PLATFORM_FSL_USB2_UDC
select IMX_HAVE_PLATFORM_IMX_KEYPAD
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_MXC_NAND
select IMX_HAVE_PLATFORM_SPI_IMX
...
...
arch/arm/mach-mx3/devices-imx31.h
浏览文件 @
d690b4c4
...
...
@@ -24,6 +24,10 @@ extern const struct imx_imx_i2c_data imx31_imx_i2c_data[] __initconst;
#define imx31_add_imx_i2c1(pdata) imx31_add_imx_i2c(1, pdata)
#define imx31_add_imx_i2c2(pdata) imx31_add_imx_i2c(2, pdata)
extern
const
struct
imx_imx_keypad_data
imx31_imx_keypad_data
__initconst
;
#define imx31_add_imx_keypad(pdata) \
imx_add_imx_keypad(&imx31_imx_keypad_data, pdata)
extern
const
struct
imx_imx_ssi_data
imx31_imx_ssi_data
[]
__initconst
;
#define imx31_add_imx_ssi(id, pdata) \
imx_add_imx_ssi(&imx31_imx_ssi_data[id], pdata)
...
...
arch/arm/mach-mx3/devices-imx35.h
浏览文件 @
d690b4c4
...
...
@@ -34,6 +34,10 @@ extern const struct imx_imx_i2c_data imx35_imx_i2c_data[] __initconst;
#define imx35_add_imx_i2c1(pdata) imx35_add_imx_i2c(1, pdata)
#define imx35_add_imx_i2c2(pdata) imx35_add_imx_i2c(2, pdata)
extern
const
struct
imx_imx_keypad_data
imx35_imx_keypad_data
__initconst
;
#define imx31_add_imx_keypad(pdata) \
imx_add_imx_keypad(&imx35_imx_keypad_data, pdata)
extern
const
struct
imx_imx_ssi_data
imx35_imx_ssi_data
[]
__initconst
;
#define imx35_add_imx_ssi(id, pdata) \
imx_add_imx_ssi(&imx35_imx_ssi_data[id], pdata)
...
...
arch/arm/mach-mx3/devices.c
浏览文件 @
d690b4c4
...
...
@@ -113,22 +113,3 @@ struct platform_device imx_rtc_device0 = {
.
num_resources
=
ARRAY_SIZE
(
imx_rtc_resources
),
.
resource
=
imx_rtc_resources
,
};
static
struct
resource
imx_kpp_resources
[]
=
{
{
.
start
=
MX3x_KPP_BASE_ADDR
,
.
end
=
MX3x_KPP_BASE_ADDR
+
0xf
,
.
flags
=
IORESOURCE_MEM
},
{
.
start
=
MX3x_INT_KPP
,
.
end
=
MX3x_INT_KPP
,
.
flags
=
IORESOURCE_IRQ
,
},
};
struct
platform_device
imx_kpp_device
=
{
.
name
=
"imx-keypad"
,
.
id
=
-
1
,
.
num_resources
=
ARRAY_SIZE
(
imx_kpp_resources
),
.
resource
=
imx_kpp_resources
,
};
arch/arm/mach-mx3/devices.h
浏览文件 @
d690b4c4
...
...
@@ -2,4 +2,3 @@ extern struct platform_device mx3_ipu;
extern
struct
platform_device
mx3_fb
;
extern
struct
platform_device
mx3_camera
;
extern
struct
platform_device
imx_rtc_device0
;
extern
struct
platform_device
imx_kpp_device
;
arch/arm/mach-mx3/mach-mx31_3ds.c
浏览文件 @
d690b4c4
...
...
@@ -22,7 +22,6 @@
#include <linux/mfd/mc13783.h>
#include <linux/spi/spi.h>
#include <linux/regulator/machine.h>
#include <linux/input/matrix_keypad.h>
#include <mach/hardware.h>
#include <asm/mach-types.h>
...
...
@@ -101,7 +100,7 @@ static const uint32_t mx31_3ds_keymap[] = {
KEY
(
2
,
3
,
KEY_F10
),
};
static
struct
matrix_keymap_data
mx31_3ds_keymap_data
=
{
static
const
struct
matrix_keymap_data
mx31_3ds_keymap_data
__initconst
=
{
.
keymap
=
mx31_3ds_keymap
,
.
keymap_size
=
ARRAY_SIZE
(
mx31_3ds_keymap
),
};
...
...
@@ -245,7 +244,7 @@ static void __init mxc_board_init(void)
spi_register_board_info
(
mx31_3ds_spi_devs
,
ARRAY_SIZE
(
mx31_3ds_spi_devs
));
mxc_register_device
(
&
imx_kpp_device
,
&
mx31_3ds_keymap_data
);
imx31_add_imx_keypad
(
&
mx31_3ds_keymap_data
);
mx31_3ds_usbotg_init
();
imx31_add_fsl_usb2_udc
(
&
usbotg_pdata
);
...
...
arch/arm/plat-mxc/devices/platform-imx-keypad.c
浏览文件 @
d690b4c4
...
...
@@ -31,6 +31,16 @@ const struct imx_imx_keypad_data imx27_imx_keypad_data __initconst =
imx_imx_keypad_data_entry_single
(
MX27
,
SZ_16
);
#endif
/* ifdef CONFIG_SOC_IMX27 */
#ifdef CONFIG_SOC_IMX31
const
struct
imx_imx_keypad_data
imx31_imx_keypad_data
__initconst
=
imx_imx_keypad_data_entry_single
(
MX31
,
SZ_16
);
#endif
/* ifdef CONFIG_SOC_IMX31 */
#ifdef CONFIG_SOC_IMX35
const
struct
imx_imx_keypad_data
imx35_imx_keypad_data
__initconst
=
imx_imx_keypad_data_entry_single
(
MX35
,
SZ_16
);
#endif
/* ifdef CONFIG_SOC_IMX35 */
struct
platform_device
*
__init
imx_add_imx_keypad
(
const
struct
imx_imx_keypad_data
*
data
,
const
struct
matrix_keymap_data
*
pdata
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录