From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5B2FC83007 for ; Tue, 28 Apr 2020 11:09:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 91B912072A for ; Tue, 28 Apr 2020 11:09:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588072186; bh=MGWunbA8swfXX7fdfm8HfW6mgSmyUonlAUB6TuoF+Jg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=n77SgofSxa3izRWJkkdlrtlOSa1NiNuZMtZrj86m7B7PzZLrc2jDYneYRAzGnLcox eI5c3Cqxxh8q38e98hmmFCBvp9NCFFa2YhwoT+igDuaBF4YwxFd9BMvVmrwkBXz7uj +RkP4lJ6M1o+DMJSvgCMXE0aPbOr9zbT3Maq/940= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726419AbgD1LJq (ORCPT ); Tue, 28 Apr 2020 07:09:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:32942 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726416AbgD1LJp (ORCPT ); Tue, 28 Apr 2020 07:09:45 -0400 Received: from localhost (fw-tnat.cambridge.arm.com [217.140.96.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6A16920661; Tue, 28 Apr 2020 11:09:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588072185; bh=MGWunbA8swfXX7fdfm8HfW6mgSmyUonlAUB6TuoF+Jg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kpOvLK49PTFx1bL0adrxIRN7QJJKw5OLlWEjnKqAtoMgznGBL9n14T49UUJOfvvYi Qbrc8Ys2eY57Ye9gbLsyVdqKQ7359Jcrr3ir3j0M0nKdcKZRR9wY+kV5JfU+OdRvHv cdP+quDPGAJUgLGSCgYDZPuaKs+0CPeFyk/iWV4o= Date: Tue, 28 Apr 2020 12:09:42 +0100 From: Mark Brown To: Sumit Semwal Cc: Nisha Kumari , Bjorn Andersson , robh+dt@kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, agross@kernel.org, lgirdwood@gmail.com, mark.rutland@arm.com, david.brown@linaro.org, LKML , kgunda@codeaurora.org, Rajendra Nayak Subject: Re: [PATCH 4/4] regulator: adding interrupt handling in labibb regulator Message-ID: <20200428110942.GC5677@sirena.org.uk> References: <1560337252-27193-1-git-send-email-nishakumari@codeaurora.org> <1560337252-27193-5-git-send-email-nishakumari@codeaurora.org> <20190613172738.GO5316@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="NU0Ex4SbNnrxsi6C" Content-Disposition: inline In-Reply-To: X-Cookie: Eschew obfuscation. User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org --NU0Ex4SbNnrxsi6C Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Apr 28, 2020 at 10:46:52AM +0530, Sumit Semwal wrote: > On Thu, 13 Jun 2019 at 22:57, Mark Brown wrote: > > > + /* > > > + * The SC(short circuit) fault would trigger PBS(Portable Batch > > > + * System) to disable regulators for protection. This would > > > + * cause the SC_DETECT status being cleared so that it's not > > > + * able to get the SC fault status. > > > + * Check if LAB/IBB regulators are enabled in the driver but > > > + * disabled in hardware, this means a SC fault had happened > > > + * and SCP handling is completed by PBS. > > > + */ > > Let the core worry about this, the driver should just report the problem > > to the core like all other devices do (and this driver doesn't...). > I (and Bjorn too) looked to find the api that allows us to do this > short circuit reporting and recovery in the core, but couldn't find > anything except REGULATOR_ERROR_OVER_CURRENT which also looks like > it's used only once in the code. A short circuit will generate excessive current (and detection of a short circuit is usually current based) so using the same notification should be fine. If you're concerned about this feel free to add a specific notification, and add any handling you need in response to that notification. You certainly shouldn't be just reenabling the regulators in your driver. Mostly AFAICT people are fairly happy with the autonomous response of the hardware to these issues, it's not like they're expected to happen in normal operation or be recoverable. --NU0Ex4SbNnrxsi6C Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl6oDvUACgkQJNaLcl1U h9Bw1Af/eH2Xtc+Nb+wOnsuA/ECmwpfLa7PgrSXEc4oqAFvwrzgmGgzJVdGz2ZZv nUDk70XTFKy0dHRIUxxeohZRJr/+lEXJOKUQx4LwHRuphGDWhbV63lAVJQJbkUbk QABoJ/lj4WWEOsiAmY4BQVuQcEuZxcY6deyeA6s1/Ur0EaoKfQv3I8x2VJjECBDc D+weiy/KgJg7OKzUtCPMufdVKwWzKoHqyW8CCEov3iozV9nJ+BoY2F3K8gGMqxEt 5GCo0EZ/uktvqCo6UroN701E+ne4zsBysVztRE39HTzWCk7nQ0Eg1c3m6C4sL9ki DYnE9SroVq3mFjcEirN8Tj9azWExdA== =jlOR -----END PGP SIGNATURE----- --NU0Ex4SbNnrxsi6C--