Lines Matching defs:ps8622

84 static int ps8622_send_config(struct ps8622_bridge *ps8622)
86 struct i2c_client *cl = ps8622->client;
179 err = ps8622_set(cl, 0x01, 0x02, 0x80 | ps8622->max_lane_count);
184 err = ps8622_set(cl, 0x01, 0x21, 0x80 | ps8622->lane_count);
272 if (ps8622->bl) {
280 ps8622->bl->props.brightness);
325 struct ps8622_bridge *ps8622 = dev_get_drvdata(&bl->dev);
328 if (!ps8622->enabled)
331 ret = ps8622_set(ps8622->client, 0x01, 0xa7, brightness);
342 struct ps8622_bridge *ps8622 = bridge_to_ps8622(bridge);
345 if (ps8622->enabled)
348 gpiod_set_value(ps8622->gpio_rst, 0);
350 if (ps8622->v12) {
351 ret = regulator_enable(ps8622->v12);
353 DRM_ERROR("fails to enable ps8622->v12");
356 gpiod_set_value(ps8622->gpio_slp, 1);
360 * enable the lcd/ps8622 fet. T2 is the range of time in which the
371 gpiod_set_value(ps8622->gpio_rst, 1);
376 ret = ps8622_send_config(ps8622);
382 ps8622->enabled = true;
393 struct ps8622_bridge *ps8622 = bridge_to_ps8622(bridge);
395 if (!ps8622->enabled)
398 ps8622->enabled = false;
405 gpiod_set_value(ps8622->gpio_slp, 0);
407 if (ps8622->v12)
408 regulator_disable(ps8622->v12);
416 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_kzalloc(dev, sizeof(*ps8622), GFP_KERNEL);
453 if (!ps8622)
460 ps8622->panel_bridge = panel_bridge;
461 ps8622->client = client;
463 ps8622->v12 = devm_regulator_get(dev, "vdd12");
464 if (IS_ERR(ps8622->v12)) {
466 ps8622->v12 = NULL;
469 ps8622->gpio_slp = devm_gpiod_get(dev, "sleep", GPIOD_OUT_HIGH);
470 if (IS_ERR(ps8622->gpio_slp)) {
471 ret = PTR_ERR(ps8622->gpio_slp);
480 ps8622->gpio_rst = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
481 if (IS_ERR(ps8622->gpio_rst)) {
482 ret = PTR_ERR(ps8622->gpio_rst);
487 ps8622->max_lane_count = id->driver_data;
490 &ps8622->lane_count)) {
491 ps8622->lane_count = ps8622->max_lane_count;
492 } else if (ps8622->lane_count > ps8622->max_lane_count) {
495 ps8622->lane_count = ps8622->max_lane_count;
499 ps8622->bl = backlight_device_register("ps8622-backlight",
500 dev, ps8622, &ps8622_backlight_ops,
502 if (IS_ERR(ps8622->bl)) {
504 ret = PTR_ERR(ps8622->bl);
505 ps8622->bl = NULL;
508 ps8622->bl->props.max_brightness = PS8622_MAX_BRIGHTNESS;
509 ps8622->bl->props.brightness = PS8622_MAX_BRIGHTNESS;
512 ps8622->bridge.funcs = &ps8622_bridge_funcs;
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");