Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1390681rwb; Fri, 19 Aug 2022 02:53:20 -0700 (PDT) X-Google-Smtp-Source: AA6agR6kkEU4Vmwuu51kPzeijokU6EQbmieyEYCN9VVMZvmgyf2JYaOIjZWS/3QiaZfndKKboFBI X-Received: by 2002:a17:902:e947:b0:170:d739:8cbe with SMTP id b7-20020a170902e94700b00170d7398cbemr6654161pll.141.1660902800095; Fri, 19 Aug 2022 02:53:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660902800; cv=none; d=google.com; s=arc-20160816; b=mnwbCUDo1t9EcIFHxKOJKg946IGpR+kwFXO0AuIk5JrgLANDoNQ6qRxXRZbD77JmOv ZiYDFrfCcDS9mwSbL9uM32ZYjl5Uw3U0U1D0E2NRg3uXVmFN+3j7CaffRmB+cv6ufXxq y36ptvE/BAS49+nLQhVHbUat6Uw5jMjBIiraXbLmQj6yl7NRqCx9xPzI7xU5uEQVhGX8 fXJHVO6KJbXxu0tQZ5te+WaDdgN7mt94pbm2D0DT2mNXEybYURWxwjdlI23GNwdjnegu 9kU5nZnqGQwf/rJCcifCmCaeMFMo1lMNh2+ieKPx06Mu2yQhBgIQTpJ1nWepDg2FbAwX ZuLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Xra5wOcQVG12+wejDaPgCNN7Ex8BBmCGGrUkA59x0/w=; b=wIif0v802dpkG3axBBN6JQsnOxEDaiFwyGNmjK/5gcA2eo/vfEAgTwM1LurZBG4cdZ 8UdaYKYByw1mr0FsbdjPlEni3l69c2PJJjXu9udBpozXSigYl11PdoWi3jDuQY4sloWj 0xxWt4OVvmN8W69PAKptXNMjxRcaOxNBc4/1wuDSOVgiO+ZrLCJa5W5u8mlFij2qbMmA yfXG+Mr6XDIgXTQBmIpIQDFbJLkuRuRJiEzkoWLpfS5d4I7taYC1Ugp4Us1uAceToi4P +o5gE9PPeHtQJ9mj5U3BKvY0T4hvWMczfCywPNU8J26btmlAfZwerIbcmhQh2n7SiBAc HnfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="dyjHy/dU"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f12-20020a056a001acc00b0052b18c4c8besi3924008pfv.217.2022.08.19.02.53.09; Fri, 19 Aug 2022 02:53:20 -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=@gmail.com header.s=20210112 header.b="dyjHy/dU"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347984AbiHSJmm (ORCPT + 99 others); Fri, 19 Aug 2022 05:42:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348205AbiHSJmi (ORCPT ); Fri, 19 Aug 2022 05:42:38 -0400 Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B72EB79A61; Fri, 19 Aug 2022 02:42:37 -0700 (PDT) Received: by mail-qk1-x732.google.com with SMTP id g16so2891967qkl.11; Fri, 19 Aug 2022 02:42:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=Xra5wOcQVG12+wejDaPgCNN7Ex8BBmCGGrUkA59x0/w=; b=dyjHy/dUBiUpNDsh5agSwMcEFKBaGt0DbaWswj2y5LuThuLI4ctgD8UpWiEOoaziYL 0hFauWnW0UQ0fkj6rRhBPM0QeyqCXrykAQ/u8Tagcy69jfOZkwvpArsH28W7MzHSvxOp 6C95gnqXqgDBsEpMPh0MGlwSdayCKyXvkooRjkKjVIm91wVdEin+62VCCR0sJEjNjVdf H64CAzxtwBZurny/cWzvdcQutvJubaL0bwdMtVreLBia2WHddYh2/kkXn0StBxBvAhfM gUzVVprAONXpaClFr6gF7s15Tp4ErtU2E8j8BhohcQaGc1kVKYlAAQY5AV0VVDqMH9Cf cdVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=Xra5wOcQVG12+wejDaPgCNN7Ex8BBmCGGrUkA59x0/w=; b=PpwIkk+Xzt4VmqOM+3Z3pIm3n8SZLUdXg+ehvWAZ4J1sB0DGQ8yxgTXi91F75vTdsY FbE6zkk4bgB1FDsopfgfFu0dD+AX8iBxHe1+YhigqzRBlNx5wVd/bkAo7NddqnafNJH/ uw3Cv432wCcSVcW0aQ2FRpW+CqNVMBn8+Jy4bZ86xM58WjqwGSl0T1ENKwnCoU0DKZ+5 RxZm2bujBmmpExH6H2N9l51YFhWebyODmOHdnzSPK91TGHNSwUHCPV4g33XMaIYArxL0 I1xwqATxVKh9yG+OaveE+fwZ8nk8f1aUPUOGJpheh1rPfyoXpUdnidE7i80SuTwodvdX doNg== X-Gm-Message-State: ACgBeo0Dib3a1jFRfkD7zDHFw/g4mB9aip8jqHg+oy2lDIqZ/p6JWkxf AmQbTctrSKIK5OJstKtabdcMORKKlnxw0BpDd9s= X-Received: by 2002:a05:620a:2809:b0:6b6:5908:316e with SMTP id f9-20020a05620a280900b006b65908316emr4716136qkp.734.1660902156806; Fri, 19 Aug 2022 02:42:36 -0700 (PDT) MIME-Version: 1.0 References: <20220809211246.251006-1-eajames@linux.ibm.com> <20220809211246.251006-2-eajames@linux.ibm.com> In-Reply-To: From: Andy Shevchenko Date: Fri, 19 Aug 2022 12:42:00 +0300 Message-ID: Subject: Re: [PATCH v4 1/2] iio: pressure: dps310: Refactor startup procedure To: Eddie James Cc: linux-iio , Jonathan Cameron , Lars-Peter Clausen , Linux Kernel Mailing List , Joel Stanley Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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, Aug 15, 2022 at 4:42 PM Eddie James wrote: > On 8/12/22 17:03, Andy Shevchenko wrote: > > On Wed, Aug 10, 2022 at 12:12 AM Eddie James wrote: ... > >> + rc = regmap_write(data->regmap, 0x0e, 0xA5); > >> + if (rc) > >> + return rc; > >> + > >> + rc = regmap_write(data->regmap, 0x0f, 0x96); > >> + if (rc) > >> + return rc; > > This code already exists, but still want to ask, is it really > > byte-registers here and not be16/le16 one? In such a case perhaps bulk > > write can be used to reflect it better? > > The temperature and pressure regs are 24 bits big endian, and all the > rest are 8 bits. I think the existing approach is best. It doesn't look like you got what I was meaning... Or I misunderstood what you said. The code above writes two byte values to two sequential registers which make me think that they are 16-bit registers at offset 0x0e. ... > >> + rc = regmap_write(data->regmap, 0x0e, 0x00); > >> + if (rc) > >> + return rc; > >> + > >> + return regmap_write(data->regmap, 0x0f, 0x00); Ditto. -- With Best Regards, Andy Shevchenko