From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BDDE9C433F5 for ; Mon, 25 Oct 2021 07:27:20 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 83A1C60273 for ; Mon, 25 Oct 2021 07:27:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 83A1C60273 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cGBhA2bx7yUZ/Nn9Z7WAxBPgO0UUx7W1keOFcSZiAJ4=; b=I5EBu9Kzyacxmi vKBefDPz4VkCRetSQZ8ElU0F5RtNhtNMrJlNx/zfhhkVqIqdD5cbrjX8O406Uh0EZHGziE27D+cxC e4ldraM5ASt9Iy5fDjW8V9mfHeeDqbYeybBHYRbC+ojJgDgaGz3ajdWgCwfMjq4Qr22KJsHcYfJl/ D5yIjuakILW0Q6C5/wb49ZK3N4+/F9yZ8Wl0fLnqWhprV75aXOtea8nTnsoYmJbEAMi66SKDASBtC HnbtLZzUZobUkKartrOaqXiqrncd/CGwRLGMd4l4Ozi9B8fRNCw3wtmsws3qpTqT7DRONkENOpSOy qkR9EKXfjERjlLOT5AFg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1meuMW-00Fbhj-74; Mon, 25 Oct 2021 07:25:41 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1meuHI-00Fa16-Ib; Mon, 25 Oct 2021 07:20:18 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id EF61660724; Mon, 25 Oct 2021 07:20:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1635146415; bh=oTmkGUaMrUls5+nCfH+wzzIwXOCcij7+t4UXotfvygc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NBBnUm5h4gqghZDyGBMFXofipnhDcGhosPJFd1wDxuNdR8Y3iJTNIfaycs/CXyeEk Pg1TjT/dDF6z6yziPGqO9eYMRx1Xh5kc35qEqRyYuFcAf4ExWCxzNb4OpkbLKLcNm/ YtwCSwNicUdpsVC1qNrsQeqqSpX3eDl8xTFq8964WT60svGjv17G5F8epkoteciX0b MDM9z53DyMs+3WNInJXoi6s6gnPPCVCSK1aiEI/S/eH/G9jBfGky62ppl5JD2QDNuR 1SsxwHagc6UmJGtIr7NVHonkZQ3/Su10jESG+wPPrb4BXYK2qNGgplVBxx+vICxTTo CCz4zW7iHKanw== Date: Mon, 25 Oct 2021 12:50:11 +0530 From: Vinod Koul To: Markus Schneider-Pargmann Cc: Chun-Kuang Hu , Philipp Zabel , Rob Herring , Sam Ravnborg , dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org Subject: Re: [PATCH v5 6/7] phy: phy-mtk-dp: Add driver for DP phy Message-ID: References: <20211021092707.3562523-1-msp@baylibre.com> <20211021092707.3562523-7-msp@baylibre.com> <20211022130636.ncqisltwsvkkc7cg@blmsp> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211022130636.ncqisltwsvkkc7cg@blmsp> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211025_002016_701276_D704264C X-CRM114-Status: GOOD ( 24.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 22-10-21, 15:06, Markus Schneider-Pargmann wrote: > > > + dp_phy->regs = *(struct regmap **)dev->platform_data; > > > + if (!dp_phy->regs) { > > > + dev_err(dev, "No data passed, requires struct regmap**\n"); > > > + return -EINVAL; > > > + } > > > > is there a reason to do it this way? Why not set the IORESOURCE_MEM for > > this device and let the driver map here? > > > > NO clocks? > > As briefly mentioned in the commit message, this phy is not a dedicated > phy. It is embedded in the DisplayPort controller that is added in patch > 7 of this series. The registerspace of the DisplayPort controller starts > at offset 0x0, continues with 0x1000 for PHY related functions and goes > on with encoder related and other registers at 0x2000, 0x3000 and > 0x4000. > > As this seems to me to be a single function block (also from what I read > from the datasheet), I designed the binding documentation so that the > DisplayPort controller starts at 0x0 and spans all registers. Based on > that I wanted to share the regmap created in the DisplayPort controller > with this PHY driver that is a direct child of that driver, similar to > multi function device drivers. > > That also means that the PHY does not have any clocks it requires as it > only exists in the context of the DisplayPort controller. I could pass > the same clocks to the PHY, but the use of these clocks does not make > any difference. Okay, that sounds sensible > As I don't have a piece of devicetree, I struggled with using phy_get > as, if I understand it correctly, it uses the devicetree to find the > correct PHY device? Not really, device tree is one of the backends phy_get() relies on. If you are having issues, then chances are there are bugs somewhere or usage is incorrect > Do you have a suggestion on how I could improve this interaction between > DP controller and PHY? Maybe some driver that I could look at that has > similar constraints? I would say use phy_get() and fix if we have any issues around it, that should make it much cleaner to use -- ~Vinod _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel