Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4744004rdh; Wed, 29 Nov 2023 09:24:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IF3Y2C0h9i0WmO1lV9VlAEJZpOb7wFTUSdWqW/OqQYtPC79K1uTSZYkze1pr66ai+mYb4xM X-Received: by 2002:a17:903:22d0:b0:1cf:d06e:d730 with SMTP id y16-20020a17090322d000b001cfd06ed730mr12414091plg.1.1701278689057; Wed, 29 Nov 2023 09:24:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701278689; cv=none; d=google.com; s=arc-20160816; b=OQYPG3ovuixPldxQu9Ov16vtFBo6MSEHjld9+PnrhbiqvPJTYVvXQTa4iY90saHOHe ovnc+y19TlGRMAUpQGDPFbvywyREAZbv8Pw6Gfpc/RFk+vEXkLSopGnN1lfvU3VEtNyf LSPeIDDQMbV82NGe6H34t9g7CqynUarRzFYJ8+GLMo6fCn3UvMLi6j8Dno91RLQ96MX5 8oPf/AjXZhdC55BoPG7CMLTfODoTzaQc7k18gk0XGi+bWd91MdYhSuvRkT4VT1caeDnd ZpLDyimHhjr9pJ5pKJF82pNnCchIzo7oRDkt+BDepPCc5SIhEuK8FhF6A/2brTHufF+D QWFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=XrIqnGc3wVVHGOHc7Vao5T0aFsTkj6uZb+J0cr3Wfo0=; fh=NLsHMCkW9oUPGVAUwi4YjxY06qY4Y90bV6UHFXN6ohE=; b=eANAt/WaPiT9Vt21MVxSuqnIxFo2DoAdp6CiOggOlPDxueB7MT6U5VVAi1ko6NxED6 +3jpJc1AcXzx8QhM5W6ivUECBpUSV0pN703ceKzIddZguNNEkHx+LJn+ijn+TZxsN2wT PExmRqxV05OZS9VlTPC49OB54lHE1sLWO+9sBDOmR+RLmJjT+oDlr+nMBHQvAXJ1KIh2 rNTGdwYWtQ1xuTnpT7vEt0QrtVFB97Qkohg+l3/PGDL7F5ykD4rPaLbYJiH9pgZdLUEe 1f2oc5zNHgjJkn5XvsbSHC6z7tec4O+IVT2fKX8oHpLWGSKRPGxS8qUm2G5MMxdHGTS0 MaTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NXZqfAQi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id p20-20020a170902ead400b001cc13895130si14071879pld.632.2023.11.29.09.24.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 09:24:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NXZqfAQi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id AD80C802F187; Wed, 29 Nov 2023 09:24:47 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232041AbjK2RYf (ORCPT + 99 others); Wed, 29 Nov 2023 12:24:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232307AbjK2RYc (ORCPT ); Wed, 29 Nov 2023 12:24:32 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4118C137; Wed, 29 Nov 2023 09:24:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701278677; x=1732814677; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=zcZl6izXCOZOAATp4wYpT1f8NPvvO0WuaGYAg0Ab9VU=; b=NXZqfAQi54Am5pwd50kRXBxt+Ju8SZNR/HQwWilbdneTaRWXkwEZB2Y4 yYrVQ995TfMKG2XsBXyA2fQyd3AiO1QRqOHjTJP/2o+19CxwvmmSRKgCT 3Y7/AtE+YNPnx94qMAEdQylwe5iCGG2i71fe+z1oBVnra9Snqoy+qSV21 YnbWh8yXKCi/+PnJIbVXzOc1QmFT/e2lNLrPdrvJiCbq2QSjU9mSRmY7U ZArOONYbdhHUhiLP4+kz7E9MDXADreMXkqZ5JrxHQDNXAWnSgEUuL8xXO ThGEeO0TR5A9aEUcXrD8OiC5NrFjYdZOIWL40uYpNrFuUSw22pCx/hvZD g==; X-IronPort-AV: E=McAfee;i="6600,9927,10909"; a="479399234" X-IronPort-AV: E=Sophos;i="6.04,235,1695711600"; d="scan'208";a="479399234" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2023 09:24:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10909"; a="1100595850" X-IronPort-AV: E=Sophos;i="6.04,235,1695711600"; d="scan'208";a="1100595850" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga005.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2023 09:24:34 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1r8OIZ-00000000VJR-1s2D; Wed, 29 Nov 2023 19:24:31 +0200 Date: Wed, 29 Nov 2023 19:24:31 +0200 From: Andy Shevchenko To: Petre Rodan Cc: linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, Jonathan Cameron , Lars-Peter Clausen , Angel Iglesias , Matti Vaittinen , Andreas Klinger , Rob Herring , Krzysztof Kozlowski Subject: Re: [PATCH v6 2/2] iio: pressure: driver for Honeywell HSC/SSC series Message-ID: References: <20231129170425.3562-1-petre.rodan@subdimension.ro> <20231129170425.3562-2-petre.rodan@subdimension.ro> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231129170425.3562-2-petre.rodan@subdimension.ro> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 29 Nov 2023 09:24:48 -0800 (PST) On Wed, Nov 29, 2023 at 07:04:12PM +0200, Petre Rodan wrote: > Adds driver for digital Honeywell TruStability HSC and SSC series > pressure and temperature sensors. > Communication is one way. The sensor only requires 4 bytes worth of > clock pulses on both i2c and spi in order to push the data out. > The i2c address is hardcoded and depends on the part number. > There is no additional GPIO control. ... > v6: modifications based on Andy's review > - use str_has_prefix(), match_string() instead of strncmp() And why not using the respective property API for that case where match_string() is used? I'm also a bit tired to repeat about: - capitalization and punctuation in the multi-line comments; - broken indentation is some cases. Otherwise it's a good stuff, I leave it now to Jonathan. ... > + tmp = div_s64(((s64)(hsc->pmax - hsc->pmin)) * MICRO, > + hsc->outmax - hsc->outmin); > + hsc->p_scale = div_s64_rem(tmp, NANO, &hsc->p_scale_dec); > + tmp = div_s64(((s64)hsc->pmin * (s64)(hsc->outmax - hsc->outmin)) * > + MICRO, hsc->pmax - hsc->pmin); Why not put MICRO on the previous line? -- With Best Regards, Andy Shevchenko