From 8e4bff4cab0ddac6060645b0715210484d02ff40 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Wed, 30 Aug 2017 08:25:59 +0000 Subject: Initial file dump from open source release --- include/linux/battery/charger/bq24157_charger.h | 48 +++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 include/linux/battery/charger/bq24157_charger.h (limited to 'include/linux/battery/charger/bq24157_charger.h') diff --git a/include/linux/battery/charger/bq24157_charger.h b/include/linux/battery/charger/bq24157_charger.h new file mode 100644 index 00000000..f6eb589d --- /dev/null +++ b/include/linux/battery/charger/bq24157_charger.h @@ -0,0 +1,48 @@ +/* + * bq24157_charger.h + * Samsung BQ24157 Charger Header + * + * Copyright (C) 2012 Samsung Electronics, Inc. + * + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#ifndef __BQ24157_CHARGER_H +#define __BQ24157_CHARGER_H __FILE__ + +/* Slave address should be shifted to the right 1bit. + * R/W bit should NOT be included. + */ +#define SEC_CHARGER_I2C_SLAVEADDR 0x6a + +/* BQ24157 Registers. */ +#define BQ24157_STATUS 0x00 +#define BQ24157_CONTROL 0x01 +#define BQ24157_VOLTAGE 0x02 +#define BQ24157_VENDOR 0x03 +#define BQ24157_CURRENT 0x04 +#define BQ24157_SPECIAL 0x05 +#define BQ24157_SAFETY 0x06 + +#define FLOAT_VOLTAGE_MASK 0xfc +#define FAST_CHARGING_CURRENT_MASK 0x70 +#define TERMINATION_CURRENT_MASK 0x07 +#define INPUT_CURRENT_MASK 0xC0 + +struct sec_chg_info { + bool dummy; +}; + +#endif /* __BQ24157_CHARGER_H */ + + + -- cgit v1.3.1