Re: [PATCH v8] drm/bridge: add it6505 driver

From: Hsin-Yi Wang
Date: Tue Aug 10 2021 - 07:39:01 EST


On Tue, Aug 10, 2021 at 7:31 PM allen <allen.chen@xxxxxxxxxx> wrote:
>
> This adds support for the iTE IT6505.
> This device can convert DPI signal to DP output.
>
> From: Allen Chen <allen.chen@xxxxxxxxxx>
> Tested-by: Hsin-yi Wang <hsinyi@xxxxxxxxxxxx>
> Signed-off-by: Hermes Wu <hermes.wu@xxxxxxxxxx>
> Signed-off-by: Allen Chen <allen.chen@xxxxxxxxxx>
>
--- <-- Add this line next time.
Add the change logs below this line so that they're not mixed with
commit messages.

> v7->v8:
> fixed "checkpatch --strict" error
> remove unused variable *edid
> remove mode_set() callback
> Documenting the individual bits of the interrupt mask values
> change it6505_dpcd_write parameter from unsigned long to u8
>
> This patch depends on https://patchwork.kernel.org/project/linux-mediatek/patch/20210722062246.2512666-4-sam@xxxxxxxxxxxx/
> ---
> drivers/gpu/drm/bridge/Kconfig | 8 +
> drivers/gpu/drm/bridge/Makefile | 1 +
> drivers/gpu/drm/bridge/ite-it6505.c | 3333 +++++++++++++++++++++++++++
> 3 files changed, 3342 insertions(+)
> create mode 100644 drivers/gpu/drm/bridge/ite-it6505.c
>
> diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig
> index 431b6e12a81fe..e1afe171075f5 100644
> --- a/drivers/gpu/drm/bridge/Kconfig
> +++ b/drivers/gpu/drm/bridge/Kconfig
> @@ -74,6 +74,14 @@ config DRM_DISPLAY_CONNECTOR
> on ARM-based platforms. Saying Y here when this driver is not needed
> will not cause any issue.
>
<snip>

> +
> + /* Register aux channel */
> + it6505->aux.name = "DP-AUX";
> + it6505->aux.dev = dev;
> + it6505->aux.transfer = it6505_aux_transfer;
> +
> + err = drm_dp_aux_register(&it6505->aux);

drm_dp_aux_register() checks if aux->drm_dev is null. Assign this
otherwise you'll see warnings.

> + if (err < 0) {
> + dev_err(dev, "Failed to register aux: %d", err);
> + return err;
> + }
<snip>