Lines Matching +full:dp +full:- +full:bridge

1 // SPDX-License-Identifier: GPL-2.0-only
3 * CrOS EC ANX7688 HDMI->DP bridge driver
38 struct drm_bridge bridge; member
43 bridge_to_cros_ec_anx7688(struct drm_bridge *bridge) in bridge_to_cros_ec_anx7688() argument
45 return container_of(bridge, struct cros_ec_anx7688, bridge); in bridge_to_cros_ec_anx7688()
48 static bool cros_ec_anx7688_bridge_mode_fixup(struct drm_bridge *bridge, in cros_ec_anx7688_bridge_mode_fixup() argument
52 struct cros_ec_anx7688 *anx = bridge_to_cros_ec_anx7688(bridge); in cros_ec_anx7688_bridge_mode_fixup()
58 if (!anx->filter) in cros_ec_anx7688_bridge_mode_fixup()
62 ret = regmap_bulk_read(anx->regmap, ANX7688_DP_BANDWIDTH_REG, regs, 2); in cros_ec_anx7688_bridge_mode_fixup()
81 requiredbw = mode->clock * 8 * 3; in cros_ec_anx7688_bridge_mode_fixup()
83 DRM_DEBUG_KMS("DP bandwidth: %d kHz (%02x/%d); mode requires %d Khz\n", in cros_ec_anx7688_bridge_mode_fixup()
100 struct device *dev = &client->dev; in cros_ec_anx7688_bridge_probe()
108 return -ENOMEM; in cros_ec_anx7688_bridge_probe()
110 anx7688->client = client; in cros_ec_anx7688_bridge_probe()
113 anx7688->regmap = devm_regmap_init_i2c(client, &cros_ec_anx7688_regmap_config); in cros_ec_anx7688_bridge_probe()
114 if (IS_ERR(anx7688->regmap)) { in cros_ec_anx7688_bridge_probe()
115 ret = PTR_ERR(anx7688->regmap); in cros_ec_anx7688_bridge_probe()
121 ret = regmap_bulk_read(anx7688->regmap, ANX7688_VENDOR_ID_REG, in cros_ec_anx7688_bridge_probe()
133 return -ENODEV; in cros_ec_anx7688_bridge_probe()
136 ret = regmap_bulk_read(anx7688->regmap, ANX7688_FW_VERSION_REG, in cros_ec_anx7688_bridge_probe()
146 anx7688->bridge.of_node = dev->of_node; in cros_ec_anx7688_bridge_probe()
150 anx7688->filter = true; in cros_ec_anx7688_bridge_probe()
156 anx7688->bridge.funcs = &cros_ec_anx7688_bridge_funcs; in cros_ec_anx7688_bridge_probe()
157 drm_bridge_add(&anx7688->bridge); in cros_ec_anx7688_bridge_probe()
166 drm_bridge_remove(&anx7688->bridge); in cros_ec_anx7688_bridge_remove()
170 { .compatible = "google,cros-ec-anx7688" },
179 .name = "cros-ec-anx7688-bridge",
186 MODULE_DESCRIPTION("ChromeOS EC ANX7688 HDMI->DP bridge driver");