diff options
author | Lee Jones <lee.jones@linaro.org> | 2012-01-05 14:07:23 +0000 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2012-01-05 14:07:23 +0000 |
commit | be8c8cd142a9bdae45b0bb6d4c384104f380f7c5 (patch) | |
tree | fdadce46d5a958c8e03e2aa48f6106af8ffde3e2 /include/linux/mfd/ab8500/ux500_chargalg.h | |
parent | 16dacd4f416b90d80a25c41399509d3e1846d1b7 (diff) | |
parent | 664b261057869dedc9a9c83fc709936657501614 (diff) |
Merge branch 'tracking-igloo_kernel-core' into merge-integration-linux-ux500
Diffstat (limited to 'include/linux/mfd/ab8500/ux500_chargalg.h')
-rw-r--r-- | include/linux/mfd/ab8500/ux500_chargalg.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/include/linux/mfd/ab8500/ux500_chargalg.h b/include/linux/mfd/ab8500/ux500_chargalg.h new file mode 100644 index 00000000000..f04e47ff56a --- /dev/null +++ b/include/linux/mfd/ab8500/ux500_chargalg.h @@ -0,0 +1,38 @@ +/* + * Copyright (C) ST-Ericsson SA 2011 + * Author: Johan Gardsmark <johan.gardsmark@stericsson.com> for ST-Ericsson. + * License terms: GNU General Public License (GPL), version 2 + */ + +#ifndef _UX500_CHARGALG_H +#define _UX500_CHARGALG_H + +#include <linux/power_supply.h> + +#define psy_to_ux500_charger(x) container_of((x), \ + struct ux500_charger, psy) + +/* Forward declaration */ +struct ux500_charger; + +struct ux500_charger_ops { + int (*enable) (struct ux500_charger *, int, int, int); + int (*kick_wd) (struct ux500_charger *); + int (*update_curr) (struct ux500_charger *, int); +}; + +/** + * struct ux500_charger - power supply ux500 charger sub class + * @psy power supply base class + * @ops ux500 charger operations + * @max_out_volt maximum output charger voltage in mV + * @max_out_curr maximum output charger current in mA + */ +struct ux500_charger { + struct power_supply psy; + struct ux500_charger_ops ops; + int max_out_volt; + int max_out_curr; +}; + +#endif |