Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751303AbcKAPsR (ORCPT ); Tue, 1 Nov 2016 11:48:17 -0400 Received: from mail-qt0-f174.google.com ([209.85.216.174]:33588 "EHLO mail-qt0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751099AbcKAPsP (ORCPT ); Tue, 1 Nov 2016 11:48:15 -0400 MIME-Version: 1.0 In-Reply-To: <20161031162226.f4flffnjxxsqi33q@sirena.org.uk> References: <20161026190054.11968-1-ahaslam@baylibre.com> <20161026190054.11968-2-ahaslam@baylibre.com> <20161028182250.df6p6setaauxsezu@sirena.org.uk> <20161029184031.adjybckguxzfu3pq@sirena.org.uk> <20161031162226.f4flffnjxxsqi33q@sirena.org.uk> From: Axel Haslam Date: Tue, 1 Nov 2016 16:47:33 +0100 Message-ID: Subject: Re: [RFC 1/3] regulator: core: Add over current changed event To: Mark Brown Cc: Liam Girdwood , Kevin Hilman , Sekhar Nori , David Lechner , linux-kernel@vger.kernel.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 Content-Length: 1522 Lines: 35 Hi Mark, On Mon, Oct 31, 2016 at 5:22 PM, Mark Brown wrote: > On Sun, Oct 30, 2016 at 01:02:21PM +0100, Axel Haslam wrote: > >> The event REGULATOR_EVENT_OVER_CURRENT allready exists. >> what is missing and what i would need form the usb driver, is a way for >> the consumer to know that the over current condition is over. >> since i cannot do this with get mode, and get status is not exported, > >> We can do this adding a more generic event flag: >> REGULATOR_EVENT_ERRORS_CLEARED > >> that would be sent by the supply when all errors are over, and the >> regulator is back to normal operation. > > That's a different thing and definitely not what you were saying in the > changelog. I don't think this is something that it makes sense to do > with events as it's not something that devices will tend to generate > interrupts for, anything that is going to rely on events for that is > going to be broken. Hardware is mostly designed with the idea that > errors are catastrophic. > > If you really care about things clearing then you need to add a sensible > interface for exposting all the possible error conditions that users can > poll. The reason get_mode() got rejected was that error statuses and > modes are completely different things, get_status() is not going to work > for you since it is very common for multiple errors to happen at the > same time. Ok, sorry if i was unclear in the change log. ill add a new interface and lets see if it makes more sense in v2. Regards Axel.