]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
power: supply: bq24190_charger: Add support for bq24192i
authorHans de Goede <hdegoede@redhat.com>
Wed, 22 Mar 2017 14:55:31 +0000 (15:55 +0100)
committerSebastian Reichel <sre@kernel.org>
Thu, 13 Apr 2017 23:41:34 +0000 (01:41 +0200)
commit99c88eb244aa6b61cc0c4ca6e6b6b9c7ce00cc53
tree5323eb6fe10bb249b1eee3943a2da0c1f0aa2af5
parent01c0e0a28da749e80cb7d549f75a5f52e2f40d0e
power: supply: bq24190_charger: Add support for bq24192i

The bq24192 and bq24192i are mostly identical to the bq24190, TI even
published a single datasheet for all 3 of them. The difference
between the bq24190 and bq24192[i] is the way charger-type detection
is done, the bq24190 is to be directly connected to the USB a/b lines,
where as the the bq24192[i] has a gpio which should be driven high/low
externally depending on the type of charger connected, from a register
level access pov there is no difference.

The differences between the bq24192 and bq24192i are:
1) Lower default charge rate on the bq24192i
2) Pre-charge-current can be max 640 mA on the bq24192i

On x86/ACPI systems the code which instantiates the i2c client may not
know the exact variant being used, so instead of coding the model-id
in the i2c_id struct and bailing if it does not match, check the reported
model-id matches one of the supported variants.

This commit only adds support for the bq24192i as I don't
have a bq24192 to test with, adding support for the bq24192 should
be as simple as also accepting its model-id in the model-id test.

Cc: Liam Breck <kernel@networkimprov.net>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/supply/bq24190_charger.c