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
8184f9f5
Commit
8184f9f5
authored
Sep 05, 2008
by
陳永達
Committed by
Jean-Paul Saman
Jan 16, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
retry 3 times and print retry value.
parent
7c5c528c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
5 deletions
+18
-5
drivers/i2c/chips/tlv320aic23.c
drivers/i2c/chips/tlv320aic23.c
+18
-5
No files found.
drivers/i2c/chips/tlv320aic23.c
View file @
8184f9f5
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
#include <linux/slab.h>
#include <linux/slab.h>
#include <linux/device.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/platform_device.h>
#include <linux/delay.h>
#include <asm/io.h>
#include <asm/io.h>
#include <asm/arch/aic23.h>
#include <asm/arch/aic23.h>
#include <asm/arch/mcbsp.h>
#include <asm/arch/mcbsp.h>
...
@@ -108,15 +109,27 @@ int tlv320aic33_write_value(u8 reg, u16 value)
...
@@ -108,15 +109,27 @@ int tlv320aic33_write_value(u8 reg, u16 value)
#endif
/* CONFIG_SENSORS_TLV320AIC33 */
#endif
/* CONFIG_SENSORS_TLV320AIC33 */
#ifdef CONFIG_SENSORS_TLV320AIC32
#ifdef CONFIG_SENSORS_TLV320AIC32
#define I2C_RETRY_SLEEP 200
#define I2C_RETRY_COUNT 3
int
tlv320aic32_write_value
(
u8
reg
,
u16
value
)
int
tlv320aic32_write_value
(
u8
reg
,
u16
value
)
{
{
static
struct
i2c_client
*
client
;
static
struct
i2c_client
*
client
;
u8
val
=
value
&
0xff
;
u8
val
=
value
&
0xff
;
int
retry
=
I2C_RETRY_COUNT
;
int
ret
=
-
1
;
client
=
new_client
;
client
=
new_client
;
printk
(
KERN_ERR
"%s
\n
"
,
__FUNCTION__
)
;
return
i2c_smbus_write_byte_data
(
client
,
reg
,
val
);
while
(
retry
--
)
{
ret
=
i2c_smbus_write_byte_data
(
client
,
reg
,
val
);
if
(
-
1
!=
ret
)
break
;
printk
(
"!!!! sil9034_write retry [%d]
\n
"
,
retry
);
mdelay
(
I2C_RETRY_SLEEP
);
}
return
ret
;
}
}
int
tlv320aic32_read_value
(
u8
reg
)
int
tlv320aic32_read_value
(
u8
reg
)
{
{
static
struct
i2c_client
*
client
;
static
struct
i2c_client
*
client
;
...
...
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