From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23906 invoked by alias); 21 Jan 2013 15:08:23 -0000 Received: (qmail 23898 invoked by uid 22791); 21 Jan 2013 15:08:22 -0000 X-SWARE-Spam-Status: No, hits=-0.4 required=5.0 tests=AWL,BAYES_50,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from p02c11o142.mxlogic.net (HELO p02c11o142.mxlogic.net) (208.65.144.75) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 21 Jan 2013 15:08:12 +0000 Received: from unknown [12.218.215.72] (EHLO smtpauth1.linear.com) by p02c11o142.mxlogic.net(mxl_mta-6.16.0-0) with ESMTP id bd95df05.0.67945.00-341.146357.p02c11o142.mxlogic.net (envelope-from ); Mon, 21 Jan 2013 08:08:12 -0700 (MST) X-MXL-Hash: 50fd59dc075d9f47-4937316b2f232a1396885c64a3170abab7320584 Received: from smtpauth1.linear.com (localhost [127.0.0.1]) by smtpauth1.linear.com (Postfix) with ESMTP id 954C574004 for ; Mon, 21 Jan 2013 07:08:11 -0800 (PST) Received: from [192.168.0.119] (75-163-185-174.clsp.qwest.net [75.163.185.174]) by smtpauth1.linear.com (Postfix) with ESMTPSA id 6456874009 for ; Mon, 21 Jan 2013 07:08:11 -0800 (PST) From: Michael Jones Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Potential I2C API Enhancement Message-Id: <8B8E915D-930A-4929-BD45-4FEC71DC8462@linear.com> Date: Mon, 21 Jan 2013 15:08:00 -0000 To: ecos-devel@ecos.sourceware.org Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) X-AnalysisOut: [v=2.0 cv=Z+pb6gtA c=1 sm=1 a=glloKNylpeYNumXQcclYyA==:17 a] X-AnalysisOut: [=D2_GN2MmYMYA:10 a=BLceEmwcHowA:10 a=kj9zAlcOel0A:10 a=MqD] X-AnalysisOut: [INYqSAAAA:8 a=GcZ3HT09TSgA:10 a=vWxiIKx8e4e5TcjW2EoA:9 a=C] X-AnalysisOut: [juIK1q_8ugA:10 a=wg3ivf7ZSd0UQ6uo:21 a=raT2-n9oqyShRfwm:21] X-MAIL-FROM: X-IsSubscribed: yes Mailing-List: contact ecos-devel-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-devel-owner@ecos.sourceware.org X-SW-Source: 2013-01/txt/msg00000.txt.bz2 While working with the I2C interface using Kinetis to write a SMBus/PMBus l= ayer over it, I could not implement a probe. PMBus developers typically probe the bus looking for slaves by sending an a= ddress and using ACK/NACK to determine presence. The only way one can probe with the current I2C API is to send at least one= data byte, so that the return is an indicator of success or failure. Howev= er, this is a dangerous way to probe, because it might have side effects. Sometimes people probe with Addr+Read, but most use Addr+Write, because tha= t avoids a potential ARA response. I am looking for ideas how best to deal with this problem. Potential soluti= ons: 1) Use a target specific API 2) Add to existing API, like i2c_slave_present(... 3) Add new API/Package In my opinion, choice 2 would be the best because it is target independent,= and least confusing. The practical impact is people developing SMBus/PMBus tend to use Cortex M.= There are a small number of targets (5) in the dev tree. So perhaps it is = still possible to add to the I2C API? Thoughts? Mike