Lines Matching refs:lcdev
214 static int hx8357_spi_write_then_read(struct lcd_device *lcdev, in hx8357_spi_write_then_read() argument
218 struct hx8357_data *lcd = lcd_get_data(lcdev); in hx8357_spi_write_then_read()
256 dev_err(&lcdev->dev, "Couldn't send SPI data\n"); in hx8357_spi_write_then_read()
264 static inline int hx8357_spi_write_array(struct lcd_device *lcdev, in hx8357_spi_write_array() argument
267 return hx8357_spi_write_then_read(lcdev, value, len, NULL, 0); in hx8357_spi_write_array()
270 static inline int hx8357_spi_write_byte(struct lcd_device *lcdev, in hx8357_spi_write_byte() argument
273 return hx8357_spi_write_then_read(lcdev, &value, 1, NULL, 0); in hx8357_spi_write_byte()
276 static int hx8357_enter_standby(struct lcd_device *lcdev) in hx8357_enter_standby() argument
280 ret = hx8357_spi_write_byte(lcdev, HX8357_SET_DISPLAY_OFF); in hx8357_enter_standby()
286 ret = hx8357_spi_write_byte(lcdev, HX8357_ENTER_SLEEP_MODE); in hx8357_enter_standby()
299 static int hx8357_exit_standby(struct lcd_device *lcdev) in hx8357_exit_standby() argument
303 ret = hx8357_spi_write_byte(lcdev, HX8357_EXIT_SLEEP_MODE); in hx8357_exit_standby()
313 ret = hx8357_spi_write_byte(lcdev, HX8357_SET_DISPLAY_ON); in hx8357_exit_standby()
320 static void hx8357_lcd_reset(struct lcd_device *lcdev) in hx8357_lcd_reset() argument
322 struct hx8357_data *lcd = lcd_get_data(lcdev); in hx8357_lcd_reset()
335 static int hx8357_lcd_init(struct lcd_device *lcdev) in hx8357_lcd_init() argument
337 struct hx8357_data *lcd = lcd_get_data(lcdev); in hx8357_lcd_init()
350 ret = hx8357_spi_write_array(lcdev, hx8357_seq_power, in hx8357_lcd_init()
355 ret = hx8357_spi_write_array(lcdev, hx8357_seq_vcom, in hx8357_lcd_init()
360 ret = hx8357_spi_write_array(lcdev, hx8357_seq_power_normal, in hx8357_lcd_init()
365 ret = hx8357_spi_write_array(lcdev, hx8357_seq_panel_driving, in hx8357_lcd_init()
370 ret = hx8357_spi_write_array(lcdev, hx8357_seq_display_frame, in hx8357_lcd_init()
375 ret = hx8357_spi_write_array(lcdev, hx8357_seq_panel_related, in hx8357_lcd_init()
380 ret = hx8357_spi_write_array(lcdev, hx8357_seq_undefined1, in hx8357_lcd_init()
385 ret = hx8357_spi_write_array(lcdev, hx8357_seq_undefined2, in hx8357_lcd_init()
390 ret = hx8357_spi_write_array(lcdev, hx8357_seq_gamma, in hx8357_lcd_init()
395 ret = hx8357_spi_write_array(lcdev, hx8357_seq_address_mode, in hx8357_lcd_init()
400 ret = hx8357_spi_write_array(lcdev, hx8357_seq_pixel_format, in hx8357_lcd_init()
405 ret = hx8357_spi_write_array(lcdev, hx8357_seq_column_address, in hx8357_lcd_init()
410 ret = hx8357_spi_write_array(lcdev, hx8357_seq_page_address, in hx8357_lcd_init()
415 ret = hx8357_spi_write_array(lcdev, hx8357_seq_rgb, in hx8357_lcd_init()
420 ret = hx8357_spi_write_array(lcdev, hx8357_seq_display_mode, in hx8357_lcd_init()
425 ret = hx8357_spi_write_byte(lcdev, HX8357_EXIT_SLEEP_MODE); in hx8357_lcd_init()
434 ret = hx8357_spi_write_byte(lcdev, HX8357_SET_DISPLAY_ON); in hx8357_lcd_init()
440 ret = hx8357_spi_write_byte(lcdev, HX8357_WRITE_MEMORY_START); in hx8357_lcd_init()
447 static int hx8369_lcd_init(struct lcd_device *lcdev) in hx8369_lcd_init() argument
451 ret = hx8357_spi_write_array(lcdev, hx8369_seq_extension_command, in hx8369_lcd_init()
457 ret = hx8357_spi_write_array(lcdev, hx8369_seq_display_related, in hx8369_lcd_init()
462 ret = hx8357_spi_write_array(lcdev, hx8369_seq_panel_waveform_cycle, in hx8369_lcd_init()
467 ret = hx8357_spi_write_array(lcdev, hx8369_seq_set_address_mode, in hx8369_lcd_init()
472 ret = hx8357_spi_write_array(lcdev, hx8369_seq_vcom, in hx8369_lcd_init()
477 ret = hx8357_spi_write_array(lcdev, hx8369_seq_gip, in hx8369_lcd_init()
482 ret = hx8357_spi_write_array(lcdev, hx8369_seq_power, in hx8369_lcd_init()
487 ret = hx8357_spi_write_byte(lcdev, HX8357_EXIT_SLEEP_MODE); in hx8369_lcd_init()
496 ret = hx8357_spi_write_array(lcdev, hx8369_seq_gamma_curve_related, in hx8369_lcd_init()
501 ret = hx8357_spi_write_byte(lcdev, HX8357_EXIT_SLEEP_MODE); in hx8369_lcd_init()
506 ret = hx8357_spi_write_array(lcdev, hx8369_seq_write_CABC_control, in hx8369_lcd_init()
512 ret = hx8357_spi_write_array(lcdev, in hx8369_lcd_init()
518 ret = hx8357_spi_write_array(lcdev, in hx8369_lcd_init()
525 ret = hx8357_spi_write_array(lcdev, hx8369_seq_set_display_brightness, in hx8369_lcd_init()
530 ret = hx8357_spi_write_byte(lcdev, HX8357_SET_DISPLAY_ON); in hx8369_lcd_init()
539 static int hx8357_set_power(struct lcd_device *lcdev, int power) in hx8357_set_power() argument
541 struct hx8357_data *lcd = lcd_get_data(lcdev); in hx8357_set_power()
545 ret = hx8357_exit_standby(lcdev); in hx8357_set_power()
547 ret = hx8357_enter_standby(lcdev); in hx8357_set_power()
552 dev_warn(&lcdev->dev, "failed to set power mode %d\n", power); in hx8357_set_power()
557 static int hx8357_get_power(struct lcd_device *lcdev) in hx8357_get_power() argument
559 struct hx8357_data *lcd = lcd_get_data(lcdev); in hx8357_get_power()
584 struct lcd_device *lcdev; in hx8357_probe() local
649 lcdev = devm_lcd_device_register(&spi->dev, "mxsfb", &spi->dev, lcd, in hx8357_probe()
651 if (IS_ERR(lcdev)) { in hx8357_probe()
652 ret = PTR_ERR(lcdev); in hx8357_probe()
655 spi_set_drvdata(spi, lcdev); in hx8357_probe()
657 hx8357_lcd_reset(lcdev); in hx8357_probe()
659 ret = ((int (*)(struct lcd_device *))match->data)(lcdev); in hx8357_probe()