1/*
2 * max8903_charger.h - Maxim 8903 USB/Adapter Charger Driver
3 *
4 * Copyright (C) 2011 Samsung Electronics
5 * MyungJoo Ham <myungjoo.ham@samsung.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20 *
21 */
22
23#ifndef __MAX8903_CHARGER_H__
24#define __MAX8903_CHARGER_H__
25
26struct max8903_pdata {
27	/*
28	 * GPIOs
29	 * cen, chg, flt, and usus are optional.
30	 * dok, dcm, and uok are not optional depending on the status of
31	 * dc_valid and usb_valid.
32	 */
33	int cen;	/* Charger Enable input */
34	int dok;	/* DC(Adapter) Power OK output */
35	int uok;	/* USB Power OK output */
36	int chg;	/* Charger status output */
37	int flt;	/* Fault output */
38	int dcm;	/* Current-Limit Mode input (1: DC, 2: USB) */
39	int usus;	/* USB Suspend Input (1: suspended) */
40
41	/*
42	 * DC(Adapter/TA) is wired
43	 * When dc_valid is true,
44	 *	dok and dcm should be valid.
45	 *
46	 * At least one of dc_valid or usb_valid should be true.
47	 */
48	bool dc_valid;
49	/*
50	 * USB is wired
51	 * When usb_valid is true,
52	 *	uok should be valid.
53	 */
54	bool usb_valid;
55};
56
57#endif /* __MAX8903_CHARGER_H__ */
58