Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

power: supply: bq25890: Enable charging on boards where we skip reset

On boards where the "linux,skip-reset" boolean property is set we don't
reset the charger; and on some boards where the fw takes care of
initalizition F_CHG_CFG is set to 0 before handing control over to the OS.

Explicitly set F_CHG_CFG to 1 on boards where we don't reset the charger,
so that charging is always enabled on these boards, like it is always
enabled on boards where we do reset the charger.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>

authored by

Hans de Goede and committed by
Sebastian Reichel
06c75095 40428bd4

+11
+11
drivers/power/supply/bq25890_charger.c
··· 747 747 dev_dbg(bq->dev, "Reset failed %d\n", ret); 748 748 return ret; 749 749 } 750 + } else { 751 + /* 752 + * Ensure charging is enabled, on some boards where the fw 753 + * takes care of initalizition F_CHG_CFG is set to 0 before 754 + * handing control over to the OS. 755 + */ 756 + ret = bq25890_field_write(bq, F_CHG_CFG, 1); 757 + if (ret < 0) { 758 + dev_dbg(bq->dev, "Enabling charging failed %d\n", ret); 759 + return ret; 760 + } 750 761 } 751 762 752 763 /* disable watchdog */