Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932884AbcJZTBj (ORCPT ); Wed, 26 Oct 2016 15:01:39 -0400 Received: from mail-wm0-f50.google.com ([74.125.82.50]:34471 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754845AbcJZTA7 (ORCPT ); Wed, 26 Oct 2016 15:00:59 -0400 From: ahaslam@baylibre.com To: broonie@kernel.org, lgirdwood@gmail.com, khilman@baylibre.com, nsekhar@ti.com, david@lechnology.com Cc: linux-kernel@vger.kernel.org, Axel Haslam Subject: [RFC 1/3] regulator: core: Add over current changed event Date: Wed, 26 Oct 2016 21:00:52 +0200 Message-Id: <20161026190054.11968-2-ahaslam@baylibre.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161026190054.11968-1-ahaslam@baylibre.com> References: <20161026190054.11968-1-ahaslam@baylibre.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1283 Lines: 36 From: Axel Haslam Regulator consumers may be interested to know when the over current condition is over. Add an over currerent "changed" event. The registered useres for this event can then check the over current flag to know the status of the over current condition. Signed-off-by: Axel Haslam --- include/linux/regulator/consumer.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index 6921082..8e33f72 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h @@ -103,6 +103,7 @@ * Data passed is old voltage cast to (void *). * PRE_DISABLE Regulator is about to be disabled * ABORT_DISABLE Regulator disable failed for some reason + * OVER_CURRENT_CHANGE Regulator over current condition changed * * NOTE: These events can be OR'ed together when passed into handler. */ @@ -119,6 +120,7 @@ #define REGULATOR_EVENT_ABORT_VOLTAGE_CHANGE 0x200 #define REGULATOR_EVENT_PRE_DISABLE 0x400 #define REGULATOR_EVENT_ABORT_DISABLE 0x800 +#define REGULATOR_EVENT_OVER_CURRENT_CHANGE 0x1000 /** * struct pre_voltage_change_data - Data sent with PRE_VOLTAGE_CHANGE event -- 1.9.1