Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
81d9c7f2
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
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看板
提交
81d9c7f2
编写于
3月 26, 2008
作者:
B
Bryan Wu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[Blackfin] arch: add i2c board info struct and move to new-style i2c interface
Signed-off-by:
N
Bryan Wu
<
cooloney@kernel.org
>
上级
d171c233
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
99 addition
and
0 deletion
+99
-0
arch/blackfin/mach-bf533/boards/stamp.c
arch/blackfin/mach-bf533/boards/stamp.c
+32
-0
arch/blackfin/mach-bf537/boards/stamp.c
arch/blackfin/mach-bf537/boards/stamp.c
+33
-0
arch/blackfin/mach-bf548/boards/ezkit.c
arch/blackfin/mach-bf548/boards/ezkit.c
+34
-0
未找到文件。
arch/blackfin/mach-bf533/boards/stamp.c
浏览文件 @
81d9c7f2
...
...
@@ -40,6 +40,7 @@
#endif
#include <linux/ata_platform.h>
#include <linux/irq.h>
#include <linux/i2c.h>
#include <asm/dma.h>
#include <asm/bfin5xx_spi.h>
#include <asm/reboot.h>
...
...
@@ -474,6 +475,31 @@ static struct platform_device i2c_gpio_device = {
};
#endif
#ifdef CONFIG_I2C_BOARDINFO
static
struct
i2c_board_info
__initdata
bfin_i2c_board_info
[]
=
{
#if defined(CONFIG_JOYSTICK_AD7142) || defined(CONFIG_JOYSTICK_AD7142_MODULE)
{
I2C_BOARD_INFO
(
"ad7142_joystick"
,
0x2C
),
.
type
=
"ad7142_joystick"
,
.
irq
=
39
,
},
#endif
#if defined(CONFIG_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE)
{
I2C_BOARD_INFO
(
"pcf8574_lcd"
,
0x22
),
.
type
=
"pcf8574_lcd"
,
},
#endif
#if defined(CONFIG_TWI_KEYPAD) || defined(CONFIG_TWI_KEYPAD_MODULE)
{
I2C_BOARD_INFO
(
"pcf8574_keypad"
,
0x27
),
.
type
=
"pcf8574_keypad"
,
.
irq
=
39
,
},
#endif
};
#endif
static
struct
platform_device
*
stamp_devices
[]
__initdata
=
{
#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
&
rtc_device
,
...
...
@@ -528,6 +554,12 @@ static int __init stamp_init(void)
int
ret
;
printk
(
KERN_INFO
"%s(): registering device resources
\n
"
,
__FUNCTION__
);
#ifdef CONFIG_I2C_BOARDINFO
i2c_register_board_info
(
0
,
bfin_i2c_board_info
,
ARRAY_SIZE
(
bfin_i2c_board_info
));
#endif
ret
=
platform_add_devices
(
stamp_devices
,
ARRAY_SIZE
(
stamp_devices
));
if
(
ret
<
0
)
return
ret
;
...
...
arch/blackfin/mach-bf537/boards/stamp.c
浏览文件 @
81d9c7f2
...
...
@@ -41,6 +41,7 @@
#include <linux/ata_platform.h>
#include <linux/irq.h>
#include <linux/interrupt.h>
#include <linux/i2c.h>
#include <linux/usb/sl811.h>
#include <asm/dma.h>
#include <asm/bfin5xx_spi.h>
...
...
@@ -700,6 +701,31 @@ static struct platform_device i2c_bfin_twi_device = {
};
#endif
#ifdef CONFIG_I2C_BOARDINFO
static
struct
i2c_board_info
__initdata
bfin_i2c_board_info
[]
=
{
#if defined(CONFIG_JOYSTICK_AD7142) || defined(CONFIG_JOYSTICK_AD7142_MODULE)
{
I2C_BOARD_INFO
(
"ad7142_joystick"
,
0x2C
),
.
type
=
"ad7142_joystick"
,
.
irq
=
55
,
},
#endif
#if defined(CONFIG_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE)
{
I2C_BOARD_INFO
(
"pcf8574_lcd"
,
0x22
),
.
type
=
"pcf8574_lcd"
,
},
#endif
#if defined(CONFIG_TWI_KEYPAD) || defined(CONFIG_TWI_KEYPAD_MODULE)
{
I2C_BOARD_INFO
(
"pcf8574_keypad"
,
0x27
),
.
type
=
"pcf8574_keypad"
,
.
irq
=
72
,
},
#endif
};
#endif
#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
static
struct
platform_device
bfin_sport0_uart_device
=
{
.
name
=
"bfin-sport-uart"
,
...
...
@@ -829,6 +855,12 @@ static struct platform_device *stamp_devices[] __initdata = {
static
int
__init
stamp_init
(
void
)
{
printk
(
KERN_INFO
"%s(): registering device resources
\n
"
,
__FUNCTION__
);
#ifdef CONFIG_I2C_BOARDINFO
i2c_register_board_info
(
0
,
bfin_i2c_board_info
,
ARRAY_SIZE
(
bfin_i2c_board_info
));
#endif
platform_add_devices
(
stamp_devices
,
ARRAY_SIZE
(
stamp_devices
));
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
spi_register_board_info
(
bfin_spi_board_info
,
...
...
@@ -838,6 +870,7 @@ static int __init stamp_init(void)
#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
irq_desc
[
PATA_INT
].
status
|=
IRQ_NOAUTOEN
;
#endif
return
0
;
}
...
...
arch/blackfin/mach-bf548/boards/ezkit.c
浏览文件 @
81d9c7f2
...
...
@@ -36,6 +36,7 @@
#include <linux/spi/spi.h>
#include <linux/spi/flash.h>
#include <linux/irq.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
#include <linux/usb/musb.h>
...
...
@@ -573,6 +574,29 @@ static struct platform_device i2c_bfin_twi1_device = {
#endif
#endif
#ifdef CONFIG_I2C_BOARDINFO
static
struct
i2c_board_info
__initdata
bfin_i2c_board_info0
[]
=
{
};
#if !defined(CONFIG_BF542)
/* The BF542 only has 1 TWI */
static
struct
i2c_board_info
__initdata
bfin_i2c_board_info1
[]
=
{
#if defined(CONFIG_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE)
{
I2C_BOARD_INFO
(
"pcf8574_lcd"
,
0x22
),
.
type
=
"pcf8574_lcd"
,
},
#endif
#if defined(CONFIG_TWI_KEYPAD) || defined(CONFIG_TWI_KEYPAD_MODULE)
{
I2C_BOARD_INFO
(
"pcf8574_keypad"
,
0x27
),
.
type
=
"pcf8574_keypad"
,
.
irq
=
212
,
},
#endif
};
#endif
#endif
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
#include <linux/gpio_keys.h>
...
...
@@ -672,6 +696,16 @@ static struct platform_device *ezkit_devices[] __initdata = {
static
int
__init
ezkit_init
(
void
)
{
printk
(
KERN_INFO
"%s(): registering device resources
\n
"
,
__FUNCTION__
);
#ifdef CONFIG_I2C_BOARDINFO
i2c_register_board_info
(
0
,
bfin_i2c_board_info0
,
ARRAY_SIZE
(
bfin_i2c_board_info0
));
#if !defined(CONFIG_BF542)
/* The BF542 only has 1 TWI */
i2c_register_board_info
(
1
,
bfin_i2c_board_info1
,
ARRAY_SIZE
(
bfin_i2c_board_info1
));
#endif
#endif
platform_add_devices
(
ezkit_devices
,
ARRAY_SIZE
(
ezkit_devices
));
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录