2 * include/linux/mfd/wm8994/core.h -- Core interface for WM8994
4 * Copyright 2009 Wolfson Microelectronics PLC.
6 * Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
15 #ifndef __MFD_WM8994_CORE_H__
16 #define __MFD_WM8994_CORE_H__
19 struct regulator_bulk_data;
21 #define WM8994_NUM_GPIO_REGS 11
22 #define WM8994_NUM_LDO_REGS 2
28 int (*read_dev)(struct wm8994 *wm8994, unsigned short reg,
29 int bytes, void *dest);
30 int (*write_dev)(struct wm8994 *wm8994, unsigned short reg,
31 int bytes, void *src);
37 /* Used over suspend/resume */
38 u16 ldo_regs[WM8994_NUM_LDO_REGS];
39 u16 gpio_regs[WM8994_NUM_GPIO_REGS];
41 struct regulator_dev *dbvdd;
42 struct regulator_bulk_data *supplies;
46 int wm8994_reg_read(struct wm8994 *wm8994, unsigned short reg);
47 int wm8994_reg_write(struct wm8994 *wm8994, unsigned short reg,
49 int wm8994_set_bits(struct wm8994 *wm8994, unsigned short reg,
50 unsigned short mask, unsigned short val);
51 int wm8994_bulk_read(struct wm8994 *wm8994, unsigned short reg,