1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 2 /* 3 * max8903_charger.h - Maxim 8903 USB/Adapter Charger Driver 4 * 5 * Copyright (C) 2011 Samsung Electronics 6 * MyungJoo Ham <myungjoo.ham@samsung.com> 7 */ 8 9 #ifndef __MAX8903_CHARGER_H__ 10 #define __MAX8903_CHARGER_H__ 11 12 struct max8903_pdata { 13 /* 14 * GPIOs 15 * cen, chg, flt, dcm and usus are optional. 16 * dok and uok are not optional depending on the status of 17 * dc_valid and usb_valid. 18 */ 19 int cen; /* Charger Enable input */ 20 int dok; /* DC(Adapter) Power OK output */ 21 int uok; /* USB Power OK output */ 22 int chg; /* Charger status output */ 23 int flt; /* Fault output */ 24 int dcm; /* Current-Limit Mode input (1: DC, 2: USB) */ 25 int usus; /* USB Suspend Input (1: suspended) */ 26 27 /* 28 * DC(Adapter/TA) is wired 29 * When dc_valid is true, 30 * dok should be valid. 31 * 32 * At least one of dc_valid or usb_valid should be true. 33 */ 34 bool dc_valid; 35 /* 36 * USB is wired 37 * When usb_valid is true, 38 * uok should be valid. 39 */ 40 bool usb_valid; 41 }; 42 43 #endif /* __MAX8903_CHARGER_H__ */ 44