Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752368AbdLMJJt (ORCPT ); Wed, 13 Dec 2017 04:09:49 -0500 Received: from mail-lf0-f66.google.com ([209.85.215.66]:39779 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752310AbdLMJJn (ORCPT ); Wed, 13 Dec 2017 04:09:43 -0500 X-Google-Smtp-Source: ACJfBos0JOB+qtXuW6NU3e37/wF7KatSqEMN+76Pdr7ko2Hntwyuf+ZpIrfAdCoI//0Kiubz3sFSug== Subject: Re: [PATCH 2/5] phy: renesas: rcar-gen3-usb2: unify OBINTEN handling To: Yoshihiro Shimoda , kishon@ti.com, robh+dt@kernel.org, mark.rutland@arm.com Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org References: <1513146460-20326-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> <1513146460-20326-3-git-send-email-yoshihiro.shimoda.uh@renesas.com> From: Sergei Shtylyov Message-ID: <7e7953b2-e94d-ded8-2278-6259a1457881@cogentembedded.com> Date: Wed, 13 Dec 2017 12:09:40 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <1513146460-20326-3-git-send-email-yoshihiro.shimoda.uh@renesas.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1251 Lines: 41 Hello! On 12/13/2017 9:27 AM, Yoshihiro Shimoda wrote: > This patch unifies the OBINTEN handling to clean-up the code. > > Signed-off-by: Yoshihiro Shimoda > --- > drivers/phy/renesas/phy-rcar-gen3-usb2.c | 23 +++++++++++++++-------- > 1 file changed, 15 insertions(+), 8 deletions(-) > > diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c > index c22d65a..beeaa30 100644 > --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c > +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c > @@ -147,6 +147,18 @@ static void rcar_gen3_enable_vbus_ctrl(struct rcar_gen3_chan *ch, int vbus) > writel(val, usb2_base + USB2_ADPCTRL); > } > > +static void rcar_gen3_enable_otg_irq(struct rcar_gen3_chan *ch, int enable) If it both enables and disables, rcar_gen3_control_otg_irq() would seem a better name... > +{ > + void __iomem *usb2_base = ch->base; > + u32 val = readl(usb2_base + USB2_OBINTEN); > + > + if (enable) > + val |= USB2_OBINT_BITS; > + else > + val &= ~USB2_OBINT_BITS; > + writel(val, usb2_base + USB2_OBINTEN); > +} > + > static void rcar_gen3_init_for_host(struct rcar_gen3_chan *ch) > { > rcar_gen3_set_linectrl(ch, 1, 1); [...] MBR, Sergei