Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/panel: nv3052c: Reduce duplication of init sequences

Although there are various small changes between the init
sequences, the second half is common for all 3 currently
supported displays.

Note that this is only compile-tested.

Signed-off-by: Priit Laes <plaes@plaes.org>
Tested-by: John Watts <contact@jookia.org>
Reviewed-by: John Watts <contact@jookia.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20250619132211.556027-1-plaes@plaes.org

authored by

Priit Laes and committed by
Neil Armstrong
b21c47d7 c57e4323

+74 -334
+74 -334
drivers/gpu/drm/panel/panel-newvision-nv3052c.c
··· 43 43 struct gpio_desc *reset_gpio; 44 44 }; 45 45 46 - static const struct nv3052c_reg ltk035c5444t_panel_regs[] = { 47 - // EXTC Command set enable, select page 1 48 - { 0xff, 0x30 }, { 0xff, 0x52 }, { 0xff, 0x01 }, 49 - // Mostly unknown registers 50 - { 0xe3, 0x00 }, 51 - { 0x40, 0x00 }, 52 - { 0x03, 0x40 }, 53 - { 0x04, 0x00 }, 54 - { 0x05, 0x03 }, 55 - { 0x08, 0x00 }, 56 - { 0x09, 0x07 }, 57 - { 0x0a, 0x01 }, 58 - { 0x0b, 0x32 }, 59 - { 0x0c, 0x32 }, 60 - { 0x0d, 0x0b }, 61 - { 0x0e, 0x00 }, 62 - { 0x23, 0xa0 }, 63 - { 0x24, 0x0c }, 64 - { 0x25, 0x06 }, 65 - { 0x26, 0x14 }, 66 - { 0x27, 0x14 }, 67 - { 0x38, 0xcc }, // VCOM_ADJ1 68 - { 0x39, 0xd7 }, // VCOM_ADJ2 69 - { 0x3a, 0x4a }, // VCOM_ADJ3 70 - { 0x28, 0x40 }, 71 - { 0x29, 0x01 }, 72 - { 0x2a, 0xdf }, 73 - { 0x49, 0x3c }, 74 - { 0x91, 0x77 }, // EXTPW_CTRL2 75 - { 0x92, 0x77 }, // EXTPW_CTRL3 76 - { 0xa0, 0x55 }, 77 - { 0xa1, 0x50 }, 78 - { 0xa4, 0x9c }, 79 - { 0xa7, 0x02 }, 80 - { 0xa8, 0x01 }, 81 - { 0xa9, 0x01 }, 82 - { 0xaa, 0xfc }, 83 - { 0xab, 0x28 }, 84 - { 0xac, 0x06 }, 85 - { 0xad, 0x06 }, 86 - { 0xae, 0x06 }, 87 - { 0xaf, 0x03 }, 88 - { 0xb0, 0x08 }, 89 - { 0xb1, 0x26 }, 90 - { 0xb2, 0x28 }, 91 - { 0xb3, 0x28 }, 92 - { 0xb4, 0x33 }, 93 - { 0xb5, 0x08 }, 94 - { 0xb6, 0x26 }, 95 - { 0xb7, 0x08 }, 96 - { 0xb8, 0x26 }, 97 - { 0xf0, 0x00 }, 98 - { 0xf6, 0xc0 }, 46 + /* 47 + * Common initialization registers for all currently 48 + * supported displays. Mostly seem to be related 49 + * to Gamma correction curves and output pad mappings. 50 + */ 51 + static const struct nv3052c_reg common_init_regs[] = { 99 52 // EXTC Command set enable, select page 2 100 53 { 0xff, 0x30 }, { 0xff, 0x52 }, { 0xff, 0x02 }, 101 54 // Set gray scale voltage to adjust gamma ··· 168 215 { 0xa0, 0x01 }, // PANELU2D33 169 216 // EXTC Command set enable, select page 2 170 217 { 0xff, 0x30 }, { 0xff, 0x52 }, { 0xff, 0x02 }, 171 - // Unknown registers 218 + // Page 2 register values (0x01..0x10) are same for nv3051d and nv3052c 172 219 { 0x01, 0x01 }, 173 220 { 0x02, 0xda }, 174 221 { 0x03, 0xba }, ··· 189 236 { 0xff, 0x30 }, { 0xff, 0x52 }, { 0xff, 0x00 }, 190 237 // Display Access Control 191 238 { 0x36, 0x0a }, // bgr = 1, ss = 1, gs = 0 239 + 240 + }; 241 + 242 + static const struct nv3052c_reg ltk035c5444t_panel_regs[] = { 243 + // EXTC Command set enable, select page 1 244 + { 0xff, 0x30 }, { 0xff, 0x52 }, { 0xff, 0x01 }, 245 + // Mostly unknown registers 246 + { 0xe3, 0x00 }, 247 + { 0x40, 0x00 }, 248 + { 0x03, 0x40 }, 249 + { 0x04, 0x00 }, 250 + { 0x05, 0x03 }, 251 + { 0x08, 0x00 }, 252 + { 0x09, 0x07 }, 253 + { 0x0a, 0x01 }, 254 + { 0x0b, 0x32 }, 255 + { 0x0c, 0x32 }, 256 + { 0x0d, 0x0b }, 257 + { 0x0e, 0x00 }, 258 + { 0x23, 0xa0 }, 259 + { 0x24, 0x0c }, 260 + { 0x25, 0x06 }, 261 + { 0x26, 0x14 }, 262 + { 0x27, 0x14 }, 263 + { 0x38, 0xcc }, // VCOM_ADJ1 264 + { 0x39, 0xd7 }, // VCOM_ADJ2 265 + { 0x3a, 0x4a }, // VCOM_ADJ3 266 + { 0x28, 0x40 }, 267 + { 0x29, 0x01 }, 268 + { 0x2a, 0xdf }, 269 + { 0x49, 0x3c }, 270 + { 0x91, 0x77 }, // EXTPW_CTRL2 271 + { 0x92, 0x77 }, // EXTPW_CTRL3 272 + { 0xa0, 0x55 }, 273 + { 0xa1, 0x50 }, 274 + { 0xa4, 0x9c }, 275 + { 0xa7, 0x02 }, 276 + { 0xa8, 0x01 }, 277 + { 0xa9, 0x01 }, 278 + { 0xaa, 0xfc }, 279 + { 0xab, 0x28 }, 280 + { 0xac, 0x06 }, 281 + { 0xad, 0x06 }, 282 + { 0xae, 0x06 }, 283 + { 0xaf, 0x03 }, 284 + { 0xb0, 0x08 }, 285 + { 0xb1, 0x26 }, 286 + { 0xb2, 0x28 }, 287 + { 0xb3, 0x28 }, 288 + { 0xb4, 0x33 }, 289 + { 0xb5, 0x08 }, 290 + { 0xb6, 0x26 }, 291 + { 0xb7, 0x08 }, 292 + { 0xb8, 0x26 }, 293 + { 0xf0, 0x00 }, 294 + { 0xf6, 0xc0 }, 192 295 }; 193 296 194 297 static const struct nv3052c_reg fs035vg158_panel_regs[] = { ··· 300 291 { 0xb8, 0x26 }, 301 292 { 0xf0, 0x00 }, 302 293 { 0xf6, 0xc0 }, 303 - // EXTC Command set enable, select page 0 304 - { 0xff, 0x30 }, { 0xff, 0x52 }, { 0xff, 0x02 }, 305 - // Set gray scale voltage to adjust gamma 306 - { 0xb0, 0x0b }, // PGAMVR0 307 - { 0xb1, 0x16 }, // PGAMVR1 308 - { 0xb2, 0x17 }, // PGAMVR2 309 - { 0xb3, 0x2c }, // PGAMVR3 310 - { 0xb4, 0x32 }, // PGAMVR4 311 - { 0xb5, 0x3b }, // PGAMVR5 312 - { 0xb6, 0x29 }, // PGAMPR0 313 - { 0xb7, 0x40 }, // PGAMPR1 314 - { 0xb8, 0x0d }, // PGAMPK0 315 - { 0xb9, 0x05 }, // PGAMPK1 316 - { 0xba, 0x12 }, // PGAMPK2 317 - { 0xbb, 0x10 }, // PGAMPK3 318 - { 0xbc, 0x12 }, // PGAMPK4 319 - { 0xbd, 0x15 }, // PGAMPK5 320 - { 0xbe, 0x19 }, // PGAMPK6 321 - { 0xbf, 0x0e }, // PGAMPK7 322 - { 0xc0, 0x16 }, // PGAMPK8 323 - { 0xc1, 0x0a }, // PGAMPK9 324 - // Set gray scale voltage to adjust gamma 325 - { 0xd0, 0x0c }, // NGAMVR0 326 - { 0xd1, 0x17 }, // NGAMVR0 327 - { 0xd2, 0x14 }, // NGAMVR1 328 - { 0xd3, 0x2e }, // NGAMVR2 329 - { 0xd4, 0x32 }, // NGAMVR3 330 - { 0xd5, 0x3c }, // NGAMVR4 331 - { 0xd6, 0x22 }, // NGAMPR0 332 - { 0xd7, 0x3d }, // NGAMPR1 333 - { 0xd8, 0x0d }, // NGAMPK0 334 - { 0xd9, 0x07 }, // NGAMPK1 335 - { 0xda, 0x13 }, // NGAMPK2 336 - { 0xdb, 0x13 }, // NGAMPK3 337 - { 0xdc, 0x11 }, // NGAMPK4 338 - { 0xdd, 0x15 }, // NGAMPK5 339 - { 0xde, 0x19 }, // NGAMPK6 340 - { 0xdf, 0x10 }, // NGAMPK7 341 - { 0xe0, 0x17 }, // NGAMPK8 342 - { 0xe1, 0x0a }, // NGAMPK9 343 - // EXTC Command set enable, select page 3 344 - { 0xff, 0x30 }, { 0xff, 0x52 }, { 0xff, 0x03 }, 345 - // Set various timing settings 346 - { 0x00, 0x2a }, // GIP_VST_1 347 - { 0x01, 0x2a }, // GIP_VST_2 348 - { 0x02, 0x2a }, // GIP_VST_3 349 - { 0x03, 0x2a }, // GIP_VST_4 350 - { 0x04, 0x61 }, // GIP_VST_5 351 - { 0x05, 0x80 }, // GIP_VST_6 352 - { 0x06, 0xc7 }, // GIP_VST_7 353 - { 0x07, 0x01 }, // GIP_VST_8 354 - { 0x08, 0x03 }, // GIP_VST_9 355 - { 0x09, 0x04 }, // GIP_VST_10 356 - { 0x70, 0x22 }, // GIP_ECLK1 357 - { 0x71, 0x80 }, // GIP_ECLK2 358 - { 0x30, 0x2a }, // GIP_CLK_1 359 - { 0x31, 0x2a }, // GIP_CLK_2 360 - { 0x32, 0x2a }, // GIP_CLK_3 361 - { 0x33, 0x2a }, // GIP_CLK_4 362 - { 0x34, 0x61 }, // GIP_CLK_5 363 - { 0x35, 0xc5 }, // GIP_CLK_6 364 - { 0x36, 0x80 }, // GIP_CLK_7 365 - { 0x37, 0x23 }, // GIP_CLK_8 366 - { 0x40, 0x03 }, // GIP_CLKA_1 367 - { 0x41, 0x04 }, // GIP_CLKA_2 368 - { 0x42, 0x05 }, // GIP_CLKA_3 369 - { 0x43, 0x06 }, // GIP_CLKA_4 370 - { 0x44, 0x11 }, // GIP_CLKA_5 371 - { 0x45, 0xe8 }, // GIP_CLKA_6 372 - { 0x46, 0xe9 }, // GIP_CLKA_7 373 - { 0x47, 0x11 }, // GIP_CLKA_8 374 - { 0x48, 0xea }, // GIP_CLKA_9 375 - { 0x49, 0xeb }, // GIP_CLKA_10 376 - { 0x50, 0x07 }, // GIP_CLKB_1 377 - { 0x51, 0x08 }, // GIP_CLKB_2 378 - { 0x52, 0x09 }, // GIP_CLKB_3 379 - { 0x53, 0x0a }, // GIP_CLKB_4 380 - { 0x54, 0x11 }, // GIP_CLKB_5 381 - { 0x55, 0xec }, // GIP_CLKB_6 382 - { 0x56, 0xed }, // GIP_CLKB_7 383 - { 0x57, 0x11 }, // GIP_CLKB_8 384 - { 0x58, 0xef }, // GIP_CLKB_9 385 - { 0x59, 0xf0 }, // GIP_CLKB_10 386 - // Map internal GOA signals to GOA output pad 387 - { 0xb1, 0x01 }, // PANELD2U2 388 - { 0xb4, 0x15 }, // PANELD2U5 389 - { 0xb5, 0x16 }, // PANELD2U6 390 - { 0xb6, 0x09 }, // PANELD2U7 391 - { 0xb7, 0x0f }, // PANELD2U8 392 - { 0xb8, 0x0d }, // PANELD2U9 393 - { 0xb9, 0x0b }, // PANELD2U10 394 - { 0xba, 0x00 }, // PANELD2U11 395 - { 0xc7, 0x02 }, // PANELD2U24 396 - { 0xca, 0x17 }, // PANELD2U27 397 - { 0xcb, 0x18 }, // PANELD2U28 398 - { 0xcc, 0x0a }, // PANELD2U29 399 - { 0xcd, 0x10 }, // PANELD2U30 400 - { 0xce, 0x0e }, // PANELD2U31 401 - { 0xcf, 0x0c }, // PANELD2U32 402 - { 0xd0, 0x00 }, // PANELD2U33 403 - // Map internal GOA signals to GOA output pad 404 - { 0x81, 0x00 }, // PANELU2D2 405 - { 0x84, 0x15 }, // PANELU2D5 406 - { 0x85, 0x16 }, // PANELU2D6 407 - { 0x86, 0x10 }, // PANELU2D7 408 - { 0x87, 0x0a }, // PANELU2D8 409 - { 0x88, 0x0c }, // PANELU2D9 410 - { 0x89, 0x0e }, // PANELU2D10 411 - { 0x8a, 0x02 }, // PANELU2D11 412 - { 0x97, 0x00 }, // PANELU2D24 413 - { 0x9a, 0x17 }, // PANELU2D27 414 - { 0x9b, 0x18 }, // PANELU2D28 415 - { 0x9c, 0x0f }, // PANELU2D29 416 - { 0x9d, 0x09 }, // PANELU2D30 417 - { 0x9e, 0x0b }, // PANELU2D31 418 - { 0x9f, 0x0d }, // PANELU2D32 419 - { 0xa0, 0x01 }, // PANELU2D33 420 - // EXTC Command set enable, select page 2 421 - { 0xff, 0x30 }, { 0xff, 0x52 }, { 0xff, 0x02 }, 422 - // Unknown registers 423 - { 0x01, 0x01 }, 424 - { 0x02, 0xda }, 425 - { 0x03, 0xba }, 426 - { 0x04, 0xa8 }, 427 - { 0x05, 0x9a }, 428 - { 0x06, 0x70 }, 429 - { 0x07, 0xff }, 430 - { 0x08, 0x91 }, 431 - { 0x09, 0x90 }, 432 - { 0x0a, 0xff }, 433 - { 0x0b, 0x8f }, 434 - { 0x0c, 0x60 }, 435 - { 0x0d, 0x58 }, 436 - { 0x0e, 0x48 }, 437 - { 0x0f, 0x38 }, 438 - { 0x10, 0x2b }, 439 - // EXTC Command set enable, select page 0 440 - { 0xff, 0x30 }, { 0xff, 0x52 }, { 0xff, 0x00 }, 441 - // Display Access Control 442 - { 0x36, 0x0a }, // bgr = 1, ss = 1, gs = 0 443 294 }; 444 295 445 296 ··· 356 487 { 0xb8, 0x26 }, 357 488 { 0xf0, 0x00 }, 358 489 { 0xf6, 0xc0 }, 359 - // EXTC Command set enable, select page 2 360 - { 0xff, 0x30 }, { 0xff, 0x52 }, { 0xff, 0x02 }, 361 - // Set gray scale voltage to adjust gamma 362 - { 0xb0, 0x0b }, // PGAMVR0 363 - { 0xb1, 0x16 }, // PGAMVR1 364 - { 0xb2, 0x17 }, // PGAMVR2 365 - { 0xb3, 0x2c }, // PGAMVR3 366 - { 0xb4, 0x32 }, // PGAMVR4 367 - { 0xb5, 0x3b }, // PGAMVR5 368 - { 0xb6, 0x29 }, // PGAMPR0 369 - { 0xb7, 0x40 }, // PGAMPR1 370 - { 0xb8, 0x0d }, // PGAMPK0 371 - { 0xb9, 0x05 }, // PGAMPK1 372 - { 0xba, 0x12 }, // PGAMPK2 373 - { 0xbb, 0x10 }, // PGAMPK3 374 - { 0xbc, 0x12 }, // PGAMPK4 375 - { 0xbd, 0x15 }, // PGAMPK5 376 - { 0xbe, 0x19 }, // PGAMPK6 377 - { 0xbf, 0x0e }, // PGAMPK7 378 - { 0xc0, 0x16 }, // PGAMPK8 379 - { 0xc1, 0x0a }, // PGAMPK9 380 - // Set gray scale voltage to adjust gamma 381 - { 0xd0, 0x0c }, // NGAMVR0 382 - { 0xd1, 0x17 }, // NGAMVR0 383 - { 0xd2, 0x14 }, // NGAMVR1 384 - { 0xd3, 0x2e }, // NGAMVR2 385 - { 0xd4, 0x32 }, // NGAMVR3 386 - { 0xd5, 0x3c }, // NGAMVR4 387 - { 0xd6, 0x22 }, // NGAMPR0 388 - { 0xd7, 0x3d }, // NGAMPR1 389 - { 0xd8, 0x0d }, // NGAMPK0 390 - { 0xd9, 0x07 }, // NGAMPK1 391 - { 0xda, 0x13 }, // NGAMPK2 392 - { 0xdb, 0x13 }, // NGAMPK3 393 - { 0xdc, 0x11 }, // NGAMPK4 394 - { 0xdd, 0x15 }, // NGAMPK5 395 - { 0xde, 0x19 }, // NGAMPK6 396 - { 0xdf, 0x10 }, // NGAMPK7 397 - { 0xe0, 0x17 }, // NGAMPK8 398 - { 0xe1, 0x0a }, // NGAMPK9 399 - // EXTC Command set enable, select page 3 400 - { 0xff, 0x30 }, { 0xff, 0x52 }, { 0xff, 0x03 }, 401 - // Set various timing settings 402 - { 0x00, 0x2a }, // GIP_VST_1 403 - { 0x01, 0x2a }, // GIP_VST_2 404 - { 0x02, 0x2a }, // GIP_VST_3 405 - { 0x03, 0x2a }, // GIP_VST_4 406 - { 0x04, 0x61 }, // GIP_VST_5 407 - { 0x05, 0x80 }, // GIP_VST_6 408 - { 0x06, 0xc7 }, // GIP_VST_7 409 - { 0x07, 0x01 }, // GIP_VST_8 410 - { 0x08, 0x03 }, // GIP_VST_9 411 - { 0x09, 0x04 }, // GIP_VST_10 412 - { 0x70, 0x22 }, // GIP_ECLK1 413 - { 0x71, 0x80 }, // GIP_ECLK2 414 - { 0x30, 0x2a }, // GIP_CLK_1 415 - { 0x31, 0x2a }, // GIP_CLK_2 416 - { 0x32, 0x2a }, // GIP_CLK_3 417 - { 0x33, 0x2a }, // GIP_CLK_4 418 - { 0x34, 0x61 }, // GIP_CLK_5 419 - { 0x35, 0xc5 }, // GIP_CLK_6 420 - { 0x36, 0x80 }, // GIP_CLK_7 421 - { 0x37, 0x23 }, // GIP_CLK_8 422 - { 0x40, 0x03 }, // GIP_CLKA_1 423 - { 0x41, 0x04 }, // GIP_CLKA_2 424 - { 0x42, 0x05 }, // GIP_CLKA_3 425 - { 0x43, 0x06 }, // GIP_CLKA_4 426 - { 0x44, 0x11 }, // GIP_CLKA_5 427 - { 0x45, 0xe8 }, // GIP_CLKA_6 428 - { 0x46, 0xe9 }, // GIP_CLKA_7 429 - { 0x47, 0x11 }, // GIP_CLKA_8 430 - { 0x48, 0xea }, // GIP_CLKA_9 431 - { 0x49, 0xeb }, // GIP_CLKA_10 432 - { 0x50, 0x07 }, // GIP_CLKB_1 433 - { 0x51, 0x08 }, // GIP_CLKB_2 434 - { 0x52, 0x09 }, // GIP_CLKB_3 435 - { 0x53, 0x0a }, // GIP_CLKB_4 436 - { 0x54, 0x11 }, // GIP_CLKB_5 437 - { 0x55, 0xec }, // GIP_CLKB_6 438 - { 0x56, 0xed }, // GIP_CLKB_7 439 - { 0x57, 0x11 }, // GIP_CLKB_8 440 - { 0x58, 0xef }, // GIP_CLKB_9 441 - { 0x59, 0xf0 }, // GIP_CLKB_10 442 - // Map internal GOA signals to GOA output pad 443 - { 0xb1, 0x01 }, // PANELD2U2 444 - { 0xb4, 0x15 }, // PANELD2U5 445 - { 0xb5, 0x16 }, // PANELD2U6 446 - { 0xb6, 0x09 }, // PANELD2U7 447 - { 0xb7, 0x0f }, // PANELD2U8 448 - { 0xb8, 0x0d }, // PANELD2U9 449 - { 0xb9, 0x0b }, // PANELD2U10 450 - { 0xba, 0x00 }, // PANELD2U11 451 - { 0xc7, 0x02 }, // PANELD2U24 452 - { 0xca, 0x17 }, // PANELD2U27 453 - { 0xcb, 0x18 }, // PANELD2U28 454 - { 0xcc, 0x0a }, // PANELD2U29 455 - { 0xcd, 0x10 }, // PANELD2U30 456 - { 0xce, 0x0e }, // PANELD2U31 457 - { 0xcf, 0x0c }, // PANELD2U32 458 - { 0xd0, 0x00 }, // PANELD2U33 459 - // Map internal GOA signals to GOA output pad 460 - { 0x81, 0x00 }, // PANELU2D2 461 - { 0x84, 0x15 }, // PANELU2D5 462 - { 0x85, 0x16 }, // PANELU2D6 463 - { 0x86, 0x10 }, // PANELU2D7 464 - { 0x87, 0x0a }, // PANELU2D8 465 - { 0x88, 0x0c }, // PANELU2D9 466 - { 0x89, 0x0e }, // PANELU2D10 467 - { 0x8a, 0x02 }, // PANELU2D11 468 - { 0x97, 0x00 }, // PANELU2D24 469 - { 0x9a, 0x17 }, // PANELU2D27 470 - { 0x9b, 0x18 }, // PANELU2D28 471 - { 0x9c, 0x0f }, // PANELU2D29 472 - { 0x9d, 0x09 }, // PANELU2D30 473 - { 0x9e, 0x0b }, // PANELU2D31 474 - { 0x9f, 0x0d }, // PANELU2D32 475 - { 0xa0, 0x01 }, // PANELU2D33 476 - // EXTC Command set enable, select page 2 477 - { 0xff, 0x30 }, { 0xff, 0x52 }, { 0xff, 0x02 }, 478 - // Unknown registers 479 - { 0x01, 0x01 }, 480 - { 0x02, 0xda }, 481 - { 0x03, 0xba }, 482 - { 0x04, 0xa8 }, 483 - { 0x05, 0x9a }, 484 - { 0x06, 0x70 }, 485 - { 0x07, 0xff }, 486 - { 0x08, 0x91 }, 487 - { 0x09, 0x90 }, 488 - { 0x0a, 0xff }, 489 - { 0x0b, 0x8f }, 490 - { 0x0c, 0x60 }, 491 - { 0x0d, 0x58 }, 492 - { 0x0e, 0x48 }, 493 - { 0x0f, 0x38 }, 494 - { 0x10, 0x2b }, 495 - // EXTC Command set enable, select page 0 496 - { 0xff, 0x30 }, { 0xff, 0x52 }, { 0xff, 0x00 }, 497 - // Display Access Control 498 - { 0x36, 0x0a }, // bgr = 1, ss = 1, gs = 0 499 490 }; 500 491 501 492 static inline struct nv3052c *to_nv3052c(struct drm_panel *panel) ··· 384 655 gpiod_set_value_cansleep(priv->reset_gpio, 0); 385 656 usleep_range(5000, 20000); 386 657 658 + /* Apply panel-specific initialization registers */ 387 659 for (i = 0; i < panel_regs_len; i++) { 388 660 err = mipi_dbi_command(dbi, panel_regs[i].cmd, 389 661 panel_regs[i].val); 390 662 663 + if (err) { 664 + dev_err(priv->dev, "Unable to set register: %d\n", err); 665 + goto err_disable_regulator; 666 + } 667 + } 668 + 669 + /* Apply common initialization registers */ 670 + for (i = 0; i < ARRAY_SIZE(common_init_regs); i++) { 671 + err = mipi_dbi_command(dbi, common_init_regs[i].cmd, 672 + common_init_regs[i].val); 391 673 if (err) { 392 674 dev_err(priv->dev, "Unable to set register: %d\n", err); 393 675 goto err_disable_regulator;