Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp5564005pxb; Mon, 28 Mar 2022 14:16:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJ2yC6yetOtN4kAeUuy+AXcBv+U68aMFoAu+ctmdcLK7sleLBYFxTQOxnpKDO5M2VZmVpx X-Received: by 2002:a05:620a:2807:b0:67d:6349:2577 with SMTP id f7-20020a05620a280700b0067d63492577mr17605897qkp.785.1648502217218; Mon, 28 Mar 2022 14:16:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648502217; cv=none; d=google.com; s=arc-20160816; b=Z54e1cWBHUKEqMnspYGVgTEpwsnV4PRmLR9i7rmJ0EZsJCe7pnrueieULM7GxmPLwP +VGA6HwDquzU/+/nUFTDVqoW9jGmCDNQ+dyNukHYnUJzI3ZGYjoOJdD3XAguO5Ekr6J7 HpHgDu+h5GwdCW+zMaKy1vtnrQ5q7TmV2kDREXY8qddLcUKhyUQmk41s3/ebo1qiTxUy u8SkTOhATs5BRbANSytyDiyc1LgqsRa7GsFa8TsD6AihtH6T7CRLpSJrgiMpkR/9BkHM XLPaENxPjL7M0UtTMJ5vvX06raudIzP8jcCFubxdj3y1D877CIwbO2FtYXDeJhTzFzd0 LLjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=iofjkRQu9YuFf8Q/IiIgNm4vk47csT3p+5V4tCrVoKo=; b=PsWnHNDlZIQ1lHQkQLpIwPhphMuAlBASVfZuj9+BWcMH3TyS9mOUHzdp0JR9jshnNc nRxl7NSTIGlB7+TtHOZOLvTVuJeOEEqOdXVNrXSnPrbCVmJK781vIsN+mtojRtH+eGK+ J6gXJhnFcKbYsI8tCxB/CXpmFj2L+EPOJetW5cR+lShKp45FmtJVVHLaIBQPFu3RiDj9 WN22jgpmZFY4jEATY1MBvp79joO/3TCBLhGXmLTXXbe5aYCak4SAzi+gFTz8IS6cincm niMcAbdNxw0KJYbPza3E4xizLKG0IxaCFj2hKJwZ0z65I0NsbndYnXHesWvwoRCCuye5 qyuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=LK9UqtwE; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id c64-20020a671c43000000b00324f1253325si3017206vsc.534.2022.03.28.14.16.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Mar 2022 14:16:57 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=LK9UqtwE; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id ADF3B793A8; Mon, 28 Mar 2022 14:07:12 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239269AbiC1IWW (ORCPT + 99 others); Mon, 28 Mar 2022 04:22:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239261AbiC1IWT (ORCPT ); Mon, 28 Mar 2022 04:22:19 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6059853A41; Mon, 28 Mar 2022 01:20:33 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: kholk11) with ESMTPSA id F14481F430ED DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1648455632; bh=HTtoc9TVDdHP3psxCeqfPiDHAPdGIinJmaM31VEeTWA=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=LK9UqtwE81DgNYCKdeZZSDBq8fnjasY1InKFW0p49+nBg8VyvJfeLlFKWGwRdgqPo gyTdxQ35jwwf7Ryf6Rr0ypstopk2UMgRSm2gmEoAnFA+f0WngNhF7a476V+LAjiD62 zxvdd2bmsi8g9kzd5JMwGAnRCWuLfwdA2GtTm29zEEwoQTjeXwzx9A8h7jWYIFz8Pj SvkLU3Z1og09N2W48A8GopEhM2Rnn114Sb7SL/BV5C8ePDGNuX0n0GLwPBnCpsErsn Nu9rXZmI02pbclGO4yfen05p65bbMarAM1Suxf00H0K/0u01Iv3g5irKmIkK2C8rwV 2Fh1x5iNAJ3dg== Message-ID: <4697e3af-86f7-83e0-1737-3f5000fc8d30@collabora.com> Date: Mon, 28 Mar 2022 10:20:27 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH v9 17/22] phy: phy-mtk-dp: Add driver for DP phy Content-Language: en-US To: Guillaume Ranquet , airlied@linux.ie, chunfeng.yun@mediatek.com, chunkuang.hu@kernel.org, ck.hu@mediatek.com, daniel@ffwll.ch, deller@gmx.de, jitao.shi@mediatek.com, kishon@ti.com, krzk+dt@kernel.org, maarten.lankhorst@linux.intel.com, matthias.bgg@gmail.com, mripard@kernel.org, p.zabel@pengutronix.de, robh+dt@kernel.org, tzimmermann@suse.de, vkoul@kernel.org Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-phy@lists.infradead.org, markyacoub@google.com, Markus Schneider-Pargmann References: <20220327223927.20848-1-granquet@baylibre.com> <20220327223927.20848-18-granquet@baylibre.com> From: AngeloGioacchino Del Regno In-Reply-To: <20220327223927.20848-18-granquet@baylibre.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Il 28/03/22 00:39, Guillaume Ranquet ha scritto: > From: Markus Schneider-Pargmann > > This is a new driver that supports the integrated DisplayPort phy for > mediatek SoCs, especially the mt8195. The phy is integrated into the > DisplayPort controller and will be created by the mtk-dp driver. This > driver expects a struct regmap to be able to work on the same registers > as the DisplayPort controller. It sets the device data to be the struct > phy so that the DisplayPort controller can easily work with it. > > The driver does not have any devicetree bindings because the datasheet > does not list the controller and the phy as distinct units. > > The interaction with the controller can be covered by the configure > callback of the phy framework and its displayport parameters. > > Signed-off-by: Markus Schneider-Pargmann > Signed-off-by: Guillaume Ranquet > --- > MAINTAINERS | 1 + > drivers/phy/mediatek/Kconfig | 8 ++ > drivers/phy/mediatek/Makefile | 1 + > drivers/phy/mediatek/phy-mtk-dp.c | 201 ++++++++++++++++++++++++++++++ > 4 files changed, 211 insertions(+) > create mode 100644 drivers/phy/mediatek/phy-mtk-dp.c > ..snip.. > diff --git a/drivers/phy/mediatek/phy-mtk-dp.c b/drivers/phy/mediatek/phy-mtk-dp.c > new file mode 100644 > index 000000000000..e5c5494f3636 > --- /dev/null > +++ b/drivers/phy/mediatek/phy-mtk-dp.c ..snip.. > + > +static int mtk_dp_phy_probe(struct platform_device *pdev) > +{ > + struct device *dev = &pdev->dev; > + struct mtk_dp_phy *dp_phy; > + struct phy *phy; > + struct regmap *regs; > + > + regs = syscon_regmap_lookup_by_phandle(dev->of_node, "mediatek,dp-syscon"); > + Please drop this blank line > + if (IS_ERR(regs)) > + return PTR_ERR(regs); > + > + dp_phy = devm_kzalloc(dev, sizeof(*dp_phy), GFP_KERNEL); > + if (!dp_phy) > + return -ENOMEM; > + > + dp_phy->regs = regs; > + > + phy = devm_phy_create(dev, NULL, &mtk_dp_phy_dev_ops); > + Same here > + if (IS_ERR(phy)) > + return dev_err_probe(dev, PTR_ERR(phy), "Failed to create DP PHY: %ld\n", PTR_ERR(phy)); > + Using dev_err_probe automates printing the error, so the correct usage is: return dev_err_probe(dev, PTR_ERR(phy), "Failed to create DP PHY\n"); > + phy_set_drvdata(phy, dp_phy); > + > + return 0; > +} > + > +struct platform_driver mtk_dp_phy_driver = { > + .probe = mtk_dp_phy_probe, > + .driver = { > + .name = "mediatek-dp-phy", > + }, > +}; > +module_platform_driver(mtk_dp_phy_driver); Also, in your dt-binding, you mention a compatible for this driver, but I don't see any, here. This means that you do know what to do, so please do it. Regards, Angelo > + > +MODULE_AUTHOR("Markus Schneider-Pargmann "); > +MODULE_DESCRIPTION("MediaTek DP PHY Driver"); > +MODULE_LICENSE("GPL");