From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean Delvare Subject: Re: V2 API Date: Fri, 30 Sep 2011 14:13:45 +0200 Message-ID: <20110930141345.3e3bc00d@endymion.delvare> References: <201109281559.45060.david.goodenough@linkchoose.co.uk> <201109301134.38697.david.goodenough@linkchoose.co.uk> <20110930130645.5ff8576b@endymion.delvare> <201109301228.07248.david.goodenough@linkchoose.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <201109301228.07248.david.goodenough-hd8OpYRHSlec/75gGNOK3g@public.gmane.org> Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: David Goodenough Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-i2c@vger.kernel.org On Fri, 30 Sep 2011 12:28:06 +0100, David Goodenough wrote: > On Friday 30 Sep 2011, Jean Delvare wrote: > > On Fri, 30 Sep 2011 11:34:38 +0100, David Goodenough wrote: > > > On Wednesday 28 Sep 2011, David Goodenough wrote: > > > > Doing a Google search looking to see if there was userland support > > > > for SMBALERT messages I saw references to the V2 API which last year > > > > was "being developed". Did this happen, and is it defined anywhere? > > > > > > I take it from the fact that no-one has replied, that the V2 API is > > > not being worked on or has stalled. > > > > I take it from the fact that no-one has replied, that "V2 API" is an > > awfully vague subject line, so odds are that nobody read your post in > > the first place. Try to come up with a better subject line next time. > It was the only name I found for any effort to address this problem. And...? You couldn't come up with a subject line at least mentioning "SMBus" and/or "alert"? > And that was from a message which I think was on this mailing list about > a year ago. > > > > > Is there any way using the > > > existing API for userland code to be notified of an incomming > > > SMBALERT? > > > > Not that I know of, and I wasn't even aware that efforts had ever been > > ongoing to achieve this. > So I take it that the only way to do this would be to write a kernel > driver? At the moment, yes. It would technically be possible to do it in user-space, I presume, by extending the i2c-dev driver to register a proper driver with alert callback. But this would require a significant redesign of the i2c-dev driver, which I am not up to for the time being. An alternative would be a simple sysfs attribute in the i2c adapter's directory in the device tree, which user-space could poll until an event triggers. I don't know what the plan was. -- Jean Delvare