rk3288:bq24296:modify bq24296 gpio unvalid

This commit is contained in:
张晴
2014-03-21 11:33:21 +08:00
parent 7535fcd3dd
commit cce17ad8a7
2 changed files with 5 additions and 3 deletions

View File

@@ -199,7 +199,7 @@
bq24296: bq24296@6b {
compatible = "ti,bq24296";
reg = <0x6b>;
// gpios = <&gpio0 GPIO_A7 GPIO_ACTIVE_HIGH>;
gpios = <&gpio0 GPIO_A7 GPIO_ACTIVE_HIGH>;
bq24296,chg_current = <1000 500 2000>;
status = "okay";
};

View File

@@ -538,7 +538,7 @@ static int bq24296_battery_probe(struct i2c_client *client,const struct i2c_devi
schedule_delayed_work(&di->usb_detect_work, 0);
bq24296_init_registers();
/*
if (gpio_is_valid(pdev->chg_irq_pin)){
irq = gpio_to_irq(pdev->chg_irq_pin);
ret = request_threaded_irq(irq, NULL,chg_irq_func, IRQF_TRIGGER_FALLING| IRQF_ONESHOT, "bq24296_chg_irq", di);
@@ -548,7 +548,6 @@ static int bq24296_battery_probe(struct i2c_client *client,const struct i2c_devi
goto err_chgirq_failed;
}
}
*/
bq24296_int =1;
@@ -566,7 +565,10 @@ err_chgirq_failed:
static void bq24296_battery_shutdown(struct i2c_client *client)
{
if (gpio_is_valid(bq24296_pdata->chg_irq_pin)){
free_irq(gpio_to_irq(bq24296_pdata->chg_irq_pin), NULL);
}
}
static int bq24296_battery_remove(struct i2c_client *client)