Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp481464yba; Fri, 12 Apr 2019 07:26:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqzf+07Ik3q5fhhTzrmTIZZT5gk3brXgVygB4rQ9w+QDDNFdcoh81ipNBDCqyb20Iqud5Ju2 X-Received: by 2002:a17:902:a583:: with SMTP id az3mr57921231plb.205.1555079211962; Fri, 12 Apr 2019 07:26:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555079211; cv=none; d=google.com; s=arc-20160816; b=0YEPw7KR9Q6gijzY+mVd8+sA5qxE4zKSH/UCKWSB/BlJWYJ+7w4jEOVHoHl6wSKigs qIG1bpGhVqvHhEdtn3QvmwQUJI4mdYc1KR8DcCa86Ob4ugKyQ9km11DcBrJBgZYe69av 9IpMPpBOHk/BjYfosQjLIbSyc8laWBis37IV2XbRzdVclZjg527Guh0ocGHkgkAZc5/W 09qUgNSeRslQcnzthUm/Ca75GKStP6J/hJu4PBGTPHNo+2NTEknFstK+O21Phml5bKsX vyiC5dDvBkbuxgmhcASVCkmUZ9CZ1YpJjrFV8z7h6ku6kUu1pM23CrWfEf4A/j3UaaZA 2c1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=Vw6Zie5sf+oXW59daqqsWea0HiJVk+fUww+feLpxn68=; b=lyx0IAfyMEHl+we3IBERYvEhX87FHIZ+sNMYAl5g8bkaMbAMfT/8fIUJN+qfOkQpDL KNtG+C0uQ0+sVsWdJ7XAacttvtJFRE0i7ZU4bCgilgKbbQYH3EJ9nXjz+m94RcXTiCER 00Ov0fYcA+GjeeYM6ysDBa5L4urYqUt4zL91Z9GFshFN3x3L1s8zWDEdvTvUh/OVpgm7 mTVV1Fm6V3rx/DfdVTMamegUN4NBRkvnRn+WJC54FhI2Ruv18We3RgTtH4J/f/Nr1QdP sJhbRkb5l3uxPn4d2StO9RErEftXk8qbIrMbRvMORDuqFjQxnTfph3evbEUthSujvMo9 EBHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Ufa0BLRK; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g11si26325913plt.35.2019.04.12.07.26.35; Fri, 12 Apr 2019 07:26:51 -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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Ufa0BLRK; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727353AbfDLOYG (ORCPT + 99 others); Fri, 12 Apr 2019 10:24:06 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:47384 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726826AbfDLOYE (ORCPT ); Fri, 12 Apr 2019 10:24:04 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x3CENsvb002136; Fri, 12 Apr 2019 09:23:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1555079034; bh=Vw6Zie5sf+oXW59daqqsWea0HiJVk+fUww+feLpxn68=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=Ufa0BLRKH93NdBpmeFH4ilom/mdIyE6VbZ7esGJUQ0+AT9EhCYUthn2wSJpIXOJ8n XaAULeRpvLiZqVmGBNdU6v7LF/RK3nBEPZyeruby5MJVJXUcPg0GnCkeY3bNsJbT2l NNIzwecBSWnhujNIWBq6c+coUSbhU/sZwunHWLk4= Received: from DFLE102.ent.ti.com (dfle102.ent.ti.com [10.64.6.23]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x3CENsAn095752 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 12 Apr 2019 09:23:54 -0500 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Fri, 12 Apr 2019 09:23:54 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Fri, 12 Apr 2019 09:23:54 -0500 Received: from [172.24.190.172] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x3CENpxb004909; Fri, 12 Apr 2019 09:23:52 -0500 Subject: Re: [PATCH v5 0/6] ARM: davinci: ohci-da8xx: model the vbus GPIO as a fixed regulator To: Bartosz Golaszewski , Kevin Hilman , Alan Stern , Greg Kroah-Hartman CC: , , , Bartosz Golaszewski References: <20190412123640.11437-1-brgl@bgdev.pl> From: Sekhar Nori Message-ID: Date: Fri, 12 Apr 2019 19:53:50 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190412123640.11437-1-brgl@bgdev.pl> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/04/19 6:06 PM, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > Historically the power supply management in this driver has been handled > in two separate places in parallel. Device-tree users simply defined an > appropriate regulator, while two boards with no DT support (da830-evm and > omapl138-hawk) passed functions defined in their respective board files > over platform data. These functions simply used legacy GPIO calls to > watch the oc GPIO for interrupts and disable the vbus GPIO when the irq > fires. > > Commit d193abf1c913 ("usb: ohci-da8xx: add vbus and overcurrent gpios") > updated these GPIO calls to the modern API and moved them inside the > driver. > > This however is not the optimal solution for the vbus GPIO as it > duplicates code. Instead we should model the GPIO as a fixed regulator > that can be controlled with a GPIO. > > This series adds fixed regulators for all users of vbus GPIO, adds > overcurrent protection using the existing vbus regulator in the USB > driver and removes the vbus GPIO calls once they're no longer used. > > Tested on da830-evm with the module both built-in and loadable. Applied to v5.2/soc with Alan's ack applied on 3/6 Thanks, Sekhar