From patchwork Mon Jul 15 14:01:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 11044247 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 410056C5 for ; Mon, 15 Jul 2019 14:08:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2E2811FE82 for ; Mon, 15 Jul 2019 14:08:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 22B3E1FF41; Mon, 15 Jul 2019 14:08:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BDBE81FE82 for ; Mon, 15 Jul 2019 14:08:10 +0000 (UTC) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id C2CA1EC4; Mon, 15 Jul 2019 14:07:33 +0000 (UTC) X-Original-To: cip-dev@lists.cip-project.org Delivered-To: cip-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id D2FAAEC3 for ; Mon, 15 Jul 2019 14:07:32 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by smtp1.linuxfoundation.org (Postfix) with ESMTP id 3AD1771C for ; Mon, 15 Jul 2019 14:07:32 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.62,493,1554735600"; d="scan'208";a="21231839" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 15 Jul 2019 23:07:32 +0900 Received: from be1yocto.ree.adwin.renesas.com (unknown [172.29.43.62]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 0784B4007551; Mon, 15 Jul 2019 23:07:30 +0900 (JST) From: Biju Das To: cip-dev@lists.cip-project.org Date: Mon, 15 Jul 2019 15:01:50 +0100 Message-Id: <1563199312-18842-11-git-send-email-biju.das@bp.renesas.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1563199312-18842-1-git-send-email-biju.das@bp.renesas.com> References: <1563199312-18842-1-git-send-email-biju.das@bp.renesas.com> Cc: Biju Das Subject: [cip-dev] [PATCH 4.19.y-cip 10/12] phy: renesas: rcar-gen3-usb2: Use pdev's device pointer on dev_vdbg() X-BeenThere: cip-dev@lists.cip-project.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: cip-dev-bounces@lists.cip-project.org Errors-To: cip-dev-bounces@lists.cip-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Yoshihiro Shimoda commit 92fec1c27caa7b6f2a70566625425190e14c2204 upstream. To implement multiple phy instances in the future, this patch uses pdev's device pointer on dev_vdbg() instead of the phy's device pointer. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman Reviewed-by: Fabrizio Castro Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Biju Das --- drivers/phy/renesas/phy-rcar-gen3-usb2.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c index 37cb619..40378da 100644 --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c @@ -83,6 +83,7 @@ struct rcar_gen3_chan { void __iomem *base; + struct device *dev; /* platform_device's device */ struct extcon_dev *extcon; struct phy *phy; struct regulator *vbus; @@ -123,7 +124,7 @@ static void rcar_gen3_set_host_mode(struct rcar_gen3_chan *ch, int host) void __iomem *usb2_base = ch->base; u32 val = readl(usb2_base + USB2_COMMCTRL); - dev_vdbg(&ch->phy->dev, "%s: %08x, %d\n", __func__, val, host); + dev_vdbg(ch->dev, "%s: %08x, %d\n", __func__, val, host); if (host) val &= ~USB2_COMMCTRL_OTG_PERI; else @@ -136,7 +137,7 @@ static void rcar_gen3_set_linectrl(struct rcar_gen3_chan *ch, int dp, int dm) void __iomem *usb2_base = ch->base; u32 val = readl(usb2_base + USB2_LINECTRL1); - dev_vdbg(&ch->phy->dev, "%s: %08x, %d, %d\n", __func__, val, dp, dm); + dev_vdbg(ch->dev, "%s: %08x, %d, %d\n", __func__, val, dp, dm); val &= ~(USB2_LINECTRL1_DP_RPD | USB2_LINECTRL1_DM_RPD); if (dp) val |= USB2_LINECTRL1_DP_RPD; @@ -150,7 +151,7 @@ static void rcar_gen3_enable_vbus_ctrl(struct rcar_gen3_chan *ch, int vbus) void __iomem *usb2_base = ch->base; u32 val = readl(usb2_base + USB2_ADPCTRL); - dev_vdbg(&ch->phy->dev, "%s: %08x, %d\n", __func__, val, vbus); + dev_vdbg(ch->dev, "%s: %08x, %d\n", __func__, val, vbus); if (vbus) val |= USB2_ADPCTRL_DRVVBUS; else @@ -410,7 +411,7 @@ static irqreturn_t rcar_gen3_phy_usb2_irq(int irq, void *_ch) irqreturn_t ret = IRQ_NONE; if (status & USB2_OBINT_BITS) { - dev_vdbg(&ch->phy->dev, "%s: %08x\n", __func__, status); + dev_vdbg(ch->dev, "%s: %08x\n", __func__, status); writel(USB2_OBINT_BITS, usb2_base + USB2_OBINTSTA); rcar_gen3_device_recognition(ch); ret = IRQ_HANDLED; @@ -529,6 +530,7 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev) platform_set_drvdata(pdev, channel); phy_set_drvdata(channel->phy, channel); + channel->dev = dev; provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate); if (IS_ERR(provider)) {