summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlokilee73 <changjoo.lee@samsung.com>2017-09-12 15:13:39 +0900
committerlokilee73 <changjoo.lee@samsung.com>2017-09-12 15:17:45 +0900
commita07cd1fca58e0b38b203ed2dfe907502f8014a06 (patch)
tree00501269ba7712e6e52fbcaa1981dcef71e4721a
parent5040220f793aa280bc994bf6ba164e0d2c2b5077 (diff)
downloadlibdevice-node-accepted/tizen_4.0_unified.tar.gz
libdevice-node-accepted/tizen_4.0_unified.tar.bz2
libdevice-node-accepted/tizen_4.0_unified.zip
Change-Id: Id1eaefb397d7e00e2c371664779eb5230b028903 Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
-rwxr-xr-x[-rw-r--r--]hw/battery.h2
-rwxr-xr-x[-rw-r--r--]hw/common.h8
-rwxr-xr-x[-rw-r--r--]hw/cpu.h2
-rwxr-xr-x[-rw-r--r--]hw/display.h2
-rwxr-xr-x[-rw-r--r--]hw/display_internal.h2
-rwxr-xr-x[-rw-r--r--]hw/external_connection.h2
-rwxr-xr-x[-rw-r--r--]hw/ir.h2
-rwxr-xr-x[-rw-r--r--]hw/led.h2
-rwxr-xr-x[-rw-r--r--]hw/sensors.h2
-rwxr-xr-x[-rw-r--r--]hw/thermal.h2
-rwxr-xr-x[-rw-r--r--]hw/touchscreen.h2
-rwxr-xr-x[-rw-r--r--]hw/usb_client.h2
-rwxr-xr-x[-rw-r--r--]hw/usb_gadget.h10
-rwxr-xr-x[-rw-r--r--]include/device-node.h39
-rwxr-xr-x[-rw-r--r--]src/device-node.c4
-rwxr-xr-x[-rw-r--r--]src/device-plugin.c10
16 files changed, 47 insertions, 46 deletions
diff --git a/hw/battery.h b/hw/battery.h
index 3302a27..55f1725 100644..100755
--- a/hw/battery.h
+++ b/hw/battery.h
@@ -35,7 +35,7 @@
/**
* The version of this device
*/
-#define BATTERY_HARDWARE_DEVICE_VERSION MAKE_VERSION(0,1)
+#define BATTERY_HARDWARE_DEVICE_VERSION MAKE_VERSION(0, 1)
struct battery_info {
char *name;
diff --git a/hw/common.h b/hw/common.h
index b333532..90c561b 100644..100755
--- a/hw/common.h
+++ b/hw/common.h
@@ -22,8 +22,8 @@
#include <stdint.h>
-#define MAKE_TAG_CONSTANT(A,B,C,D) (((A) << 24) | ((B) << 16) | ((C) << 8) | (D))
-#define HARDWARE_INFO_TAG MAKE_TAG_CONSTANT('T','H','I','T')
+#define MAKE_TAG_CONSTANT(A, B, C, D) (((A) << 24) | ((B) << 16) | ((C) << 8) | (D))
+#define HARDWARE_INFO_TAG MAKE_TAG_CONSTANT('T', 'H', 'I', 'T')
struct hw_common;
struct hw_info {
@@ -55,13 +55,13 @@ struct hw_common {
struct hw_info *info;
};
-#define MAKE_VERSION(maj,min) \
+#define MAKE_VERSION(maj, min) \
((((maj) & 0xff) << 8) | ((min) & 0xff))
/**
* Version of the struct hw_info
*/
-#define HARDWARE_INFO_VERSION MAKE_VERSION(1,0)
+#define HARDWARE_INFO_VERSION MAKE_VERSION(1, 0)
/**
* Name of the hardware info symbolic (Tizen Hardware Info)
diff --git a/hw/cpu.h b/hw/cpu.h
index c35f0c8..bdcf451 100644..100755
--- a/hw/cpu.h
+++ b/hw/cpu.h
@@ -30,7 +30,7 @@
/**
* The version of this device
*/
-#define CPU_HARDWARE_DEVICE_VERSION MAKE_VERSION(0,1)
+#define CPU_HARDWARE_DEVICE_VERSION MAKE_VERSION(0, 1)
struct cpu_device {
struct hw_common common;
diff --git a/hw/display.h b/hw/display.h
index 34b3d74..5114ee2 100644..100755
--- a/hw/display.h
+++ b/hw/display.h
@@ -30,7 +30,7 @@
/**
* The version of this device
*/
-#define DISPLAY_HARDWARE_DEVICE_VERSION MAKE_VERSION(0,2)
+#define DISPLAY_HARDWARE_DEVICE_VERSION MAKE_VERSION(0, 2)
enum display_state {
DISPLAY_ON, /* In use */
diff --git a/hw/display_internal.h b/hw/display_internal.h
index 125f0d9..4ebdefb 100644..100755
--- a/hw/display_internal.h
+++ b/hw/display_internal.h
@@ -34,7 +34,7 @@
/**
* The version of this device
*/
-#define DISPLAY_INTERNAL_HARDWARE_DEVICE_VERSION MAKE_VERSION(0,2)
+#define DISPLAY_INTERNAL_HARDWARE_DEVICE_VERSION MAKE_VERSION(0, 2)
typedef enum display_internal_enhance_mode {
ENHANCE_MODE_NONE = 1001,
diff --git a/hw/external_connection.h b/hw/external_connection.h
index b860445..6175775 100644..100755
--- a/hw/external_connection.h
+++ b/hw/external_connection.h
@@ -38,7 +38,7 @@
/**
* The version of this device
*/
-#define EXTERNAL_CONNECTION_HARDWARE_DEVICE_VERSION MAKE_VERSION(0,1)
+#define EXTERNAL_CONNECTION_HARDWARE_DEVICE_VERSION MAKE_VERSION(0, 1)
struct connection_info {
char *name;
diff --git a/hw/ir.h b/hw/ir.h
index a7538d2..4f17fc5 100644..100755
--- a/hw/ir.h
+++ b/hw/ir.h
@@ -30,7 +30,7 @@
/**
* The version of this device
*/
-#define IR_HARDWARE_DEVICE_VERSION MAKE_VERSION(0,1)
+#define IR_HARDWARE_DEVICE_VERSION MAKE_VERSION(0, 1)
struct ir_device {
struct hw_common common;
diff --git a/hw/led.h b/hw/led.h
index 69c6c10..d01f5c8 100644..100755
--- a/hw/led.h
+++ b/hw/led.h
@@ -30,7 +30,7 @@
/**
* The version of this device
*/
-#define LED_HARDWARE_DEVICE_VERSION MAKE_VERSION(1,0)
+#define LED_HARDWARE_DEVICE_VERSION MAKE_VERSION(1, 0)
/**
* The id of led devices
diff --git a/hw/sensors.h b/hw/sensors.h
index 8fee6e3..abe77b7 100644..100755
--- a/hw/sensors.h
+++ b/hw/sensors.h
@@ -24,7 +24,7 @@
/* the id of this device */
#define SENSOR_HARDWARE_DEVICE_ID "sensor"
-#define SENSOR_HARDWARE_DEVICE_VERSION MAKE_VERSION(0,1)
+#define SENSOR_HARDWARE_DEVICE_VERSION MAKE_VERSION(0, 1)
/**
* Sensor types
diff --git a/hw/thermal.h b/hw/thermal.h
index 8262a38..0788a78 100644..100755
--- a/hw/thermal.h
+++ b/hw/thermal.h
@@ -30,7 +30,7 @@
/**
* The version of this device
*/
-#define THERMAL_HARDWARE_DEVICE_VERSION MAKE_VERSION(0,1)
+#define THERMAL_HARDWARE_DEVICE_VERSION MAKE_VERSION(0, 1)
typedef enum _thermal_state {
THERMAL_STATE_LOW,
diff --git a/hw/touchscreen.h b/hw/touchscreen.h
index 9614164..c98a86a 100644..100755
--- a/hw/touchscreen.h
+++ b/hw/touchscreen.h
@@ -30,7 +30,7 @@
/**
* The version of this device
*/
-#define TOUCHSCREEN_HARDWARE_DEVICE_VERSION MAKE_VERSION(0,1)
+#define TOUCHSCREEN_HARDWARE_DEVICE_VERSION MAKE_VERSION(0, 1)
enum touchscreen_state {
TOUCHSCREEN_OFF, /* Disable touchscreen */
diff --git a/hw/usb_client.h b/hw/usb_client.h
index 4b4ffae..9c316bf 100644..100755
--- a/hw/usb_client.h
+++ b/hw/usb_client.h
@@ -32,7 +32,7 @@
/**
* The version of this device
*/
-#define USB_CLIENT_HARDWARE_DEVICE_VERSION MAKE_VERSION(0,1)
+#define USB_CLIENT_HARDWARE_DEVICE_VERSION MAKE_VERSION(0, 1)
struct usb_client {
struct hw_common common;
diff --git a/hw/usb_gadget.h b/hw/usb_gadget.h
index 2db9566..e393e64 100644..100755
--- a/hw/usb_gadget.h
+++ b/hw/usb_gadget.h
@@ -33,12 +33,12 @@
/**
* The version of this device
*/
-#define USB_GADGET_DEVICE_VERSION MAKE_VERSION(0,1)
+#define USB_GADGET_DEVICE_VERSION MAKE_VERSION(0, 1)
#ifndef container_of
-#define container_of(ptr, type, member) ({ \
- const typeof( ((type *)0)->member ) *__mptr = (ptr); \
- (type *)( (char *)__mptr - offsetof(type,member) );})
+#define container_of(ptr, type, member) ({ \
+ const typeof(((type *)0)->member) *__mptr = (ptr); \
+ (type *)((char *)__mptr - offsetof(type, member)); })
#endif
#define _HELPER_Y(x) ((x) & -(x))
@@ -183,7 +183,7 @@ out:
#define DEFINE_SIMPLE_USB_FUNCTION(_id, _name) \
static struct usb_function _##_name##_function = { \
.function_group = USB_FUNCTION_GROUP_SIMPLE, \
- .id = _id, \
+ .id = _id, \
.name = #_name, \
.instance = "default", \
.free_func = free_simple_func, \
diff --git a/include/device-node.h b/include/device-node.h
index 56e4323..0df718c 100644..100755
--- a/include/device-node.h
+++ b/include/device-node.h
@@ -45,10 +45,9 @@ extern "C" {
/**
* @par Description:
- * device type enum
+ * device type enum
*/
-enum device_type
-{
+enum device_type {
DEVICE_TYPE_DISPLAY, /**< display */
DEVICE_TYPE_VIBRATOR, /**< vibrator */
DEVICE_TYPE_EXTCON, /**< extcon - Micro USB, 3.5 pi jack etc */
@@ -62,7 +61,7 @@ enum device_type
/**
* @par Description:
- * DEVICE_TYPE_DISPLAY property for generic APIs
+ * DEVICE_TYPE_DISPLAY property for generic APIs
*/
enum {
PROP_DISPLAY_DISPLAY_COUNT,
@@ -93,7 +92,7 @@ enum {
/**
* @par Description:
- * DEVICE_TYPE_JACK property for generic APIs
+ * DEVICE_TYPE_JACK property for generic APIs
*/
enum {
PROP_EXTCON_TA_ONLINE, /**< Travel Adapter(Charger) */
@@ -111,7 +110,7 @@ enum {
/**
* @par Description:
- * DEVICE_TYPE_LED property for generic APIs
+ * DEVICE_TYPE_LED property for generic APIs
*/
enum {
PROP_LED_BRIGHTNESS,
@@ -122,7 +121,7 @@ enum {
/**
* @par Description:
- * DEVICE_TYPE_POWER property for generic APIs
+ * DEVICE_TYPE_POWER property for generic APIs
*/
enum {
PROP_POWER_CAPACITY, /**< Current remaining battery */
@@ -138,7 +137,7 @@ enum {
/**
* @par Description:
- * DEVICE_TYPE_MEMORY property for generic APIs
+ * DEVICE_TYPE_MEMORY property for generic APIs
*/
enum {
PROP_MEMORY_NODE,
@@ -149,7 +148,7 @@ enum {
/**
* @par Description:
- * DEVICE_TYPE_CPU property for generic APIs
+ * DEVICE_TYPE_CPU property for generic APIs
*/
enum {
PROP_CPU_CPUINFO_MAX_FREQ,
@@ -160,7 +159,7 @@ enum {
/**
* @par Description:
- * DEVICE_TYPE_PROCESS property for generic APIs
+ * DEVICE_TYPE_PROCESS property for generic APIs
*/
enum {
PROP_PROCESS_NODE,
@@ -171,8 +170,8 @@ enum {
/**
* @fn int device_get_property(enum device_type devtype, int property, int *value)
* @par Description:
- * This generic API is used to get the property values of supported devices.\n
- * If the caller process does not have permission, it returns failure.
+ * This generic API is used to get the property values of supported devices.\n
+ * If the caller process does not have permission, it returns failure.
* @param[in] devtype device type that you want to get the value
* @param[in] property value property that you want to get the value
* @param[out] *value current value of device property
@@ -180,12 +179,12 @@ enum {
* @see device_set_property()
* @par Example:
* @code
- * ...
- * if( device_get_property(DEVICE_TYPE_POWER, PROP_POWER_CAPACITY, &val) < 0 )
- * printf("Fail to get property\n");
- * else
- * printf("Property is %d\n", val);
- * ...
+ * ...
+ * if( device_get_property(DEVICE_TYPE_POWER, PROP_POWER_CAPACITY, &val) < 0 )
+ * printf("Fail to get property\n");
+ * else
+ * printf("Property is %d\n", val);
+ * ...
* @endcode
*/
int device_get_property(enum device_type devtype, int property, int *value);
@@ -193,8 +192,8 @@ int device_get_property(enum device_type devtype, int property, int *value);
/**
* @fn int device_set_property(enum device_type devtype, int property, int value)
* @par Description:
- * This generic API is used to set the property values of supported devices.\n
- * If the caller process does not have permission, it returns failure.
+ * This generic API is used to set the property values of supported devices.\n
+ * If the caller process does not have permission, it returns failure.
* @param[in] devtype device type that you want to set the value
* @param[in] property value property that you want to set the value
* @param[in] value value that you want to set
diff --git a/src/device-node.c b/src/device-node.c
index 3000a76..876310b 100644..100755
--- a/src/device-node.c
+++ b/src/device-node.c
@@ -23,8 +23,8 @@
#include "device-internal.h"
#define container_of(ptr, type, member) ({ \
- const typeof( ((type *)0)->member ) *__mptr = (ptr); \
- (type *)( (char *)__mptr - offsetof(type,member) );})
+ const typeof(((type *)0)->member) *__mptr = (ptr); \
+ (type *)((char *)__mptr - offsetof(type, member)); })
static GList *dev_head;
static void *dlopen_handle;
diff --git a/src/device-plugin.c b/src/device-plugin.c
index 4289903..f404220 100644..100755
--- a/src/device-plugin.c
+++ b/src/device-plugin.c
@@ -378,11 +378,13 @@ static int OEM_sys_set_irled_control(char *value)
return 0;
}
-static int OEM_sys_get_hardkey_backlight(int *value){
+static int OEM_sys_get_hardkey_backlight(int *value)
+{
return 0;
}
-static int OEM_sys_set_hardkey_backlight(int value){
+static int OEM_sys_set_hardkey_backlight(int value)
+{
return 0;
}
@@ -440,7 +442,7 @@ const OEM_sys_devman_plugin_interface default_plugin = {
.OEM_sys_get_battery_charge_now = &OEM_sys_get_battery_charge_now,
.OEM_sys_get_battery_present = &OEM_sys_get_battery_present,
.OEM_sys_get_battery_health = &OEM_sys_get_battery_health,
- .OEM_sys_get_battery_polling_required= &OEM_sys_get_battery_polling_required,
+ .OEM_sys_get_battery_polling_required = &OEM_sys_get_battery_polling_required,
.OEM_sys_get_battery_support_insuspend_charging = &OEM_sys_get_battery_support_insuspend_charging,
/* Connection interfaces */
@@ -494,5 +496,5 @@ const OEM_sys_devman_plugin_interface default_plugin = {
.OEM_sys_set_irled_control = &OEM_sys_set_irled_control,
.OEM_sys_get_hardkey_backlight = &OEM_sys_get_hardkey_backlight,
- .OEM_sys_set_hardkey_backlight= &OEM_sys_set_hardkey_backlight
+ .OEM_sys_set_hardkey_backlight = &OEM_sys_set_hardkey_backlight
};