Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp526497ybb; Thu, 28 Mar 2019 07:12:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqyk6DhVr0L3cx3bxbmm+mEyQJtxxOK1qPb7VwQNWxnvfMAXGgEaHtLkrrjACNVRWrsgw4Bj X-Received: by 2002:a63:e050:: with SMTP id n16mr39878925pgj.210.1553782374350; Thu, 28 Mar 2019 07:12:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553782374; cv=none; d=google.com; s=arc-20160816; b=be+bdqGlxso6EjnS75e1j6WomPHDtTmeG0kBAupno5TogDpW45PO+JHOfPvKQPYlbw 0qBXQgpJIPtN3bGkqX1EokVJHs7/h8yzJA5Xo8WZ1jStVUiKI9YlvNUJimPTuyCFMfE1 JzVwP9CEtkn/c/ZDWDyDcokI5UpbQClWTmc3aYf+t0Bo51wxp9kMJVG6C6hHNTO+NXMf 2PeIfYcV9J2RMUK1zkzH5cIXUc5Bvu6vNFkkz3jZhZKim5Fjm0KKKljRwJGakwRNq01n zPdYxnJYjJAe3zYm3u77z3YUAf73PggMI13REwlEb1zmQ9N5xWDn178XaEaTvUNVB4AE CEfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to :subject:cc:to:from:date; bh=tCHCqiRMvfJogD2KP2rVPnpKuif1vNbcdmvS+PZTM5w=; b=k6Fr+OJuBd/uQcmzAHG2w75X6IiRj4+KjZw3g43/Bd6uZ0cEa9ixb7Jqp1RHP32ux3 PpyhLCcCbYBRQTsESuFj3QbKlP0d0+tjGkt7o6ioEwU42GL9+ONSkuFemVH4K6nJn/zX KhJRrlk/6/MycJIaV46PjDMPtCNAkTU1No9pANKQOXOhgo4CUjfcxri+AeYg2kDTfoKr 7AvU1UnqIBA+Ksj22ihFRHXLxFFkoAtVhal+/7lEsx55cJlHLfF4hqag2JxoG7CPQmj0 HLvYKKKmsbmIgfAvhYgRj/SeyLRqM3IfkxT5HO83j01sTXvW75KaMTSiHPNlC06yl2tW UqSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 191si1130393pga.219.2019.03.28.07.12.38; Thu, 28 Mar 2019 07:12:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726380AbfC1OLf (ORCPT + 99 others); Thu, 28 Mar 2019 10:11:35 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:51518 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1725779AbfC1OLe (ORCPT ); Thu, 28 Mar 2019 10:11:34 -0400 Received: (qmail 5642 invoked by uid 2102); 28 Mar 2019 10:11:33 -0400 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 28 Mar 2019 10:11:33 -0400 Date: Thu, 28 Mar 2019 10:11:33 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Sekhar Nori cc: Bartosz Golaszewski , Kevin Hilman , Greg Kroah-Hartman , Linux ARM , Linux Kernel Mailing List , , Bartosz Golaszewski Subject: Re: [PATCH 0/3] ARM: davinci: ohci-da8xx: model the vbus GPIO as a fixed regulator In-Reply-To: <3d7f7814-6184-96c6-8087-6373a489ebc0@ti.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 28 Mar 2019, Sekhar Nori wrote: > >> Can you document why the current solution is not optimal? Is it to make > >> future device-tree conversion for these boards easier? Or? > >> > > > > It's sub-optimal from the HW modeling in SW PoV - it is in fact a > > regulator enabled/disabled by a GPIO. Also: it's code duplication as > > currently we check if the vbus GPIO exists and then use it or check if > > the regulator exists and use this as the second choice. The third > > patch actually shrinks the driver. > > I see now that the driver supports controlling the VBUS gpio as > regulator already. Something I should have caught in review last time > around. > > I agree this patch is an improvement. Lets see what Alan feels. I'm not an expert on this stuff, but the patch looks reasonable. However, I do wish that in the devm_request_threaded_irq() call, the indentation of the continuation lines was left unchanged. Alan Stern > Also, reg_enabled member of da8xx_ohci_hcd structure seems to be pretty > useless considering regulator API already has use counting. Can you take > a look and remove that too as an added bonus. > > Thanks, > Sekhar