blob: 06b7c79b1dfb116d0bd3ba1e2c5f63ea3c22899d [file] [log] [blame]
Matt Wagantall49722712011-08-17 18:50:53 -07001/* Copyright (c) 2010-2011 Code Aurora Forum. All rights reserved.
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002 *
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
Matt Wagantall49722712011-08-17 18:50:53 -070019/* Device IDs */
20#define FS_GFX2D0 0
21#define FS_GFX2D1 1
22#define FS_GFX3D 2
23#define FS_IJPEG 3
24#define FS_MDP 4
25#define FS_MFC 5
26#define FS_ROT 6
27#define FS_VED 7
28#define FS_VFE 8
29#define FS_VPE 9
30#define MAX_FS 10
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070031
32#define FS_GENERIC(_drv_name, _id, _name) (&(struct platform_device){ \
33 .name = (_drv_name), \
34 .id = (_id), \
35 .dev = { \
36 .platform_data = &(struct regulator_init_data){ \
37 .constraints = { \
38 .valid_modes_mask = REGULATOR_MODE_NORMAL, \
39 .valid_ops_mask = REGULATOR_CHANGE_STATUS, \
40 }, \
41 .num_consumer_supplies = 1, \
42 .consumer_supplies = \
43 &(struct regulator_consumer_supply) \
44 REGULATOR_SUPPLY((_name), NULL), \
45 } \
46 }, \
47})
Matt Wagantall49722712011-08-17 18:50:53 -070048#define FS_PCOM(_id, _name) FS_GENERIC("footswitch-pcom", (_id), (_name))
49#define FS_8X60(_id, _name) FS_GENERIC("footswitch-8x60", (_id), (_name))
50
51#endif