blob: 5675a93e7206bb446f5453ee128c09b4f1db670e [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 __PMIC8058_MISC_H__
15#define __PMIC8058_MISC_H__
16
17enum pm8058_vib_en_mode {
18 PM8058_VIB_MANUAL,
19 PM8058_VIB_DTEST1,
20 PM8058_VIB_DTEST2,
21 PM8058_VIB_DTEST3
22};
23
24enum pm8058_coincell_chg_voltage {
25 PM8058_COINCELL_VOLTAGE_3p2V = 1,
26 PM8058_COINCELL_VOLTAGE_3p1V,
27 PM8058_COINCELL_VOLTAGE_3p0V,
28 PM8058_COINCELL_VOLTAGE_2p5V = 16
29};
30
31enum pm8058_coincell_chg_resistor {
32 PM8058_COINCELL_RESISTOR_2100_OHMS,
33 PM8058_COINCELL_RESISTOR_1700_OHMS,
34 PM8058_COINCELL_RESISTOR_1200_OHMS,
35 PM8058_COINCELL_RESISTOR_800_OHMS
36};
37
38enum pm8058_coincell_chg_state {
39 PM8058_COINCELL_CHG_DISABLE,
40 PM8058_COINCELL_CHG_ENABLE
41};
42
43struct pm8058_vib_config {
44 u16 drive_mV;
45 u8 active_low;
46 enum pm8058_vib_en_mode enable_mode;
47};
48
49struct pm8058_coincell_chg_config {
50 enum pm8058_coincell_chg_state state;
51 enum pm8058_coincell_chg_voltage voltage;
52 enum pm8058_coincell_chg_resistor resistor;
53};
54
55int pm8058_vibrator_config(struct pm8058_vib_config *vib_config);
56int pm8058_coincell_chg_config(struct pm8058_coincell_chg_config *chg_config);
57
58#endif /* __PMIC8058_MISC_H__ */