All of lore.kernel.org
 help / color / mirror / Atom feed
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 <ahaslam@baylibre.com>
Subject: [RFC 1/3] regulator: core: Add over current changed event
Date: Wed, 26 Oct 2016 21:00:52 +0200	[thread overview]
Message-ID: <20161026190054.11968-2-ahaslam@baylibre.com> (raw)
In-Reply-To: <20161026190054.11968-1-ahaslam@baylibre.com>

From: Axel Haslam <ahaslam@baylibre.com>

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 <ahaslam@baylibre.com>
---
 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

  reply	other threads:[~2016-10-26 19:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-26 19:00 [PATCH 0/3] regulator: Send events on over current condition ahaslam
2016-10-26 19:00 ` ahaslam [this message]
2016-10-28 18:22   ` [RFC 1/3] regulator: core: Add over current changed event Mark Brown
2016-10-28 19:41     ` Axel Haslam
2016-10-29  8:50       ` Axel Haslam
2016-10-29 18:40       ` Mark Brown
2016-10-30 12:02         ` Axel Haslam
2016-10-31 16:22           ` Mark Brown
2016-11-01 15:47             ` Axel Haslam
2016-10-26 19:00 ` [RFC 2/3] regulator: fixed: Handle optional overcurrent pin ahaslam
2016-10-26 19:00 ` [RFC 3/3] regulator: fixed: dt: Allow an optional over current pin ahaslam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161026190054.11968-2-ahaslam@baylibre.com \
    --to=ahaslam@baylibre.com \
    --cc=broonie@kernel.org \
    --cc=david@lechnology.com \
    --cc=khilman@baylibre.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nsekhar@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.