Skip to content

Commit b042c08

Browse files
Gene ChenLee Jones
authored andcommitted
mfd: mt6360: Merge header file into driver and remove unuse register define
Merge header file into driver and remove unuse register define Signed-off-by: Gene Chen <gene_chen@richtek.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
1 parent e847029 commit b042c08

2 files changed

Lines changed: 47 additions & 241 deletions

File tree

‎drivers/mfd/mt6360-core.c‎

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,53 @@
1515
#include <linux/regmap.h>
1616
#include <linux/slab.h>
1717

18-
#include <linux/mfd/mt6360.h>
18+
enum {
19+
MT6360_SLAVE_TCPC = 0,
20+
MT6360_SLAVE_PMIC,
21+
MT6360_SLAVE_LDO,
22+
MT6360_SLAVE_PMU,
23+
MT6360_SLAVE_MAX,
24+
};
25+
26+
struct mt6360_ddata {
27+
struct i2c_client *i2c[MT6360_SLAVE_MAX];
28+
struct device *dev;
29+
struct regmap *regmap;
30+
struct regmap_irq_chip_data *irq_data;
31+
unsigned int chip_rev;
32+
u8 crc8_tbl[CRC8_TABLE_SIZE];
33+
};
34+
35+
#define MT6360_TCPC_SLAVEID 0x4E
36+
#define MT6360_PMIC_SLAVEID 0x1A
37+
#define MT6360_LDO_SLAVEID 0x64
38+
#define MT6360_PMU_SLAVEID 0x34
39+
40+
#define MT6360_REG_TCPCSTART 0x00
41+
#define MT6360_REG_TCPCEND 0xFF
42+
#define MT6360_REG_PMICSTART 0x100
43+
#define MT6360_REG_PMICEND 0x13B
44+
#define MT6360_REG_LDOSTART 0x200
45+
#define MT6360_REG_LDOEND 0x21C
46+
#define MT6360_REG_PMUSTART 0x300
47+
#define MT6360_PMU_DEV_INFO 0x300
48+
#define MT6360_PMU_CHG_IRQ1 0x3D0
49+
#define MT6360_PMU_CHG_MASK1 0x3F0
50+
#define MT6360_REG_PMUEND 0x3FF
51+
52+
#define MT6360_PMU_IRQ_REGNUM 16
53+
54+
#define CHIP_VEN_MASK 0xF0
55+
#define CHIP_VEN_MT6360 0x50
56+
#define CHIP_REV_MASK 0x0F
57+
58+
#define MT6360_ADDRESS_MASK 0x3F
59+
#define MT6360_DATA_SIZE_1_BYTE 0x00
60+
#define MT6360_DATA_SIZE_2_BYTES 0x40
61+
#define MT6360_DATA_SIZE_3_BYTES 0x80
62+
#define MT6360_DATA_SIZE_4_BYTES 0xC0
63+
64+
#define MT6360_CRC8_POLYNOMIAL 0x7
1965

2066
/* reg 0 -> 0 ~ 7 */
2167
#define MT6360_CHG_TREG_EVT 4

‎include/linux/mfd/mt6360.h‎

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

0 commit comments

Comments
 (0)