From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-we0-x22c.google.com ([2a00:1450:400c:c03::22c]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XEl3M-00008r-BH for barebox@lists.infradead.org; Tue, 05 Aug 2014 20:09:50 +0000 Received: by mail-we0-f172.google.com with SMTP id x48so1600872wes.3 for ; Tue, 05 Aug 2014 13:09:25 -0700 (PDT) From: =?UTF-8?q?Rapha=C3=ABl=20Poggi?= Date: Tue, 5 Aug 2014 13:09:16 -0700 Message-Id: <1407269357-20471-2-git-send-email-poggi.raph@gmail.com> In-Reply-To: <1407269357-20471-1-git-send-email-poggi.raph@gmail.com> References: <1407269357-20471-1-git-send-email-poggi.raph@gmail.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" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH v2 1/2] pinctrl: at91: add pinctrl driver To: barebox@lists.infradead.org Cc: =?UTF-8?q?Rapha=C3=ABl=20Poggi?= VGhpcyBkcml2ZXIgaXMgYmFzZWQgb24gbWFjaC1hdDkxL2dwaW8uYyBhbmQgbGludXggcGluY3Ry bCBkcml2ZXIuClRoZSBkcml2ZXIgY29udGFpbnMgdGhlIGdwaW8gYW5kIHBpbmN0cmwgcGFydHMg KGxpa2UgaW4gbGludXgpIGJlY2F1c2UgdGhlIHR3byBwYXJ0cwpzaGFyZSBzb21lIHN0cnVjdHVy ZXMgYW5kIGxvZ2ljcy4KClNpZ25lZC1vZmYtYnk6IFJhcGhhw6tsIFBvZ2dpIDxwb2dnaS5yYXBo QGdtYWlsLmNvbT4KLS0tCiBkcml2ZXJzL3BpbmN0cmwvS2NvbmZpZyAgICAgICAgfCAgIDYgKwog ZHJpdmVycy9waW5jdHJsL01ha2VmaWxlICAgICAgIHwgICAxICsKIGR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lZCBpbnQgcGluX251bSwgdW5zaWduZWQgaW50IG11eCwgdW5zaWduZWQgaW50 IGNvbmYpCit7CisJdW5zaWduZWQgaW50IG1hc2s7CisJdm9pZCBfX2lvbWVtICpwaW87CisKKwlw aW8gPSBwaW5fdG9fY29udHJvbGxlcihpbmZvLCBwaW5fbnVtKTsKKwltYXNrID0gcGluX3RvX21h c2socGluX251bSk7CisKKwlpZiAoY29uZiAmIFBVTExfVVAgJiYgY29uZiAmIFBVTExfRE9XTikK KwkJcmV0dXJuIC1FSU5WQUw7CisKKwlhdDkxX211eF9zZXRfcHVsbHVwKHBpbywgbWFzaywgY29u ZiAmIFBVTExfVVApOworCWF0OTFfbXV4X3NldF9tdWx0aWRyaXZlKHBpbywgbWFzaywgY29uZiAm IE1VTFRJX0RSSVZFKTsKKwlpZiAoaW5mby0+b3BzLT5zZXRfZGVnbGl0Y2gpCisJCWluZm8tPm9w cy0+c2V0X2RlZ2xpdGNoKHBpbywgbWFzaywgY29uZiAmIERFR0xJVENIKTsKKwlpZiAoaW5mby0+ b3BzLT5zZXRfZGVib3VuY2UpCisJCWluZm8tPm9wcy0+c2V0X2RlYm91bmNlKHBpbywgbWFzaywg Y29uZiAmIERFQk9VTkNFLAorCQkJKGNvbmYgJiBERUJPVU5DRV9WQUwpID4+IERFQk9VTkNFX1ZB TF9TSElGVCk7CisJaWYgKGluZm8tPm9wcy0+c2V0X3B1bGxkb3duKQorCQlpbmZvLT5vcHMtPnNl dF9wdWxsZG93bihwaW8sIG1hc2ssIGNvbmYgJiBQVUxMX0RPV04pOworCWlmIChpbmZvLT5vcHMt PmRpc2FibGVfc2NobWl0dF90cmlnICYmIGNvbmYgJiBESVNfU0NITUlUKQorCQlpbmZvLT5vcHMt PmRpc2FibGVfc2NobWl0dF90cmlnKHBpbywgbWFzayk7CisKKwlyZXR1cm4gMDsKK30KKworc3Rh dGljIGludCBhdDkxX3BpbmN0cmxfc2V0X3N0YXRlKHN0cnVjdCBwaW5jdHJsX2RldmljZSAqcGRl diwgc3RydWN0IGRldmljZV9ub2RlICpucCkKK3sKKwlzdHJ1Y3QgYXQ5MV9waW5jdHJsICppbmZv OworCWNvbnN0IF9fYmUzMiAqbGlzdDsKKwlpbnQgaSwgc2l6ZTsKKwlpbnQgcmV0ID0gMDsKKwlp bnQgYmFua19udW0sIHBpbl9udW0sIG11eCwgY29uZjsKKworCWluZm8gPSB0b19hdDkxX3BpbmN0 cmwocGRldik7CisKKwlsaXN0ID0gb2ZfZ2V0X3Byb3BlcnR5KG5wLCAiYXRtZWwscGlucyIsICZz aXplKTsKKwlzaXplIC89IHNpemVvZigqbGlzdCk7CisKKwlpZiAoIXNpemUgfHwgc2l6ZSAlIDQp IHsKKwkJZGV2X2VycihwZGV2LT5kZXYsICJ3cm9uZyBwaW5zIG51bWJlciBvciBwaW5zIGFuZCBj b25maWdzIHNob3VsZCBiZSBieSA0XG4iKTsKKwkJcmV0dXJuIC1FSU5WQUw7CisJfQorCisJZm9y IChpID0gMDsgaSA8IHNpemU7IGkgKz0gNCkgeworCQliYW5rX251bSA9IGJlMzJfdG9fY3B1KCps aXN0KyspOworCQlwaW5fbnVtID0gYmUzMl90b19jcHUoKmxpc3QrKyk7CisJCW11eCA9IGJlMzJf dG9fY3B1KCpsaXN0KyspOworCQljb25mID0gYmUzMl90b19jcHUoKmxpc3QrKyk7CisKKwkJcmV0 ID0gYXQ5MV9tdXhfcGluKGluZm8sIHBpbl9udW0sIG11eCwgY29uZiAmIFBVTExfVVApOworCQlp ZiAocmV0KSB7CisJCQlkZXZfZXJyKHBkZXYtPmRldiwgImZhaWxlZCB0byBtdXggcGluICVkXG4i LCBwaW5fbnVtKTsKKwkJCXJldHVybiByZXQ7CisJCX0KKworCQlyZXQgPSBhdDkxX3BpbmN0cmxf c2V0X2NvbmYoaW5mbywgcGluX251bSwgbXV4LCBjb25mKTsKKwkJaWYgKHJldCkgeworCQkJZGV2 X2VycihwZGV2LT5kZXYsICJmYWlsZWQgdG8gc2V0IGNvbm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XdfcmVhZGwocGlvICsg UElPX1BEU1IpOworICAgICAgIHJldHVybiAocGRzciAmIG1hc2spICE9IDA7Cit9CisKKyNlbmRp ZiAvKiBfX0FUOTFfR1BJT19IX18gKi8KLS0gCjEuOC4zLjIKCgpfX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fXwpiYXJlYm94IG1haWxpbmcgbGlzdApiYXJlYm94 QGxpc3RzLmluZnJhZGVhZC5vcmcKaHR0cDovL2xpc3RzLmluZnJhZGVhZC5vcmcvbWFpbG1hbi9s aXN0aW5mby9iYXJlYm94Cg==