• Home
  • Raw
  • Download

Lines Matching refs:ret

154 	int ret = 0;  in hx8357_spi_write_then_read()  local
186 ret = spi_sync(lcd->spi, &msg); in hx8357_spi_write_then_read()
187 if (ret < 0) in hx8357_spi_write_then_read()
193 return ret; in hx8357_spi_write_then_read()
210 int ret; in hx8357_enter_standby() local
212 ret = hx8357_spi_write_byte(lcdev, HX8357_SET_DISPLAY_OFF); in hx8357_enter_standby()
213 if (ret < 0) in hx8357_enter_standby()
214 return ret; in hx8357_enter_standby()
218 ret = hx8357_spi_write_byte(lcdev, HX8357_ENTER_SLEEP_MODE); in hx8357_enter_standby()
219 if (ret < 0) in hx8357_enter_standby()
220 return ret; in hx8357_enter_standby()
229 int ret; in hx8357_exit_standby() local
231 ret = hx8357_spi_write_byte(lcdev, HX8357_EXIT_SLEEP_MODE); in hx8357_exit_standby()
232 if (ret < 0) in hx8357_exit_standby()
233 return ret; in hx8357_exit_standby()
237 ret = hx8357_spi_write_byte(lcdev, HX8357_SET_DISPLAY_ON); in hx8357_exit_standby()
238 if (ret < 0) in hx8357_exit_standby()
239 return ret; in hx8357_exit_standby()
247 int ret; in hx8357_lcd_init() local
265 ret = hx8357_spi_write_array(lcdev, hx8357_seq_power, in hx8357_lcd_init()
267 if (ret < 0) in hx8357_lcd_init()
268 return ret; in hx8357_lcd_init()
270 ret = hx8357_spi_write_array(lcdev, hx8357_seq_vcom, in hx8357_lcd_init()
272 if (ret < 0) in hx8357_lcd_init()
273 return ret; in hx8357_lcd_init()
275 ret = hx8357_spi_write_array(lcdev, hx8357_seq_power_normal, in hx8357_lcd_init()
277 if (ret < 0) in hx8357_lcd_init()
278 return ret; in hx8357_lcd_init()
280 ret = hx8357_spi_write_array(lcdev, hx8357_seq_panel_driving, in hx8357_lcd_init()
282 if (ret < 0) in hx8357_lcd_init()
283 return ret; in hx8357_lcd_init()
285 ret = hx8357_spi_write_array(lcdev, hx8357_seq_display_frame, in hx8357_lcd_init()
287 if (ret < 0) in hx8357_lcd_init()
288 return ret; in hx8357_lcd_init()
290 ret = hx8357_spi_write_array(lcdev, hx8357_seq_panel_related, in hx8357_lcd_init()
292 if (ret < 0) in hx8357_lcd_init()
293 return ret; in hx8357_lcd_init()
295 ret = hx8357_spi_write_array(lcdev, hx8357_seq_undefined1, in hx8357_lcd_init()
297 if (ret < 0) in hx8357_lcd_init()
298 return ret; in hx8357_lcd_init()
300 ret = hx8357_spi_write_array(lcdev, hx8357_seq_undefined2, in hx8357_lcd_init()
302 if (ret < 0) in hx8357_lcd_init()
303 return ret; in hx8357_lcd_init()
305 ret = hx8357_spi_write_array(lcdev, hx8357_seq_gamma, in hx8357_lcd_init()
307 if (ret < 0) in hx8357_lcd_init()
308 return ret; in hx8357_lcd_init()
310 ret = hx8357_spi_write_array(lcdev, hx8357_seq_address_mode, in hx8357_lcd_init()
312 if (ret < 0) in hx8357_lcd_init()
313 return ret; in hx8357_lcd_init()
315 ret = hx8357_spi_write_array(lcdev, hx8357_seq_pixel_format, in hx8357_lcd_init()
317 if (ret < 0) in hx8357_lcd_init()
318 return ret; in hx8357_lcd_init()
320 ret = hx8357_spi_write_array(lcdev, hx8357_seq_column_address, in hx8357_lcd_init()
322 if (ret < 0) in hx8357_lcd_init()
323 return ret; in hx8357_lcd_init()
325 ret = hx8357_spi_write_array(lcdev, hx8357_seq_page_address, in hx8357_lcd_init()
327 if (ret < 0) in hx8357_lcd_init()
328 return ret; in hx8357_lcd_init()
330 ret = hx8357_spi_write_array(lcdev, hx8357_seq_rgb, in hx8357_lcd_init()
332 if (ret < 0) in hx8357_lcd_init()
333 return ret; in hx8357_lcd_init()
335 ret = hx8357_spi_write_array(lcdev, hx8357_seq_display_mode, in hx8357_lcd_init()
337 if (ret < 0) in hx8357_lcd_init()
338 return ret; in hx8357_lcd_init()
340 ret = hx8357_spi_write_byte(lcdev, HX8357_EXIT_SLEEP_MODE); in hx8357_lcd_init()
341 if (ret < 0) in hx8357_lcd_init()
342 return ret; in hx8357_lcd_init()
346 ret = hx8357_spi_write_byte(lcdev, HX8357_SET_DISPLAY_ON); in hx8357_lcd_init()
347 if (ret < 0) in hx8357_lcd_init()
348 return ret; in hx8357_lcd_init()
352 ret = hx8357_spi_write_byte(lcdev, HX8357_WRITE_MEMORY_START); in hx8357_lcd_init()
353 if (ret < 0) in hx8357_lcd_init()
354 return ret; in hx8357_lcd_init()
364 int ret = 0; in hx8357_set_power() local
367 ret = hx8357_exit_standby(lcdev); in hx8357_set_power()
369 ret = hx8357_enter_standby(lcdev); in hx8357_set_power()
371 if (ret == 0) in hx8357_set_power()
376 return ret; in hx8357_set_power()
395 int i, ret; in hx8357_probe() local
403 ret = spi_setup(spi); in hx8357_probe()
404 if (ret < 0) { in hx8357_probe()
406 return ret; in hx8357_probe()
417 ret = devm_gpio_request_one(&spi->dev, lcd->reset, in hx8357_probe()
420 if (ret) { in hx8357_probe()
423 lcd->reset, ret); in hx8357_probe()
439 ret = devm_gpio_request_one(&spi->dev, lcd->im_pins[i], in hx8357_probe()
441 if (ret) { in hx8357_probe()
443 lcd->im_pins[i], ret); in hx8357_probe()
450 ret = PTR_ERR(lcdev); in hx8357_probe()
451 return ret; in hx8357_probe()
455 ret = hx8357_lcd_init(lcdev); in hx8357_probe()
456 if (ret) { in hx8357_probe()
467 return ret; in hx8357_probe()