blob: 824ef5f23e19ddca855de47a271dfb5d8d75329d [file] [log] [blame]
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001/* Copyright (c) 2011, 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_DSPS_H_
15#define _MSM_DSPS_H_
16
17#include <linux/types.h>
18#include <linux/clk.h>
19#include <linux/regulator/consumer.h>
20
21#define DSPS_SIGNATURE 0x12345678
22
23/**
24 * DSPS Clocks Platform data.
25 *
26 * @name - clock name.
27 * @rate - rate to set. zero if not relevant.
28 * @clock - clock handle, reserved for the driver.
29 */
30struct dsps_clk_info {
31 const char *name;
32 u32 rate;
33 struct clk *clock;
34};
35
36/**
37 * DSPS GPIOs Platform data.
38 *
39 * @name - clock name.
40 * @num - GPIO number.
41 * @on_val - value to ouptput for ON (depends on polarity).
42 * @off_val - value to ouptput for OFF (depends on polarity).
43 * @is_owner - reserved for the driver.
44 */
45struct dsps_gpio_info {
46 const char *name;
47 int num;
48 int on_val;
49 int off_val;
50 int is_owner;
51};
52
53/**
54 * DSPS Power regulators Platform data.
55 *
56 * @name - regulator name.
57 * @volt - required voltage (in uV).
58 * @reg - reserved for the driver.
59 */
60struct dsps_regulator_info {
61 const char *name;
62 int volt;
63 struct regulator *reg;
64};
65
66/**
67 * DSPS Platform data.
68 *
69 * @pil_name - peripheral image name
70 * @clks - array of clocks.
71 * @clks_num - number of clocks in array.
72 * @gpios - array of gpios.
73 * @gpios_num - number of gpios.
74 * @regs - array of regulators.
75 * @regs_num - number of regulators.
76 * @dsps_pwr_ctl_en - to enable DSPS to do power control if set 1
77 * otherwise the apps will do power control
78 * @signature - signature for validity check.
79 */
80struct msm_dsps_platform_data {
81 const char *pil_name;
82 struct dsps_clk_info *clks;
83 int clks_num;
84 struct dsps_gpio_info *gpios;
85 int gpios_num;
86 struct dsps_regulator_info *regs;
87 int regs_num;
88 int dsps_pwr_ctl_en;
89 u32 signature;
90};
91
92#endif /* _MSM_DSPS_H_ */