blob: e4ceab6f7a96b3ccae21f25137dc3c5b2e54586c [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Łukasz Majewski294a97d2012-11-13 03:22:02 +00002/*
3 * Copyright (C) 2012 Samsung Electronics
4 * Lukasz Majewski <l.majewski@samsung.com>
Łukasz Majewski294a97d2012-11-13 03:22:02 +00005 */
6
7#ifndef __MAX8997_MUIC_H_
8#define __MAX8997_MUIC_H_
9
10#include <power/power_chrg.h>
11
12/* MAX8997_MUIC_STATUS2 */
13#define MAX8997_MUIC_CHG_NO 0x00
14#define MAX8997_MUIC_CHG_USB 0x01
15#define MAX8997_MUIC_CHG_USB_D 0x02
16#define MAX8997_MUIC_CHG_TA 0x03
17#define MAX8997_MUIC_CHG_TA_500 0x04
18#define MAX8997_MUIC_CHG_TA_1A 0x05
19#define MAX8997_MUIC_CHG_MASK 0x07
20
21/* MAX 8997 MUIC registers */
22enum {
23 MAX8997_MUIC_ID = 0x00,
24 MAX8997_MUIC_INT1 = 0x01,
25 MAX8997_MUIC_INT2 = 0x02,
26 MAX8997_MUIC_INT3 = 0x03,
27 MAX8997_MUIC_STATUS1 = 0x04,
28 MAX8997_MUIC_STATUS2 = 0x05,
29 MAX8997_MUIC_STATUS3 = 0x06,
30 MAX8997_MUIC_INTMASK1 = 0x07,
31 MAX8997_MUIC_INTMASK2 = 0x08,
32 MAX8997_MUIC_INTMASK3 = 0x09,
33 MAX8997_MUIC_CDETCTRL = 0x0A,
34 MAX8997_MUIC_CONTROL1 = 0x0C,
35 MAX8997_MUIC_CONTROL2 = 0x0D,
36 MAX8997_MUIC_CONTROL3 = 0x0E,
37
38 MUIC_NUM_OF_REGS = 0x0F,
39};
40
41#define MAX8997_MUIC_I2C_ADDR (0x4A >> 1)
42
43int power_muic_init(unsigned int bus);
44#endif /* __MAX8997_MUIC_H_ */