Lines Matching refs:lcdev

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