From 707acf2b87d704091d36c1e9bdac085f95ddc7d3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E5=BC=A0=E6=99=B4?= Date: Mon, 17 Sep 2012 11:52:39 +0800 Subject: [PATCH] rk2928:m720:compat pmic act8931 and tps65910 --- arch/arm/configs/rk2928_a720_defconfig | 1 + drivers/regulator/act8931.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/arch/arm/configs/rk2928_a720_defconfig b/arch/arm/configs/rk2928_a720_defconfig index d218666ddeb0..c20716ea0ab3 100644 --- a/arch/arm/configs/rk2928_a720_defconfig +++ b/arch/arm/configs/rk2928_a720_defconfig @@ -262,6 +262,7 @@ CONFIG_MFD_TPS65910=y CONFIG_MFD_TPS65090=y CONFIG_REGULATOR=y CONFIG_REGULATOR_TPS65910=y +CONFIG_REGULATOR_ACT8931=y CONFIG_RK30_PWM_REGULATOR=y CONFIG_MEDIA_SUPPORT=y CONFIG_VIDEO_DEV=y diff --git a/drivers/regulator/act8931.c b/drivers/regulator/act8931.c index ae0b45168aeb..e35f17d46307 100755 --- a/drivers/regulator/act8931.c +++ b/drivers/regulator/act8931.c @@ -562,6 +562,12 @@ static int __devinit act8931_i2c_probe(struct i2c_client *i2c, const struct i2c_ act8931->dev = &i2c->dev; i2c_set_clientdata(i2c, act8931); mutex_init(&act8931->io_lock); + + ret = act8931_reg_read(act8931,0x22); + if ((ret < 0) || (ret == 0xff)){ + printk("The device is not act8931 \n"); + return 0; + } if (pdata) { ret = setup_regulators(act8931, pdata); -- 2.34.1