Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933796AbcJaQWp (ORCPT ); Mon, 31 Oct 2016 12:22:45 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:45592 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762745AbcJaQWn (ORCPT ); Mon, 31 Oct 2016 12:22:43 -0400 Date: Mon, 31 Oct 2016 10:22:26 -0600 From: Mark Brown To: Axel Haslam Cc: Liam Girdwood , Kevin Hilman , Sekhar Nori , David Lechner , linux-kernel@vger.kernel.org Message-ID: <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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="dntjrqeslaztnrdn" Content-Disposition: inline In-Reply-To: X-Cookie: I have a TINY BOWL in my HEAD User-Agent: NeoMutt/20161014 (1.7.1) X-SA-Exim-Connect-IP: 70.90.202.86 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [RFC 1/3] regulator: core: Add over current changed event X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: No (on mezzanine.sirena.org.uk); Unknown failure Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1924 Lines: 47 --dntjrqeslaztnrdn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. --dntjrqeslaztnrdn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAABCAAGBQJYF2/BAAoJECTWi3JdVIfQlwgH/024LSGOf+zaMPuMqF/CGCy0 rh8VnXSECburg8NgaSAvEX1dHNadwJr//BwFFsdI6eP/vgcY5qeuKqbRYgwm1jF5 ydIo9ypIVKOt6kYEuaAQHDO0WqKOB6uZk4cdDv7HjVq8V8K9I1bSbRY8vyxcUV8m IEf8tzlPKxMb8yfvQ1Wrj0Gs4lwL0MNxgSv+DFMHr5Fy+u0GPvUuOMyzUasG6Y88 kJkbvN0/AC+t+S5QMdipD0LRkkE1KMmiWPMc01fT/7KGVs3t1zHSke4GJIENs9wx dkhnWinMOeCBke7A61xM6bTyB61IQ4NrH7EZbHhLE2+1gwDytyYVe8Xon3TKe8A= =DWxV -----END PGP SIGNATURE----- --dntjrqeslaztnrdn--