Lines Matching defs:ps8622
85 static int ps8622_send_config(struct ps8622_bridge *ps8622)
87 struct i2c_client *cl = ps8622->client;
180 err = ps8622_set(cl, 0x01, 0x02, 0x80 | ps8622->max_lane_count);
185 err = ps8622_set(cl, 0x01, 0x21, 0x80 | ps8622->lane_count);
273 if (ps8622->bl) {
281 ps8622->bl->props.brightness);
326 struct ps8622_bridge *ps8622 = dev_get_drvdata(&bl->dev);
333 if (!ps8622->enabled)
336 ret = ps8622_set(ps8622->client, 0x01, 0xa7, brightness);
347 struct ps8622_bridge *ps8622 = bridge_to_ps8622(bridge);
350 if (ps8622->enabled)
353 gpiod_set_value(ps8622->gpio_rst, 0);
355 if (ps8622->v12) {
356 ret = regulator_enable(ps8622->v12);
358 DRM_ERROR("fails to enable ps8622->v12");
361 gpiod_set_value(ps8622->gpio_slp, 1);
365 * enable the lcd/ps8622 fet. T2 is the range of time in which the
376 gpiod_set_value(ps8622->gpio_rst, 1);
381 ret = ps8622_send_config(ps8622);
387 ps8622->enabled = true;
398 struct ps8622_bridge *ps8622 = bridge_to_ps8622(bridge);
400 if (!ps8622->enabled)
403 ps8622->enabled = false;
410 gpiod_set_value(ps8622->gpio_slp, 0);
412 if (ps8622->v12)
413 regulator_disable(ps8622->v12);
421 gpiod_set_value(ps8622->gpio_rst, 0);
429 struct ps8622_bridge *ps8622 = bridge_to_ps8622(bridge);
431 return drm_bridge_attach(ps8622->bridge.encoder, ps8622->panel_bridge,
432 &ps8622->bridge, flags);
443 {.compatible = "parade,ps8622",},
453 struct ps8622_bridge *ps8622;
458 ps8622 = devm_kzalloc(dev, sizeof(*ps8622), GFP_KERNEL);
459 if (!ps8622)
470 ps8622->panel_bridge = panel_bridge;
471 ps8622->client = client;
473 ps8622->v12 = devm_regulator_get(dev, "vdd12");
474 if (IS_ERR(ps8622->v12)) {
476 ps8622->v12 = NULL;
479 ps8622->gpio_slp = devm_gpiod_get(dev, "sleep", GPIOD_OUT_HIGH);
480 if (IS_ERR(ps8622->gpio_slp)) {
481 ret = PTR_ERR(ps8622->gpio_slp);
490 ps8622->gpio_rst = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
491 if (IS_ERR(ps8622->gpio_rst)) {
492 ret = PTR_ERR(ps8622->gpio_rst);
497 ps8622->max_lane_count = id->driver_data;
500 &ps8622->lane_count)) {
501 ps8622->lane_count = ps8622->max_lane_count;
502 } else if (ps8622->lane_count > ps8622->max_lane_count) {
505 ps8622->lane_count = ps8622->max_lane_count;
509 ps8622->bl = backlight_device_register("ps8622-backlight",
510 dev, ps8622, &ps8622_backlight_ops,
512 if (IS_ERR(ps8622->bl)) {
514 ret = PTR_ERR(ps8622->bl);
515 ps8622->bl = NULL;
518 ps8622->bl->props.max_brightness = PS8622_MAX_BRIGHTNESS;
519 ps8622->bl->props.brightness = PS8622_MAX_BRIGHTNESS;
522 ps8622->bridge.funcs = &ps8622_bridge_funcs;
523 ps8622->bridge.type = DRM_MODE_CONNECTOR_LVDS;
524 ps8622->bridge.of_node = dev->of_node;
525 drm_bridge_add(&ps8622->bridge);
527 i2c_set_clientdata(client, ps8622);
534 struct ps8622_bridge *ps8622 = i2c_get_clientdata(client);
536 backlight_device_unregister(ps8622->bl);
537 drm_bridge_remove(&ps8622->bridge);
544 {"ps8622", 1},
555 .name = "ps8622",
562 MODULE_DESCRIPTION("Parade ps8622/ps8625 eDP-LVDS converter driver");