4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: DongGi Jang <dg0402.jang@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
22 #include "device_engine.h"
23 #include "device_haptic.h"
24 #include "device_plugin.h"
26 static int get_haptic(int prop, int *val)
29 case HAPTIC_PROP_LEVEL:
30 return plugin_intf->OEM_sys_get_haptic_vibetones_level(val);
31 case HAPTIC_PROP_LEVEL_MAX:
32 return plugin_intf->OEM_sys_get_haptic_vibetones_level_max(val);
38 static int set_haptic(int prop, int val)
41 case HAPTIC_PROP_ENABLE:
42 return plugin_intf->OEM_sys_set_haptic_vibetones_enable(val);
43 case HAPTIC_PROP_LEVEL:
44 return plugin_intf->OEM_sys_set_haptic_vibetones_level(val);
45 case HAPTIC_PROP_ONESHOT:
46 return plugin_intf->OEM_sys_set_haptic_vibetones_oneshot(val);
52 static struct device haptic = {
54 .set_int = set_haptic,
55 .get_int = get_haptic,
56 .devtype = DEVTYPE_HAPTIC
59 static void __attribute__ ((constructor)) module_init()