Merge tag 'jfs-3.7-2' of git://github.com/kleikamp/linux-shaggy
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / include / linux / mfd / tps65090.h
CommitLineData
3c33be06
VB
1/*
2 * Core driver interface for TI TPS65090 PMIC family
3 *
4 * Copyright (C) 2012 NVIDIA Corporation
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 *
20 */
21
22#ifndef __LINUX_MFD_TPS65090_H
23#define __LINUX_MFD_TPS65090_H
24
06c4998b
AL
25#include <linux/irq.h>
26
27struct tps65090 {
28 struct mutex lock;
29 struct device *dev;
30 struct i2c_client *client;
31 struct regmap *rmap;
32 struct irq_chip irq_chip;
33 struct mutex irq_lock;
34 int irq_base;
35 unsigned int id;
36};
37
3c33be06
VB
38struct tps65090_subdev_info {
39 int id;
40 const char *name;
41 void *platform_data;
42};
43
44struct tps65090_platform_data {
45 int irq_base;
46 int num_subdevs;
47 struct tps65090_subdev_info *subdevs;
48};
49
50/*
51 * NOTE: the functions below are not intended for use outside
52 * of the TPS65090 sub-device drivers
53 */
54extern int tps65090_write(struct device *dev, int reg, uint8_t val);
55extern int tps65090_read(struct device *dev, int reg, uint8_t *val);
56extern int tps65090_set_bits(struct device *dev, int reg, uint8_t bit_num);
57extern int tps65090_clr_bits(struct device *dev, int reg, uint8_t bit_num);
58
59#endif /*__LINUX_MFD_TPS65090_H */