4 * Copyright (C) 2008 Samsung Electronics
6 * Author: Kyungmin Park <kyungmin.park@samsung.com>
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.
13 #ifndef __HAPTIC_H_INCLUDED
14 #define __HAPTIC_H_INCLUDED
16 #include <linux/device.h>
17 #include <linux/rwsem.h>
18 #include <linux/haptic.h>
20 static inline void haptic_set_value(struct haptic_classdev *haptic_cdev,
21 enum haptic_value value)
23 if (value > HAPTIC_FULL)
25 haptic_cdev->value = value;
26 if (!(haptic_cdev->flags & HAPTIC_SUSPENDED))
27 haptic_cdev->set(haptic_cdev, value);
30 static inline int haptic_get_value(struct haptic_classdev *haptic_cdev)
32 return haptic_cdev->value;
35 #endif /* __HAPTIC_H_INCLUDED */