Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
f2325c54
Commit
f2325c54
authored
Jan 07, 2015
by
Wolfram Sang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
i2c: viperboard: make use of the new infrastructure for quirks
Signed-off-by:
Wolfram Sang
<
wsa@the-dreams.de
>
parent
7ee405ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
drivers/i2c/busses/i2c-viperboard.c
drivers/i2c/busses/i2c-viperboard.c
+6
-4
No files found.
drivers/i2c/busses/i2c-viperboard.c
View file @
f2325c54
...
...
@@ -288,10 +288,6 @@ static int vprbrd_i2c_xfer(struct i2c_adapter *i2c, struct i2c_msg *msgs,
i
,
pmsg
->
flags
&
I2C_M_RD
?
"read"
:
"write"
,
pmsg
->
flags
,
pmsg
->
len
,
pmsg
->
addr
);
/* msgs longer than 2048 bytes are not supported by adapter */
if
(
pmsg
->
len
>
2048
)
return
-
EINVAL
;
mutex_lock
(
&
vb
->
lock
);
/* directly send the message */
if
(
pmsg
->
flags
&
I2C_M_RD
)
{
...
...
@@ -358,6 +354,11 @@ static const struct i2c_algorithm vprbrd_algorithm = {
.
functionality
=
vprbrd_i2c_func
,
};
static
struct
i2c_adapter_quirks
vprbrd_quirks
=
{
.
max_read_len
=
2048
,
.
max_write_len
=
2048
,
};
static
int
vprbrd_i2c_probe
(
struct
platform_device
*
pdev
)
{
struct
vprbrd
*
vb
=
dev_get_drvdata
(
pdev
->
dev
.
parent
);
...
...
@@ -373,6 +374,7 @@ static int vprbrd_i2c_probe(struct platform_device *pdev)
vb_i2c
->
i2c
.
owner
=
THIS_MODULE
;
vb_i2c
->
i2c
.
class
=
I2C_CLASS_HWMON
;
vb_i2c
->
i2c
.
algo
=
&
vprbrd_algorithm
;
vb_i2c
->
i2c
.
quirks
=
&
vprbrd_quirks
;
vb_i2c
->
i2c
.
algo_data
=
vb
;
/* save the param in usb capabable memory */
vb_i2c
->
bus_freq_param
=
i2c_bus_param
;
...
...
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