Lines Matching defs:lcdev

213 static int hx8357_spi_write_then_read(struct lcd_device *lcdev,
217 struct hx8357_data *lcd = lcd_get_data(lcdev);
255 dev_err(&lcdev->dev, "Couldn't send SPI data\n");
263 static inline int hx8357_spi_write_array(struct lcd_device *lcdev,
266 return hx8357_spi_write_then_read(lcdev, value, len, NULL, 0);
269 static inline int hx8357_spi_write_byte(struct lcd_device *lcdev,
272 return hx8357_spi_write_then_read(lcdev, &value, 1, NULL, 0);
275 static int hx8357_enter_standby(struct lcd_device *lcdev)
279 ret = hx8357_spi_write_byte(lcdev, HX8357_SET_DISPLAY_OFF);
285 ret = hx8357_spi_write_byte(lcdev, HX8357_ENTER_SLEEP_MODE);
298 static int hx8357_exit_standby(struct lcd_device *lcdev)
302 ret = hx8357_spi_write_byte(lcdev, HX8357_EXIT_SLEEP_MODE);
312 ret = hx8357_spi_write_byte(lcdev, HX8357_SET_DISPLAY_ON);
319 static void hx8357_lcd_reset(struct lcd_device *lcdev)
321 struct hx8357_data *lcd = lcd_get_data(lcdev);
334 static int hx8357_lcd_init(struct lcd_device *lcdev)
336 struct hx8357_data *lcd = lcd_get_data(lcdev);
349 ret = hx8357_spi_write_array(lcdev, hx8357_seq_power,
354 ret = hx8357_spi_write_array(lcdev, hx8357_seq_vcom,
359 ret = hx8357_spi_write_array(lcdev, hx8357_seq_power_normal,
364 ret = hx8357_spi_write_array(lcdev, hx8357_seq_panel_driving,
369 ret = hx8357_spi_write_array(lcdev, hx8357_seq_display_frame,
374 ret = hx8357_spi_write_array(lcdev, hx8357_seq_panel_related,
379 ret = hx8357_spi_write_array(lcdev, hx8357_seq_undefined1,
384 ret = hx8357_spi_write_array(lcdev, hx8357_seq_undefined2,
389 ret = hx8357_spi_write_array(lcdev, hx8357_seq_gamma,
394 ret = hx8357_spi_write_array(lcdev, hx8357_seq_address_mode,
399 ret = hx8357_spi_write_array(lcdev, hx8357_seq_pixel_format,
404 ret = hx8357_spi_write_array(lcdev, hx8357_seq_column_address,
409 ret = hx8357_spi_write_array(lcdev, hx8357_seq_page_address,
414 ret = hx8357_spi_write_array(lcdev, hx8357_seq_rgb,
419 ret = hx8357_spi_write_array(lcdev, hx8357_seq_display_mode,
424 ret = hx8357_spi_write_byte(lcdev, HX8357_EXIT_SLEEP_MODE);
433 ret = hx8357_spi_write_byte(lcdev, HX8357_SET_DISPLAY_ON);
439 ret = hx8357_spi_write_byte(lcdev, HX8357_WRITE_MEMORY_START);
446 static int hx8369_lcd_init(struct lcd_device *lcdev)
450 ret = hx8357_spi_write_array(lcdev, hx8369_seq_extension_command,
456 ret = hx8357_spi_write_array(lcdev, hx8369_seq_display_related,
461 ret = hx8357_spi_write_array(lcdev, hx8369_seq_panel_waveform_cycle,
466 ret = hx8357_spi_write_array(lcdev, hx8369_seq_set_address_mode,
471 ret = hx8357_spi_write_array(lcdev, hx8369_seq_vcom,
476 ret = hx8357_spi_write_array(lcdev, hx8369_seq_gip,
481 ret = hx8357_spi_write_array(lcdev, hx8369_seq_power,
486 ret = hx8357_spi_write_byte(lcdev, HX8357_EXIT_SLEEP_MODE);
495 ret = hx8357_spi_write_array(lcdev, hx8369_seq_gamma_curve_related,
500 ret = hx8357_spi_write_byte(lcdev, HX8357_EXIT_SLEEP_MODE);
505 ret = hx8357_spi_write_array(lcdev, hx8369_seq_write_CABC_control,
511 ret = hx8357_spi_write_array(lcdev,
517 ret = hx8357_spi_write_array(lcdev,
524 ret = hx8357_spi_write_array(lcdev, hx8369_seq_set_display_brightness,
529 ret = hx8357_spi_write_byte(lcdev, HX8357_SET_DISPLAY_ON);
538 static int hx8357_set_power(struct lcd_device *lcdev, int power)
540 struct hx8357_data *lcd = lcd_get_data(lcdev);
544 ret = hx8357_exit_standby(lcdev);
546 ret = hx8357_enter_standby(lcdev);
551 dev_warn(&lcdev->dev, "failed to set power mode %d\n", power);
556 static int hx8357_get_power(struct lcd_device *lcdev)
558 struct hx8357_data *lcd = lcd_get_data(lcdev);
583 struct lcd_device *lcdev;
648 lcdev = devm_lcd_device_register(&spi->dev, "mxsfb", &spi->dev, lcd,
650 if (IS_ERR(lcdev)) {
651 ret = PTR_ERR(lcdev);
654 spi_set_drvdata(spi, lcdev);
656 hx8357_lcd_reset(lcdev);
658 ret = ((int (*)(struct lcd_device *))match->data)(lcdev);