Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
c1f1a9d4
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看板
提交
c1f1a9d4
编写于
6月 30, 2012
作者:
J
Jonathan Cameron
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'fixes-togreg' into togreg
上级
2da049bd
06d5199d
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
28 addition
and
11 deletion
+28
-11
drivers/staging/iio/Documentation/iio_utils.h
drivers/staging/iio/Documentation/iio_utils.h
+19
-5
drivers/staging/iio/accel/adis16204_core.c
drivers/staging/iio/accel/adis16204_core.c
+1
-1
drivers/staging/iio/accel/adis16240_core.c
drivers/staging/iio/accel/adis16240_core.c
+6
-3
drivers/staging/iio/adc/ad7793.c
drivers/staging/iio/adc/ad7793.c
+2
-2
未找到文件。
drivers/staging/iio/Documentation/iio_utils.h
浏览文件 @
c1f1a9d4
...
...
@@ -158,7 +158,8 @@ inline int iioutils_get_type(unsigned *is_signed,
&
padint
,
shift
);
if
(
ret
<
0
)
{
printf
(
"failed to pass scan type description
\n
"
);
return
ret
;
ret
=
-
errno
;
goto
error_close_sysfsfp
;
}
*
be
=
(
endianchar
==
'b'
);
*
bytes
=
padint
/
8
;
...
...
@@ -174,7 +175,11 @@ inline int iioutils_get_type(unsigned *is_signed,
free
(
filename
);
filename
=
0
;
sysfsfp
=
0
;
}
error_close_sysfsfp:
if
(
sysfsfp
)
fclose
(
sysfsfp
);
error_free_filename:
if
(
filename
)
free
(
filename
);
...
...
@@ -468,23 +473,30 @@ inline int find_type_by_name(const char *name, const char *type)
+
strlen
(
type
)
+
numstrlen
+
6
);
if
(
filename
==
NULL
)
if
(
filename
==
NULL
)
{
closedir
(
dp
);
return
-
ENOMEM
;
}
sprintf
(
filename
,
"%s%s%d/name"
,
iio_dir
,
type
,
number
);
nameFile
=
fopen
(
filename
,
"r"
);
if
(
!
nameFile
)
if
(
!
nameFile
)
{
free
(
filename
);
continue
;
}
free
(
filename
);
fscanf
(
nameFile
,
"%s"
,
thisname
);
if
(
strcmp
(
name
,
thisname
)
==
0
)
return
number
;
fclose
(
nameFile
);
if
(
strcmp
(
name
,
thisname
)
==
0
)
{
closedir
(
dp
);
return
number
;
}
}
}
}
closedir
(
dp
);
return
-
ENODEV
;
}
...
...
@@ -513,6 +525,7 @@ inline int _write_sysfs_int(char *filename, char *basedir, int val, int verify)
goto
error_free
;
}
fscanf
(
sysfsfp
,
"%d"
,
&
test
);
fclose
(
sysfsfp
);
if
(
test
!=
val
)
{
printf
(
"Possible failure in int write %d to %s%s
\n
"
,
val
,
...
...
@@ -562,6 +575,7 @@ int _write_sysfs_string(char *filename, char *basedir, char *val, int verify)
goto
error_free
;
}
fscanf
(
sysfsfp
,
"%s"
,
temp
);
fclose
(
sysfsfp
);
if
(
strcmp
(
temp
,
val
)
!=
0
)
{
printf
(
"Possible failure in string write of %s "
"Should be %s "
...
...
drivers/staging/iio/accel/adis16204_core.c
浏览文件 @
c1f1a9d4
...
...
@@ -381,7 +381,7 @@ static int adis16204_read_raw(struct iio_dev *indio_dev,
return
IIO_VAL_INT_PLUS_MICRO
;
case
IIO_ACCEL
:
*
val
=
0
;
if
(
chan
->
channel
==
'x'
)
if
(
chan
->
channel
2
==
IIO_MOD_X
)
*
val2
=
17125
;
else
*
val2
=
8407
;
...
...
drivers/staging/iio/accel/adis16240_core.c
浏览文件 @
c1f1a9d4
...
...
@@ -500,7 +500,8 @@ static struct iio_chan_spec adis16240_channels[] = {
.
channel2
=
IIO_MOD_X
,
.
info_mask
=
IIO_CHAN_INFO_RAW_SEPARATE_BIT
|
IIO_CHAN_INFO_SCALE_SHARED_BIT
|
IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT
,
IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT
|
IIO_CHAN_INFO_PEAK_SEPARATE_BIT
,
.
address
=
accel_x
,
.
scan_index
=
ADIS16240_SCAN_ACC_X
,
.
scan_type
=
{
...
...
@@ -514,7 +515,8 @@ static struct iio_chan_spec adis16240_channels[] = {
.
channel2
=
IIO_MOD_Y
,
.
info_mask
=
IIO_CHAN_INFO_RAW_SEPARATE_BIT
|
IIO_CHAN_INFO_SCALE_SHARED_BIT
|
IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT
,
IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT
|
IIO_CHAN_INFO_PEAK_SEPARATE_BIT
,
.
address
=
accel_y
,
.
scan_index
=
ADIS16240_SCAN_ACC_Y
,
.
scan_type
=
{
...
...
@@ -528,7 +530,8 @@ static struct iio_chan_spec adis16240_channels[] = {
.
channel2
=
IIO_MOD_Z
,
.
info_mask
=
IIO_CHAN_INFO_RAW_SEPARATE_BIT
|
IIO_CHAN_INFO_SCALE_SHARED_BIT
|
IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT
,
IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT
|
IIO_CHAN_INFO_PEAK_SEPARATE_BIT
,
.
address
=
accel_z
,
.
scan_index
=
ADIS16240_SCAN_ACC_Z
,
.
scan_type
=
{
...
...
drivers/staging/iio/adc/ad7793.c
浏览文件 @
c1f1a9d4
...
...
@@ -758,7 +758,7 @@ static const struct ad7793_chip_info ad7793_chip_info_tbl[] = {
.
address
=
AD7793_CH_AIN1M_AIN1M
,
.
info_mask
=
IIO_CHAN_INFO_RAW_SEPARATE_BIT
|
IIO_CHAN_INFO_SCALE_SHARED_BIT
,
.
scan_index
=
2
,
.
scan_index
=
3
,
.
scan_type
=
IIO_ST
(
's'
,
24
,
32
,
0
)
},
.
channel
[
4
]
=
{
...
...
@@ -831,7 +831,7 @@ static const struct ad7793_chip_info ad7793_chip_info_tbl[] = {
.
address
=
AD7793_CH_AIN1M_AIN1M
,
.
info_mask
=
IIO_CHAN_INFO_RAW_SEPARATE_BIT
|
IIO_CHAN_INFO_SCALE_SHARED_BIT
,
.
scan_index
=
2
,
.
scan_index
=
3
,
.
scan_type
=
IIO_ST
(
's'
,
16
,
32
,
0
)
},
.
channel
[
4
]
=
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录