Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC ADC 100M 14b 4cha - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
FMC ADC 100M 14b 4cha - Software
Commits
758cd250
Commit
758cd250
authored
Nov 14, 2012
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fa-zio-drv.c: get che channel from cset
Signed-off-by:
Federico Vaga
<
federico.vaga@gmail.com
>
parent
4ae23b38
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
fa-zio-drv.c
kernel/fa-zio-drv.c
+6
-2
No files found.
kernel/fa-zio-drv.c
View file @
758cd250
...
...
@@ -201,7 +201,7 @@ static ZIO_ATTR_DEFINE_STD(ZIO_DEV, zfad_chan_std_zattr) = {
* 0x45 (69): 10V range
* 0x00 (0): Open input
*/
ZIO_ATTR
(
zdev
,
ZIO_ATTR_VREFTYPE
,
S_IRUGO
|
S_IWUGO
,
ZFA_CHx_CTL_RANGE
,
0x11
),
ZIO_ATTR
(
zdev
,
ZIO_ATTR_VREFTYPE
,
S_IRUGO
|
S_IWUGO
,
ZFA_CHx_CTL_RANGE
,
0x11
),
};
static
struct
zio_attribute
zfad_chan_ext_zattr
[]
=
{
...
...
@@ -262,6 +262,10 @@ static void zfad_reset_offset(struct fa_dev *fa)
zfa_common_conf_set
(
fa
,
&
zfad_regs
[
ZFA_CTL_DAC_CLR_N
],
0
);
udelay
(
20
);
zfa_common_conf_set
(
fa
,
&
zfad_regs
[
ZFA_CTL_DAC_CLR_N
],
1
);
/*
* FIXME update the value with the default value for the selected range
*/
}
static
int
zfad_get_range
(
uint32_t
usr_val
)
...
...
@@ -355,7 +359,7 @@ static int zfad_conf_set(struct device *dev, struct zio_attribute *zattr,
const
struct
zio_field_desc
*
reg
;
int
i
,
err
;
i
=
4
;
/* FIXME temporary, to get chan number
*/
i
=
fa
->
zdev
->
cset
->
n_chan
-
1
;
/* -1 because of interleaved channel
*/
switch
(
zattr
->
id
)
{
case
ZFA_SW_R_NOADDERS_AUTO
:
enable_auto_start
=
usr_val
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment