From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965495AbcJXSM2 (ORCPT ); Mon, 24 Oct 2016 14:12:28 -0400 Received: from mail-qk0-f178.google.com ([209.85.220.178]:33738 "EHLO mail-qk0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965310AbcJXSMW (ORCPT ); Mon, 24 Oct 2016 14:12:22 -0400 MIME-Version: 1.0 In-Reply-To: <20161024175320.GO17252@sirena.org.uk> References: <20161024164634.4330-1-ahaslam@baylibre.com> <20161024164634.4330-10-ahaslam@baylibre.com> <20161024175320.GO17252@sirena.org.uk> From: Axel Haslam Date: Mon, 24 Oct 2016 20:11:40 +0200 Message-ID: Subject: Re: [PATCH/RFT v2 09/17] regulator: fixed: Add over current event To: Mark Brown Cc: Greg KH , Johan Hovold , robh+dt@kernel.org, Sekhar Nori , Alan Stern , Kevin Hilman , Sergei Shtylyov , David Lechner , manjunath.goudar@linaro.org, Alexandre Bailon , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 24, 2016 at 7:53 PM, Mark Brown wrote: > On Mon, Oct 24, 2016 at 06:46:26PM +0200, ahaslam@baylibre.com wrote: > >> + if (ret) { >> + pr_err("Failed to request irq: %d\n", ret); > > dev_err() > >> +++ b/include/linux/regulator/consumer.h >> @@ -74,6 +74,10 @@ >> * the most noisy and may not be able to handle fast load >> * switching. >> * >> + * OVERCURRENT Regulator has detected an overcurrent condition, and >> + * may be limiting the supply output. >> + * >> + * >> * NOTE: Most regulators will only support a subset of these modes. Some >> * will only just support NORMAL. >> * >> @@ -84,6 +88,7 @@ >> #define REGULATOR_MODE_NORMAL 0x2 >> #define REGULATOR_MODE_IDLE 0x4 >> #define REGULATOR_MODE_STANDBY 0x8 >> +#define REGULATOR_MODE_OVERCURRENT 0x10 > > This is adding a new core feature with a new mode and should have been > split out of the driver specific change with a spearate changelog. Why Ok, will do. > does it make sense to report this as a mode, we don't report other error > conditions as modes but instead use REGULATOR_STATUS_ with the > get_status() operation? I used mode, because when the regulator toggles the overcurrent line, it means that it has entered a current limited mode, at least the regulator im looking at. ill change to STATUS Regards Axel From mboxrd@z Thu Jan 1 00:00:00 1970 From: Axel Haslam Subject: Re: [PATCH/RFT v2 09/17] regulator: fixed: Add over current event Date: Mon, 24 Oct 2016 20:11:40 +0200 Message-ID: References: <20161024164634.4330-1-ahaslam@baylibre.com> <20161024164634.4330-10-ahaslam@baylibre.com> <20161024175320.GO17252@sirena.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: <20161024175320.GO17252-GFdadSzt00ze9xe1eoZjHA@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Mark Brown Cc: Greg KH , Johan Hovold , robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, Sekhar Nori , Alan Stern , Kevin Hilman , Sergei Shtylyov , David Lechner , manjunath.goudar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, Alexandre Bailon , linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: devicetree@vger.kernel.org On Mon, Oct 24, 2016 at 7:53 PM, Mark Brown wrote: > On Mon, Oct 24, 2016 at 06:46:26PM +0200, ahaslam-rdvid1DuHRBWk0Htik3J/w@public.gmane.org wrote: > >> + if (ret) { >> + pr_err("Failed to request irq: %d\n", ret); > > dev_err() > >> +++ b/include/linux/regulator/consumer.h >> @@ -74,6 +74,10 @@ >> * the most noisy and may not be able to handle fast load >> * switching. >> * >> + * OVERCURRENT Regulator has detected an overcurrent condition, and >> + * may be limiting the supply output. >> + * >> + * >> * NOTE: Most regulators will only support a subset of these modes. Some >> * will only just support NORMAL. >> * >> @@ -84,6 +88,7 @@ >> #define REGULATOR_MODE_NORMAL 0x2 >> #define REGULATOR_MODE_IDLE 0x4 >> #define REGULATOR_MODE_STANDBY 0x8 >> +#define REGULATOR_MODE_OVERCURRENT 0x10 > > This is adding a new core feature with a new mode and should have been > split out of the driver specific change with a spearate changelog. Why Ok, will do. > does it make sense to report this as a mode, we don't report other error > conditions as modes but instead use REGULATOR_STATUS_ with the > get_status() operation? I used mode, because when the regulator toggles the overcurrent line, it means that it has entered a current limited mode, at least the regulator im looking at. ill change to STATUS Regards Axel -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: ahaslam@baylibre.com (Axel Haslam) Date: Mon, 24 Oct 2016 20:11:40 +0200 Subject: [PATCH/RFT v2 09/17] regulator: fixed: Add over current event In-Reply-To: <20161024175320.GO17252@sirena.org.uk> References: <20161024164634.4330-1-ahaslam@baylibre.com> <20161024164634.4330-10-ahaslam@baylibre.com> <20161024175320.GO17252@sirena.org.uk> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Mon, Oct 24, 2016 at 7:53 PM, Mark Brown wrote: > On Mon, Oct 24, 2016 at 06:46:26PM +0200, ahaslam at baylibre.com wrote: > >> + if (ret) { >> + pr_err("Failed to request irq: %d\n", ret); > > dev_err() > >> +++ b/include/linux/regulator/consumer.h >> @@ -74,6 +74,10 @@ >> * the most noisy and may not be able to handle fast load >> * switching. >> * >> + * OVERCURRENT Regulator has detected an overcurrent condition, and >> + * may be limiting the supply output. >> + * >> + * >> * NOTE: Most regulators will only support a subset of these modes. Some >> * will only just support NORMAL. >> * >> @@ -84,6 +88,7 @@ >> #define REGULATOR_MODE_NORMAL 0x2 >> #define REGULATOR_MODE_IDLE 0x4 >> #define REGULATOR_MODE_STANDBY 0x8 >> +#define REGULATOR_MODE_OVERCURRENT 0x10 > > This is adding a new core feature with a new mode and should have been > split out of the driver specific change with a spearate changelog. Why Ok, will do. > does it make sense to report this as a mode, we don't report other error > conditions as modes but instead use REGULATOR_STATUS_ with the > get_status() operation? I used mode, because when the regulator toggles the overcurrent line, it means that it has entered a current limited mode, at least the regulator im looking at. ill change to STATUS Regards Axel