git.openpandora.org
/
pandora-kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2165c8a
)
lp8727_charger: Add supported i2c functionality check routine
author
Kim, Milo
<Milo.Kim@ti.com>
Fri, 18 Nov 2011 05:43:06 +0000
(21:43 -0800)
committer
Anton Vorontsov
<cbouatmailru@gmail.com>
Wed, 4 Jan 2012 04:34:20 +0000
(08:34 +0400)
lp8727 i2c r/w functions are based on SMBUS I2C BLOCK. So the driver needs to
check whether i2c bus supports this functionality or not.
Signed-off-by: Woogyom Kim <milo.kim@ti.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
drivers/power/lp8727_charger.c
patch
|
blob
|
history
diff --git
a/drivers/power/lp8727_charger.c
b/drivers/power/lp8727_charger.c
index
2a649e0
..
a7e5cc2
100644
(file)
--- a/
drivers/power/lp8727_charger.c
+++ b/
drivers/power/lp8727_charger.c
@@
-425,6
+425,9
@@
static int lp8727_probe(struct i2c_client *cl, const struct i2c_device_id *id)
struct lp8727_chg *pchg;
int ret;
+ if (!i2c_check_functionality(cl->adapter, I2C_FUNC_SMBUS_I2C_BLOCK))
+ return -EIO;
+
pchg = kzalloc(sizeof(*pchg), GFP_KERNEL);
if (!pchg)
return -ENOMEM;