2 * Copyright (C) 2015 Samsung Electronics Co.Ltd
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
10 #ifndef _MDNIE_LITE_H_
11 #define _MDNIE_LITE_H_
26 enum mdnie_accessibility {
63 typedef struct lcm_init_code_tag {
65 unsigned char data[MAX_DATA];
68 struct mdnie_command {
69 lcm_init_code *sequence;
76 struct mdnie_command tune[MDNIE_CMD_MAX];
79 #define MDNIE_SET(id) \
83 {.sequence = LEVEL1_UNLOCK, .size = ARRAY_SIZE(LEVEL1_UNLOCK), .sleep = 0,}, \
84 {.sequence = id##_1, .size = ARRAY_SIZE(id##_1), .sleep = 0,}, \
85 {.sequence = LEVEL1_LOCK, .size = ARRAY_SIZE(LEVEL1_LOCK), .sleep = 0,}, \
90 int (*write)(void *data, struct mdnie_command *seq, u32 len);
91 int (*read)(void *data, u8 addr, mdnie_t *buf, u32 len);
92 int (*color)(void *data, u32 *co_ord);
95 typedef int (*mdnie_w)(void *devdata, struct mdnie_command *seq, u32 len);
96 typedef int (*mdnie_r)(void *devdata, u8 addr, u8 *buf, u32 len);
97 typedef int (*mdnie_c)(void *devdata, u32 *co_ord);
99 struct mdnie_lite_device {
100 enum mdnie_mode mode;
101 enum mdnie_scenario scenario;
102 enum mdnie_outdoor outdoor;
103 enum mdnie_accessibility accessibility;
107 struct mdnie_ops ops;
108 struct notifier_block fb_notif;
109 struct mutex dev_lock;
112 unsigned int co_ordinates[2];
113 unsigned int color_correction
116 #endif /*_MDNIE_LITE_H_*/