Commit graph

5 commits

Author SHA1 Message Date
Rhyland Klein 605860bc24 tps65090-charger: Add dt node to power_supply
Passing in the dt node for this charger enables the logic in the core to
lookup this device, to see if it is supplying another power_supply,
through dt.

Signed-off-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-06-28 18:20:58 -07:00
Andrew Chew e24142178f tps65090-charger: Fix AC detect
The VACG interrupt was not being enabled.  Thus, interrupts were never
generated when AC status changes.  In addition, interrupts were never
cleared after taking and processing the interrupt.

Added the register offset for the INTR_MASK register, since this is needed
to unmask the VACG interrupt.

Enabled the VACG interrupt in tps65090_config_charger().

Cleared interrupts after processing, in tps65090_charger_isr().

Also removed unused variable "enable" in tps65090_enable_charging(), and
fixed a typo in one of the dev_err() prints.

Signed-off-by: Andrew Chew <achew@nvidia.com>
Tested-by: Rhyland Klein <rklein@nvidia.com>
Acked-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-06-09 10:07:34 -07:00
Jingoo Han e083587924 power: Use platform_{get,set}_drvdata()
Use the wrapper functions for getting and setting the driver data using
platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
so we can directly pass a struct platform_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-06-06 17:30:46 -07:00
Rhyland Klein 594f8f888d tps65090: Setup compatible property for dt
Setup the compatible property so that when this device is registered
through device tree, it can match the expected compatiblity string used in
the tps65090 driver.

Signed-off-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-03-31 23:15:47 -07:00
Rhyland Klein 6f8da5df8c power_supply: Add support for tps65090-charger
This patch adds support for the tps65090 charger driver. This driver is
responsible for controlling the charger aspect of the tps65090 mfd.
Currently, this mainly consists of turning on and off the charger, but
some features of the charger can be supported through this driver
including:

- Enable Auto Recharge based on Battery voltage
- Fast Charge Safety Timer
- Maximum battery discharge current
- Maximum battery adapter current
- Enable External Charge
- Disable charging termination based on low charger current (supported)

Once the driver is accepted, later patches can add support for the
features above which are not yet supported.

Based on work by:

  Syed Rafiuddin <srafiuddin@nvidia.com>
  Laxman Dewangan <ldewangan@nvidia.com>

Signed-off-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
2013-03-18 19:20:05 -07:00