aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-ux500/include/mach/ste_audio_io_vibrator.h
blob: 7af7e5fa8e94a263ea66f80fb8d40962a8824914 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
* Overview:
*   Header File defining vibrator kernel space interface
*
* Copyright (C) 2010 ST Ericsson
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/

#ifndef _STE_AUDIO_IO_VIBRATOR_H_
#define _STE_AUDIO_IO_VIBRATOR_H_

/* Client definitions which can use vibrator, defined as bitmask */
#define STE_AUDIOIO_CLIENT_AUDIO_L	1
#define STE_AUDIOIO_CLIENT_AUDIO_R	2
#define STE_AUDIOIO_CLIENT_FF_VIBRA     4
#define STE_AUDIOIO_CLIENT_TIMED_VIBRA  8

/*
 * Define vibrator's maximum speed allowed
 * Duty cycle supported by vibrator's PWM is 0-100
 */
#define STE_AUDIOIO_VIBRATOR_MAX_SPEED	100

/* Vibrator control function - uses PWM source */
int ste_audioio_vibrator_pwm_control(int client,
	unsigned char left_speed, unsigned char right_speed);

#endif