From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932298AbcKDU0h (ORCPT ); Fri, 4 Nov 2016 16:26:37 -0400 Received: from mail-lf0-f54.google.com ([209.85.215.54]:33877 "EHLO mail-lf0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754775AbcKDU0f (ORCPT ); Fri, 4 Nov 2016 16:26:35 -0400 Subject: Re: [PATCH v4 3/4] usb: musb: Add a quirk flag to skip the phy set mode To: Alexandre Bailon , david@lechnology.com, b-liu@ti.com, balbi@kernel.org References: <1478277818-5091-1-git-send-email-abailon@baylibre.com> <1478277818-5091-4-git-send-email-abailon@baylibre.com> Cc: kishon@ti.com, khilman@baylibre.com, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, nsekhar@ti.com From: Sergei Shtylyov Organization: Cogent Embedded Message-ID: Date: Fri, 4 Nov 2016 23:20:31 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <1478277818-5091-4-git-send-email-abailon@baylibre.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello. On 11/04/2016 07:43 PM, Alexandre Bailon wrote: > During the init, the driver will use the mode to configure > the controller mode and the phy mode. PHY -- be consistent please... > The PHY of DA8xx has some issues when the phy is forced in host or device. Again. > Add way to skip the set mode and let the da8xx glue manage the phy mode. > > Signed-off-by: Alexandre Bailon > --- > drivers/usb/musb/musb_core.c | 15 ++++++++++----- > drivers/usb/musb/musb_core.h | 1 + > 2 files changed, 11 insertions(+), 5 deletions(-) > > diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c > index 27dadc0..6f5f039 100644 > --- a/drivers/usb/musb/musb_core.c > +++ b/drivers/usb/musb/musb_core.c [...] > @@ -2278,15 +2279,19 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl) [...] > - if (status < 0) > - goto fail3; > + if (mode != MUSB_UNDEFINED && > + !(musb->io.quirks & MUSB_SKIP_SET_MODE)) { Please either add one more tab here or align to 'mode', so it's easier on the eyes. > + status = musb_platform_set_mode(musb, mode); > + if (status < 0) > + goto fail3; > + } > > status = musb_init_debugfs(musb); > if (status < 0) [...] MBR, Sergei