• Home
  • Raw
  • Download

Lines Matching refs:acx

96 	struct acx424akp *acx = bl_get_data(bl);  in acx424akp_set_brightness()  local
97 struct mipi_dsi_device *dsi = to_mipi_dsi_device(acx->dev); in acx424akp_set_brightness()
112 dev_dbg(acx->dev, "calculated duty cycle %02x\n", pwm_ratio); in acx424akp_set_brightness()
116 dev_err(acx->dev, "failed to set display PWM ratio (%d)\n", ret); in acx424akp_set_brightness()
132 dev_err(acx->dev, "failed to unlock CMD 2 (%d)\n", ret); in acx424akp_set_brightness()
138 dev_err(acx->dev, "failed to enter page 1 (%d)\n", ret); in acx424akp_set_brightness()
144 dev_err(acx->dev, "failed to disable MTP reload (%d)\n", ret); in acx424akp_set_brightness()
149 dev_err(acx->dev, "failed to set PWM divisor (%d)\n", ret); in acx424akp_set_brightness()
155 dev_err(acx->dev, "failed to lock CMD 2 (%d)\n", ret); in acx424akp_set_brightness()
164 dev_err(acx->dev, "failed to enable display backlight (%d)\n", ret); in acx424akp_set_brightness()
175 static int acx424akp_read_id(struct acx424akp *acx) in acx424akp_read_id() argument
177 struct mipi_dsi_device *dsi = to_mipi_dsi_device(acx->dev); in acx424akp_read_id()
184 dev_err(acx->dev, "could not vendor ID byte\n"); in acx424akp_read_id()
189 dev_err(acx->dev, "could not read device version byte\n"); in acx424akp_read_id()
194 dev_err(acx->dev, "could not read panel ID byte\n"); in acx424akp_read_id()
199 dev_err(acx->dev, "device vendor ID is zero\n"); in acx424akp_read_id()
208 dev_info(acx->dev, "MTP vendor: %02x, version: %02x, panel: %02x\n", in acx424akp_read_id()
212 dev_info(acx->dev, "unknown vendor: %02x, version: %02x, panel: %02x\n", in acx424akp_read_id()
220 static int acx424akp_power_on(struct acx424akp *acx) in acx424akp_power_on() argument
224 ret = regulator_enable(acx->supply); in acx424akp_power_on()
226 dev_err(acx->dev, "failed to enable supply (%d)\n", ret); in acx424akp_power_on()
231 gpiod_set_value_cansleep(acx->reset_gpio, 1); in acx424akp_power_on()
234 gpiod_set_value_cansleep(acx->reset_gpio, 0); in acx424akp_power_on()
240 static void acx424akp_power_off(struct acx424akp *acx) in acx424akp_power_off() argument
243 gpiod_set_value_cansleep(acx->reset_gpio, 1); in acx424akp_power_off()
246 regulator_disable(acx->supply); in acx424akp_power_off()
251 struct acx424akp *acx = panel_to_acx424akp(panel); in acx424akp_prepare() local
252 struct mipi_dsi_device *dsi = to_mipi_dsi_device(acx->dev); in acx424akp_prepare()
256 ret = acx424akp_power_on(acx); in acx424akp_prepare()
260 ret = acx424akp_read_id(acx); in acx424akp_prepare()
262 dev_err(acx->dev, "failed to read panel ID (%d)\n", ret); in acx424akp_prepare()
270 dev_err(acx->dev, "failed to enable vblank TE (%d)\n", ret); in acx424akp_prepare()
287 dev_err(acx->dev, "failed to set MDDI (%d)\n", ret); in acx424akp_prepare()
294 dev_err(acx->dev, "failed to exit sleep mode (%d)\n", ret); in acx424akp_prepare()
301 dev_err(acx->dev, "failed to turn display on (%d)\n", ret); in acx424akp_prepare()
304 if (acx->video_mode) { in acx424akp_prepare()
308 dev_err(acx->dev, "failed to turn on peripheral\n"); in acx424akp_prepare()
313 acx->bl->props.power = FB_BLANK_NORMAL; in acx424akp_prepare()
318 acx424akp_power_off(acx); in acx424akp_prepare()
324 struct acx424akp *acx = panel_to_acx424akp(panel); in acx424akp_unprepare() local
325 struct mipi_dsi_device *dsi = to_mipi_dsi_device(acx->dev); in acx424akp_unprepare()
334 dev_err(acx->dev, "failed to disable display backlight (%d)\n", ret); in acx424akp_unprepare()
340 dev_err(acx->dev, "failed to turn display off (%d)\n", ret); in acx424akp_unprepare()
347 dev_err(acx->dev, "failed to enter sleep mode (%d)\n", ret); in acx424akp_unprepare()
352 acx424akp_power_off(acx); in acx424akp_unprepare()
353 acx->bl->props.power = FB_BLANK_POWERDOWN; in acx424akp_unprepare()
360 struct acx424akp *acx = panel_to_acx424akp(panel); in acx424akp_enable() local
366 acx->bl->props.power = FB_BLANK_UNBLANK; in acx424akp_enable()
373 struct acx424akp *acx = panel_to_acx424akp(panel); in acx424akp_disable() local
379 acx->bl->props.power = FB_BLANK_NORMAL; in acx424akp_disable()
387 struct acx424akp *acx = panel_to_acx424akp(panel); in acx424akp_get_modes() local
390 if (acx->video_mode) in acx424akp_get_modes()
422 struct acx424akp *acx; in acx424akp_probe() local
425 acx = devm_kzalloc(dev, sizeof(struct acx424akp), GFP_KERNEL); in acx424akp_probe()
426 if (!acx) in acx424akp_probe()
428 acx->video_mode = of_property_read_bool(dev->of_node, in acx424akp_probe()
431 mipi_dsi_set_drvdata(dsi, acx); in acx424akp_probe()
432 acx->dev = dev; in acx424akp_probe()
445 if (acx->video_mode) in acx424akp_probe()
454 acx->supply = devm_regulator_get(dev, "vddi"); in acx424akp_probe()
455 if (IS_ERR(acx->supply)) in acx424akp_probe()
456 return PTR_ERR(acx->supply); in acx424akp_probe()
459 acx->reset_gpio = devm_gpiod_get_optional(dev, "reset", in acx424akp_probe()
461 if (IS_ERR(acx->reset_gpio)) { in acx424akp_probe()
462 ret = PTR_ERR(acx->reset_gpio); in acx424akp_probe()
468 drm_panel_init(&acx->panel, dev, &acx424akp_drm_funcs, in acx424akp_probe()
471 acx->bl = devm_backlight_device_register(dev, "acx424akp", dev, acx, in acx424akp_probe()
473 if (IS_ERR(acx->bl)) { in acx424akp_probe()
475 return PTR_ERR(acx->bl); in acx424akp_probe()
477 acx->bl->props.max_brightness = 1023; in acx424akp_probe()
478 acx->bl->props.brightness = 512; in acx424akp_probe()
479 acx->bl->props.power = FB_BLANK_POWERDOWN; in acx424akp_probe()
481 drm_panel_add(&acx->panel); in acx424akp_probe()
485 drm_panel_remove(&acx->panel); in acx424akp_probe()
494 struct acx424akp *acx = mipi_dsi_get_drvdata(dsi); in acx424akp_remove() local
497 drm_panel_remove(&acx->panel); in acx424akp_remove()