From patchwork Tue Dec 5 20:13:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 750687 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5A8BF6DD09; Tue, 5 Dec 2023 20:13:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Gk97RPpI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 50268C433CB; Tue, 5 Dec 2023 20:13:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701807224; bh=sjzE8QZ8uXSlrXNRxh0UBUKR87kmK2KHZp2G4Sxqhrs=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Gk97RPpIZ8GZ9TGjd2N5pqzscHAF0ogln/+b3jPehBDG29/0nLH776NEkNBgWoAmO tIwksCtSc8w6g6zPLQ1rKFjfq4PFtMBqCXUfkCYTjfWFncR5RFE16XqhM2utRpAR9a 8SNcMWweKweAPG9n9BRD+iBsTaVzOn+PvnzcRB+h83Q//P8fl9dDKR3GAtF4edaQjJ sCGv1uPoL7IesyASP3lG5rI958Bt+SiiVq6QeYw6aRY4ooEBeYUNrykl8FkY9zt73u bmFyPgHf9sh6vsdP7GkR3dUcPQGJsOSFqT/qq/CCvmOmUL5D4smRrMgJaPei0FraSH 71DETylH3Peww== From: Nathan Chancellor Date: Tue, 05 Dec 2023 13:13:34 -0700 Subject: [PATCH 1/3] usb: typec: nb7vpq904m: Only select DRM_AUX_BRIDGE with OF Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20231205-drm_aux_bridge-fixes-v1-1-d242a0ae9df4@kernel.org> References: <20231205-drm_aux_bridge-fixes-v1-0-d242a0ae9df4@kernel.org> In-Reply-To: <20231205-drm_aux_bridge-fixes-v1-0-d242a0ae9df4@kernel.org> To: dmitry.baryshkov@linaro.org Cc: heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org, linux@roeck-us.net, neil.armstrong@linaro.org, bryan.odonoghue@linaro.org, linux-usb@vger.kernel.org, dri-devel@lists.freedesktop.org, patches@lists.linux.dev, Nathan Chancellor X-Mailer: b4 0.13-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1345; i=nathan@kernel.org; h=from:subject:message-id; bh=sjzE8QZ8uXSlrXNRxh0UBUKR87kmK2KHZp2G4Sxqhrs=; b=owGbwMvMwCUmm602sfCA1DTG02pJDKn5LeV7nCdxCa7boyh86aeRbD3TLZ2QnKfKe6sW9k+em JRqcqy1o5SFQYyLQVZMkaX6sepxQ8M5ZxlvnJoEM4eVCWQIAxenAEzEcRHD/0wZN4PYy1f9nY4k 6DhnWgkGMf1j/fqsevePvXov3/kd+cHI8Nz7zxddA/Yp59UVdCbGfsk55/Mn5fNqffX7NnuZPtu e5QAA X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 CONFIG_DRM_AUX_BRIDGE depends on CONFIG_OF but that dependency is not included when CONFIG_TYPEC_MUX_NB7VPQ904M selects it, resulting in a Kconfig warning when CONFIG_OF is disabled: WARNING: unmet direct dependencies detected for DRM_AUX_BRIDGE Depends on [n]: HAS_IOMEM [=y] && DRM_BRIDGE [=y] && OF [=n] Selected by [y]: - TYPEC_MUX_NB7VPQ904M [=y] && USB_SUPPORT [=y] && TYPEC [=y] && I2C [=y] && (DRM [=y] || DRM [=y]=n) && DRM_BRIDGE [=y] Only select CONFIG_DRM_AUX_BRIDGE with both CONFIG_DRM_BRIDGE and CONFIG_OF to clear up the warning. Fixes: c5d296bad640 ("usb: typec: nb7vpq904m: switch to DRM_AUX_BRIDGE") Signed-off-by: Nathan Chancellor Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus --- drivers/usb/typec/mux/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/typec/mux/Kconfig b/drivers/usb/typec/mux/Kconfig index 5120942f309d..38416fb0cc3c 100644 --- a/drivers/usb/typec/mux/Kconfig +++ b/drivers/usb/typec/mux/Kconfig @@ -40,7 +40,7 @@ config TYPEC_MUX_NB7VPQ904M tristate "On Semiconductor NB7VPQ904M Type-C redriver driver" depends on I2C depends on DRM || DRM=n - select DRM_AUX_BRIDGE if DRM_BRIDGE + select DRM_AUX_BRIDGE if DRM_BRIDGE && OF select REGMAP_I2C help Say Y or M if your system has a On Semiconductor NB7VPQ904M Type-C From patchwork Tue Dec 5 20:13:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 752483 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D85E76DD12; Tue, 5 Dec 2023 20:13:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BvFqtazG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 09D60C433CC; Tue, 5 Dec 2023 20:13:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701807225; bh=Qsn40tjxGnHVFA1jtVU5KxpxGSX5I9OlgqeJmtQV+pE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=BvFqtazGHji0TaHDeq1hSb6lnVDQzR/XRr/aw1IpvJ64L61Vr+hL+kfsuIsj93qqI Tvby1wYvoqxhyvf78+b7Dv8u/WpPrBMyn/v5eDXzSI9edmiNwaAi9q3TIEK+azmFRM tIapLI1hnGdzx0/XBukZ3tJe+dhrdRWx0imR+WDifaqVuN0KcX1kgAIX1Lgsq/VHGQ kho0Jms0T/hx/5n+0c0lTkobYe54tPennEDHETCUty67FmqwdvHIfj0lvRuMqWXB2g eUa8IxT6P897xe/4C9Rcc+/lMXKWX1gaMWc/P6JdVoMxuT8PEsPKwn9irrI47tAJLl kPMlHTi9hwkrA== From: Nathan Chancellor Date: Tue, 05 Dec 2023 13:13:35 -0700 Subject: [PATCH 2/3] usb: typec: qcom-pmic-typec: Only select DRM_AUX_HPD_BRIDGE with OF Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20231205-drm_aux_bridge-fixes-v1-2-d242a0ae9df4@kernel.org> References: <20231205-drm_aux_bridge-fixes-v1-0-d242a0ae9df4@kernel.org> In-Reply-To: <20231205-drm_aux_bridge-fixes-v1-0-d242a0ae9df4@kernel.org> To: dmitry.baryshkov@linaro.org Cc: heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org, linux@roeck-us.net, neil.armstrong@linaro.org, bryan.odonoghue@linaro.org, linux-usb@vger.kernel.org, dri-devel@lists.freedesktop.org, patches@lists.linux.dev, Nathan Chancellor X-Mailer: b4 0.13-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1470; i=nathan@kernel.org; h=from:subject:message-id; bh=Qsn40tjxGnHVFA1jtVU5KxpxGSX5I9OlgqeJmtQV+pE=; b=owGbwMvMwCUmm602sfCA1DTG02pJDKn5LeX7k668cWGadpD1xd1SwQwRroSIKvMFJ1UzGoV5f 2fw3VzXUcrCIMbFICumyFL9WPW4oeGcs4w3Tk2CmcPKBDKEgYtTACZSz87wz9rOnzdYZe69Y467 Xv8/XjBndU/iPON3ZpGsEdpG56J1DzL8M9wwdeLqPznW9hYpysU6YV7bNTRfivr8SWQNW2XcX2X FCwA= X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 CONFIG_DRM_AUX_HPD_BRIDGE depends on CONFIG_OF but that dependency is not included when CONFIG_TYPEC_QCOM_PMIC selects it, resulting in a Kconfig warning when CONFIG_OF is disabled: WARNING: unmet direct dependencies detected for DRM_AUX_HPD_BRIDGE Depends on [n]: HAS_IOMEM [=y] && DRM_BRIDGE [=y] && OF [=n] Selected by [m]: - TYPEC_QCOM_PMIC [=m] && USB_SUPPORT [=y] && TYPEC [=m] && TYPEC_TCPM [=m] && (ARCH_QCOM || COMPILE_TEST [=y]) && (DRM [=m] || DRM [=m]=n) && DRM_BRIDGE [=y] Only select CONFIG_DRM_AUX_HPD_BRIDGE with both CONFIG_DRM_BRIDGE and CONFIG_OF to clear up the warning. Fixes: 7d9f1b72b296 ("usb: typec: qcom-pmic-typec: switch to DRM_AUX_HPD_BRIDGE") Signed-off-by: Nathan Chancellor --- drivers/usb/typec/tcpm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/typec/tcpm/Kconfig b/drivers/usb/typec/tcpm/Kconfig index 64d5421c69e6..8cdd84ca5d6f 100644 --- a/drivers/usb/typec/tcpm/Kconfig +++ b/drivers/usb/typec/tcpm/Kconfig @@ -80,7 +80,7 @@ config TYPEC_QCOM_PMIC tristate "Qualcomm PMIC USB Type-C Port Controller Manager driver" depends on ARCH_QCOM || COMPILE_TEST depends on DRM || DRM=n - select DRM_AUX_HPD_BRIDGE if DRM_BRIDGE + select DRM_AUX_HPD_BRIDGE if DRM_BRIDGE && OF help A Type-C port and Power Delivery driver which aggregates two discrete pieces of silicon in the PM8150b PMIC block: the From patchwork Tue Dec 5 20:13:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 750686 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 164CF61FC4; Tue, 5 Dec 2023 20:13:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JQCLrElW" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B7D50C433C8; Tue, 5 Dec 2023 20:13:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701807226; bh=dIROEkvo2Gg0VYeHSqM2xywwQJJxQH5RhW1JkLyvtWA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=JQCLrElWpENPuaglK0pVPSbbFIJ0pOeO16T9QAE1VwuFVEbpVcqPj4hwaSKkLsb+V T7MN2D2V22KXDI8UUu91p1I6eDSOPwaPFkAgvMG9yUGcIPKHf4Zby0Moa8/lNa4s3H ZSt62UwqKjv7xF56lXZKMZPdEb+5rHRmqpVmT3JQvlrueq4/T960ctl3eRftok89HJ 8FF7Mjzn2Sd0D+92Uap16Nek1LihQVhYITLtZ1sC26I8BVg7obDUTp3UTI06o/u8Ai h7eFcIRz85wb0m+Q8w9ivO1xKoRkeFTfqWuvZt8JPQzksiI+74HydRzmd7DVtb834H Y46JmPyKRtlkg== From: Nathan Chancellor Date: Tue, 05 Dec 2023 13:13:36 -0700 Subject: [PATCH 3/3] drm/bridge: Return NULL instead of plain 0 in drm_dp_hpd_bridge_register() stub Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20231205-drm_aux_bridge-fixes-v1-3-d242a0ae9df4@kernel.org> References: <20231205-drm_aux_bridge-fixes-v1-0-d242a0ae9df4@kernel.org> In-Reply-To: <20231205-drm_aux_bridge-fixes-v1-0-d242a0ae9df4@kernel.org> To: dmitry.baryshkov@linaro.org Cc: heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org, linux@roeck-us.net, neil.armstrong@linaro.org, bryan.odonoghue@linaro.org, linux-usb@vger.kernel.org, dri-devel@lists.freedesktop.org, patches@lists.linux.dev, kernel test robot , Nathan Chancellor X-Mailer: b4 0.13-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1151; i=nathan@kernel.org; h=from:subject:message-id; bh=dIROEkvo2Gg0VYeHSqM2xywwQJJxQH5RhW1JkLyvtWA=; b=owGbwMvMwCUmm602sfCA1DTG02pJDKn5LeVpGnVr72+cF7xbef/BhYHuWU6J3Gwthed+rXc3F C0wOafVUcrCIMbFICumyFL9WPW4oeGcs4w3Tk2CmcPKBDKEgYtTACYSKsTIsGOtzpY2/rxVV3LO 1G79Vq8mV+XoHFt9es+FO5k3FWq+1TIyPJ17Pl37quq+9Qu8A67PufrJ4mpJ3Tm7nw5d73QcvH8 HcwAA X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 sparse complains: drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c: note: in included file: include/drm/bridge/aux-bridge.h:29:16: sparse: sparse: Using plain integer as NULL pointer Return NULL to clear up the warning. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312060025.BdeqZrWx-lkp@intel.com/ Fixes: e560518a6c2e ("drm/bridge: implement generic DP HPD bridge") Signed-off-by: Nathan Chancellor Reviewed-by: Guenter Roeck Reviewed-by: Bryan O'Donoghue --- include/drm/bridge/aux-bridge.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/drm/bridge/aux-bridge.h b/include/drm/bridge/aux-bridge.h index 66249ff0858e..c4c423e97f06 100644 --- a/include/drm/bridge/aux-bridge.h +++ b/include/drm/bridge/aux-bridge.h @@ -26,7 +26,7 @@ void drm_aux_hpd_bridge_notify(struct device *dev, enum drm_connector_status sta static inline struct device *drm_dp_hpd_bridge_register(struct device *parent, struct device_node *np) { - return 0; + return NULL; } static inline void drm_aux_hpd_bridge_notify(struct device *dev, enum drm_connector_status status)