blob: 35920bd3e0403ba884931a3fe24369cb0456be13 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
/*
* Copyright (C) 2011 Alexander Aring <a.aring@phytec.de>
*
* Based on:
* Copyright (C) 2010 Michael Grzeschik <mgr@pengutronix.de>
* Copyright (C) 2010 Sascha Hauer <sha@pengutronix.de>
*
* This file is released under the GPLv2
*
*/
#ifndef __MFD_TWLCORE_H__
#define __MFD_TWLCORE_H__
#include <common.h>
#include <i2c/i2c.h>
#include <linux/err.h>
struct twlcore {
struct cdev cdev;
struct i2c_client *client;
};
extern struct cdev_operations twl_fops;
int twlcore_reg_read(struct twlcore *twlcore, u16 reg, u8 *val);
int twlcore_reg_write(struct twlcore *twlcore, u16 reg, u8 val);
int twlcore_set_bits(struct twlcore *twlcore, u16 reg, u8 mask, u8 val);
struct twlcore *twlcore_get(void);
#endif /* __MFD_TWLCORE_H__ */
|