Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
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-2.6.23
Commits
3c1e0906
Commit
3c1e0906
authored
Nov 27, 2009
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tlv320aic23.c detect i2c retries on read
parent
3a781f21
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
drivers/i2c/chips/tlv320aic23.c
drivers/i2c/chips/tlv320aic23.c
+13
-3
No files found.
drivers/i2c/chips/tlv320aic23.c
View file @
3c1e0906
...
@@ -124,7 +124,7 @@ int tlv320aic32_write_value(u8 reg, u16 value)
...
@@ -124,7 +124,7 @@ int tlv320aic32_write_value(u8 reg, u16 value)
{
{
ret
=
i2c_smbus_write_byte_data
(
client
,
reg
,
val
);
ret
=
i2c_smbus_write_byte_data
(
client
,
reg
,
val
);
if
(
-
1
!=
ret
)
break
;
if
(
-
1
!=
ret
)
break
;
printk
(
KERN_ERR
"!!!!
sil9034
_write retry [%d]
\n
"
,
retry
);
printk
(
KERN_ERR
"!!!!
tvl320aic32
_write retry [%d]
\n
"
,
retry
);
mdelay
(
I2C_RETRY_SLEEP
);
mdelay
(
I2C_RETRY_SLEEP
);
}
}
return
ret
;
return
ret
;
...
@@ -133,9 +133,18 @@ int tlv320aic32_write_value(u8 reg, u16 value)
...
@@ -133,9 +133,18 @@ int tlv320aic32_write_value(u8 reg, u16 value)
int
tlv320aic32_read_value
(
u8
reg
)
int
tlv320aic32_read_value
(
u8
reg
)
{
{
static
struct
i2c_client
*
client
;
static
struct
i2c_client
*
client
;
client
=
new_client
;
int
retry
=
I2C_RETRY_COUNT
;
int
ret
=
-
1
;
return
i2c_smbus_read_byte_data
(
client
,
reg
);
client
=
new_client
;
while
(
retry
--
)
{
ret
=
i2c_smbus_read_byte_data
(
client
,
reg
);
if
(
-
1
!=
ret
)
break
;
printk
(
KERN_ERR
"!!!! tvl320aic32_read retry [%d]
\n
"
,
retry
);
mdelay
(
I2C_RETRY_SLEEP
);
}
return
ret
;
}
}
#endif
/* CONFIG_SENSORS_TLV320AIC32 */
#endif
/* CONFIG_SENSORS_TLV320AIC32 */
...
@@ -724,5 +733,6 @@ EXPORT_SYMBOL(tlv320aic33_write_value);
...
@@ -724,5 +733,6 @@ EXPORT_SYMBOL(tlv320aic33_write_value);
#ifdef CONFIG_SENSORS_TLV320AIC32
#ifdef CONFIG_SENSORS_TLV320AIC32
EXPORT_SYMBOL
(
tlv320aic32_write_value
);
EXPORT_SYMBOL
(
tlv320aic32_write_value
);
EXPORT_SYMBOL
(
tlv320aic32_read_value
);
#endif
#endif
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