From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from smtp2-g21.free.fr ([212.27.42.2]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1OEJ4i-0008Ab-Ck for barebox@lists.infradead.org; Tue, 18 May 2010 09:26:58 +0000 Received: from smtp2-g21.free.fr (localhost [127.0.0.1]) by smtp2-g21.free.fr (Postfix) with ESMTP id ADB4D4B0093 for ; Tue, 18 May 2010 11:26:53 +0200 (CEST) Received: from localhost.localdomain (pac33-2-82-240-38-71.fbx.proxad.net [82.240.38.71]) by smtp2-g21.free.fr (Postfix) with ESMTP for ; Tue, 18 May 2010 11:26:51 +0200 (CEST) From: =?utf-8?q?Eric=20B=C3=A9nard?= Date: Tue, 18 May 2010 11:26:47 +0200 Message-Id: <1274174808-9516-2-git-send-email-eric@eukrea.com> In-Reply-To: <1274174808-9516-1-git-send-email-eric@eukrea.com> References: <1274174808-9516-1-git-send-email-eric@eukrea.com> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 2/3] i2c: add i2cdev driver To: barebox@lists.infradead.org dGhpcyBkcml2ZXIgaXMgbmVlZGVkIHRvIGludHJvZHVjZSBpMmMgY29tbWFuZHMKClNpZ25lZC1v ZmYtYnk6IEVyaWMgQsOpbmFyZCA8ZXJpY0BldWtyZWEuY29tPgotLS0KIGRyaXZlcnMvaTJjL0tj b25maWcgIHwgICAgMyArKwogZHJpdmVycy9pMmMvTWFrZWZpbGUgfCAgICAxICsKIGRyaXZlcnMv aTJjL2kyY2Rldi5jIHwgICA4MyArKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysr KysrKysrKysrKysrKwogMyBmaWxlcyBjaGFuZ2VkLCA4NyBpbnNlcnRpb25zKCspLCA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