SmartAudio/lichee/linux-4.9/drivers/power/supply/axp/bmu1760/bmu1760-charger.h

52 lines
1.9 KiB
C

/*
* drivers/power/supply/bmu/bmu1760-charger.h
* (C) Copyright 2010-2016
* Allwinner Technology Co., Ltd. <www.allwinnertech.com>
* Pannan <pannan@allwinnertech.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
*/
#ifndef BMU1760_CHARGER_H
#define BMU1760_CHARGER_H
#include "bmu1760.h"
/* BMU1760 */
#define BMU1760_CHARGE_STATUS BMU1760_STATUS
#define BMU1760_CAP (0xB9)
#define BMU1760_BATCAP0 (0xe0)
#define BMU1760_BATCAP1 (0xe1)
#define BMU1760_RDC0 (0xba)
#define BMU1760_RDC1 (0xbb)
#define BMU1760_VLTF_CHARGE (0x84)
#define BMU1760_VHTF_CHARGE (0x85)
#define BMU1760_VLTF_WORK (0x86)
#define BMU1760_VHTF_WORK (0x87)
#define BMU1760_CHARGE_CONTROL2 (0x8c)
#define BMU1760_ADC_CONTROL (0x80)
#define BMU1760_ADC_BATVOL_ENABLE (1 << 4)
#define BMU1760_ADC_BATCUR_ENABLE (1 << 6)
//#define BMU1760_ADC_DCINVOL_ENABLE (1 << 5)
//#define BMU1760_ADC_DCINCUR_ENABLE (1 << 4)
#define BMU1760_ADC_DIETMP_ENABLE (1 << 7)
#define BMU1760_ADC_TSVOL_ENABLE (1 << 5)
#define BMU1760_VBATH_RES (0x78)
#define BMU1760_IBATH_REG (0x7a)
#define BMU1760_DISIBATH_REG (0x7c)
#define BMU1760_COULOMB_CTL (0xB8)
#define BMU1760_ADJUST_PARA (0xE8)
#define BMU1760_ADJUST_PARA1 (0xE9)
#define AXP_CHG_ATTR(_name) \
{ \
.attr = { .name = #_name, .mode = 0644 }, \
.show = _name##_show, \
.store = _name##_store, \
}
#endif