Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp475269imn; Wed, 3 Aug 2022 11:53:55 -0700 (PDT) X-Google-Smtp-Source: AGRyM1si2klw+aWmzWUCXiT1QgY10S/xqGXQoTREYlKc6lutWNhTdbyK3ocPjKlk07mlE3z8YDZU X-Received: by 2002:a05:6402:48:b0:43a:caa8:756b with SMTP id f8-20020a056402004800b0043acaa8756bmr26456671edu.112.1659552835763; Wed, 03 Aug 2022 11:53:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659552835; cv=none; d=google.com; s=arc-20160816; b=XYfoHnw8nXIX7Uw1+mBcZy8Je9mZWBkQrW0aOfyZqdQFXqatpXkw6r8t+KmnfGukJw Sr/cdzFHvW8C0myjbSvSqCTNxXLiD3j3N9J1VtjojnSyuqdw7qwlefEWdB1pKg3Y17vB EGMDHJGgBHLwMxeLMXf3gyUxMiETV7xKGmTNMANAsTOifBr4tFNuqSWwtjuU0HXxtJ/M ANCAjWoDkdWrkvG368akoiUNW7ygCGNHNIPRDx6L3wF2kIHzI8XsXNyqwcG5EJKzLcHp y379PR49djmyYUeAQil7jmun1sj7jM2b+4WbEaDh1mULx01BXyojyUVhjHfXd/OLPXQY hoQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=AFS79+dO5ikd1qNd+wJdt8tTXYQwYhcVieR97AhPH3Y=; b=tj6UeiUrPUp2+8OwSeeveT1dhKeDqYsMZWB+sQwnCP/QAIBSNqtuh2tNkwmxu+0IIE FyeDZTQj7y6DpNa1qttFoUcBFI4uesqYPMVxGGkd2u/6hE94F+mMP1XFVNuKbnjY4gSs yzkgg45ZNjMwigfteyQFQTNcBYx0LNKlyYqSyKPApBLD9ONlx6a9Sjal+xPt7wFT9mFb pWzjiiuIl4O40ypN+fHEi0ysY5TyhHOam4TGZA5+L7ru9SrifQw1aLDTmvXa4IKgiZlI Iw0FQqZTVqlMOjB46++TGR6ak/aQ7fL4DA9jo6CCL2zWK1ZmwQ2aWWJ33yfv00hCCGKP HoLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=BAeaxim9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dt22-20020a170907729600b0072b60b29cc8si16783965ejc.49.2022.08.03.11.53.29; Wed, 03 Aug 2022 11:53:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=BAeaxim9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238270AbiHCSkM (ORCPT + 99 others); Wed, 3 Aug 2022 14:40:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232488AbiHCSkL (ORCPT ); Wed, 3 Aug 2022 14:40:11 -0400 Received: from mail.sberdevices.ru (mail.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BAA15A2EA; Wed, 3 Aug 2022 11:40:08 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mail.sberdevices.ru (Postfix) with ESMTP id 3C42F5FD36; Wed, 3 Aug 2022 21:40:05 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1659552005; bh=AFS79+dO5ikd1qNd+wJdt8tTXYQwYhcVieR97AhPH3Y=; h=From:To:Subject:Date:Message-ID:Content-Type:MIME-Version; b=BAeaxim9CAU+amvAX4NHDEXMsp7dIuSrcWpHX1VmzB/Osu7OGMHq2Zg8AT1POx6H/ nl41hH8V88HC5TwvP054amUGr4Phy72ZIftTE1TVd6/LvXJQaICYjdUy4hfjviXMrK I5RDeonvwaL/s0LF+vR7LHnCn/zSKDSSvbLcJ35GnOvPOSGm06DrMlDpXxilukIwCY ap/g+7zIs7pcMAlZW9uLfs1sxksegtsM7J+1H4GaxjlH0LjPrQK4fnaCYU6uSywa0Q lhEw2JULCOiFJPz2t2vzuLJSOP7uvpQsaD/Pr8fJtqmxvbcq48wba58dl+3KnLlc4q /DQtL//dRSBhw== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mail.sberdevices.ru (Postfix) with ESMTP; Wed, 3 Aug 2022 21:40:04 +0300 (MSK) From: Dmitry Rokosov To: Christophe JAILLET CC: "andy.shevchenko@gmail.com" , "devicetree@vger.kernel.org" , "jic23@kernel.org" , kernel , "lars@metafoo.de" , "linux-iio@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "robh+dt@kernel.org" , "shawnguo@kernel.org" , "stano.jakubek@gmail.com" , "stephan@gerhold.net" Subject: Re: [PATCH v4 2/3] iio: add MEMSensing MSA311 3-axis accelerometer driver Thread-Topic: [PATCH v4 2/3] iio: add MEMSensing MSA311 3-axis accelerometer driver Thread-Index: AQHYpzqIoQnaRj7vNkq2cXUUGjAB/62dSAuAgAAIFYA= Date: Wed, 3 Aug 2022 18:39:49 +0000 Message-ID: <20220803184001.fcappv7grdjyaetn@CAB-WSD-L081021.sigma.sbrf.ru> References: <20220803131132.19630-1-ddrokosov@sberdevices.ru> <20220803131132.19630-3-ddrokosov@sberdevices.ru> <67041dbe-ad6c-c53f-9760-bd7b5988d137@wanadoo.fr> In-Reply-To: <67041dbe-ad6c-c53f-9760-bd7b5988d137@wanadoo.fr> Accept-Language: ru-RU, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.16.1.12] Content-Type: text/plain; charset="utf-8" Content-ID: <08B9D705C7259E4B936A7AF48D49D8D2@sberdevices.ru> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2022/08/03 16:08:00 #20044033 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SGVsbG8gQ2hyaXN0b3BoZSwNCg0KVGhhbmsgeW91IGZvciBxdWljayByZXZpZXcNCg0KT24gV2Vk LCBBdWcgMDMsIDIwMjIgYXQgMDg6MTE6MDVQTSArMDIwMCwgQ2hyaXN0b3BoZSBKQUlMTEVUIHdy b3RlOg0KPiBMZSAwMy8wOC8yMDIyIMOgIDE1OjExLCBEbWl0cnkgUm9rb3NvdiBhIMOpY3JpdMKg Og0KPiA+IE1TQTMxMSBpcyBhIHRyaS1heGlhbCwgbG93LWcgYWNjZWxlcm9tZXRlciB3aXRoIEky QyBka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