blob: 0780ca4cdf60d6368cd71ddf6be86e5e313708c6 [file] [log] [blame]
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 */
13
14#ifndef __MSM_FOOTSWITCH__
15#define __MSM_FOOTSWITCH__
16
17#include <linux/regulator/machine.h>
18
19enum fs_ids {
20 FS_GFX2D0 = 0,
21 FS_GFX2D1,
22 FS_GFX3D,
23 FS_IJPEG,
24 FS_MDP,
25 FS_MFC,
26 FS_ROT,
27 FS_VED,
28 FS_VFE,
29 FS_VPE,
30 MAX_FS
31};
32
33#endif
34
35#define FS_GENERIC(_drv_name, _id, _name) (&(struct platform_device){ \
36 .name = (_drv_name), \
37 .id = (_id), \
38 .dev = { \
39 .platform_data = &(struct regulator_init_data){ \
40 .constraints = { \
41 .valid_modes_mask = REGULATOR_MODE_NORMAL, \
42 .valid_ops_mask = REGULATOR_CHANGE_STATUS, \
43 }, \
44 .num_consumer_supplies = 1, \
45 .consumer_supplies = \
46 &(struct regulator_consumer_supply) \
47 REGULATOR_SUPPLY((_name), NULL), \
48 } \
49 }, \
50})
51#define FS_PCOM(_id, _name) FS_GENERIC("footswitch-pcom", (_id), (_name))
52#define FS_8X60(_id, _name) FS_GENERIC("footswitch-msm8x60", (_id), (_name))