Received: by 10.223.185.116 with SMTP id b49csp3996834wrg; Mon, 19 Feb 2018 09:15:54 -0800 (PST) X-Google-Smtp-Source: AH8x225CcaVyWgpYbm2wYuO0p5Kuf1Ueb2yfgXWPPbnLcJ74SobAZQdRYRugUBBi9u5L5wy2EdHa X-Received: by 2002:a17:902:8ec7:: with SMTP id x7-v6mr537134plo.330.1519060554033; Mon, 19 Feb 2018 09:15:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519060553; cv=none; d=google.com; s=arc-20160816; b=WqWrP1tNsQ30CLq7gjrSuwkwlX/xTHNu9mXvHjwrNZkRGruDIRlFoGrCPJA6URExYN LuhR6bnSqGrEC/PDTZpsKZzCmP5JJt0Xseh9j66srOHlcrUAcXYFn8FxO1jRrTU1HOqN mPEf0VeDGNc4vLve8m+pTWZu6UXlXF9mJYtpOPlyYbYxx+a/Q6IsKG7SJzAROZWhVOHx wcAoROoPkHIIIQdMqyXzKeRskbkJ1qBbGmQuVlFMbOdnq+CgneetCHNZmjrTFce9IF18 gwfmJzvJFskQHxMWIWPMA6wWsAJxbO1kZFCj0wm+Xm12dg91Z1XHyZ2tO6h50fqy6O+U XDIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:user-agent:content-language:accept-language:in-reply-to :references:message-id:date:thread-index:thread-topic:subject:cc:to :from:arc-authentication-results; bh=d+uy3QlL6P2zmTGEoiSR1Kw1M627CuYSTt8YmNDm1YM=; b=A/fHntqn3XiVWOP62QGgdBcrq1bGxl1jzt8ubun91IPDIZkm043BRjohD/M25jL39W icuBzOJPq0L+faQD17qE8oL1W2URC4FN4I0yGL7KZ+Ji/5B+pZ09S6PyS2j1WRbAU+Nj +UWyiSor36tuHDQ5yK96UO2w6876S+FGXUr+kBxrvVsb4hODsdBLOVzifRWPXjxYRMQW g2joYCy/UfoaS+a+md08bOabT0Ip19ExJ31HCDAhGZnM40joL8l5JcUqqeq6ut43P4kL nufbpgaZBRuOOmkG36l417SE2wuDt1gm88rVLvz5zPwEZY/8d7WycYKJ/iess65CFJTF 8yVg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f6si3982277pgr.820.2018.02.19.09.15.39; Mon, 19 Feb 2018 09:15:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753579AbeBSROt (ORCPT + 99 others); Mon, 19 Feb 2018 12:14:49 -0500 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:59416 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753250AbeBSROp (ORCPT ); Mon, 19 Feb 2018 12:14:45 -0500 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w1JHDxcP029640; Mon, 19 Feb 2018 18:13:59 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2g6c5gae1h-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 19 Feb 2018 18:13:59 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 048BF31; Mon, 19 Feb 2018 17:13:57 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag3node3.st.com [10.75.127.9]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id BB7665A4D; Mon, 19 Feb 2018 17:13:57 +0000 (GMT) Received: from SFHDAG3NODE2.st.com (10.75.127.8) by SFHDAG3NODE3.st.com (10.75.127.9) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Mon, 19 Feb 2018 18:13:57 +0100 Received: from SFHDAG3NODE2.st.com ([fe80::b82f:1ce:8854:5b96]) by SFHDAG3NODE2.st.com ([fe80::b82f:1ce:8854:5b96%20]) with mapi id 15.00.1347.000; Mon, 19 Feb 2018 18:13:57 +0100 From: Amelie DELAUNAY To: Andy Shevchenko CC: Lee Jones , Linus Walleij , Rob Herring , Mark Rutland , Russell King , "Alexandre TORGUE" , Maxime Coquelin , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , devicetree , linux-arm Mailing List Subject: Re: [PATCH 3/6] gpio: Add GPIO support for the ST Multi-Function eXpander Thread-Topic: [PATCH 3/6] gpio: Add GPIO support for the ST Multi-Function eXpander Thread-Index: AQHToOkDMk7LryqMCE6GHDVul6FkVaOj/t4AgAf4mAA= Date: Mon, 19 Feb 2018 17:13:57 +0000 Message-ID: <32166cf0-5384-c313-f1be-4c27baf40ccf@st.com> References: <1518100057-23234-1-git-send-email-amelie.delaunay@st.com> <1518100057-23234-4-git-send-email-amelie.delaunay@st.com> In-Reply-To: Accept-Language: fr-FR, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.75.127.47] Content-Type: text/plain; charset="utf-8" Content-ID: Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-02-19_08:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org DQoNCk9uIDAyLzE0LzIwMTggMDQ6MzAgUE0sIEFuZHkgU2hldmNoZW5rbyB3cm90ZToNCj4gT24g VGh1LCBGZWIgOCwgMjAxOCBhdCA0OjI3IFBNLCBBbWVsaWUgRGVsYXVuYXkgPGFtZWxpZS5kZWxh dW5heUBzdC5jb20+IHdyb3RlOg0KPj4gU1QgTXVsdGktRnVuY3Rpb24gZVhwYW5kZXIgKE1GWCkg Y2FuIGJlIHVzZWQgYXMgR1BJTyBleHBhbmRlci4NCj4+IEl0IGhhcyAxNiBmYXN0IEdQSU9zIGFu ZCBjYW4gaGF2ZSA4IGV4dHJhIGFsdGVybmF0ZSBHUElPcw0KPj4gd2hlbiBvdGhlciBNRlggZmVh dHVyZXMgYXJlIG5vdCBlbmFibGVkLg0KPiANCj4+ICtjb25maWcgR1BJT19TVF9NRlgNCj4+ICsg ICAgICAgYm9vbCAiU1QtTUZYIEdQSU9zIg0KPj4gKyAgICAgICBkZXBlbmRzIG9uIE1GRF9TVF9N RlgNCj4+ICsgICAgICAgZGVwZW5kcyBvbiBPRl9HUElPDQo+PiArICAgICAgIHNlbGVjdCBHUElP TElCX0lSUUNISVANCj4+ICsgICAgICAgaGVscA0KPj4gKyAgICAgICAgIEdQSU8gZHJpdmVyIGZv ciBTVE1pY3JvZWxlY3Ryb25pY3MgTXVsdGktRnVuY3Rpb24gZVhwYW5kZXIuDQo+PiArDQo+PiAr ICAgICAgICAgVGhpcyBwcm92aWRlcyBHUElPIGludGVyZmFjZSBzdXBwb3J0aW5nIGlucHV0cyBh bmQgb3V0cHV0cy4NCj4gDQo+PiArLyoNCj4+ICsgKiBTVE1pY3JvZWxlY3Ryb25pY3MgTXVsdGkt RnVuY3Rpb24gZVhwYW5kZXIgKFNULU1GWCkgLSBHUElPIGV4cGFuZGVyIGRyaXZlci4NCj4+ICsg Kg0KPj4gKyAqIENvcHlyaWdodCAoQykg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Z4X2dwaW8tPm1meDsNCj4+ICsgICAgICAgdTE2 IGk7DQo+PiArDQo+PiArICAgICAgIGZvciAoaSA9IDA7IGkgPCBnYy0+bmdwaW87IGkrKykgew0K Pj4gKyAgICAgICAgICAgICAgIGludCBncGlvID0gaSArIGdjLT5iYXNlOw0KPj4gKyAgICAgICAg ICAgICAgIGNvbnN0IGNoYXIgKmxhYmVsID0gZ3Bpb2NoaXBfaXNfcmVxdWVzdGVkKGdjLCBpKTsN Cj4+ICsgICAgICAgICAgICAgICBpbnQgZGlyID0gbWZ4X2dwaW9fZ2V0X2RpcmVjdGlvbihnYywg aSk7DQo+PiArICAgICAgICAgICAgICAgaW50IHZhbCA9IG1meF9ncGlvX2dldChnYywgaSk7DQo+ PiArICAgICAgICAgICAgICAgdTggbWFzayA9IGdldF9tYXNrKGkpOw0KPj4gKyAgICAgICAgICAg ICAgIHU4IHJlZzsNCj4+ICsgICAgICAgICAgICAgICBpbnQgdHlwZSwgcHVwZDsNCj4+ICsgICAg ICAgICAgICAgICBpbnQgaXJxc3JjLCBpcnFldnQsIGlycXR5cGUsIGlycXBlbmRpbmc7DQo+IA0K Pj4gKyAgICAgICAgICAgICAgIGlmICghbGFiZWwpDQo+PiArICAgICAgICAgICAgICAgICAgICAg ICBsYWJlbCA9ICJVbnJlcXVlc3RlZCI7DQo+IA0KPiBJIHdvdWxkIHJhdGhlciBwdXQgbGFiZWwg PSBncGlvY2hpcF8uLi4oKTsgaW1tZWRpYXRlbHkgYmVmb3JlIHRoaXMNCj4gY29uZGl0aW9uIGZv ciBiZXR0ZXIgcmVhZGFiaWxpdHkuDQo+IA0KWW91J3JlIHJpZ2h0Lg0KDQo+PiArDQo+PiArICAg ICAgICAgICAgICAgc2VxX3ByaW50ZihzLCAiIGdwaW8tJS0zZCAoJS0yMC4yMHMpICIsIGdwaW8s IGxhYmVsKTsNCj4+ICsNCj4gDQo+PiArICAgICAgICAgICAgICAgcmVnID0gTUZYX1JFR19JUlFf R1BJX1BFTkRJTkcgKyBnZXRfYmFuayhpKTsNCj4+ICsgICAgICAgICAgICAgICBpcnFwZW5kaW5n ID0gbWZ4X3JlZ19yZWFkKG1meCwgcmVnKTsNCj4+ICsgICAgICAgICAgICAgICBpZiAoaXJxcGVu ZGluZyA8IDApDQo+PiArICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47DQo+PiArICAgICAg ICAgICAgICAgaXJxcGVuZGluZyA9ICEhKGlycXBlbmRpbmcgJiBtYXNrKTsNCj4+ICsNCj4gDQo+ PiArICAgICAgICAgICAgICAgaWYgKCFkaXIpIHsNCj4gDQo+IFdoeSBub3QgdG8gdXNlDQo+IA0K PiBpZiAoZGlyKSB7DQo+IA0KPiA/DQo+IA0KTXkgYnJhaW4gb3JkZXJzIHRoaW5ncyBpbiBhc2Nl bmRpbmcgb3JkZXIsIEkgdGhpbmsgaXQgaXMgdGhlIHJlYXNvbiB3aHkgDQp0aGlzIGNvZGUgbWFu YWdlcyBmYWxzZSBjYXNlcyAoPTApIGJlZm9yZSB0aGUgb3RoZXJzLg0KDQo+PiArICAgICAgICAg ICAgICAgICAgICAgICBzZXFfcHJpbnRmKHMsICJvdXQgJXMgIiwgdmFsID8gImhpZ2giIDogImxv dyIpOw0KPj4gKyAgICAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGUpDQo+PiArICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIHNlcV9wdXRzKHMsICJvcGVuIGRyYWluICIpOw0KPj4gKyAg ICAgICAgICAgICAgICAgICAgICAgZWxzZQ0KPj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBzZXFfcHV0cyhzLCAicHVzaCBwdWxsICIpOw0KPj4gKyAgICAgICAgICAgICAgICAgICAg ICAgaWYgKHB1cGQgJiYgdHlwZSkNCj4+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg c2VxX3B1dHMocywgIndpdGggaW50ZXJuYWwgcHVsbC11cCAiKTsNCj4+ICsgICAgICAgICAgICAg ICAgICAgICAgIGVsc2UNCj4+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VxX3B1 dHMocywgIndpdGhvdXQgaW50ZXJuYWwgcHVsbC11cCAiKTsNCj4+ICsgICAgICAgICAgICAgICB9 IGVsc2Ugew0KPj4gKyAgICAgICAgICAgICAgICAgICAgICAgc2VxX3ByaW50ZihzLCAiaW4gJXMg IiwgdmFsID8gImhpZ2giIDogImxvdyIpOw0KPj4gKyAgICAgICAgICAgICAgICAgICAgICAgaWYg KHR5cGUpDQo+PiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlcV9wcmludGYocywg IndpdGggaW50ZXJuYWwgcHVsbC0lcyAiLA0KPj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIHB1cGQgPyAidXAiIDogImRvd24iKTsNCj4+ICsgICAgICAgICAgICAg ICAgICAgICAgIGVsc2UNCj4+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VxX3By aW50ZihzLCAiJXMgIiwNCj4+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBwdXBkID8gImZsb2F0aW5nIiA6ICJhbmFsb2ciKTsNCj4+ICsgICAgICAgICAgICAgICB9 DQo+PiArDQo+PiArICAgICAgICAgICAgICAgaWYgKGlycXNyYykgew0KPj4gKyAgICAgICAgICAg ICAgICAgICAgICAgc2VxX3ByaW50ZihzLCAiSVJRIGdlbmVyYXRlZCBvbiAlcyAlcyIsDQo+PiAr ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICFpcnFldnQgPw0KPj4gKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAoIWlycXR5cGUgPyAiTG93IGxldmVsIiA6ICJIaWdo IGxldmVsIikgOg0KPj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoIWlycXR5 cGUgPyAiRmFsbGluZyBlZGdlIiA6ICJSaXNpbmcgZWRnZSIpLA0K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sNCj4+ICsgICAgICAgdTgg c3RhdHVzW251bV9iYW5rc107DQo+IA0KPj4gKyAgICAgICBpbnQgcmV0Ow0KPj4gKyAgICAgICB1 OCBiYW5rOw0KPiANCj4gU3dhcCBsaW5lcy4NCj4gDQpPSy4NCj4+ICsNCj4+ICsgICAgICAgcmV0 ID0gbWZ4X2Jsb2NrX3JlYWQobWZ4LCBNRlhfUkVHX0lSUV9HUElfUEVORElORywgQVJSQVlfU0la RShzdGF0dXMpLA0KPj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXMpOw0KPj4g KyAgICAgICBpZiAocmV0IDwgMCkgew0KPiANCj4+ICsgICAgICAgICAgICAgICBkZXZfZXJyKG1m eF9ncGlvLT5kZXYsICJjYW4ndCBnZXQgSVJRX0dQSV9QRU5ESU5HOiAlZFxuIiwgcmV0KTsNCj4g DQo+IEluIElSUSBjb250ZXh0IG9uIGVyciBsZXZlbD8gSG1tLi4uDQo+IA0KT0sgSSB3aWxsIHJl bW92ZSBpdCBpbiBWMi4NCj4+ICsgICAgICAgICAgICAgICByZXR1cm4gSVJRX05PTkU7DQo+PiAr ICAgICAgIH0NCj4+ICsNCj4+ICsgICAgICAgZm9yIChiYW5rID0gMDsgYmFuayA8IEFSUkFZX1NJ WkUoc3RhdHVzKTsgYmFuaysrKSB7DQo+PiArICAgICAgICAgICAgICAgdTggc3RhdCA9IHN0YXR1 c1tiYW5rXTsNCj4+ICsNCj4+ICsgICAgICAgICAgICAgICBpZiAoIXN0YXQpDQo+PiArICAgICAg ICAgICAgICAgICAgICAgICBjb250aW51ZTsNCj4+ICsNCj4gDQo+PiArICAgICAgICAgICAgICAg d2hpbGUgKHN0YXQpIHsNCj4+ICsgICAgICAgICAgICAgICAgICAgICAgIGludCBiaXQgPSBfX2Zm cyhzdGF0KTsNCj4gDQo+IGZvcl9lYWNoX3NldF9iaXQoKSA/DQo+IA0KWW91J3JlIHJpZ2h0Lg0K Pj4gKyAgICAgICAgICAgICAgICAgICAgICAgaW50IG9mZnNldCA9IGJhbmsgKiBOUl9HUElPU19Q RVJfQkFOSyArIGJpdDsNCj4+ICsgICAgICAgICAgICAgICAgICAgICAgIGludCBncGlvX2lycSA9 IGlycV9maW5kX21hcHBpbmcobWZ4X2dwaW8tPmdjLmlycS5kb21haW4sDQo+PiArICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9mZnNldCk7DQo+ PiArICAgICAgICAgICAgICAgICAgICAgICBpbnQgaXJxX3RyaWdnZXIgPSBpcnFfZ2V0X3RyaWdn ZXJfdHlwZShncGlvX2lycSk7DQo+PiArDQo+PiArICAgICAgICAgICAgICAgICAgICAgICBoYW5k bGVfbmVzdGVkX2lycShncGlvX2lycSk7DQo+PiArICAgICAgICAgICAgICAgICAgICAgICBzdGF0 ICY9IH4oQklUKGJpdCkpOw0KPj4gKw0KPj4gKyAgICAgICAgICAgICAgICAgICAgICAgaWYgKGly cV90cmlnZ2VyICYgSVJRX1RZUEVfRURHRV9CT1RIKQ0KPj4gKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBtZnhfZ3Bpb19pcnFfdG9nZ2xlX3RyaWdnZXIoJm1meF9ncGlvLT5nYywNCj4+ ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIG9mZnNldCk7DQo+PiArICAgICAgICAgICAgICAgfQ0KPj4gKw0KPj4gKyAgICAgICAgICAg ICAgIG1meF9yZWdfd3JpdGUobWZ4LCBNRlhfUkVHX0lSUV9HUElfQUNLICsgYmFuaywgc3RhdHVz W2JhbmtdKTsNCj4+ICsgICAgICAgfQ0KPj4gKw0KPj4gKyAgICAgICByZXR1cm4gSVJRX0hBTkRM RUQ7DQo+PiArfQ0KPiANCg0KVGhhbmtzIGZvciByZXZpZXcsDQpBbWVsaWU=