Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp824935rwb; Thu, 4 Aug 2022 11:33:55 -0700 (PDT) X-Google-Smtp-Source: AA6agR7CKVzf2GqKkj/H7Hx+P7NepfNfqpkqNYKhRorh0hz4joubDW6PJxHVirUZyfJ6RNRqhu8y X-Received: by 2002:a05:6402:c47:b0:437:ce2d:c30d with SMTP id cs7-20020a0564020c4700b00437ce2dc30dmr3294264edb.395.1659638035376; Thu, 04 Aug 2022 11:33:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659638035; cv=none; d=google.com; s=arc-20160816; b=Dq8rFF3CkyQL4oHUVl+/R5EUrp4SyjH61UJXASohN3TJk1r8AY/iq3Uyg8xr0YY0W/ OcFxOa5G3GTlJKuIoJXJv/zKbOqZUwOfXvxzs2C/bZzZ+vwaSdZa2GH7LlADCP4BjlIN 4Vg3Z3zDobpPtYCdj+MreBF1XzaBRN46U12YBqU7Q9gvKJ7LkCDq+aiMSLqmdn/MEWlt mWMpw9ohSmM1BCCwkikHBOB4veDHzacFXngbUrcupgL9EOCFBdSbkIU8DMCkgZ/CW89w 6uzLrRg9Ug+YVTMYrLcmDrW1bd8z83SHypXQoWyK729fGr3eHPvVYaNE2GINQHPgNcRY viCg== 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=Tvb9VvakfApSPWdpoQx5Q1AcS3jGz0l17iYUSKjdN+M=; b=trdoVhzfZ0RiEN32Ka8MYfWR25frsYt+qnu07O68VjSUVVaasgPr/m9einBfDx6RbR YU1akOZfP83nbHZTRzdRp7prdNyHCdEoJrZiBAY/RuAWByqAnmCA0QLiFV/QRgHgm2d/ AOgEUyrLIWes1bKZvHoC1lRX9W1wU5Q8qGUo8PIhynFzpCPAUh0t7hSzdKSVyKtYnOn3 tkZqJOmEi8AzgIT3E6InxF1f0xW3xoehLTzRdYPCT3zuL/hzD32bZBewftQbEclaav26 RwkheqQg9/hbjGUZXNLwXIQgq8s8fmn+ZIHqgGZGDN0jEzlyNSEWKmWXIyGyzdTHNH0Y NHIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=n3Kwntd7; 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 nd12-20020a170907628c00b007304f4611e6si1506250ejc.719.2022.08.04.11.33.31; Thu, 04 Aug 2022 11:33: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=n3Kwntd7; 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 S239916AbiHDSRi (ORCPT + 99 others); Thu, 4 Aug 2022 14:17:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233540AbiHDSRh (ORCPT ); Thu, 4 Aug 2022 14:17:37 -0400 Received: from mail.sberdevices.ru (mail.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D2406C116; Thu, 4 Aug 2022 11:17:31 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mail.sberdevices.ru (Postfix) with ESMTP id D5F135FD06; Thu, 4 Aug 2022 21:17:29 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1659637049; bh=Tvb9VvakfApSPWdpoQx5Q1AcS3jGz0l17iYUSKjdN+M=; h=From:To:Subject:Date:Message-ID:Content-Type:MIME-Version; b=n3Kwntd7y5Fw+H3WQtG0ajJUj379omQjTE6t8oUetMppbYkAYtektxKsKJuUc3KI9 YGinavIhcy5VGBc5VvlvSe8bKXoQDXcfioV1QUbwUuB2aCJvKPlqNiaqGF7v3xyj5A R//M+CGQIQd6+9ISsK2OZE0wY5Mw2WHgLn7KNQ4fU6+WLKpfbW5lTs/QuVefKm0ESn C4NlzRrjNaFB5CJFXTqIglytwei94XH+2HOItkhJbptACoT7j4LkFs8ZpsJqM9JL1W +kg/pm3VV3NAWGkxexIayoqLdJKAzXhKrd9FoyYiJrX3QfL93dvKnmf7GGkXDuYT5T dTnI0WCaZLuGw== Received: from S-MS-EXCH02.sberdevices.ru (S-MS-EXCH02.sberdevices.ru [172.16.1.5]) by mail.sberdevices.ru (Postfix) with ESMTP; Thu, 4 Aug 2022 21:17:28 +0300 (MSK) From: Dmitry Rokosov To: Andy Shevchenko CC: "robh+dt@kernel.org" , "stano.jakubek@gmail.com" , "shawnguo@kernel.org" , "jic23@kernel.org" , "lars@metafoo.de" , "stephan@gerhold.net" , "linux-iio@vger.kernel.org" , "devicetree@vger.kernel.org" , kernel , "linux-kernel@vger.kernel.org" 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/62dQgeAgAAYQICAAYHbgA== Date: Thu, 4 Aug 2022 18:17:05 +0000 Message-ID: <20220804181723.4bljpxcwkj6cnn2f@CAB-WSD-L081021.sigma.sbrf.ru> References: <20220803131132.19630-1-ddrokosov@sberdevices.ru> <20220803131132.19630-3-ddrokosov@sberdevices.ru> <20220803191621.tzrmndkygfe7nlpx@CAB-WSD-L081021.sigma.sbrf.ru> In-Reply-To: <20220803191621.tzrmndkygfe7nlpx@CAB-WSD-L081021.sigma.sbrf.ru> 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="us-ascii" Content-ID: <88CACE263C12EA449953E33B2739D1C6@sberdevices.ru> Content-Transfer-Encoding: quoted-printable 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/04 16:30:00 #20051329 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 Andy, I have one question about str_read_write() helper, please find it below. On Wed, Aug 03, 2022 at 07:16:13PM +0000, Dmitry Rokosov wrote: > Hello Andy, >=20 > Thank you for quick review, >=20 > On Wed, Aug 03, 2022 at 07:49:33PM +0200, Andy Shevchenko wrote: > > On Wed, Aug 3, 2022 at 3:11 PM Dmitry Rokosov wrote: > > > > > > MSA311 is a tri-axial, low-g accelerometer with I2C digital output fo= r > > > sensitivity consumer applications. It has dynamic user-selectable ful= l > > > scales range of +-2g/+-4g/+-8g/+-16g and allows acceleration measurem= ents > > > with output data rates from 1Hz to 1000Hz. > > > > > > Spec: https://cdn-shop.adafruit.com/product-files/5309/MSA311-V1.1-EN= G.pdf > > > > > > This driver supports following MSA311 features: > > > - IIO interface > > > - Different power modes: NORMAL and SUSPEND (using pm_runtime) > > > - ODR (Output Data Rate) selection > > > - Scale and samp_freq selection > > > - IIO triggered buffer, IIO reg access > > > - NEW_DATA interrupt + trigger > > > > > > Below features to be done: > > > - Motion Events: ACTIVE, TAP, ORIENT, FREEFALL > > > - Low Power mode > >=20 > > Thanks for an update, my comments below. [...] > >=20 > > ... > >=20 > > > + dev_err(dev, "cannot %s register %u from debugfs (%d)= \n", > > > + readval ? "read" : "write", reg, err); > >=20 > > You may consider taking [1] as a precursor here and use str_read_write(= ). > >=20 > > [1]: https://lore.kernel.org/linux-i2c/20220703154232.55549-1-andriy.sh= evchenko@linux.intel.com/ >=20 > Oh, really... Thank you for suggestion! I have taken it closer, and it's really helpful and nice, but looks like it's not merged to linux-next. Please advise how I can use it in the driver. Should I provide "Depends-On:" tag as I did for my HZ units patchset? --=20 Thank you, Dmitry=