Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751342AbdLNJsQ (ORCPT ); Thu, 14 Dec 2017 04:48:16 -0500 Received: from relmlor4.renesas.com ([210.160.252.174]:10739 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750825AbdLNJsN (ORCPT ); Thu, 14 Dec 2017 04:48:13 -0500 X-IronPort-AV: E=Sophos;i="5.45,400,1508770800"; d="scan'208";a="266375186" From: Yoshihiro Shimoda To: Sergei Shtylyov , "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" Subject: RE: [PATCH 2/5] phy: renesas: rcar-gen3-usb2: unify OBINTEN handling Thread-Topic: [PATCH 2/5] phy: renesas: rcar-gen3-usb2: unify OBINTEN handling Thread-Index: AQHTc9wTLWc/P4UK/kyZqG9yQwoKrqNA/H4AgAGcDOA= Date: Thu, 14 Dec 2017 09:48:08 +0000 Message-ID: References: <1513146460-20326-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> <1513146460-20326-3-git-send-email-yoshihiro.shimoda.uh@renesas.com> <7e7953b2-e94d-ded8-2278-6259a1457881@cogentembedded.com> In-Reply-To: <7e7953b2-e94d-ded8-2278-6259a1457881@cogentembedded.com> Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=yoshihiro.shimoda.uh@renesas.com; x-originating-ip: [211.11.155.139] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;TY1PR06MB0989;20:rG2uXI2EuCia+nVxHHUdqZqMFsqw3BP8vqIhewHBM0eumXDvgtflnCr/pA/UGKDQX8ZD7T77FWnG9IoaLDBA5Ci+qS0IevsdTsN3fcJEfMahx8GSZqXIJB/6dftYmrd5VrpdNjI/jiCLZ4rniRsqvmxyvWscHcQ3ypDGGyugd2M= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 4e21aca7-c988-4df6-a4bc-08d542d7c821 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(48565401081)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307);SRVR:TY1PR06MB0989; x-ms-traffictypediagnostic: TY1PR06MB0989: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040450)(2401047)(8121501046)(5005006)(3002001)(10201501046)(3231023)(93006095)(93001095)(6055026)(6041248)(20161123555025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123558100)(20161123562025)(6072148)(201708071742011);SRVR:TY1PR06MB0989;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:TY1PR06MB0989; x-forefront-prvs: 05214FD68E x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(346002)(366004)(39860400002)(376002)(24454002)(189003)(199004)(7696005)(14454004)(2501003)(3280700002)(6436002)(478600001)(86362001)(105586002)(68736007)(106356001)(5660300001)(53546011)(25786009)(4326008)(2950100002)(6506007)(110136005)(54906003)(316002)(97736004)(99286004)(76176011)(55016002)(2900100001)(8936002)(102836003)(3846002)(345774005)(33656002)(53936002)(6246003)(9686003)(81156014)(8676002)(2906002)(77096006)(3660700001)(7736002)(305945005)(229853002)(81166006)(74316002)(230783001)(6116002)(66066001);DIR:OUT;SFP:1102;SCL:1;SRVR:TY1PR06MB0989;H:TY1PR06MB0992.apcprd06.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4e21aca7-c988-4df6-a4bc-08d542d7c821 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Dec 2017 09:48:08.4124 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY1PR06MB0989 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id vBE9mLvS001711 Content-Length: 1612 Lines: 52 Hello! > From: Sergei Shtylyov, Sent: Wednesday, December 13, 2017 6:10 PM > > 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... Thank you for the comment! I think so. So, I'll change the name in v2. I'll also change the names of "enable_vbus_ctrl" and members of rcar_gen3_role_swap_ops in the patch 4 Best regards, Yoshihiro Shimoda > > +{ > > + 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