diff options
author | Lukasz Skalski <l.skalski@samsung.com> | 2014-06-13 09:29:26 +0200 |
---|---|---|
committer | Lukasz Skalski <l.skalski@samsung.com> | 2014-06-13 09:29:26 +0200 |
commit | 0088728977a4fe2bfb7c6c1304e7940549b5e086 (patch) | |
tree | c89a76f05732a8b4d2946d4c7313a2dd76ec3777 | |
parent | a3a00640d9e403b38982ee9840e27f749d778002 (diff) | |
download | device-manager-plugin-exynos-0088728977a4fe2bfb7c6c1304e7940549b5e086.tar.gz device-manager-plugin-exynos-0088728977a4fe2bfb7c6c1304e7940549b5e086.tar.bz2 device-manager-plugin-exynos-0088728977a4fe2bfb7c6c1304e7940549b5e086.zip |
Return default/empirical value if min_brightness kernel node is not available
Change-Id: Iebd2e9435451d104099b15a881c10ff3fe502e8a
Signed-off-by: Lukasz Skalski <l.skalski@samsung.com>
-rw-r--r-- | src/device_manager_plugin_exynos.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/device_manager_plugin_exynos.c b/src/device_manager_plugin_exynos.c index 826a9c5..1e47e8c 100644 --- a/src/device_manager_plugin_exynos.c +++ b/src/device_manager_plugin_exynos.c @@ -205,12 +205,19 @@ int OEM_sys_get_backlight_min_brightness(int index, int *value) snprintf(path, MAX_NAME, BACKLIGHT_MIN_BRIGHTNESS_PATH, disp_info[index].bl_name); ret = sys_get_int(path, value); + + /* s6e8ax0 driver doesn't support min_brightness node - return default/empirical value */ + if (ret < 0) { + *value = 0; + devmgr_log("Can't read min_brightness node[%s] default value[%d]", path, *value); + return 0; + } + devmgr_log("path[%s]value[%d]", path, *value); return ret; } - int OEM_sys_get_backlight_brightness(int index, int *value, int power_saving) { int ret = -1; @@ -248,7 +255,7 @@ int OEM_sys_get_backlight_brightness(int index, int *value, int power_saving) return ret; } - +/* FIXME: s6e8ax0 driver doesn't support dimming */ int OEM_sys_set_backlight_dimming(int index, int value) { int ret = -1; @@ -643,6 +650,7 @@ GENERATE_ACCESSORS_INT_R(battery_charge_full, BATTERY_CHARGE_FULL_PATH) GENERATE_ACCESSORS_INT_R(battery_charge_now, BATTERY_CHARGE_NOW_PATH) GENERATE_ACCESSORS_INT_R(battery_present, BATTERY_PRESENT_PATH) +/* FIXME: max170xx_battery driver doesn't support capacity_raw */ int OEM_sys_get_battery_capacity_raw(int *value) { int ret; |