Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame^] | 1 | /* |
| 2 | * isa1200.h - ISA1200 Haptic Motor driver |
| 3 | * |
| 4 | * Copyright (C) 2009 Samsung Electronics |
| 5 | * Kyungmin Park <kyungmin.park@samsung.com> |
| 6 | * Copyright (c) 2010, Code Aurora Forum. All rights reserved. |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. |
| 11 | */ |
| 12 | |
| 13 | #ifndef __LINUX_ISA1200_H |
| 14 | #define __LINUX_ISA1200_H |
| 15 | |
| 16 | enum mode_control { |
| 17 | POWER_DOWN_MODE = 0, |
| 18 | PWM_INPUT_MODE, |
| 19 | PWM_GEN_MODE, |
| 20 | WAVE_GEN_MODE |
| 21 | }; |
| 22 | |
| 23 | union pwm_div_freq { |
| 24 | unsigned int pwm_div; /* PWM gen mode */ |
| 25 | unsigned int pwm_freq; /* PWM input mode */ |
| 26 | }; |
| 27 | |
| 28 | struct isa1200_platform_data { |
| 29 | const char *name; |
| 30 | unsigned int pwm_ch_id; /* pwm channel id */ |
| 31 | unsigned int max_timeout; |
| 32 | unsigned int hap_en_gpio; |
| 33 | bool overdrive_high; /* high/low overdrive */ |
| 34 | bool overdrive_en; /* enable/disable overdrive */ |
| 35 | enum mode_control mode_ctrl; /* input/generation/wave */ |
| 36 | union pwm_div_freq pwm_fd; |
| 37 | bool smart_en; /* smart mode enable/disable */ |
| 38 | bool is_erm; |
| 39 | bool ext_clk_en; |
| 40 | unsigned int chip_en; |
| 41 | unsigned int duty; |
| 42 | int (*power_on)(int on); |
| 43 | int (*dev_setup)(bool on); |
| 44 | }; |
| 45 | |
| 46 | #endif /* __LINUX_ISA1200_H */ |