Skip to content

Commit 3188677

Browse files
Linus Walleijsre
authored andcommitted
power: supply: max8903: Absorb pdata header
The platform data header is not included by any other file in the kernel but the driver itself. Decomission the stand-alone header and absorb it into the driver itself. Cc: Chris Lapa <chris@lapa.com.au> Cc: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
1 parent ed3c19b commit 3188677

2 files changed

Lines changed: 31 additions & 44 deletions

File tree

‎drivers/power/supply/max8903_charger.c‎

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,37 @@
1515
#include <linux/slab.h>
1616
#include <linux/power_supply.h>
1717
#include <linux/platform_device.h>
18-
#include <linux/power/max8903_charger.h>
18+
19+
struct max8903_pdata {
20+
/*
21+
* GPIOs
22+
* cen, chg, flt, dcm and usus are optional.
23+
* dok and uok are not optional depending on the status of
24+
* dc_valid and usb_valid.
25+
*/
26+
int cen; /* Charger Enable input */
27+
int dok; /* DC(Adapter) Power OK output */
28+
int uok; /* USB Power OK output */
29+
int chg; /* Charger status output */
30+
int flt; /* Fault output */
31+
int dcm; /* Current-Limit Mode input (1: DC, 2: USB) */
32+
int usus; /* USB Suspend Input (1: suspended) */
33+
34+
/*
35+
* DC(Adapter/TA) is wired
36+
* When dc_valid is true,
37+
* dok should be valid.
38+
*
39+
* At least one of dc_valid or usb_valid should be true.
40+
*/
41+
bool dc_valid;
42+
/*
43+
* USB is wired
44+
* When usb_valid is true,
45+
* uok should be valid.
46+
*/
47+
bool usb_valid;
48+
};
1949

2050
struct max8903_data {
2151
struct max8903_pdata *pdata;

‎include/linux/power/max8903_charger.h‎

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)