Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
791a08fc
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看板
提交
791a08fc
编写于
7月 03, 2009
作者:
M
Mauro Carvalho Chehab
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
V4L/DVB (12172): em28xx: Add autodetection code for Silvercrest 1.3 mpix
Signed-off-by:
N
Mauro Carvalho Chehab
<
mchehab@redhat.com
>
上级
58fc1ce3
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
45 addition
and
1 deletion
+45
-1
drivers/media/video/em28xx/em28xx-cards.c
drivers/media/video/em28xx/em28xx-cards.c
+44
-0
drivers/media/video/em28xx/em28xx-i2c.c
drivers/media/video/em28xx/em28xx-i2c.c
+1
-1
未找到文件。
drivers/media/video/em28xx/em28xx-cards.c
浏览文件 @
791a08fc
...
...
@@ -58,6 +58,8 @@ static unsigned int card[] = {[0 ... (EM28XX_MAXBOARDS - 1)] = UNSET };
module_param_array
(
card
,
int
,
NULL
,
0444
);
MODULE_PARM_DESC
(
card
,
"card type"
);
#define MT9V011_VERSION 0x8243
/* Bitmask marking allocated devices from 0 to EM28XX_MAXBOARDS */
static
unsigned
long
em28xx_devused
;
...
...
@@ -1702,6 +1704,46 @@ static inline void em28xx_set_model(struct em28xx *dev)
EM28XX_I2C_FREQ_100_KHZ
;
}
/* HINT method: webcam I2C chips
*
* This method work for webcams with Micron sensors
*/
static
int
em28xx_hint_sensor
(
struct
em28xx
*
dev
)
{
int
rc
;
char
*
sensor_name
;
unsigned
char
cmd
;
__be16
version_be
;
u16
version
;
if
(
dev
->
model
!=
EM2820_BOARD_UNKNOWN
)
return
0
;
dev
->
i2c_client
.
addr
=
0xba
>>
1
;
cmd
=
0
;
i2c_master_send
(
&
dev
->
i2c_client
,
&
cmd
,
1
);
rc
=
i2c_master_recv
(
&
dev
->
i2c_client
,
(
char
*
)
&
version_be
,
2
);
if
(
rc
!=
2
)
return
-
EINVAL
;
version
=
be16_to_cpu
(
version_be
);
switch
(
version
)
{
case
MT9V011_VERSION
:
dev
->
model
=
EM2820_BOARD_SILVERCREST_WEBCAM
;
sensor_name
=
"mt9v011"
;
break
;
default:
printk
(
"Unknown Sensor 0x%04x
\n
"
,
be16_to_cpu
(
version
));
return
-
EINVAL
;
}
em28xx_errdev
(
"Sensor is %s, assuming that webcam is %s
\n
"
,
sensor_name
,
em28xx_boards
[
dev
->
model
].
name
);
return
0
;
}
/* Since em28xx_pre_card_setup() requires a proper dev->model,
* this won't work for boards with generic PCI IDs
*/
...
...
@@ -2368,6 +2410,8 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev,
return
errCode
;
}
em28xx_hint_sensor
(
dev
);
/* Do board specific init and eeprom reading */
em28xx_card_setup
(
dev
);
...
...
drivers/media/video/em28xx/em28xx-i2c.c
浏览文件 @
791a08fc
...
...
@@ -483,7 +483,7 @@ static char *i2c_devs[128] = {
[
0xa0
>>
1
]
=
"eeprom"
,
[
0xb0
>>
1
]
=
"tda9874"
,
[
0xb8
>>
1
]
=
"tvp5150a"
,
[
0xba
>>
1
]
=
"tvp5150a"
,
[
0xba
>>
1
]
=
"
webcam sensor or
tvp5150a"
,
[
0xc0
>>
1
]
=
"tuner (analog)"
,
[
0xc2
>>
1
]
=
"tuner (analog)"
,
[
0xc4
>>
1
]
=
"tuner (analog)"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录