From patchwork Fri Jan 10 12:31:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13934444 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 48C46E77188 for ; Fri, 10 Jan 2025 12:32:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4CBF610F096; Fri, 10 Jan 2025 12:32:01 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="FVomrzev"; dkim-atps=neutral Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by gabe.freedesktop.org (Postfix) with ESMTPS id C3B3810E0C8 for ; Fri, 10 Jan 2025 12:31:59 +0000 (UTC) Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-30036310158so15372121fa.0 for ; Fri, 10 Jan 2025 04:31:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736512318; x=1737117118; darn=lists.freedesktop.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=pu+t3eGEK8ZKk4cbdeq2Wt6p9hR7Yq831BJnA041QI0=; b=FVomrzevUYS5mJ3RV+M/zT9I/gZEmEIaL6dp97z1FiVcoWZxKV8GlCwPOfv3vq+3Jb nXEc+pXkWFiUhlRYajLpRE+3Fu70SuVEC9mGGFA90HyFbijxvnZcrpTCcVtcBoHzgrwF iI6r41Rqnhxo/DkgEA2qNYGcLr61tC9q5uNgfJl8CXHRuANdWqB6Tw4ClnniQaWLHeJy cyRrS41HsPi0fu6IYvaTvolPv+gtep2lVFtXNoCx2mxK/NwWf3deXdwXWUNSdHhZaKQd Bfgy2M5HMZzPP2UAxI8THM98CotZel5gc3yKpgay0z2q5KZzIZvgOR3MR9F8rr7IUS3Z kwXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736512318; x=1737117118; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pu+t3eGEK8ZKk4cbdeq2Wt6p9hR7Yq831BJnA041QI0=; b=uiH5t7GD45VmFFW0hisKMZgrTYhdYCRQDN3nWlxoBZBucAGMNhL/BNudzXziDGpv6m gorufU8qaBUp0vaCGky1Jpgq1q/gxTKNpevdLE7Wku/x3pLrUkMXPP2pMLlTWU0/ImlO ie7dA0mBFiXdvXMF/hYFFmyeQOMALkGXnmRkHXSD1bvk/iFH5Iwh7rmrMha4nOfOLk+P k94mQ1Q1rgVb7weznZy7GSl/tFJdnH2K6OiDh6DbpKfbL3QmbeGo0Y1Tkk8vFjyh9IYG YsXCNoBGRIkYM2a3B5cW5wk0HjEdh+YJ01HIu+eggsfQyfOvrs9n4tPuXsWilXIYX5C1 JBsg== X-Forwarded-Encrypted: i=1; AJvYcCUIb8FVhYcnmSGXDCF/5czdkI77OAT/8dyjammkRqfWo51b646ixDxtIzn2vcYIMhzQU4cs5gJed3I=@lists.freedesktop.org X-Gm-Message-State: AOJu0YyjOQCoi6DGOTcMexyvwAQcM/qIKP7T7jLw+LR/IRrPFu/UbGJL 0PSPUuN+ICYcnmjkVaVxF+9ioGC/AyJIm0YFIzBMGpaVxaX0S3hoNoyRIrD8Mf8= X-Gm-Gg: ASbGncvlvJvf85tikB2ijTpNwsnh9yclXqYg9w5FXrSEUeL7Yegs2TXhvq/TVAX0GgU 7seFgeuqIsYDoS524Lu4bX7xxQelZadOVXTyPWYqVIzyrhEo1n6kip3+VNjGl7B2CLpcXGUK1a4 Js71YZ3l00Xp3oOZWA4ZKKO0KESCIyIQthM6dIsh2F0KMNuhC0CyaIIWoZf27aShvHsRcjIBl3y LyH25PPUUZ8Wm5+YRcBSWuMPiam9xqvHB9XsV6HuDB2gPU5Xu/N4LzHNK3Ztt0a X-Google-Smtp-Source: AGHT+IHIqxOyaNaQN2BbTx5w9qm3mPKfSMMsxEhtpOB8wpjQpkZW05iGwIzfb5VpPrzZMnxU/eo2ow== X-Received: by 2002:a05:651c:1a0c:b0:300:322e:6a with SMTP id 38308e7fff4ca-305f45aed51mr34797561fa.23.1736512317990; Fri, 10 Jan 2025 04:31:57 -0800 (PST) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-305ff0cedafsm4720691fa.29.2025.01.10.04.31.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jan 2025 04:31:57 -0800 (PST) From: Dmitry Baryshkov Date: Fri, 10 Jan 2025 14:31:53 +0200 Subject: [PATCH v2 1/3] drm/i2c: tda998x: drop support for platform_data MIME-Version: 1.0 Message-Id: <20250110-drm-move-tda998x-v2-1-ef2ae5832d21@linaro.org> References: <20250110-drm-move-tda998x-v2-0-ef2ae5832d21@linaro.org> In-Reply-To: <20250110-drm-move-tda998x-v2-0-ef2ae5832d21@linaro.org> To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Liviu Dudau , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Russell King , Hans Verkuil , Mauro Carvalho Chehab Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, Laurent Pinchart X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=5039; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=ynoYEf8e255Bg4jgwwDTCT/Dnh62RtjqpzCFJ2/k3Vs=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBngRM8LT2PCkJ7DKSTs3koimwKHNVTXiPHe9Tfa KflWlY3FruJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZ4ETPAAKCRCLPIo+Aiko 1cFHB/9ziikfq/rWdcHX+v+rI9cm13Q1bzq5NuebkB3/EUtKi7J8WNQqOvl9fQIbix4A01x0Sl1 oLy855x2xdcOsKws3KrDfzzVjmP1dnftx5x1iJOkV3laaPEFS1O39FFKMSlAPwhlZ+SL4wddGDb SX8mCjz09HVmGYVhO1pDNg+RyAyTRMjHIuW1FULp+rKYmofnSuZ+EwGgw9KQ0B1AMpqjX5/2Cbv rBuT47VvM2fKlZmRVp3Tu+XzfBrF8HfogpGt/hIwJuCGqiaMVIIl/7BdB1Fsq6gYy/qvtEzRB6B G5G0gatX1q6jLqOwkijn3bnYSFWe3soChcbhgSxl3FBqClCS X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" After the commit 0fb2970b4b6b ("drm/armada: remove non-component support") there are no remaining users of the struct tda998x_encoder_params. Drop the header and corresponding API from the TDA998x driver. Reviewed-by: Laurent Pinchart Signed-off-by: Dmitry Baryshkov --- MAINTAINERS | 1 - drivers/gpu/drm/i2c/tda998x_drv.c | 49 ++++----------------------------------- include/drm/i2c/tda998x.h | 40 -------------------------------- 3 files changed, 4 insertions(+), 86 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index a3566163f1cbd583b8fdb7f2f18d5289263adc31..223eb6bfd0579768c246dcc51831048627fb8d02 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -17046,7 +17046,6 @@ S: Maintained T: git git://git.armlinux.org.uk/~rmk/linux-arm.git drm-tda998x-devel T: git git://git.armlinux.org.uk/~rmk/linux-arm.git drm-tda998x-fixes F: drivers/gpu/drm/i2c/tda998x_drv.c -F: include/drm/i2c/tda998x.h F: include/dt-bindings/display/tda998x.h K: "nxp,tda998x" diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c index 82d4a4e206a584e045a8fcd593fc12b7c1257bfe..ebc758c72891188e236d4da0cde283f108d80aca 100644 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c @@ -21,10 +21,11 @@ #include #include #include -#include #include +#include + #define DBG(fmt, ...) DRM_DEBUG(fmt"\n", ##__VA_ARGS__) enum { @@ -1717,10 +1718,10 @@ static int tda998x_get_audio_ports(struct tda998x_priv *priv, u8 ena_ap = be32_to_cpup(&port_data[2*i+1]); switch (afmt) { - case AFMT_I2S: + case TDA998x_I2S: route = AUDIO_ROUTE_I2S; break; - case AFMT_SPDIF: + case TDA998x_SPDIF: route = AUDIO_ROUTE_SPDIF; break; default: @@ -1746,44 +1747,6 @@ static int tda998x_get_audio_ports(struct tda998x_priv *priv, return 0; } -static int tda998x_set_config(struct tda998x_priv *priv, - const struct tda998x_encoder_params *p) -{ - priv->vip_cntrl_0 = VIP_CNTRL_0_SWAP_A(p->swap_a) | - (p->mirr_a ? VIP_CNTRL_0_MIRR_A : 0) | - VIP_CNTRL_0_SWAP_B(p->swap_b) | - (p->mirr_b ? VIP_CNTRL_0_MIRR_B : 0); - priv->vip_cntrl_1 = VIP_CNTRL_1_SWAP_C(p->swap_c) | - (p->mirr_c ? VIP_CNTRL_1_MIRR_C : 0) | - VIP_CNTRL_1_SWAP_D(p->swap_d) | - (p->mirr_d ? VIP_CNTRL_1_MIRR_D : 0); - priv->vip_cntrl_2 = VIP_CNTRL_2_SWAP_E(p->swap_e) | - (p->mirr_e ? VIP_CNTRL_2_MIRR_E : 0) | - VIP_CNTRL_2_SWAP_F(p->swap_f) | - (p->mirr_f ? VIP_CNTRL_2_MIRR_F : 0); - - if (p->audio_params.format != AFMT_UNUSED) { - unsigned int ratio, route; - bool spdif = p->audio_params.format == AFMT_SPDIF; - - route = AUDIO_ROUTE_I2S + spdif; - - priv->audio.route = &tda998x_audio_route[route]; - priv->audio.cea = p->audio_params.cea; - priv->audio.sample_rate = p->audio_params.sample_rate; - memcpy(priv->audio.status, p->audio_params.status, - min(sizeof(priv->audio.status), - sizeof(p->audio_params.status))); - priv->audio.ena_ap = p->audio_params.config; - priv->audio.i2s_format = I2S_FORMAT_PHILIPS; - - ratio = spdif ? 64 : p->audio_params.sample_width * 2; - return tda998x_derive_cts_n(priv, &priv->audio, ratio); - } - - return 0; -} - static void tda998x_destroy(struct device *dev) { struct tda998x_priv *priv = dev_get_drvdata(dev); @@ -1982,10 +1945,6 @@ static int tda998x_create(struct device *dev) if (priv->audio_port_enable[AUDIO_ROUTE_I2S] || priv->audio_port_enable[AUDIO_ROUTE_SPDIF]) tda998x_audio_codec_init(priv, &client->dev); - } else if (dev->platform_data) { - ret = tda998x_set_config(priv, dev->platform_data); - if (ret) - goto fail; } priv->bridge.funcs = &tda998x_bridge_funcs; diff --git a/include/drm/i2c/tda998x.h b/include/drm/i2c/tda998x.h deleted file mode 100644 index 3cb25ccbe5e68bf95ce13249f15549b7e2582281..0000000000000000000000000000000000000000 --- a/include/drm/i2c/tda998x.h +++ /dev/null @@ -1,40 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#ifndef __DRM_I2C_TDA998X_H__ -#define __DRM_I2C_TDA998X_H__ - -#include -#include - -enum { - AFMT_UNUSED = 0, - AFMT_SPDIF = TDA998x_SPDIF, - AFMT_I2S = TDA998x_I2S, -}; - -struct tda998x_audio_params { - u8 config; - u8 format; - unsigned sample_width; - unsigned sample_rate; - struct hdmi_audio_infoframe cea; - u8 status[5]; -}; - -struct tda998x_encoder_params { - u8 swap_b:3; - u8 mirr_b:1; - u8 swap_a:3; - u8 mirr_a:1; - u8 swap_d:3; - u8 mirr_d:1; - u8 swap_c:3; - u8 mirr_c:1; - u8 swap_f:3; - u8 mirr_f:1; - u8 swap_e:3; - u8 mirr_e:1; - - struct tda998x_audio_params audio_params; -}; - -#endif From patchwork Fri Jan 10 12:31:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13934445 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 678B1E77188 for ; Fri, 10 Jan 2025 12:33:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DE57910E500; Fri, 10 Jan 2025 12:33:02 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="KeHzNfpj"; dkim-atps=neutral Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) by gabe.freedesktop.org (Postfix) with ESMTPS id 07D2910E500 for ; Fri, 10 Jan 2025 12:33:02 +0000 (UTC) Received: by mail-lj1-f180.google.com with SMTP id 38308e7fff4ca-306007227d3so13767261fa.0 for ; Fri, 10 Jan 2025 04:33:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736512320; x=1737117120; darn=lists.freedesktop.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=LNqcxeemu0dTYtSJZLx7nl127aYJDaVFq9hJPsyhj4k=; b=KeHzNfpjGAUepm+5djX5ThIKD/+3ZAbiLCSenlm0iCJmvnzo2utYZfxmdZyIA+hyfK 2tRKl0z1C7Tm9Rn0tUpsApUfANlwGMGBiClN6A16/fjCCpVtLJpaT83e5xjRrtPoMQxc ShpDaIcR9qp2PrgtrSykVsLfZ3+jYRmofeU6n49yQQ2b0OpzVJjv+7MaGKHeVjzR+XjW mSqGd3WNuaTqtBfBFDO4PboTQKl7A31cVuP2TzlHpFhZiMHNVkewJhd7hza0wqgpENkJ PFPPSzFeDB1SwsYanMIRHtDTT7gph1/xIzQGucSItYHb6D+GkuGPNjDlas7jteAjRZRd srmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736512320; x=1737117120; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LNqcxeemu0dTYtSJZLx7nl127aYJDaVFq9hJPsyhj4k=; b=GJnMBWRhvjTcwlzx3y0dHsigk2PoGqqb9jJ1nD2ySL1+8JEVGOL2G/A7j4NwZlKzCb LmamlAz6MNG1N/GhXua5/8JS1P44lmVj5IOx25dw5xoYw0eNX8GoYHjMMkQW8HVTH9zq MNlcCKNVFiydHLzoQzDl33aVuBjmyXSas9XiOl3L0dKfY4sl/KWGyCRhpJYOtlT/G31a 5U5XTdahHy++btPe/e9HOxVvtjNVmhm54YjPyEV7BIyfXgsACARewJfkiUk646pBIXMx /ngXckocomEvHwIpPpRxc3OIEZSmi+Rcf4XBZkmTmGwNFZuSt9PinFh2AkYl53HueTiI zvHA== X-Forwarded-Encrypted: i=1; AJvYcCUeAnTceGkhhFopCcKVYww/U912YA/w0xROowXHjZ6X/osx6M6Tg8LmM6MzzTew1YYHtJR5YuKQCaM=@lists.freedesktop.org X-Gm-Message-State: AOJu0Yzj6aB0k5b9ou264577EI3O/tErWx4AJOY3Dz4PKm+PfXKvRnIh YLPxmnI2zXBX5dLvEScm+5Xb4Pq0A/jUm/6ufAkj8t/ejkKTSj6pcRR1vZVoZuY= X-Gm-Gg: ASbGncvxLyJwAeQlh2lWAy4q5qH02nQxLBToxzrGlh5FzDK7bnO3+dUepx0YMNy+ak/ A8xKfDQZKu9ahDGK0lJRambezkUMVYaFB7smle9AKaICeTg7HNt/tLrFo1c/0EGSfoGeGn6PXcV Y+pznE3NOGQw+8T3z3eGPT8CqvWn8bSjJPZupwqG6OLUgv2LG6ilA95+rEQbTO7nw4EtaThCMzh 467m55QiR25SE33wx5ElUAptQahT/sQT1njAmszMBnCQ6Bvu0anrCxgHjvJI+pF X-Google-Smtp-Source: AGHT+IHpCKgjAmWJKiXDpM6QD6fFZBeaBe5TuPx/yke+1hwwlNLWjhZffdT0BC9t/x6+79dRRNucFQ== X-Received: by 2002:a05:651c:221a:b0:300:38ff:f8d9 with SMTP id 38308e7fff4ca-305f4533083mr26808201fa.3.1736512320358; Fri, 10 Jan 2025 04:32:00 -0800 (PST) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-305ff0cedafsm4720691fa.29.2025.01.10.04.31.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jan 2025 04:31:59 -0800 (PST) From: Dmitry Baryshkov Date: Fri, 10 Jan 2025 14:31:54 +0200 Subject: [PATCH v2 2/3] media: cec: move driver for TDA9950 from drm/i2c MIME-Version: 1.0 Message-Id: <20250110-drm-move-tda998x-v2-2-ef2ae5832d21@linaro.org> References: <20250110-drm-move-tda998x-v2-0-ef2ae5832d21@linaro.org> In-Reply-To: <20250110-drm-move-tda998x-v2-0-ef2ae5832d21@linaro.org> To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Liviu Dudau , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Russell King , Hans Verkuil , Mauro Carvalho Chehab Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2936; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=8laCO1G6C22Qn5+rN+sCPt76jMJ4MGhNPQxJk96BxX4=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBngRM8PZfvrJ3WUN4XrAgEELpTl91x/xncm8aZ/ NQ1/RMTwOqJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZ4ETPAAKCRCLPIo+Aiko 1T1MB/4y9YgyIHmTdSzZpNz5olrK+8CNKOizShHvjLGlppR0+W+ax17g3FhL7KY98otV0YORhmo Sw3GHeT/2j3q6C7ptJekboAfZsTCndAeNaVbGFwwRIpQCkRsC0bxm0Z3/WZO1EmO6+0aD/+TKY3 iybvwPOa8A5/wxZzeFLH/jNecwdDMdPkE4r4X/8WdzRQwV/1ogiMDPqrOSAcCrlEkjsNw2qOjzN uy00+Gk8M3J5QYgSAIumS9vL6O0AmcMJ7YOKFnBDJQZw6SkfiNOeEclMupSieWgTL+GX2N+NRVR z/+QeClMiNv5z6SXEm6oDk9tMiDgjQPrOPOdLhyWxb3C6KdL X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Move the driver for NXP TDA9950 / CEC part of TDA998x together to drivers/media/i2c, close to other CEC drivers. Specify 'default DRM_I2C_NXP_TDA998X' in order to simplify migration from old config files as the Kconfig name has been changed to follow media/cec style. Signed-off-by: Dmitry Baryshkov Acked-by: Hans Verkuil --- drivers/gpu/drm/i2c/Kconfig | 5 ----- drivers/gpu/drm/i2c/Makefile | 1 - drivers/media/cec/i2c/Kconfig | 9 +++++++++ drivers/media/cec/i2c/Makefile | 1 + drivers/{gpu/drm => media/cec}/i2c/tda9950.c | 0 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i2c/Kconfig b/drivers/gpu/drm/i2c/Kconfig index d5200f67958e68a8ec73401f1d3b79cbe0aa303d..1aa2a0bf5cc183b4ce92fc4f7eb61fd0065250d1 100644 --- a/drivers/gpu/drm/i2c/Kconfig +++ b/drivers/gpu/drm/i2c/Kconfig @@ -10,9 +10,4 @@ config DRM_I2C_NXP_TDA998X help Support for NXP Semiconductors TDA998X HDMI encoders. -config DRM_I2C_NXP_TDA9950 - tristate "NXP Semiconductors TDA9950/TDA998X HDMI CEC" - select CEC_NOTIFIER - select CEC_CORE - endmenu diff --git a/drivers/gpu/drm/i2c/Makefile b/drivers/gpu/drm/i2c/Makefile index 31fd35527d99d7eb23851d290175a3ff0c756772..45791fbfae983eecf58565109cf8eecb6431643b 100644 --- a/drivers/gpu/drm/i2c/Makefile +++ b/drivers/gpu/drm/i2c/Makefile @@ -1,4 +1,3 @@ # SPDX-License-Identifier: GPL-2.0 tda998x-y := tda998x_drv.o obj-$(CONFIG_DRM_I2C_NXP_TDA998X) += tda998x.o -obj-$(CONFIG_DRM_I2C_NXP_TDA9950) += tda9950.o diff --git a/drivers/media/cec/i2c/Kconfig b/drivers/media/cec/i2c/Kconfig index d912d143fb3129c6b3d0133dbfceffdd48bd543d..b9d21643eef1892ccff508b1864db30e83570212 100644 --- a/drivers/media/cec/i2c/Kconfig +++ b/drivers/media/cec/i2c/Kconfig @@ -13,3 +13,12 @@ config CEC_CH7322 generic CEC framework interface. CEC bus is present in the HDMI connector and enables communication between compatible devices. + +config CEC_NXP_TDA9950 + tristate "NXP Semiconductors TDA9950/TDA998X HDMI CEC" + select CEC_NOTIFIER + select CEC_CORE + default DRM_I2C_NXP_TDA998X + help + This is a driver for the NXP TDA9950 CEC controller and for the CEC + controller block integrated into several NXP TDA998x HDMI encoders. diff --git a/drivers/media/cec/i2c/Makefile b/drivers/media/cec/i2c/Makefile index d7496dfd0fa49631299ff56c20e946757e50cdb2..95c9eda5258361c4d9196acb527e0c1b4351dbe0 100644 --- a/drivers/media/cec/i2c/Makefile +++ b/drivers/media/cec/i2c/Makefile @@ -3,3 +3,4 @@ # Makefile for the CEC I2C device drivers. # obj-$(CONFIG_CEC_CH7322) += ch7322.o +obj-$(CONFIG_CEC_NXP_TDA9950) += tda9950.o diff --git a/drivers/gpu/drm/i2c/tda9950.c b/drivers/media/cec/i2c/tda9950.c similarity index 100% rename from drivers/gpu/drm/i2c/tda9950.c rename to drivers/media/cec/i2c/tda9950.c From patchwork Fri Jan 10 12:31:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13934446 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 73EE8E7719C for ; Fri, 10 Jan 2025 12:33:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D974E10F084; Fri, 10 Jan 2025 12:33:05 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="KmsHaL98"; dkim-atps=neutral Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) by gabe.freedesktop.org (Postfix) with ESMTPS id 93BBA10F084 for ; Fri, 10 Jan 2025 12:33:04 +0000 (UTC) Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-54026562221so2048837e87.1 for ; Fri, 10 Jan 2025 04:33:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736512323; x=1737117123; darn=lists.freedesktop.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=hiEWcElxhZTK73TnXgswdyP6JxZMw7F27l1xnn3hpWk=; b=KmsHaL98Gvwf8yoJ4Szh9WfORMKLqAKjTjOXooaL7DF/DhE87ZQV6CsLZin3cdQC9k yieFsRjx9t/eJyUH4A98KwhH0EfSEBFzMmCaLWQqhoQaVDHr163rdb9Kwa5lgIGLursY DZn4khu96VIF8ZDlsjgzbpEEtNShMgWPEdZYG5pDkqddgfxZGME2CJ4XkwRnfDec/dgL MxMIbLcc2yVIl51hkXWIPKZSOtVslXI/dK03JUzFDPZc2kqVaGGTrzDMSHih1kx2x9/W AN4sm+TSLfT/EUyHtwgLVwQdWhRLrTJeSJhuo1sNNrrfsKxTqzShvmtGlawokCpETg99 aBcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736512323; x=1737117123; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hiEWcElxhZTK73TnXgswdyP6JxZMw7F27l1xnn3hpWk=; b=Id5V2zqkdXXomglfTs+2xMO1cdGzX3YNeTm1DlVs5rCYMq1MMZWAhQeOzOAnsu2X22 QipNdrGdlVOlPUu4RszXZKaCeRn0vPKHSCZoqSYWCZCmUylf4iM1CllB03U2EWXN5iiX fNYkQxIt5/73TSxnghtutcO4G55Xn02KvJFbK3itR/RxvJAfuzL2qrBOZWe6xdQ7kFcg JprcpHOCuzfrktJCLtNdpedOoqKTlLz9hqplDLW/9n6HE3QHuzJq9h8PzeAdUn/AxaLt fxVREODQhTdWKfuX2UneGvJK1xHIVjQRXptN0dVoMLSk0e6SVgTzcxC/OGrThW8AOVe5 tvhw== X-Forwarded-Encrypted: i=1; AJvYcCVgz9cJjT86IC+qh6aWGD1NOd+K0ux86gE+5SJD4LD2pO2AyFke7kDwSzan4DePIvO04qrs9p75oLY=@lists.freedesktop.org X-Gm-Message-State: AOJu0YzO4kn6+tcVdFb+H337UR44X/QkYy+RI12R8RuHvCTgEQ5Yow3r jynK6PA8pSARgTnSjK3vJQYwG0vpEfchuc6mA5a652t7LY6p8W5tBLXJud61zjI= X-Gm-Gg: ASbGncsk/X96iNLJI7bpiQK1GiqcUgJ/PKUpMgOHijY7FpOwqEgjlnCD3OIGRoCdSk1 Wjdlt/MsFAgknOkuinU0iOwV52wzzQcGkfJi77GxCFhke7kmBvwCK8maMM6iE1qZRNix0gQ9AIc MeKHVzHnoYY2NCHnxUdarzoRhJNuyDTamJwL3hdQz0vItZ+HUpbZHv6wItv8+tKzkHhy798+XPq f095ACNgq3+XGh1/h65WvuPe7Q2vtrN4vVPnP1/WzyicYqE8We7kJHmDLyjrZeT X-Google-Smtp-Source: AGHT+IHDSOgExi0q9r6Qp60KV0c5WHDnz8FIQrxe1koxDTMIZtWbTmGKRVyZC0HDHCHMKRyp+Z0SjA== X-Received: by 2002:a05:651c:1a0c:b0:2fc:9622:794b with SMTP id 38308e7fff4ca-305f45a4294mr31226241fa.24.1736512322679; Fri, 10 Jan 2025 04:32:02 -0800 (PST) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-305ff0cedafsm4720691fa.29.2025.01.10.04.32.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jan 2025 04:32:01 -0800 (PST) From: Dmitry Baryshkov Date: Fri, 10 Jan 2025 14:31:55 +0200 Subject: [PATCH v2 3/3] drm/i2c: move TDA drivers under drivers/gpu/drm/bridge MIME-Version: 1.0 Message-Id: <20250110-drm-move-tda998x-v2-3-ef2ae5832d21@linaro.org> References: <20250110-drm-move-tda998x-v2-0-ef2ae5832d21@linaro.org> In-Reply-To: <20250110-drm-move-tda998x-v2-0-ef2ae5832d21@linaro.org> To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Liviu Dudau , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Russell King , Hans Verkuil , Mauro Carvalho Chehab Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, Laurent Pinchart X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=4898; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=g+7ytvieuvI7RKTOj/q24QGGdISGbPrB0TEqnLrOfZk=; b=owGbwMvMwMXYbdNlx6SpcZXxtFoSQ3qjsE0c92aDhzJ7Yv13+amIte8Pn708fZ1ERGhtM9M3N zbF6X86GY1ZGBi5GGTFFFl8ClqmxmxKDvuwY2o9zCBWJpApDFycAjARxbns/xN+Z3QWbFrlw68o GTldfeuBh+I+fL/UU23C4ifv9j7YevdqVQmf8Z8Pk3r61UvmMnbNKTsRandK/9c/FxtF+6eL/Q7 93aAZIcjz/0rF7PwPU26HM75c+TfrdXCAtNnT3Jn7e+ez9//J+WmcuqztR3M7X3LSUtdN5kanRU OD3ntvU/vtfe90kHXYcv3SVSo85nwqPi6fzCLfbr5y8PDi2F3TIkqyg5eZX7rg8iNyl5m4VuP0x 6cWrubJOuns7Lcp7L1u6IVnhl2nZCM8kvdtt5h86EGChLjOyaLkpcmsAlbaSh28PiKCzzVcLu/y MDHgTW+YbDt9Zt9ZxgrLNTWJN++vyXhazzLL7+MF7oxyAA== X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" TDA998x is the HDMI bridge driver, incorporating drm_connector and optional drm_encoder (created via the component bind API by the TICLDC and HDLCD drivers). Thus it should be residing together with the other DRM bridge drivers under drivers/gpu/drm/bridge/. TDA9950 is an I2C-CEC translator, being present on-die on the TDA9989 and TDA19989 chips, so it is being instantiated by the TDA998x driver. Move it together with the TDA998x under bridge drivers subdir. Acked-by: Neil Armstrong Acked-by: Liviu Dudau Reviewed-by: Laurent Pinchart Signed-off-by: Dmitry Baryshkov --- MAINTAINERS | 2 +- drivers/gpu/drm/arm/Kconfig | 1 + drivers/gpu/drm/bridge/Kconfig | 8 ++++++++ drivers/gpu/drm/bridge/Makefile | 4 ++++ drivers/gpu/drm/{i2c => bridge}/tda998x_drv.c | 0 drivers/gpu/drm/i2c/Kconfig | 13 ------------- drivers/gpu/drm/i2c/Makefile | 3 --- 7 files changed, 14 insertions(+), 17 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 223eb6bfd0579768c246dcc51831048627fb8d02..7a15fb49c2905dcba7bc08f03abe12bd7f493f84 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -17045,7 +17045,7 @@ M: Russell King S: Maintained T: git git://git.armlinux.org.uk/~rmk/linux-arm.git drm-tda998x-devel T: git git://git.armlinux.org.uk/~rmk/linux-arm.git drm-tda998x-fixes -F: drivers/gpu/drm/i2c/tda998x_drv.c +F: drivers/gpu/drm/bridge/tda998x_drv.c F: include/dt-bindings/display/tda998x.h K: "nxp,tda998x" diff --git a/drivers/gpu/drm/arm/Kconfig b/drivers/gpu/drm/arm/Kconfig index c901ac00c0c3a8f356bd53d97305c6b39b3e6662..ed3ed617c6884876368c8bd072c53f1b710df443 100644 --- a/drivers/gpu/drm/arm/Kconfig +++ b/drivers/gpu/drm/arm/Kconfig @@ -9,6 +9,7 @@ config DRM_HDLCD select DRM_CLIENT_SELECTION select DRM_KMS_HELPER select DRM_GEM_DMA_HELPER + select DRM_BRIDGE # for TDA998x help Choose this option if you have an ARM High Definition Colour LCD controller. diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index 6b4664d91faa80f096ac6a0548ed342e802ae68b..d20f1646dac27898ecb7599a9a06663357dcca14 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -90,6 +90,14 @@ config DRM_FSL_LDB help Support for i.MX8MP DPI-to-LVDS on-SoC encoder. +config DRM_I2C_NXP_TDA998X + tristate "NXP Semiconductors TDA998X HDMI encoder" + default m if DRM_TILCDC + select CEC_CORE if CEC_NOTIFIER + select SND_SOC_HDMI_CODEC if SND_SOC + help + Support for NXP Semiconductors TDA998X HDMI encoders. + config DRM_ITE_IT6263 tristate "ITE IT6263 LVDS/HDMI bridge" depends on OF diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile index 97304b429a530c108dcbff906965cda091b0a7a2..245e8a27e3fc525ffe02103e4436c71313f55d9a 100644 --- a/drivers/gpu/drm/bridge/Makefile +++ b/drivers/gpu/drm/bridge/Makefile @@ -6,6 +6,10 @@ obj-$(CONFIG_DRM_CHRONTEL_CH7033) += chrontel-ch7033.o obj-$(CONFIG_DRM_CROS_EC_ANX7688) += cros-ec-anx7688.o obj-$(CONFIG_DRM_DISPLAY_CONNECTOR) += display-connector.o obj-$(CONFIG_DRM_FSL_LDB) += fsl-ldb.o + +tda998x-y := tda998x_drv.o +obj-$(CONFIG_DRM_I2C_NXP_TDA998X) += tda998x.o + obj-$(CONFIG_DRM_ITE_IT6263) += ite-it6263.o obj-$(CONFIG_DRM_ITE_IT6505) += ite-it6505.o obj-$(CONFIG_DRM_LONTIUM_LT8912B) += lontium-lt8912b.o diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/bridge/tda998x_drv.c similarity index 100% rename from drivers/gpu/drm/i2c/tda998x_drv.c rename to drivers/gpu/drm/bridge/tda998x_drv.c diff --git a/drivers/gpu/drm/i2c/Kconfig b/drivers/gpu/drm/i2c/Kconfig deleted file mode 100644 index 1aa2a0bf5cc183b4ce92fc4f7eb61fd0065250d1..0000000000000000000000000000000000000000 --- a/drivers/gpu/drm/i2c/Kconfig +++ /dev/null @@ -1,13 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -menu "I2C encoder or helper chips" - depends on DRM && DRM_KMS_HELPER && I2C - -config DRM_I2C_NXP_TDA998X - tristate "NXP Semiconductors TDA998X HDMI encoder" - default m if DRM_TILCDC - select CEC_CORE if CEC_NOTIFIER - select SND_SOC_HDMI_CODEC if SND_SOC - help - Support for NXP Semiconductors TDA998X HDMI encoders. - -endmenu diff --git a/drivers/gpu/drm/i2c/Makefile b/drivers/gpu/drm/i2c/Makefile deleted file mode 100644 index 45791fbfae983eecf58565109cf8eecb6431643b..0000000000000000000000000000000000000000 --- a/drivers/gpu/drm/i2c/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0 -tda998x-y := tda998x_drv.o -obj-$(CONFIG_DRM_I2C_NXP_TDA998X) += tda998x.o