diff options
Diffstat (limited to 'firmware/target')
-rw-r--r-- | firmware/target/arm/s5l8702/i2c-s5l8702.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/target/arm/s5l8702/i2c-s5l8702.c b/firmware/target/arm/s5l8702/i2c-s5l8702.c index 954bacbd61..294e5b58ce 100644 --- a/firmware/target/arm/s5l8702/i2c-s5l8702.c +++ b/firmware/target/arm/s5l8702/i2c-s5l8702.c | |||
@@ -74,7 +74,7 @@ void i2c_init() | |||
74 | int i2c_write(int bus, unsigned char slave, int address, int len, const unsigned char *data) | 74 | int i2c_write(int bus, unsigned char slave, int address, int len, const unsigned char *data) |
75 | { | 75 | { |
76 | mutex_lock(&i2c_mtx[bus]); | 76 | mutex_lock(&i2c_mtx[bus]); |
77 | i2c_on(bus); | 77 | i2c_on(bus); |
78 | long timeout = current_tick + HZ / 50; | 78 | long timeout = current_tick + HZ / 50; |
79 | 79 | ||
80 | /* START */ | 80 | /* START */ |
@@ -123,7 +123,7 @@ int i2c_write(int bus, unsigned char slave, int address, int len, const unsigned | |||
123 | return 5; | 123 | return 5; |
124 | } | 124 | } |
125 | 125 | ||
126 | i2c_off(bus); | 126 | i2c_off(bus); |
127 | mutex_unlock(&i2c_mtx[bus]); | 127 | mutex_unlock(&i2c_mtx[bus]); |
128 | return 0; | 128 | return 0; |
129 | } | 129 | } |
@@ -131,7 +131,7 @@ int i2c_write(int bus, unsigned char slave, int address, int len, const unsigned | |||
131 | int i2c_read(int bus, unsigned char slave, int address, int len, unsigned char *data) | 131 | int i2c_read(int bus, unsigned char slave, int address, int len, unsigned char *data) |
132 | { | 132 | { |
133 | mutex_lock(&i2c_mtx[bus]); | 133 | mutex_lock(&i2c_mtx[bus]); |
134 | i2c_on(bus); | 134 | i2c_on(bus); |
135 | long timeout = current_tick + HZ / 50; | 135 | long timeout = current_tick + HZ / 50; |
136 | 136 | ||
137 | if (address >= 0) { | 137 | if (address >= 0) { |
@@ -189,7 +189,7 @@ int i2c_read(int bus, unsigned char slave, int address, int len, unsigned char * | |||
189 | return 5; | 189 | return 5; |
190 | } | 190 | } |
191 | 191 | ||
192 | i2c_off(bus); | 192 | i2c_off(bus); |
193 | mutex_unlock(&i2c_mtx[bus]); | 193 | mutex_unlock(&i2c_mtx[bus]); |
194 | return 0; | 194 | return 0; |
195 | } | 195 | } |