blob: aa823be0db8216705dcb120b80777b74743e7b69 [file] [log] [blame]
Anirudh Ghayal5ce77942012-05-04 18:26:03 +05301/* Copyright (c) 2013, The Linux Foundation. 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#ifndef __QPNP_VIBRATOR_H__
14#define __QPNP_VIBRATOR_H__
15
16enum qpnp_vib_en_mode {
17 QPNP_VIB_MANUAL,
18 QPNP_VIB_DTEST1,
19 QPNP_VIB_DTEST2,
20 QPNP_VIB_DTEST3,
21};
22
23struct qpnp_vib_config {
24 u16 drive_mV;
25 u8 active_low;
26 enum qpnp_vib_en_mode enable_mode;
27};
28#if defined(CONFIG_QPNP_VIBRATOR)
29
30int qpnp_vibrator_config(struct qpnp_vib_config *vib_config);
31#else
32
33static inline int qpnp_vibrator_config(struct qpnp_vib_config *vib_config)
34{
35 return -ENODEV;
36}
37#endif
38
39#endif /* __QPNP_VIBRATOR_H__ */