Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Librem5
uboot-imx
Commits
9815326d
Commit
9815326d
authored
Jul 19, 2012
by
Troy Kisky
Committed by
Heiko Schocher
Jul 31, 2012
Browse files
mxc_i2c: finish adding CONFIG_I2C_MULTI_BUS support
Signed-off-by:
Troy Kisky
<
troy.kisky@boundarydevices.com
>
parent
96c19bd3
Changes
1
Hide whitespace changes
Inline
Side-by-side
drivers/i2c/mxc_i2c.c
View file @
9815326d
...
@@ -416,6 +416,23 @@ static int i2c_idle_bus(void *base)
...
@@ -416,6 +416,23 @@ static int i2c_idle_bus(void *base)
return
0
;
return
0
;
}
}
#ifdef CONFIG_I2C_MULTI_BUS
unsigned
int
i2c_get_bus_num
(
void
)
{
return
srdata
.
curr_i2c_bus
;
}
int
i2c_set_bus_num
(
unsigned
bus_idx
)
{
if
(
bus_idx
>=
ARRAY_SIZE
(
srdata
.
i2c_data
))
return
-
1
;
if
(
!
srdata
.
i2c_data
[
bus_idx
].
base
)
return
-
1
;
srdata
.
curr_i2c_bus
=
bus_idx
;
return
0
;
}
#endif
int
i2c_read
(
uchar
chip
,
uint
addr
,
int
alen
,
uchar
*
buf
,
int
len
)
int
i2c_read
(
uchar
chip
,
uint
addr
,
int
alen
,
uchar
*
buf
,
int
len
)
{
{
return
bus_i2c_read
(
get_base
(),
chip
,
addr
,
alen
,
buf
,
len
);
return
bus_i2c_read
(
get_base
(),
chip
,
addr
,
alen
,
buf
,
len
);
...
...
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