]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - include/linux/power/sabresd_battery.h
ARM: dts: imx6-tx6*: fix 'flexcan' labels
[karo-tx-linux.git] / include / linux / power / sabresd_battery.h
1 /*
2  * sabresd_battery.h - Maxim 8903 USB/Adapter Charger Driver
3  *
4  * Copyright (C) 2011 Samsung Electronics
5  * Copyright (C) 2011-2013 Freescale Semiconductor, Inc.
6  * Based on max8903_charger.h
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21  *
22  */
23
24 #ifndef __MAX8903_SABRESD_H__
25 #define __MAX8903_SABRESD_H__
26
27 struct max8903_pdata {
28         /*
29          * GPIOs
30          * cen, chg, flt, and usus are optional.
31          * dok, dcm, and uok are not optional depending on the status of
32          * dc_valid and usb_valid.
33          */
34         int cen;        /* Charger Enable input */
35         int dok;        /* DC(Adapter) Power OK output */
36         int uok;        /* USB Power OK output */
37         int chg;        /* Charger status output */
38         int flt;        /* Fault output */
39         int dcm;        /* Current-Limit Mode input (1: DC, 2: USB) */
40         int usus;       /* USB Suspend Input (1: suspended) */
41         int feature_flag;/* battery capacity feature(0:enable, 1:disable) */
42
43         /*
44          * DCM wired to Logic High Set this true when DCM pin connect to
45          * Logic high.
46          */
47         bool dcm_always_high;
48
49         /*
50          * DC(Adapter/TA) is wired
51          * When dc_valid is true,
52          *      dok and dcm should be valid.
53          *
54          * At least one of dc_valid or usb_valid should be true.
55          */
56         bool dc_valid;
57         /*
58          * USB is wired
59          * When usb_valid is true,
60          *      uok should be valid.
61          */
62         bool usb_valid;
63 };
64
65 #endif /* __SABRESD_BATTERY_H__ */