diff options
Diffstat (limited to 'drivers/power/sbs-battery.c')
-rw-r--r-- | drivers/power/sbs-battery.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/power/sbs-battery.c b/drivers/power/sbs-battery.c index a65e8f54157e..4146596d254b 100644 --- a/drivers/power/sbs-battery.c +++ b/drivers/power/sbs-battery.c | |||
@@ -759,6 +759,16 @@ static int __devinit sbs_probe(struct i2c_client *client, | |||
759 | chip->irq = irq; | 759 | chip->irq = irq; |
760 | 760 | ||
761 | skip_gpio: | 761 | skip_gpio: |
762 | /* | ||
763 | * Before we register, we need to make sure we can actually talk | ||
764 | * to the battery. | ||
765 | */ | ||
766 | rc = sbs_read_word_data(client, sbs_data[REG_STATUS].addr); | ||
767 | if (rc < 0) { | ||
768 | dev_err(&client->dev, "%s: Failed to get device status\n", | ||
769 | __func__); | ||
770 | goto exit_psupply; | ||
771 | } | ||
762 | 772 | ||
763 | rc = power_supply_register(&client->dev, &chip->power_supply); | 773 | rc = power_supply_register(&client->dev, &chip->power_supply); |
764 | if (rc) { | 774 | if (rc) { |