From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-wg0-x22f.google.com ([2a00:1450:400c:c00::22f]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XPCDh-0002Ou-8h for barebox@lists.infradead.org; Wed, 03 Sep 2014 15:11:39 +0000 Received: by mail-wg0-f47.google.com with SMTP id z12so8681772wgg.30 for ; Wed, 03 Sep 2014 08:11:14 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20140903135256.GK5352@pengutronix.de> References: <1409656080-19280-1-git-send-email-poggi.raph@gmail.com> <1409656080-19280-3-git-send-email-poggi.raph@gmail.com> <20140903065649.GD5352@pengutronix.de> <20140903135256.GK5352@pengutronix.de> From: =?UTF-8?Q?Rapha=C3=ABl_Poggi?= Date: Wed, 3 Sep 2014 17:10:33 +0200 Message-ID: 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: Re: [PATCH v3 2/3] pinctrl: at91: add pinctrl driver To: Sascha Hauer Cc: barebox@lists.infradead.org VGhpcyBwYXRjaCBpcyBwZXJmZWN0IDotKS4gWW91IGp1c3QgbWlzcyB0byBjaGVjayB0aGUgcmV0 dXJuIHZhbHVlIGluCmF0OTFfZ3Bpb19wcm9iZS4KCkRvIEkgaGF2ZSB0byBpbnRlZ3JhdGUgdGhp cyBwYXRjaCBpbiBtaW5lID8gb3IgeW91IHdpbGwgYXBwbHkgaXQgeW91cnNlbGYgPwoKMjAxNC0w OS0wMyAxNTo1MiBHTVQrMDI6MDAgU2FzY2hhIEhhdWVyIDxzLmhhdWVyQHBlbmd1dHJvbml4LmRl PjoKPiBPbiBXZWQsIFNlcCAwMywgMjAxNCBhdCAwMToyMzoxNFBNICswMjAwLCBSYXBoYcOrbCBQ b2dnaSB3cm90ZToKPj4gU291bmRzIGdv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Cj4gLSAgICAgICB9IGVsc2Ugewo+IC0g ICAgICAgICAgICAgICBwcmludGYoIltwZXJpcGggJWNdIiwgbW9kZSArICdBJyAtIDEpOwo+IC0g ICAgICAgfQo+IC19Cj4gLQo+IC1zdGF0aWMgdm9pZCBhdDkxbXV4X2R1bXBfY29uZmlnKHZvaWQp Cj4gLXsKPiAtICAgICAgIGludCBiYW5rLCBqOwo+IC0KPiAtICAgICAgIC8qIHByaW50IGhlYWRp bmcgKi8KPiAtICAgICAgIHByaW50ZigiUGluXHQiKTsKPiAtICAgICAgIGZvciAoYmFuayA9IDA7 IGJhbmsgPCBncGlvX2JhbmtzOyBiYW5rKyspIHsKPiAtICAgICAgICAgICAgICAgcHJpbnRmKCJQ SU8lY1x0XHQiLCAnQScgKyBiYW5rKTsKPiAtICAgICAgIH07Cj4gLSAgICAgICBwcmludGYoIlxu XG4iKTsKPiAtCj4gLSAgICAgICAvKiBwcmludCBwaW4gc3RhdHVzICovCj4gLSAgICAgICBmb3Ig KGogPSAwOyBqIDwgMzI7IGorKykgewo+IC0gICAgICAgICAgICAgICBwcmludGYoIiVpOlx0Iiwg aik7Cj4gLQo+IC0gICAgICAgICAgICAgICBmb3IgKGJhbmsgPSAwOyBiYW5rIDwgZ3Bpb19iYW5r czsgYmFuaysrKSB7Cj4gLSAgICAgICAgICAgICAgICAgICAgICAgYXQ5MW11eF9wcmludGZfbW9k ZShiYW5rLCBqKTsKPiAtCj4gLSAgICAgICAgICAgICAgICAgICAgICAgcHJpbnRmKCJcdCIpOwo+ IC0gICAgICAgICAgICAgICB9Cj4gLQo+IC0gICAgICAgICAgICAgICBwcmludGYoIlxuIik7Cj4g LSAgICAgICB9Cj4gLX0KPiAtCj4gLXN0YXRpYyB2b2lkIGF0OTFtdXhfcHJpbnRfZW5fZGlzYWJs ZShjb25zdCBjaGFyICpzdHIsIGJvb2wgaXNfb24pCj4gLXsKPiAtICAgICAgIHByaW50ZigiJXMg PSAiLCBzdHIpOwo+IC0KPiAtIC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Cj4gLSAgICAgICAgICAgICAgIGF0OTFtdXhfZHVtcF9j b25maWcoKTsKPiAtICAgICAgICAgICAgICAgcmV0dXJuIDA7Cj4gLSAgICAgICB9Cj4gLQo+IC0g ICAgICAgd2hpbGUgKChvcHQgPSBnZXRvcHQoYXJnYywgYXJndiwgImI6cDoiKSkgPiAwKSB7Cj4g LSAgICAgICAgICAgICAgIHN3aXRjaCAob3B0KSB7Cj4gLSAgICAgICAgICAgICAgIGNhc2UgJ2In Ogo+IC0gICAgICAgICAgICAgICAgICAgICAgIGJhbmsgPSBzaW1wbGVfc3RydG91bChvcHRhcmcs IE5VTEwsIDEwKTsKPiAtICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKPiAtICAgICAgICAg ICAgICAgY2FzZSAncCc6Cj4gLSAgICAgICAgICAgICAgICAgICAgICAgcGluID0gc2ltcGxlX3N0 cnRvdWwob3B0YXJnLCBOVUxMLCAxMCk7Cj4gLSAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7 Cj4gLSAgICAgICAgICAgICAgIH0KPiAtICAgICAgIH0KPiAtCj4gLSAgICAgICBpZiAoYmFuayA+ PSBncGlvX2JhbmtzKSB7Cj4gLSAgICAgICAgICAgICAgIHByaW50ZigiYmFuayAlYyA+PSBzdXBw b3J0ZWQgJWMgYmFua3NcbiIsIGJhbmsgKyAnQScsCj4gLSAgICAgICAgICAgICAgICAgICAgICAg Z3Bpb19iYW5rcyArICdBJyk7Cj4gLSAgICAgICAgICAgICAgIHJldHVybiAxOwo+IC0gICAgICAg fQo+IC0KPiAtICAgICAgIGlmIChwaW4gPj0gMzIpIHsKPiAtICAgICAgICAgICAgICAgcHJpbnRm KCJwaW4gJXUgPj0gc3VwcG9ydGVkICVkIHBpbnNcbiIsIHBpbiwgMzIpOwo+IC0gICAgICAgICAg ICAgICByZXR1cm4gMTsKPiAtICAgICAgIH0KPiAtCj4gLSAgICAgICBhdDkxbXV4X2R1bXBfcGlv X2NvbmZpZyhiYW5rLCBwaW4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W5rICsgJ0EnLCBwaW4sIHVzZV9wdWxsdXApOwo+ICsgICAgICAgfQo+ ICsKPiArICAgICAgIHN3aXRjaChtdXgpIHsKPiArICAgICAgIGNhc2UgQVQ5MV9NVVhfR1BJTzoK PiArICAgICAgICAgICAgICAgYXQ5MV9tdXhfZ3Bpb19lbmFibGUocGlvLCBtYXNrKTsKPiArICAg ICAgICAgICAgICAgYnJlYWs7Cj4gKyAgICAgICBjYXNlIEFUOTFfTVVYX1BFUklQSF9BOgo+ICsg ICAgICAgICAgICAgICBhdDkxX2dwaW8tPm9wcy0+bXV4X0FfcGVyaXBoKHBpbywgbWFzayk7Cj4g KyAgICAgICAgICAgICAgIGJyZWFrOwo+ICsgICAgICAgY2FzZSBBVDkxX01VWF9QRVJJUEhfQjoK PiArICAgICAgICAgICAgICAgYXQ5MV9ncGlvLT5vcHMtPm11eF9CX3BlcmlwaChwaW8sIG1hc2sp Owo+ICsgICAgICAgICAgICAgICBicmVhazsKPiArICAgICAgIGNhc2UgQVQ5MV9NVVhfUEVSSVBI X0M6Cj4gKyAgICAgICAgICAgICAgIGlmICghYXQ5MV9ncGlvLT5vcHMtPm11eF9DX3BlcmlwaCkK PiArICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLUVJTlZBTDsKPiArICAgICAgICAgICAg ICAgYXQ5MV9ncGlvLT5vcHMtPm11eF9DX3BlcmlwaChwaW8sIG1hc2spOwo+ICsgICAgICAgICAg ICAgICBicmVhazsKPiArICAgICAgIGNhc2UgQVQ5MV9NVVhfUEVSSVBIX0Q6Cj4gKyAgICAgICAg ICAgICAgIGlmICghYXQ5MV9ncGlvLT5vcHMtPm11eF9EX3BlcmlwaCkKPiArICAgICAgICAgICAg ICAgICAgICAgICByZXR1cm4gLUVJTlZBTDsKPiArICAgICAgICAgICAgICAgYXQ5MV9ncGlvLT5v cHMtPm11eF9EX3BlcmlwaChwaW8sIG1hc2spOwo+ICsgICAgICAgICAgICAgICBicmVhazsKPiAr ICAgICAgIH0K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iAt ICAgICAgIHZvaWQgX19pb21lbSAgICAqcGlvID0gcGluX3RvX2NvbnRyb2xsZXIoaW5mbywgcGlu KTsKPiAtICAgICAgIHVuc2lnbmVkIG1hc2sgPSBwaW5fdG9fbWFzayhwaW4pOwo+IC0KPiAtICAg ICAgIGlmICghaW5mbykKPiAtICAgICAgICAgICAgICAgcmV0dXJuIC1FSU5WQUw7Cj4gLQo+IC0g ICAgICAgaWYgKCFwaW8pCj4gLSAgICAgICAgICAgICAgIHJldHVybiAtRUlOVkFMOwo+IC0KPiAt ICAgICAgIGF0OTFfbXV4X2Rpc2FibGVfaW50ZXJydXB0KHBpbywgbWFzayk7Cj4gLQo+IC0gICAg ICAgc3dpdGNoIChtdXgpIHsKPiAtICAgICAgIGNhc2UgQVQ5MV9NVVhfR1BJTzoKPiAtICAgICAg ICAgICAgICAgYXQ5MV9tdXhfZ3Bpb19lbmFibGUocGlvLCBtYXNrKTsKPiAtICAgICAgICAgICAg ICAgYnJlYWs7Cj4gLSAgICAgICBjYXNlIEFUOTFfTVVYX1BFUklQSF9BOgo+IC0gICAgICAgICAg ICAgICBpbmZvLT5vcHMtPm11eF9BX3BlcmlwaChwaW8sIG1hc2spOwo+IC0gICAgICAgICAgICAg ICBicmVhazsKPiAtICAgICAgIGNhc2UgQVQ5MV9NVVhfUEVSSVBIX0I6Cj4gLSAgICAgICAgICAg ICAgIGluZm8tPm9wcy0+bXV4X0JfcGVyaXBoKHBpbywgbWFzayk7Cj4gLSAgICAgICAgICAgICAg IGJyZWFrOwo+IC0gICAgICAgY2FzZSBBVDkxX01VWF9QRVJJUEhfQzoKPiAtICAgICAgICAgICAg ICAgaWYgKCFpbmZvLT5vcHMtPm11eF9DX3BlcmlwaCkKPiAtICAgICAgICAgICAgICAgICAgICAg ICByZXR1cm4gLUVJTlZBTDsKPiAtICAgICAgICAgICAgICAgaW5mby0+b3BzLT5tdXhfQ19wZXJp cGgocGlvLCBtYXNrKTsKPiAtICAgICAgICAgICAgICAgYnJlYWs7Cj4gLSAgICAgICBjYXNlIEFU OTFfTVVYX1BFUklQSF9EOgo+IC0gICAgICAgICAgICAgICBpZiAoIWluZm8tPm9wcy0+bXV4X0Rf cGVyaXBoKQo+IC0gICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAtRUlOVkFMOwo+IC0gICAg ICAgICAgICAgICBpbmZvLT5vcHMtPm11eF9EX3BlcmlwaChwaW8sIG1hc2spOwo+IC0gICAgICAg ICAgICAgICBicmVhazsKPiAtICAgICAgIH0KPiAtICAgICAgIGlmIChtdXgpCj4gLSAgICAgICAg ICAgICAgIGF0OTFfbXV4X2dwaW9fZGlzYWJsZShwaW8sIG1hc2spOwo+IC0KPiAtICAgICAgIGlm ICh1c2VfcHVsbHVwID49IDApCj4gLSAgICAgICAgICAgICAgIGF0OTFfbXV4X3NldF9wdWxsdXAo cGlvLCBtYXNrLCB1c2VfcHVsbHVwKTsKPiAtCj4gLSAgICAgICByZXR1cm4gMDsKPiAtfQo+IC0K PiAgc3RhdGljIHN0cnVjdCBvZl9kZXZpY2VfaWQgYXQ5MV9waW5jdHJsX2R0X2lkc1tdID0gewo+ ICAgICAgICAgewo+ICAgICAgICAgICAgICAgICAuY29tcGF0aWJsZSA9ICJhdG1lbCxhdDkxcm05 MjAwLXBpbmN0cmwiLAo+IEBAIC0yNjQsNyArNDE1LDcgQEAgc3RhdGljIGludCBhdDkxX3BpbmN0 cmxfc2V0X2NvbmYoc3RydWN0IGF0OTFfcGluY3RybCAqaW5mbywgdW5zaWduZWQgaW50IHBpbl9u dW0KPiAgICAgICAgIHVuc2lnbmVkIGludCBtYXNrOwo+ICAgICAgICAgdm9pZCBfX2lvbWVtICpw aW87Cj4KPiAtICAgICAgIHBpbyA9IHBpbl90b19jb250cm9sbGVyKGluZm8sIHBpbl9udW0pOwo+ ICsgICAgICAgcGlvID0gcGluX3RvX2NvbnRyb2xsZXIocGluX251bSk7Cj4gICAgICAgICBtYXNr ID0gcGluX3RvX21hc2socGluX251bSk7Cj4KPiAgICAgICAgIGlmIChjb25mICYgUFVMTF9VUCAm JiBjb25mICYgUFVMTF9ET1dOKQo+IEBAIC0zMDksNyArNDYwLDcgQEAgc3RhdGljIGludCBhdDkx X3BpbmN0cmxfc2V0X3N0YXRlKHN0cnVjdCBwaW5jdHJsX2RldmljZSAqcGRldiwgc3RydWN0IGRl dmljZV9ub2QKPiAgICAgICAgICAgICAgICAgbXV4ID0gYmUzMl90b19jcHUoKmxpc3QrKyk7Cj4g ICAgICAgICAgICAgICAgIGNvbmYgPSBiZTMyX3RvX2NwdSgqbGlzdCsrKTsKPgo+IC0gICAgICAg ICAgICAgICByZXQgPSBhdDkxX211eF9waW4oaW5mbywgcGluX251bSwgbXV4LCBjb25mICYgUFVM TF9VUCk7Cj4gKyAgICAgICAgICAgICAgIHJldCA9IGF0OTFfbXV4X3BpbihwaW5fbnVtLCBtdXgs IGNvbmYgJiBQVUxMX1VQKTsKPiAgICAgICAgICAgICAgICAgaWYgKHJldCkgewo+ICAgICAgICAg ICAgICAgICAgICAgICAgIGRldl9lcnIocGRldi0+ZGV2LCAiZmFpbGVkIHRvIG11eCBwaW4gJWRc biIsIHBpbl9udW0pOwo+ICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXQ7Cj4gQEAg LTMzNCw2ICs0ODUsOSBAQCBzdGF0aWMgaW50IGF0OTFfcGluY3RybF9wcm9iZShzdHJ1Y3QgZGV2 aWNlX2QgKmRldikKPiAgICAgICAgIHN0cnVjdCBhdDkxX3BpbmN0cmwgKmluZm87Cj4gICAgICAg ICBpbnQgcmV0Owo+Cj4gKyAgICAgICBpZiAoIUlTX0VOQUJMRUQoQ09ORklHX1BJTkNUUkwpKQo+ ICsgICAgICAgICAgICAgICByZXR1cm4gMDsKPiArCj4gICAgICAgICBpbmZvID0geHphbGxvYyhz aXplb2Yoc3RydWN0IGF0OTFfcGluY3RybCkpOwo+Cj4gICAgICAgICBpbmZvLT5vcHMgPSBhdDkx X3BpbmN0cmxfZ2V0X2RyaXZlcl9kYXRhKGRldik7Cj4gLS0KPiAyLjEuMAo+Cj4KPgo+IC0tCj4g UGVuZ3V0cm9uaXggZS5LLiAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIHwKPiBJbmR1c3RyaWFsIExpbnV4IFNvbHV0aW9ucyAgICAgICAgICAg ICAgICAgfCBodHRwOi8vd3d3LnBlbmd1dHJvbml4LmRlLyAgfAo+IFBlaW5lciBTdHIuIDYtOCwg MzExMzcgSGlsZGVzaGVpbSwgR2VybWFueSB8IFBob25lOiArNDktNTEyMS0yMDY5MTctMCAgICB8 Cj4gQW10c2dlcmljaHQgSGlsZGVzaGVpbSwgSFJBIDI2ODYgICAgICAgICAgIHwgRmF4OiAgICs0 OS01MTIxLTIwNjkxNy01NTU1IHwKPgo+IF9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fCj4gYmFyZWJveCBtYWlsaW5nIGxpc3QKPiBiYXJlYm94QGxpc3RzLmlu ZnJhZGVhZC5vcmcKPiBodHRwOi8vbGlzdHMuaW5mcmFkZWFkLm9yZy9tYWlsbWFuL2xpc3RpbmZv L2JhcmVib3gKCl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f CmJhcmVib3ggbWFpbGluZyBsaXN0CmJhcmVib3hAbGlzdHMuaW5mcmFkZWFkLm9yZwpodHRwOi8v bGlzdHMuaW5mcmFkZWFkLm9yZy9tYWlsbWFuL2xpc3RpbmZvL2JhcmVib3gK