1/*
2 * Gamma level definitions.
3 *
4 * Copyright (c) 2011 Samsung Electronics
5 * InKi Dae <inki.dae@samsung.com>
6 * Donghwa Lee <dh09.lee@samsung.com>
7 *
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.
11*/
12
13#ifndef _LD9040_BRIGHTNESS_H
14#define _LD9040_BRIGHTNESS_H
15
16#define MAX_GAMMA_LEVEL		25
17#define GAMMA_TABLE_COUNT	21
18
19/* gamma value: 2.2 */
20static const unsigned int ld9040_22_300[] = {
21	0x00, 0xa7, 0xb4, 0xae, 0xbf, 0x00, 0x91,
22	0x00, 0xb2, 0xb4, 0xaa, 0xbb, 0x00, 0xac,
23	0x00, 0xb3, 0xb1, 0xaa, 0xbc, 0x00, 0xb3
24};
25
26static const unsigned int ld9040_22_290[] = {
27	0x00, 0xa9, 0xb7, 0xae, 0xbd, 0x00, 0x89,
28	0x00, 0xb7, 0xb6, 0xa8, 0xba, 0x00, 0xa4,
29	0x00, 0xb1, 0xb4, 0xaa, 0xbb, 0x00, 0xaa
30};
31
32static const unsigned int ld9040_22_280[] = {
33	0x00, 0xa9, 0xb6, 0xad, 0xbf, 0x00, 0x86,
34	0x00, 0xb8, 0xb5, 0xa8, 0xbc, 0x00, 0xa0,
35	0x00, 0xb3, 0xb3, 0xa9, 0xbc, 0x00, 0xa7
36};
37
38static const unsigned int ld9040_22_270[] = {
39	0x00, 0xa8, 0xb8, 0xae, 0xbe, 0x00, 0x84,
40	0x00, 0xb9, 0xb7, 0xa8, 0xbc, 0x00, 0x9d,
41	0x00, 0xb2, 0xb5, 0xaa, 0xbc, 0x00, 0xa4
42
43};
44static const unsigned int ld9040_22_260[] = {
45	0x00, 0xa4, 0xb8, 0xb0, 0xbf, 0x00, 0x80,
46	0x00, 0xb8, 0xb6, 0xaa, 0xbc, 0x00, 0x9a,
47	0x00, 0xb0, 0xb5, 0xab, 0xbd, 0x00, 0xa0
48};
49
50static const unsigned int ld9040_22_250[] = {
51	0x00, 0xa4, 0xb9, 0xaf, 0xc1, 0x00, 0x7d,
52	0x00, 0xb9, 0xb6, 0xaa, 0xbb, 0x00, 0x97,
53	0x00, 0xb1, 0xb5, 0xaa, 0xbf, 0x00, 0x9d
54};
55
56static const unsigned int ld9040_22_240[] = {
57	0x00, 0xa2, 0xb9, 0xaf, 0xc2, 0x00, 0x7a,
58	0x00, 0xb9, 0xb7, 0xaa, 0xbd, 0x00, 0x94,
59	0x00, 0xb0, 0xb5, 0xab, 0xbf, 0x00, 0x9a
60};
61
62static const unsigned int ld9040_22_230[] = {
63	0x00, 0xa0, 0xb9, 0xaf, 0xc3, 0x00, 0x77,
64	0x00, 0xb9, 0xb7, 0xab, 0xbe, 0x00, 0x90,
65	0x00, 0xb0, 0xb6, 0xab, 0xbf, 0x00, 0x97
66};
67
68static const unsigned int ld9040_22_220[] = {
69	0x00, 0x9e, 0xba, 0xb0, 0xc2, 0x00, 0x75,
70	0x00, 0xb9, 0xb8, 0xab, 0xbe, 0x00, 0x8e,
71	0x00, 0xb0, 0xb6, 0xac, 0xbf, 0x00, 0x94
72};
73
74static const unsigned int ld9040_22_210[] = {
75	0x00, 0x9c, 0xb9, 0xb0, 0xc4, 0x00, 0x72,
76	0x00, 0xb8, 0xb8, 0xac, 0xbf, 0x00, 0x8a,
77	0x00, 0xb0, 0xb6, 0xac, 0xc0, 0x00, 0x91
78};
79
80static const unsigned int ld9040_22_200[] = {
81	0x00, 0x9a, 0xba, 0xb1, 0xc4, 0x00, 0x6f,
82	0x00, 0xb8, 0xb8, 0xad, 0xc0, 0x00, 0x86,
83	0x00, 0xb0, 0xb7, 0xad, 0xc0, 0x00, 0x8d
84};
85
86static const unsigned int ld9040_22_190[] = {
87	0x00, 0x97, 0xba, 0xb2, 0xc5, 0x00, 0x6c,
88	0x00, 0xb8, 0xb8, 0xae, 0xc1, 0x00, 0x82,
89	0x00, 0xb0, 0xb6, 0xae, 0xc2, 0x00, 0x89
90};
91
92static const unsigned int ld9040_22_180[] = {
93	0x00, 0x93, 0xba, 0xb3, 0xc5, 0x00, 0x69,
94	0x00, 0xb8, 0xb9, 0xae, 0xc1, 0x00, 0x7f,
95	0x00, 0xb0, 0xb6, 0xae, 0xc3, 0x00, 0x85
96};
97
98static const unsigned int ld9040_22_170[] = {
99	0x00, 0x8b, 0xb9, 0xb3, 0xc7, 0x00, 0x65,
100	0x00, 0xb7, 0xb8, 0xaf, 0xc3, 0x00, 0x7a,
101	0x00, 0x80, 0xb6, 0xae, 0xc4, 0x00, 0x81
102};
103
104static const unsigned int ld9040_22_160[] = {
105	0x00, 0x89, 0xba, 0xb3, 0xc8, 0x00, 0x62,
106	0x00, 0xb6, 0xba, 0xaf, 0xc3, 0x00, 0x76,
107	0x00, 0xaf, 0xb7, 0xae, 0xc4, 0x00, 0x7e
108};
109
110static const unsigned int ld9040_22_150[] = {
111	0x00, 0x82, 0xba, 0xb4, 0xc7, 0x00, 0x5f,
112	0x00, 0xb5, 0xba, 0xb0, 0xc3, 0x00, 0x72,
113	0x00, 0xae, 0xb8, 0xb0, 0xc3, 0x00, 0x7a
114};
115
116static const unsigned int ld9040_22_140[] = {
117	0x00, 0x7b, 0xbb, 0xb4, 0xc8, 0x00, 0x5b,
118	0x00, 0xb5, 0xba, 0xb1, 0xc4, 0x00, 0x6e,
119	0x00, 0xae, 0xb9, 0xb0, 0xc5, 0x00, 0x75
120};
121
122static const unsigned int ld9040_22_130[] = {
123	0x00, 0x71, 0xbb, 0xb5, 0xc8, 0x00, 0x57,
124	0x00, 0xb5, 0xbb, 0xb0, 0xc5, 0x00, 0x6a,
125	0x00, 0xae, 0xb9, 0xb1, 0xc6, 0x00, 0x70
126};
127
128static const unsigned int ld9040_22_120[] = {
129	0x00, 0x47, 0xba, 0xb6, 0xca, 0x00, 0x53,
130	0x00, 0xb5, 0xbb, 0xb3, 0xc6, 0x00, 0x65,
131	0x00, 0xae, 0xb8, 0xb3, 0xc7, 0x00, 0x6c
132};
133
134static const unsigned int ld9040_22_110[] = {
135	0x00, 0x13, 0xbb, 0xb7, 0xca, 0x00, 0x4f,
136	0x00, 0xb4, 0xbb, 0xb3, 0xc7, 0x00, 0x60,
137	0x00, 0xad, 0xb8, 0xb4, 0xc7, 0x00, 0x67
138};
139
140static const unsigned int ld9040_22_100[] = {
141	0x00, 0x13, 0xba, 0xb8, 0xcb, 0x00, 0x4b,
142	0x00, 0xb3, 0xbc, 0xb4, 0xc7, 0x00, 0x5c,
143	0x00, 0xac, 0xb8, 0xb4, 0xc8, 0x00, 0x62
144};
145
146static const unsigned int ld9040_22_90[] = {
147	0x00, 0x13, 0xb9, 0xb8, 0xcd, 0x00, 0x46,
148	0x00, 0xb1, 0xbc, 0xb5, 0xc8, 0x00, 0x56,
149	0x00, 0xaa, 0xb8, 0xb4, 0xc9, 0x00, 0x5d
150};
151
152static const unsigned int ld9040_22_80[] = {
153	0x00, 0x13, 0xba, 0xb9, 0xcd, 0x00, 0x41,
154	0x00, 0xb0, 0xbe, 0xb5, 0xc9, 0x00, 0x51,
155	0x00, 0xa9, 0xb9, 0xb5, 0xca, 0x00, 0x57
156};
157
158static const unsigned int ld9040_22_70[] = {
159	0x00, 0x13, 0xb9, 0xb9, 0xd0, 0x00, 0x3c,
160	0x00, 0xaf, 0xbf, 0xb6, 0xcb, 0x00, 0x4b,
161	0x00, 0xa8, 0xb9, 0xb5, 0xcc, 0x00, 0x52
162};
163
164static const unsigned int ld9040_22_50[] = {
165	0x00, 0x13, 0xb2, 0xba, 0xd2, 0x00, 0x30,
166	0x00, 0xaf, 0xc0, 0xb8, 0xcd, 0x00, 0x3d,
167	0x00, 0xa8, 0xb8, 0xb7, 0xcd, 0x00, 0x44
168};
169
170struct ld9040_gamma {
171	unsigned int *gamma_22_table[MAX_GAMMA_LEVEL];
172};
173
174static struct ld9040_gamma gamma_table = {
175	.gamma_22_table[0] = (unsigned int *)&ld9040_22_50,
176	.gamma_22_table[1] = (unsigned int *)&ld9040_22_70,
177	.gamma_22_table[2] = (unsigned int *)&ld9040_22_80,
178	.gamma_22_table[3] = (unsigned int *)&ld9040_22_90,
179	.gamma_22_table[4] = (unsigned int *)&ld9040_22_100,
180	.gamma_22_table[5] = (unsigned int *)&ld9040_22_110,
181	.gamma_22_table[6] = (unsigned int *)&ld9040_22_120,
182	.gamma_22_table[7] = (unsigned int *)&ld9040_22_130,
183	.gamma_22_table[8] = (unsigned int *)&ld9040_22_140,
184	.gamma_22_table[9] = (unsigned int *)&ld9040_22_150,
185	.gamma_22_table[10] = (unsigned int *)&ld9040_22_160,
186	.gamma_22_table[11] = (unsigned int *)&ld9040_22_170,
187	.gamma_22_table[12] = (unsigned int *)&ld9040_22_180,
188	.gamma_22_table[13] = (unsigned int *)&ld9040_22_190,
189	.gamma_22_table[14] = (unsigned int *)&ld9040_22_200,
190	.gamma_22_table[15] = (unsigned int *)&ld9040_22_210,
191	.gamma_22_table[16] = (unsigned int *)&ld9040_22_220,
192	.gamma_22_table[17] = (unsigned int *)&ld9040_22_230,
193	.gamma_22_table[18] = (unsigned int *)&ld9040_22_240,
194	.gamma_22_table[19] = (unsigned int *)&ld9040_22_250,
195	.gamma_22_table[20] = (unsigned int *)&ld9040_22_260,
196	.gamma_22_table[21] = (unsigned int *)&ld9040_22_270,
197	.gamma_22_table[22] = (unsigned int *)&ld9040_22_280,
198	.gamma_22_table[23] = (unsigned int *)&ld9040_22_290,
199	.gamma_22_table[24] = (unsigned int *)&ld9040_22_300,
200};
201
202#endif
203