mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
charger:cps4019 fix build errors
Modify some code formatting and fix some build errors. If your kernel include has <linux/wakelock.h>, you can define CONFIG_HAS_WAKELOCK. Change-Id: I6371653581334ac8d63d41112b50ac9ea2919dc0 Signed-off-by: wanggc6 <wanggc6@motorola.com> Reviewed-on: https://gerrit.mot.com/2218913 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Huosheng Liao <liaohs@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
d83f686e76
commit
fdedc16d10
3 changed files with 927 additions and 858 deletions
|
|
@ -1 +1,10 @@
|
|||
obj-$(CONFIG_CPS_WLS_CHARGER) += cps_wls_charger.o
|
||||
KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build
|
||||
|
||||
all:
|
||||
$(MAKE) -C $(KERNEL_SRC) M=$(shell pwd) modules $(KBUILD_OPTIONS)
|
||||
|
||||
modules_install:
|
||||
$(MAKE) INSTALL_MOD_STRIP=1 -C $(KERNEL_SRC) M=$(shell pwd) modules_install
|
||||
|
||||
clean:
|
||||
$(MAKE) -C $(KERNEL_SRC) M=$(PWD) clean
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -10,7 +10,6 @@
|
|||
#ifndef __CPS_WLS_CHARGER_H__
|
||||
#define __CPS_WLS_CHARGER_H__
|
||||
|
||||
|
||||
#define CPS_WLS_FAIL -1
|
||||
#define CPS_WLS_SUCCESS 0
|
||||
|
||||
|
|
@ -70,64 +69,4 @@
|
|||
#define ILLEGAL 0x40
|
||||
#define CPS_PROGRAM_BUFFER_SIZE 64
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* Log
|
||||
****************************************************************************/
|
||||
#define CPS_LOG_NONE 0
|
||||
#define CPS_LOG_ERR 1
|
||||
#define CPS_LOG_DEBG 2
|
||||
#define CPS_LOG_FULL 3
|
||||
|
||||
#define ENABLE_CPS_LOG CPS_LOG_FULL
|
||||
|
||||
#define cps_wls_log(num, fmt, args...) \
|
||||
do { \
|
||||
if (ENABLE_CPS_LOG >= (int)num) \
|
||||
pr_err(fmt, ##args); \
|
||||
} while (0)
|
||||
|
||||
/*-------------------------------------------------------------------*/
|
||||
struct cps_wls_chrg_chip {
|
||||
struct i2c_client *client;
|
||||
struct device *dev;
|
||||
struct regmap *regmap;
|
||||
char *name;
|
||||
struct power_supply *wl_psy;
|
||||
struct power_supply *batt_psy;
|
||||
struct power_supply *usb_psy;
|
||||
struct power_supply *dc_psy;
|
||||
struct power_supply_desc wl_psd;
|
||||
struct power_supply_config wl_psc;
|
||||
struct power_supply_desc batt_psd;
|
||||
struct power_supply_desc usb_psd;
|
||||
struct power_supply_desc dc_psd;
|
||||
struct pinctrl *cps_pinctrl;
|
||||
struct pinctrl_state *cps_gpio_active;
|
||||
struct pinctrl_state *cps_gpio_suspend;
|
||||
|
||||
struct wake_lock cps_wls_wake_lock;
|
||||
struct mutex irq_lock;
|
||||
struct mutex i2c_lock;
|
||||
int state;
|
||||
int wls_charge_int;
|
||||
int cps_wls_irq;
|
||||
int reg_addr;
|
||||
int reg_data;
|
||||
int rx_ovp;
|
||||
int rx_ocp;
|
||||
int rx_opp;
|
||||
int rx_ht_thl;
|
||||
int rx_vout_target;
|
||||
int rx_ept_rsn;
|
||||
int rx_iout;
|
||||
int rx_vrect;
|
||||
int rx_vout;
|
||||
int rx_die_temp;
|
||||
int rx_ntc;
|
||||
int rx_neg_power;
|
||||
int rx_neg_protocol;
|
||||
int command_flag;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue