linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND] power: bq24190_charger: Fix charge type sysfs property
@ 2015-08-04 16:36 Andreas Dannenberg
  2015-08-04 16:45 ` Dan Murphy
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Andreas Dannenberg @ 2015-08-04 16:36 UTC (permalink / raw)
  To: Sebastian Reichel, Dmitry Eremin-Solenikov, David Woodhouse
  Cc: linux-pm, Dan Murphy, Andrew Davis, Andreas Dannenberg

Access to the BQ24190's configurable charge type property (none, trickle,
fast) is being masked by an incorrect power_supply_property entry. After
applying this patch a new 'charge_type' property will appear in the
bq24190-charger sysfs folder backed up by getters/setters already
present in the driver.

Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
---
This is a RESEND of yesterday's patch that for some reason did not seem to
have gotten picked up correctly...

The current driver incorrectly tries to declare the charge type property
using POWER_SUPPLY_PROP_TYPE which is the wrong declaration for this
(actually POWER_SUPPLY_PROP_TYPE itself has been superseeded by
power_supply.type and isn't even used anymore as part of the power
supply property declarations).

After implementing the fix tested this aspect of the driver using an
actual BQ24190 device and could witness the impact the change of charge
type has on the battery (writing '1' to the new sysfs property means
charging off, '2' will do trickle charging, and '3' will result in
fast charging).


 drivers/power/bq24190_charger.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/bq24190_charger.c b/drivers/power/bq24190_charger.c
index 052db78..40ae47c 100644
--- a/drivers/power/bq24190_charger.c
+++ b/drivers/power/bq24190_charger.c
@@ -902,7 +902,7 @@ static int bq24190_charger_property_is_writeable(struct power_supply *psy,
 }
 
 static enum power_supply_property bq24190_charger_properties[] = {
-	POWER_SUPPLY_PROP_TYPE,
+	POWER_SUPPLY_PROP_CHARGE_TYPE,
 	POWER_SUPPLY_PROP_HEALTH,
 	POWER_SUPPLY_PROP_ONLINE,
 	POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT,
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-08-13 16:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-04 16:36 [PATCH RESEND] power: bq24190_charger: Fix charge type sysfs property Andreas Dannenberg
2015-08-04 16:45 ` Dan Murphy
2015-08-04 16:54 ` Andrew F. Davis
2015-08-05  4:09 ` Sebastian Reichel
2015-08-05 16:05 ` [RFC] TI BQ242xx Battery Charger Development/Consolidation Plans Andreas Dannenberg
2015-08-07  8:58   ` Laurentiu Palcu
2015-08-11 11:12     ` Pallala, Ramakrishna
2015-08-12 16:20       ` Andreas Dannenberg
2015-08-13 16:19         ` Pallala, Ramakrishna
2015-08-12 16:10     ` Andreas Dannenberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).