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";
};
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);
goto err_chgirq_failed;
}
}
-*/
bq24296_int =1;
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)