From: Dinh Nguyen Date: Mon, 16 Apr 2018 15:41:03 -0500 Subject: [U-Boot] [PATCHv1 14/14] reset: remove request and free functions In-Reply-To: <3b54a729-97bc-b07e-b54f-a67436bea156@wwwdotorg.org> References: <1523731900-4675-1-git-send-email-dinguyen@kernel.org> <1523731900-4675-15-git-send-email-dinguyen@kernel.org> <3b54a729-97bc-b07e-b54f-a67436bea156@wwwdotorg.org> Message-ID: <834165a7-bc4c-0433-45d2-6722e7cf5a4c@kernel.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 04/16/2018 01:51 PM, Stephen Warren wrote: > On 04/16/2018 12:43 PM, Simon Glass wrote: >> +Stephen for comment >> >> Hi Dinh, >> >> On 14 April 2018 at 12:51, Dinh Nguyen wrote: >>> The request and free reset functions are not really used for any useful >>> purpose but for debugging. We can safely remove them. >> >> The API is set to line up with clocks. I think in general we do want >> to be able to request and free these devices, just as we do for GPIOs. >> What is the goal of removing these methods? > > Many of the request methods do in fact do something; they check the > validity of the reset ID so that check doesn't need to be duplicated > everywhere. Even ignoring that, any resource management API should have > explicit request/free APIs so that lifetime can be tracked if needed. Agreed, that the checks were in some of the request functions, but the majority did not do any checks, just a debug() statement. All of the platforms that did the checks, I just moved them to reset_assert and reset_deassert. Dinh