Commit 35092c5
power: supply: bq27xxx: Add cache parameter to bq27xxx_battery_current_and_status()
Add a cache parameter to bq27xxx_battery_current_and_status() so that
it can optionally use cached flags instead of re-reading them itself.
This is a preparation patch for making bq27xxx_battery_update() check
the status and have it call power_supply_changed() on status changes.
Fixes: 297a533 ("bq27x00: Cache battery registers")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>1 parent c00bc80 commit 35092c5
1 file changed
Lines changed: 12 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1840 | 1840 | | |
1841 | 1841 | | |
1842 | 1842 | | |
1843 | | - | |
| 1843 | + | |
| 1844 | + | |
1844 | 1845 | | |
1845 | 1846 | | |
1846 | 1847 | | |
| |||
1852 | 1853 | | |
1853 | 1854 | | |
1854 | 1855 | | |
1855 | | - | |
1856 | | - | |
1857 | | - | |
1858 | | - | |
| 1856 | + | |
| 1857 | + | |
| 1858 | + | |
| 1859 | + | |
| 1860 | + | |
| 1861 | + | |
| 1862 | + | |
| 1863 | + | |
1859 | 1864 | | |
1860 | 1865 | | |
1861 | 1866 | | |
| |||
2001 | 2006 | | |
2002 | 2007 | | |
2003 | 2008 | | |
2004 | | - | |
| 2009 | + | |
2005 | 2010 | | |
2006 | 2011 | | |
2007 | 2012 | | |
| |||
2010 | 2015 | | |
2011 | 2016 | | |
2012 | 2017 | | |
2013 | | - | |
| 2018 | + | |
2014 | 2019 | | |
2015 | 2020 | | |
2016 | 2021 | | |
| |||
0 commit comments