Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4809718rdh; Wed, 29 Nov 2023 11:13:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IERPYlVy5SDM+EOtlKWEUtNOLoLY9+G6x2y1rr8ro/hFzR4NC0Eq7vSZWRTTUohZIqaC1gW X-Received: by 2002:a05:6e02:17cf:b0:35d:1ea0:f25a with SMTP id z15-20020a056e0217cf00b0035d1ea0f25amr6918413ilu.31.1701285235279; Wed, 29 Nov 2023 11:13:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701285235; cv=none; d=google.com; s=arc-20160816; b=fHmWJtyc8I2bv6dQTRXFxKNUCbT9K32+3fzO5lQSJtzn0pRm7QRHjnECGwdoK7hbw2 cAJuGa84lawmKfuvsarSL+cERXPhHRk0j3PwPCCCpN41D485lsX65hsiAFQ9GKg2gyqs K/ZGxzr3hVo0EF8KxTLg9bCpIv1U8X1n+m8j/oe5SVhFxevlmZmQNvm12rXuqxV1+gEw hbnE9X9Lbc7YATR05S3lM46jxHu4JH+U6IwEnK8zbBkzxJN8WIg+txU+zNz2WYR/n7IS srirfp7ywey/CiZJZC+tzXnOXJycwFP1NGTXRFxnNj6n+hzUU92q+OEJTJ1LSQF3ap7Y un7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=4rRJnWJTYBCoTd1RCAWX1TEMMh7HNQveE0x/2SZdCtI=; fh=CalxqnSLS88wzVzIAabzKUkNEkFzm2JQdM+g5DNvClM=; b=H8CXDopM42u54AnvMvUPquWN2f3YY6y501nzlLIfamKjq+GoaNwue82BTbT/w6dU+P mlqK5M4qvQnbTmc6z1bH05v6ynoOYzuxXtTZSQZceMF64ru7whIsL3QprvLLJ+agG2QD /96CX9FODcyz3hYe1LblSK3sR9jhWZuXmdwqN73JNdYm8rC2ojlswZbdREWybQSKWv0B vxlVrKyc/TgOH4+rfwGO+pcSGeP2dEHtJ5dF5did90r4MQ2BtRVZivuQtZwlCf4KK7c1 zcLKl3OVLvVRtFGtUJKlEEIRSFWT9a3aVgSXsv130pbciNIDAd32yLgQOqqqr64MRONu FKzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@subdimension.ro header.s=skycaves header.b="c/+8u4YQ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=subdimension.ro Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id t22-20020a63eb16000000b005c2964b77a2si14533834pgh.362.2023.11.29.11.13.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 11:13:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@subdimension.ro header.s=skycaves header.b="c/+8u4YQ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=subdimension.ro Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id E141B803F7BE; Wed, 29 Nov 2023 11:13:52 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233023AbjK2TMv (ORCPT + 99 others); Wed, 29 Nov 2023 14:12:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231304AbjK2TMu (ORCPT ); Wed, 29 Nov 2023 14:12:50 -0500 Received: from mail.subdimension.ro (unknown [IPv6:2a01:7e01:e001:1d1::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB2E7D5E; Wed, 29 Nov 2023 11:12:55 -0800 (PST) Received: from sunspire (unknown [188.24.94.216]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mail.subdimension.ro (Postfix) with ESMTPSA id 396B328EE6F; Wed, 29 Nov 2023 19:12:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=subdimension.ro; s=skycaves; t=1701285174; bh=xiXoHUFxOf2VpMnPxdPWZok2lzoqqKH4KbvpI0hmZCM=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=c/+8u4YQUBewn/6pZpzPocLAKHOCW3HtaP0idL8WBy3zYF9Ey2jzHseXZGo2XoG4I V/byl8oCNX8T7F6YGWKoXV2aHK4OWF4pp8jgaWHK0y/YZT2qz5OV/2bpwX+b9fQpt5 ANQOaXsdvvKV9uo+Vku+/6HYcji8lqmfLsDMEm+8= Date: Wed, 29 Nov 2023 21:12:52 +0200 From: Petre Rodan To: Andy Shevchenko 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: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Wed, 29 Nov 2023 11:13:53 -0800 (PST) hello! On Wed, Nov 29, 2023 at 07:24:31PM +0200, Andy Shevchenko wrote: > 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 lost again. 437: ret = device_property_read_string(dev, "honeywell,pressure-triplet", &triplet); [..] 455: ret = match_string(hsc_triplet_variants, HSC_VARIANTS_MAX, triplet); if (ret < 0) return dev_err_probe(dev, -EINVAL, "honeywell,pressure-triplet is invalid\n"); hsc->pmin = hsc_range_config[ret].pmin; hsc->pmax = hsc_range_config[ret].pmax; triplet is got via device_property_read_string(), is there some other property function I should be using? > I'm also a bit tired to repeat about: > - capitalization and punctuation in the multi-line comments; > - broken indentation is some cases. sorry about that. I removed all comments you complained about. just to simplify the process. > 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? oh well, from the review I understood you were asking for the replacement of NANO with MICRO on the previous instruction and it did not make much sense ( units are in pascal and we need a kilopascal output to userland) now I understood it's an indentation request. however moving MICRO will cross the 80 column rule. but if there will be yet another modification request I'll move it. cheers, peter > > -- > With Best Regards, > Andy Shevchenko > > -- petre rodan