Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp2381453rwe; Sun, 28 Aug 2022 09:55:19 -0700 (PDT) X-Google-Smtp-Source: AA6agR5Q7m6+adJb52ex4HcfRkBNrXrgNgwiixnzw9XCY++W7tMTZc3DXwXyNoiCGRYcvrmzIFgL X-Received: by 2002:a17:90a:988:b0:1f2:3dff:f1dd with SMTP id 8-20020a17090a098800b001f23dfff1ddmr14916751pjo.150.1661705718829; Sun, 28 Aug 2022 09:55:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661705718; cv=none; d=google.com; s=arc-20160816; b=jjT1tgVMwEq+VTEuY037ijq3Bhm4l7A2ZCmpZiA8R+qETH56osA5U74ZXGXuvxX/i5 rjAZhoKw1N9jKV4yh1BgyzULzxqcLBdEnHIFvIPXq2He+ozwcklVPiVo4rJ8/rnSCKlf a9OijW45I0zOU4XFD7O5jv9r5S9D8k9Mn97ldvGHIkdXK/4tDQ0pNnuZ4uEu4oeIzwsK NiqVXwfAYjnlj8xZKMQIYi0spl3h+G71HV2PWTUNGq8yk3cYw0nMh4nbkHJocoP+etne 2ZtPQUDW08NV2nhU67rxeZVerWmTgRgaeIu47/hZBM7TletdHR86tEJ3CYKaX43XEDL7 Olcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=VBRipXtHTvtxDCsmoewei9S+WY6nUHJzRweKIlRdTdI=; b=0i6OCA4m1hViQZSAj3lAUDsDWOWHhQNS8PGRWtHJG6IhGwLqho+9LW6LrXFkF2mlN/ ufqDBpgIQP9xtQNAFC6KAWBfX/gwEllTXd7+WNxzUz8+Kz0UiOrLpRaJPYre66iUAEAL kD0nqUBL10EijZLv6IdCyaJcjJrC6iKEHKJEAa4csgz3kCHLoEmolc6h5AmnQ6EnSxEd S0njfqMNEhwOTHXRElEBjHRE+uA//Y92/qY/3sx/NG4yRhFTwGqp+NSwv0Qe4Jys3CE7 DtoAOuhtg1UiHATD/3ym96duj4kYw32xVQ3z400NiTKH0yZcS8DDf+v5rme46K5bgBha Y5VA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LV9FfEsO; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e3-20020a17090a7c4300b001faf24cf424si6967668pjl.64.2022.08.28.09.55.07; Sun, 28 Aug 2022 09:55:18 -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=@kernel.org header.s=k20201202 header.b=LV9FfEsO; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229945AbiH1QVf (ORCPT + 99 others); Sun, 28 Aug 2022 12:21:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229489AbiH1QVd (ORCPT ); Sun, 28 Aug 2022 12:21:33 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C9C41CFFE; Sun, 28 Aug 2022 09:21:31 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 432FD60B3E; Sun, 28 Aug 2022 16:21:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA299C433D7; Sun, 28 Aug 2022 16:21:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661703690; bh=qYruH8K/GFaVT47Q2Gp0/tqxVZZ0LOn2zgpb+Qy0tMk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=LV9FfEsOCa+wpjcTo6584src7EGkGKYdBVjujp7f3pBNuPBKqXz6r6IMc0d6HIUpj B1GbebuZvK6SNN41Za9QHOcnJZ4esq2/REoU3mkqWwGrf/nYrJvjJsutjPKEaZn1II VEvBeaAhMjCNY8LbKFwI01+9KwtA72mCgw48hczTmbday4HA1wwJ2gHpDjImv9BEOE llBLgphQePOuC2ffYZlX9MRr6gYfWd5aXZtANjfm8g/9JQfS6ZkuRESPTOWTXsxXPI jKvYRF/omTJyC96i1+6uD5SqoBvqHoke9FamjSrwZ6+kiHlPHJ8OgFn9o9FSaZBcaA KbxPpfhoyeh8Q== Date: Sun, 28 Aug 2022 16:47:08 +0100 From: Jonathan Cameron To: Dmitry Rokosov Cc: "akpm@linux-foundation.org" , "andriy.shevchenko@linux.intel.com" , "daniel.lezcano@linaro.org" , "wsa@kernel.org" , "andy.shevchenko@gmail.com" , "lars@metafoo.de" , "Michael.Hennerich@analog.com" , "jbhayana@google.com" , "linux-iio@vger.kernel.org" , kernel , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v3 0/3] units: complement the set of Hz units Message-ID: <20220828164708.017c400d@jic23-huawei> In-Reply-To: <20220801143811.14817-1-ddrokosov@sberdevices.ru> References: <20220801143811.14817-1-ddrokosov@sberdevices.ru> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On Mon, 1 Aug 2022 14:37:23 +0000 Dmitry Rokosov wrote: > During msa311 accel IIO driver development > > https://lore.kernel.org/linux-iio/20220616104211.9257-1-ddrokosov@sberdevices.ru/ > > Andy requested to use proper units in the hz->ms calculation. Current > units.h header doesn't have milli, micro and nano HZ coefficients, so > some drivers (in the IIO subsystem) implement their own copies for that. > > The current patchset resolves such a problem and intoduces general > MILLIHZ_PER_HZ, MICROHZ_PER_HZ and NANOHZ_PER_HZ definitions in the units.h, > and fixes all drivers which duplicate these units. Ok, I'm just about convinced this is worth doing given the precedence of similar cases. Applied to the togreg branch of iio.git and pushed out as testing. Thanks, Jonathan > > Changes: > * v2->v3: > - changed UHZ_PER_HZ to MICROHZ_PER_HZ and NHZ_PER_HZ to > NANOHZ_PER_HZ to save name consistency for all new HZ units > > * v1->v2: > - changed MHZ_PER_HZ to a different name as Andy suggested > (suppose MILLIHZ_PER_HZ is good enough) > > Dmitry Rokosov (3): > units: complement the set of Hz units > iio: accel: adxl345: use HZ macro from units.h > iio: common: scmi_sensors: use HZ macro from units.h > > drivers/iio/accel/adxl345_core.c | 7 ++++--- > drivers/iio/common/scmi_sensors/scmi_iio.c | 8 ++++---- > include/linux/units.h | 3 +++ > 3 files changed, 11 insertions(+), 7 deletions(-) >