Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
d702182a
Commit
d702182a
authored
Apr 01, 2008
by
Kevin Hilman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "ARM: DaVinci: I2C: enable zero-length transfer hack"
This reverts commit
a8e67c9d
.
parent
48f7d7be
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
24 deletions
+0
-24
drivers/i2c/busses/i2c-davinci.c
drivers/i2c/busses/i2c-davinci.c
+0
-24
No files found.
drivers/i2c/busses/i2c-davinci.c
View file @
d702182a
...
...
@@ -41,11 +41,6 @@
#include <asm/arch/i2c.h>
/* Hack to enable zero length transfers and smbus quick until clean fix
* is available
*/
#define DAVINCI_HACK
/* ----- global defines ----------------------------------------------- */
#define DAVINCI_I2C_TIMEOUT (1*HZ)
...
...
@@ -249,14 +244,9 @@ i2c_davinci_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg, int stop)
u32
flag
;
u16
w
;
int
r
;
#ifdef DAVINCI_HACK
u8
zero_byte
=
0
;
#endif
#ifndef DAVINCI_HACK
if
(
msg
->
len
==
0
)
return
-
EINVAL
;
#endif
if
(
!
pdata
)
pdata
=
&
davinci_i2c_platform_data_default
;
...
...
@@ -267,18 +257,8 @@ i2c_davinci_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg, int stop)
/* set the slave address */
davinci_i2c_write_reg
(
dev
,
DAVINCI_I2C_SAR_REG
,
msg
->
addr
);
#ifndef DAVINCI_HACK
dev
->
buf
=
msg
->
buf
;
dev
->
buf_len
=
msg
->
len
;
#else
if
(
msg
->
len
==
0
)
{
dev
->
buf
=
&
zero_byte
;
dev
->
buf_len
=
1
;
}
else
{
dev
->
buf
=
msg
->
buf
;
dev
->
buf_len
=
msg
->
len
;
}
#endif
davinci_i2c_write_reg
(
dev
,
DAVINCI_I2C_CNT_REG
,
dev
->
buf_len
);
...
...
@@ -383,11 +363,7 @@ i2c_davinci_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
static
u32
i2c_davinci_func
(
struct
i2c_adapter
*
adap
)
{
#ifndef DAVINCI_HACK
return
I2C_FUNC_I2C
|
(
I2C_FUNC_SMBUS_EMUL
&
~
I2C_FUNC_SMBUS_QUICK
);
#else
return
I2C_FUNC_I2C
|
I2C_FUNC_SMBUS_EMUL
;
#endif
}
static
inline
void
terminate_read
(
struct
davinci_i2c_dev
*
dev
)
...
...
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