Lines Matching +full:- +full:75 +full:mv
1 // SPDX-License-Identifier: GPL-2.0-only
67 struct i2c_adapter *adap = client->adapter;
71 msg.addr = client->addr + page;
79 client->addr + page, reg, val, ret);
85 struct i2c_client *cl = ps8622->client;
136 /* [7:5] DCO_FTRNG=+-40% */
146 /* Gitune=-37% */
161 /* RPIO Setting: [7:4] LVDS driver bias current : 75% (250mV swing) */
166 /* [7:6] Right-bar GPIO output strength is 8mA */
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);
289 /* Set LVDS output as 6bit-VESA mapping, single LVDS channel */
299 /* Set SSC enabled and +/-1% central spreading */
310 /* LC -> RCO */
319 return err ? -EIO : 0;
324 struct ps8622_bridge *ps8622 = dev_get_drvdata(&bl->dev);
327 if (!ps8622->enabled)
328 return -EINVAL;
330 ret = ps8622_set(ps8622->client, 0x01, 0xa7, brightness);
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);
370 gpiod_set_value(ps8622->gpio_rst, 1);
381 ps8622->enabled = true;
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);
425 return drm_bridge_attach(ps8622->bridge.encoder, ps8622->panel_bridge,
426 &ps8622->bridge, flags);
446 struct device *dev = &client->dev;
453 return -ENOMEM;
455 panel_bridge = devm_drm_of_get_bridge(dev, dev->of_node, 0, 0);
459 ps8622->panel_bridge = panel_bridge;
460 ps8622->client = client;
462 ps8622->v12 = devm_regulator_get(dev, "vdd12");
463 if (IS_ERR(ps8622->v12)) {
465 ps8622->v12 = NULL;
468 ps8622->gpio_slp = devm_gpiod_get(dev, "sleep", GPIOD_OUT_HIGH);
469 if (IS_ERR(ps8622->gpio_slp)) {
470 ret = PTR_ERR(ps8622->gpio_slp);
479 ps8622->gpio_rst = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
480 if (IS_ERR(ps8622->gpio_rst)) {
481 ret = PTR_ERR(ps8622->gpio_rst);
486 ps8622->max_lane_count = id->driver_data;
488 if (of_property_read_u32(dev->of_node, "lane-count",
489 &ps8622->lane_count)) {
490 ps8622->lane_count = ps8622->max_lane_count;
491 } else if (ps8622->lane_count > ps8622->max_lane_count) {
492 dev_info(dev, "lane-count property is too high,"
494 ps8622->lane_count = ps8622->max_lane_count;
497 if (!of_property_read_bool(dev->of_node, "use-external-pwm")) {
498 ps8622->bl = backlight_device_register("ps8622-backlight",
501 if (IS_ERR(ps8622->bl)) {
503 ret = PTR_ERR(ps8622->bl);
504 ps8622->bl = NULL;
507 ps8622->bl->props.max_brightness = PS8622_MAX_BRIGHTNESS;
508 ps8622->bl->props.brightness = PS8622_MAX_BRIGHTNESS;
511 ps8622->bridge.funcs = &ps8622_bridge_funcs;
512 ps8622->bridge.type = DRM_MODE_CONNECTOR_LVDS;
513 ps8622->bridge.of_node = dev->of_node;
514 drm_bridge_add(&ps8622->bridge);
525 backlight_device_unregister(ps8622->bl);
526 drm_bridge_remove(&ps8622->bridge);
549 MODULE_DESCRIPTION("Parade ps8622/ps8625 eDP-LVDS converter driver");