Lines Matching refs:acx

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