Merge remote-tracking branch 'omap_dss2/for-next'
[deliverable/linux.git] / include / linux / mfd / rt5033.h
CommitLineData
0b271258
BS
1/*
2 * MFD core driver for the RT5033
3 *
4 * Copyright (C) 2014 Samsung Electronics
5 * Author: Beomho Seo <beomho.seo@samsung.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published bythe Free Software Foundation.
10 */
11
12#ifndef __RT5033_H__
13#define __RT5033_H__
14
15#include <linux/regulator/consumer.h>
16#include <linux/i2c.h>
17#include <linux/regmap.h>
18#include <linux/power_supply.h>
19
20/* RT5033 regulator IDs */
21enum rt5033_regulators {
22 RT5033_BUCK = 0,
23 RT5033_LDO,
24 RT5033_SAFE_LDO,
25
26 RT5033_REGULATOR_NUM,
27};
28
29struct rt5033_dev {
30 struct device *dev;
31
32 struct regmap *regmap;
33 struct regmap_irq_chip_data *irq_data;
34 int irq;
35 bool wakeup;
36};
37
38struct rt5033_battery {
39 struct i2c_client *client;
40 struct rt5033_dev *rt5033;
41 struct regmap *regmap;
297d716f 42 struct power_supply *psy;
0b271258
BS
43};
44
45/* RT5033 charger platform data */
46struct rt5033_charger_data {
47 unsigned int pre_uamp;
48 unsigned int pre_uvolt;
49 unsigned int const_uvolt;
50 unsigned int eoc_uamp;
51 unsigned int fast_uamp;
52};
53
54struct rt5033_charger {
55 struct device *dev;
56 struct rt5033_dev *rt5033;
57 struct power_supply psy;
58
59 struct rt5033_charger_data *chg;
60};
61
62#endif /* __RT5033_H__ */
This page took 0.156026 seconds and 5 git commands to generate.