Lines Matching refs:ps8622
83 static int ps8622_send_config(struct ps8622_bridge *ps8622)
85 struct i2c_client *cl = ps8622->client;
178 err = ps8622_set(cl, 0x01, 0x02, 0x80 | ps8622->max_lane_count);
183 err = ps8622_set(cl, 0x01, 0x21, 0x80 | ps8622->lane_count);
271 if (ps8622->bl) {
279 ps8622->bl->props.brightness);
324 struct ps8622_bridge *ps8622 = dev_get_drvdata(&bl->dev);
327 if (!ps8622->enabled)
330 ret = ps8622_set(ps8622->client, 0x01, 0xa7, brightness);
341 struct ps8622_bridge *ps8622 = bridge_to_ps8622(bridge);
344 if (ps8622->enabled)
347 gpiod_set_value(ps8622->gpio_rst, 0);
349 if (ps8622->v12) {
350 ret = regulator_enable(ps8622->v12);
352 DRM_ERROR("fails to enable ps8622->v12");
355 gpiod_set_value(ps8622->gpio_slp, 1);
359 * enable the lcd/ps8622 fet. T2 is the range of time in which the
370 gpiod_set_value(ps8622->gpio_rst, 1);
375 ret = ps8622_send_config(ps8622);
381 ps8622->enabled = true;
392 struct ps8622_bridge *ps8622 = bridge_to_ps8622(bridge);
394 if (!ps8622->enabled)
397 ps8622->enabled = false;
404 gpiod_set_value(ps8622->gpio_slp, 0);
406 if (ps8622->v12)
407 regulator_disable(ps8622->v12);
415 gpiod_set_value(ps8622->gpio_rst, 0);
424 struct ps8622_bridge *ps8622 = bridge_to_ps8622(bridge);
426 return drm_bridge_attach(ps8622->bridge.encoder, ps8622->panel_bridge,
427 &ps8622->bridge, flags);
438 {.compatible = "parade,ps8622",},
448 struct ps8622_bridge *ps8622;
452 ps8622 = devm_drm_bridge_alloc(dev, struct ps8622_bridge, bridge,
454 if (IS_ERR(ps8622))
455 return PTR_ERR(ps8622);
461 ps8622->panel_bridge = panel_bridge;
462 ps8622->client = client;
464 ps8622->v12 = devm_regulator_get(dev, "vdd12");
465 if (IS_ERR(ps8622->v12)) {
467 ps8622->v12 = NULL;
470 ps8622->gpio_slp = devm_gpiod_get(dev, "sleep", GPIOD_OUT_HIGH);
471 if (IS_ERR(ps8622->gpio_slp)) {
472 ret = PTR_ERR(ps8622->gpio_slp);
481 ps8622->gpio_rst = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
482 if (IS_ERR(ps8622->gpio_rst)) {
483 ret = PTR_ERR(ps8622->gpio_rst);
488 ps8622->max_lane_count = id->driver_data;
491 &ps8622->lane_count)) {
492 ps8622->lane_count = ps8622->max_lane_count;
493 } else if (ps8622->lane_count > ps8622->max_lane_count) {
496 ps8622->lane_count = ps8622->max_lane_count;
500 ps8622->bl = backlight_device_register("ps8622-backlight",
501 dev, ps8622, &ps8622_backlight_ops,
503 if (IS_ERR(ps8622->bl)) {
505 ret = PTR_ERR(ps8622->bl);
506 ps8622->bl = NULL;
509 ps8622->bl->props.max_brightness = PS8622_MAX_BRIGHTNESS;
510 ps8622->bl->props.brightness = PS8622_MAX_BRIGHTNESS;
513 ps8622->bridge.type = DRM_MODE_CONNECTOR_LVDS;
514 ps8622->bridge.of_node = dev->of_node;
515 drm_bridge_add(&ps8622->bridge);
517 i2c_set_clientdata(client, ps8622);
524 struct ps8622_bridge *ps8622 = i2c_get_clientdata(client);
526 backlight_device_unregister(ps8622->bl);
527 drm_bridge_remove(&ps8622->bridge);
532 {"ps8622", 1},
543 .name = "ps8622",
550 MODULE_DESCRIPTION("Parade ps8622/ps8625 eDP-LVDS converter driver");