Lines Matching refs:ret

103 	int ret;  in acx424akp_set_brightness()  local
113 ret = mipi_dsi_dcs_write(dsi, MIPI_DCS_SET_DISPLAY_BRIGHTNESS, in acx424akp_set_brightness()
115 if (ret < 0) { in acx424akp_set_brightness()
116 dev_err(acx->dev, "failed to set display PWM ratio (%d)\n", ret); in acx424akp_set_brightness()
117 return ret; in acx424akp_set_brightness()
130 ret = mipi_dsi_dcs_write(dsi, 0xf3, &par, 1); in acx424akp_set_brightness()
131 if (ret < 0) { in acx424akp_set_brightness()
132 dev_err(acx->dev, "failed to unlock CMD 2 (%d)\n", ret); in acx424akp_set_brightness()
133 return ret; in acx424akp_set_brightness()
136 ret = mipi_dsi_dcs_write(dsi, 0x00, &par, 1); in acx424akp_set_brightness()
137 if (ret < 0) { in acx424akp_set_brightness()
138 dev_err(acx->dev, "failed to enter page 1 (%d)\n", ret); in acx424akp_set_brightness()
139 return ret; in acx424akp_set_brightness()
142 ret = mipi_dsi_dcs_write(dsi, 0x7d, &par, 1); in acx424akp_set_brightness()
143 if (ret < 0) { in acx424akp_set_brightness()
144 dev_err(acx->dev, "failed to disable MTP reload (%d)\n", ret); in acx424akp_set_brightness()
145 return ret; in acx424akp_set_brightness()
147 ret = mipi_dsi_dcs_write(dsi, 0x22, &pwm_div, 1); in acx424akp_set_brightness()
148 if (ret < 0) { in acx424akp_set_brightness()
149 dev_err(acx->dev, "failed to set PWM divisor (%d)\n", ret); in acx424akp_set_brightness()
150 return ret; in acx424akp_set_brightness()
153 ret = mipi_dsi_dcs_write(dsi, 0x7f, &par, 1); in acx424akp_set_brightness()
154 if (ret < 0) { in acx424akp_set_brightness()
155 dev_err(acx->dev, "failed to lock CMD 2 (%d)\n", ret); in acx424akp_set_brightness()
156 return ret; in acx424akp_set_brightness()
161 ret = mipi_dsi_dcs_write(dsi, MIPI_DCS_WRITE_CONTROL_DISPLAY, in acx424akp_set_brightness()
163 if (ret < 0) { in acx424akp_set_brightness()
164 dev_err(acx->dev, "failed to enable display backlight (%d)\n", ret); in acx424akp_set_brightness()
165 return ret; in acx424akp_set_brightness()
180 int ret; in acx424akp_read_id() local
182 ret = mipi_dsi_dcs_read(dsi, ACX424_DCS_READ_ID1, &vendor, 1); in acx424akp_read_id()
183 if (ret < 0) { in acx424akp_read_id()
185 return ret; in acx424akp_read_id()
187 ret = mipi_dsi_dcs_read(dsi, ACX424_DCS_READ_ID2, &version, 1); in acx424akp_read_id()
188 if (ret < 0) { in acx424akp_read_id()
190 return ret; in acx424akp_read_id()
192 ret = mipi_dsi_dcs_read(dsi, ACX424_DCS_READ_ID3, &panel, 1); in acx424akp_read_id()
193 if (ret < 0) { in acx424akp_read_id()
195 return ret; in acx424akp_read_id()
222 int ret; in acx424akp_power_on() local
224 ret = regulator_enable(acx->supply); in acx424akp_power_on()
225 if (ret) { in acx424akp_power_on()
226 dev_err(acx->dev, "failed to enable supply (%d)\n", ret); in acx424akp_power_on()
227 return ret; in acx424akp_power_on()
254 int ret; in acx424akp_prepare() local
256 ret = acx424akp_power_on(acx); in acx424akp_prepare()
257 if (ret) in acx424akp_prepare()
258 return ret; in acx424akp_prepare()
260 ret = acx424akp_read_id(acx); in acx424akp_prepare()
261 if (ret) { in acx424akp_prepare()
262 dev_err(acx->dev, "failed to read panel ID (%d)\n", ret); in acx424akp_prepare()
267 ret = mipi_dsi_dcs_set_tear_on(dsi, in acx424akp_prepare()
269 if (ret) { in acx424akp_prepare()
270 dev_err(acx->dev, "failed to enable vblank TE (%d)\n", ret); in acx424akp_prepare()
284 ret = mipi_dsi_dcs_write(dsi, ACX424_DCS_SET_MDDI, in acx424akp_prepare()
286 if (ret < 0) { in acx424akp_prepare()
287 dev_err(acx->dev, "failed to set MDDI (%d)\n", ret); in acx424akp_prepare()
292 ret = mipi_dsi_dcs_exit_sleep_mode(dsi); in acx424akp_prepare()
293 if (ret) { in acx424akp_prepare()
294 dev_err(acx->dev, "failed to exit sleep mode (%d)\n", ret); in acx424akp_prepare()
299 ret = mipi_dsi_dcs_set_display_on(dsi); in acx424akp_prepare()
300 if (ret) { in acx424akp_prepare()
301 dev_err(acx->dev, "failed to turn display on (%d)\n", ret); in acx424akp_prepare()
306 ret = mipi_dsi_turn_on_peripheral(dsi); in acx424akp_prepare()
307 if (ret) { in acx424akp_prepare()
319 return ret; in acx424akp_prepare()
327 int ret; in acx424akp_unprepare() local
331 ret = mipi_dsi_dcs_write(dsi, MIPI_DCS_WRITE_CONTROL_DISPLAY, in acx424akp_unprepare()
333 if (ret) { in acx424akp_unprepare()
334 dev_err(acx->dev, "failed to disable display backlight (%d)\n", ret); in acx424akp_unprepare()
335 return ret; in acx424akp_unprepare()
338 ret = mipi_dsi_dcs_set_display_off(dsi); in acx424akp_unprepare()
339 if (ret) { in acx424akp_unprepare()
340 dev_err(acx->dev, "failed to turn display off (%d)\n", ret); in acx424akp_unprepare()
341 return ret; in acx424akp_unprepare()
345 ret = mipi_dsi_dcs_enter_sleep_mode(dsi); in acx424akp_unprepare()
346 if (ret) { in acx424akp_unprepare()
347 dev_err(acx->dev, "failed to enter sleep mode (%d)\n", ret); in acx424akp_unprepare()
348 return ret; in acx424akp_unprepare()
423 int ret; in acx424akp_probe() local
462 ret = PTR_ERR(acx->reset_gpio); in acx424akp_probe()
463 if (ret != -EPROBE_DEFER) in acx424akp_probe()
464 dev_err(dev, "failed to request GPIO (%d)\n", ret); in acx424akp_probe()
465 return ret; in acx424akp_probe()
483 ret = mipi_dsi_attach(dsi); in acx424akp_probe()
484 if (ret < 0) { in acx424akp_probe()
486 return ret; in acx424akp_probe()