From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from zimbra1.kalray.eu ([92.103.151.219]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eEbN1-0007uD-AU for barebox@lists.infradead.org; Tue, 14 Nov 2017 13:35:21 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra1.kalray.eu (Postfix) with ESMTP id 76C1128107C for ; Tue, 14 Nov 2017 14:34:52 +0100 (CET) Received: from zimbra1.kalray.eu ([127.0.0.1]) by localhost (zimbra1.kalray.eu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id zGn82U9QJop1 for ; Tue, 14 Nov 2017 14:34:51 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra1.kalray.eu (Postfix) with ESMTP id DEB5628107D for ; Tue, 14 Nov 2017 14:34:51 +0100 (CET) Received: from zimbra1.kalray.eu ([127.0.0.1]) by localhost (zimbra1.kalray.eu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id EvA7OBlIAtnR for ; Tue, 14 Nov 2017 14:34:51 +0100 (CET) Received: from zimbra1.kalray.eu (localhost [127.0.0.1]) by zimbra1.kalray.eu (Postfix) with ESMTP id CBDB428107B for ; Tue, 14 Nov 2017 14:34:51 +0100 (CET) Date: Tue, 14 Nov 2017 14:34:51 +0100 (CET) From: =?utf-8?Q?Cl=C3=A9ment?= Leger Message-ID: <221136220.35006899.1510666491764.JavaMail.zimbra@kalray.eu> 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" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH] Net: add mdio_i2c driver. To: Barebox List RnJvbSAxMjM4YjVjNzBkMjk3NjIwNzRiYzcxYWMyNTYyM2I5NThhZjkwMTBhIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBDbGVtZW50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MgPSBJMkNfTV9SRDsKKwltc2dzWzFdLmxl biA9IHNpemVvZihkYXRhKTsKKwltc2dzWzFdLmJ1ZiA9IGRhdGE7CisKKwlyZXQgPSBpMmNfdHJh bnNmZXIoaTJjLCBtc2dzLCBBUlJBWV9TSVpFKG1zZ3MpKTsKKwlpZiAocmV0ICE9IEFSUkFZX1NJ WkUobXNncykpCisJCXJldHVybiAweGZmZmY7CisKKwlyZXR1cm4gZGF0YVswXSA8PCA4IHwgZGF0 YVsxXTsKK30KKworc3RhdGljIGludCBpMmNfbWlpX3dyaXRlKHN0cnVjdCBtaWlfYnVzICpidXMs IGludCBwaHlfaWQsIGludCByZWcsIHUxNiB2YWwpCit7CisJc3RydWN0IGkyY19hZGFwdGVyICpp MmMgPSBidXMtPnByaXY7CisJc3RydWN0IGkyY19tc2cgbXNnOworCWludCByZXQ7CisJdTggZGF0 YVszXTsKKworCWlmICghaTJjX21paV92YWxpZF9waHlfaWQocGh5X2lkKSkKKwkJcmV0dXJuIDA7 CisKKwlkYXRhWzBdID0gcmVnOworCWRhdGFbMV0gPSB2YWwgPj4gODsKKwlkYXRhWzJdID0gdmFs OworCisJbXNnLmFkZHIgPSBpMmNfbWlpX3BoeV9hZGRyKHBoeV9pZCk7CisJbXNnLmZsYWdzID0g MDsKKwltc2cubGVuID0gMzsKKwltc2cuYnVmID0gZGF0YTsKKworCXJldCA9IGkyY190cmFuc2Zl cihpMmMsICZtc2csIDEpOworCisJcmV0dXJuIHJldCA8IDAgPyByZXQgOiAwOworfQorCitzdGF0 aWMgaW50IG1kaW9faTJjX3Byb2JlKHN0cnVjdCBkZXZpY2VfZCAqZGV2KQoreworCXN0cnVjdCBt aWlfYnVzICptaWk7CisJc3RydWN0IGkyY19hZGFwdGVyICppMmNfYWRhcDsKKwlzdHJ1Y3QgZGV2 aWNlX25vZGUgKmkyY19ub2RlOworCisJaTJjX25vZGUgPSBvZl9wYXJzZV9waGFuZGxlKGRldi0+ ZGV2aWNlX25vZGUsICJpMm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WkyYy1idXMgPSA8JmkyY19idXM+OworfTsKLS0gCjEuOC4zLjEKCgpf X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXwpiYXJlYm94IG1h aWxpbmcgbGlzdApiYXJlYm94QGxpc3RzLmluZnJhZGVhZC5vcmcKaHR0cDovL2xpc3RzLmluZnJh ZGVhZC5vcmcvbWFpbG1hbi9saXN0aW5mby9iYXJlYm94Cg==