4 * Copyright (c) 2012 - 2015 Samsung Electronics Co., Ltd.
6 * Licensed under the Apache License, Version 2.0 (the License);
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
23 #include <sys/types.h>
33 #include <hal/device/hal-display.h>
35 #include "ambient-mode.h"
37 #include "shared/devices.h"
38 #include "shared/common.h"
39 #include "shared/device-notifier.h"
40 #include "device-interface.h"
43 #include "display-panel.h"
44 #include "display-backlight.h"
45 #include "power/power-suspend.h"
46 #include "display-lock.h"
48 static struct display_backlight_ops backlight_ops;
49 static const struct display_config *display_conf;
51 inline struct display_backlight_ops *get_var_backlight_ops(void)
53 return &backlight_ops;
56 static struct display_backlight_ops backlight_ops = {
57 .get_lcd_power = display_panel_get_dpms_cached_state,
58 .set_brightness = NULL,
59 .get_brightness = NULL,
60 .transit_state = NULL,
64 /* Dummy. Do not consider detached display state */
65 int is_lcdon_blocked(void)
67 return LCDON_BLOCK_NONE;
70 void setup_display_plugin_backlight_ops(struct display_plugin *dp)
74 dp->backlight = &backlight_ops;
77 static void __CONSTRUCTOR__ initialize(void)
79 display_conf = get_var_display_config();
81 _E("Failed to get display configuration variable.");