Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp4823784rwb; Tue, 6 Sep 2022 13:21:03 -0700 (PDT) X-Google-Smtp-Source: AA6agR5jF2P87hbPP/8OKnveSOLLuRtnAqHSTk0UHJv+ND5eB/ss+h7lL0AqArJw0n1aejwmwzE3 X-Received: by 2002:a17:907:6089:b0:734:be0c:e0cd with SMTP id ht9-20020a170907608900b00734be0ce0cdmr135712ejc.474.1662495662776; Tue, 06 Sep 2022 13:21:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662495662; cv=none; d=google.com; s=arc-20160816; b=XkWUdVNJ9C7v8kysB5t6ldcE+bho+6XSKdlgFrsRl5XV0SJeAcOuFtTZ2161HI1WJD CEQHgZ+DrE0dXTiOOCkVd/4UZYoHrsqFRLbyozV4bwnGaCghJEz587kaDCHFmYJlSqeL JEa8vvjdRTZix0L1AxgXzwEPGJSO7Q73giC5BU9kN4kiv4hHoOi1M8fQCzETUcjsL2Cx ghmHCUkyRw+BCrHAqciwAYOjx+5pyB0Ry87JwDTJDmp4oVNRCd6jCcOeGLItv/kgVv0S yafxjTLJh83N6A0Hsr98VvpnJkNf47POR5W27p0Y2PjpnknupqDsQDPAQ+iuTeV5VgnL TjwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=OujVUnVk+XFo1lwQ6hOBY2ejWHuVgo8Nja2nbuNrs+Y=; b=DN+GxqvOf5yy9umyOPaNn14BCDJqTw9aJ7rLVXpslGLiPEEfsWROqZt4tRu+wn1DtA c6Dt/PILxTmdRe42HMkbCGyPrjfFlco2l2t2gVf89UhudwG9j1AYtnT321boo21mWJ0U GQM4cUtg4ZLvtBGoCKXy5BtdE2IW0F3IuM4m8wrdHbp3zQ0lk1C1uA3a0Y4CgKbqgDGK xox70+DW7ZsGhfnqdDTOM4pmE2leHk2tESkroMtgQX6GDtJcWDacuzmQhjiAGZrwJupK rxDFKpVO0x7Ak4UTHLGEGeba536xvIOEm1JAaviTFJJEt1wcl9YcljYbwjezlS2keoDh KcrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=kRGhHHWr; 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=ibm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dp16-20020a170906c15000b0073dc19d10basi10363907ejc.70.2022.09.06.13.20.33; Tue, 06 Sep 2022 13:21:02 -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=@ibm.com header.s=pp1 header.b=kRGhHHWr; 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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229730AbiIFTsm (ORCPT + 99 others); Tue, 6 Sep 2022 15:48:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229453AbiIFTsl (ORCPT ); Tue, 6 Sep 2022 15:48:41 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CB9388DC8; Tue, 6 Sep 2022 12:48:39 -0700 (PDT) Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 286JH1v0003042; Tue, 6 Sep 2022 19:48:24 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=OujVUnVk+XFo1lwQ6hOBY2ejWHuVgo8Nja2nbuNrs+Y=; b=kRGhHHWro42WmadVLpkbqMoATZrqSHZ5ERgje5t6ft+CGClR6KqLQmB/jWyr30KJayVg hU47Fv/xJ5kEuedBTQ5LWOvASu/fe8Hz7AVv4nmbpY51DPSpYRbysYcKSv00pvrNPYuq ouow9tLOfIsvmIU+CGEmolMRyAtTjiKysGpNIRdrdPCaDd0joZ11TmnRMXLUgdRLWc5i K4BRZlIi5jj5+ki9OkJJClEdBKqDUIc4UOLyJY5+EoBlPRVeP7fkJoQ935g6biYXvgmL 2Ed6+e52w16AgIVylZq0q55nKyptDfeBEwyZFP7PnJbhUIoR73SeZLG1nt22WggT6fBr dg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3jec7t0sfh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 06 Sep 2022 19:48:24 +0000 Received: from m0098409.ppops.net (m0098409.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 286JI49C007696; Tue, 6 Sep 2022 19:48:23 GMT Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3jec7t0sex-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 06 Sep 2022 19:48:23 +0000 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 286JZOr9009557; Tue, 6 Sep 2022 19:48:22 GMT Received: from b01cxnp23032.gho.pok.ibm.com (b01cxnp23032.gho.pok.ibm.com [9.57.198.27]) by ppma01dal.us.ibm.com with ESMTP id 3jbxj9tuv2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 06 Sep 2022 19:48:22 +0000 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 286JmLHP66257302 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 6 Sep 2022 19:48:21 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7D775AC05F; Tue, 6 Sep 2022 19:48:21 +0000 (GMT) Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 12138AC059; Tue, 6 Sep 2022 19:48:21 +0000 (GMT) Received: from [9.160.74.237] (unknown [9.160.74.237]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 6 Sep 2022 19:48:20 +0000 (GMT) Message-ID: <85280d48-4251-2811-b66d-092f4153fbb5@linux.ibm.com> Date: Tue, 6 Sep 2022 14:48:20 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH v4 1/2] iio: pressure: dps310: Refactor startup procedure Content-Language: en-US To: Jonathan Cameron , Andy Shevchenko Cc: linux-iio , Lars-Peter Clausen , Linux Kernel Mailing List , Joel Stanley References: <20220809211246.251006-1-eajames@linux.ibm.com> <20220809211246.251006-2-eajames@linux.ibm.com> <20220820124915.5dd5b745@jic23-huawei> From: Eddie James In-Reply-To: <20220820124915.5dd5b745@jic23-huawei> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: Z1R8v4d-APcFHezH-Vaw1xMjvgw7wGyQ X-Proofpoint-GUID: akQIzJwyKuoJW_lSwCdH3dALnWcWuCo8 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-06_09,2022-09-06_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 priorityscore=1501 mlxlogscore=999 spamscore=0 mlxscore=0 impostorscore=0 malwarescore=0 bulkscore=0 suspectscore=0 clxscore=1015 phishscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2209060090 X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_MSPIKE_H2,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 8/20/22 06:49, Jonathan Cameron wrote: > On Fri, 19 Aug 2022 12:42:00 +0300 > Andy Shevchenko wrote: > >> 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. > Given they are undocumented, this is guessing territory. > Probably best to just leave them as is. > You could do a bulk write on an array though as that implies > nothing about what's in the registers -just that they happen > to be next to each other. Indeed. Is it worth it to switch to bulk write for two 2-byte writes? I'm inclined to say no and will leave this as-is for v6, but if you think it is, I can switch it. Thanks, Eddie > >> ... >> >>>>> + rc = regmap_write(data->regmap, 0x0e, 0x00); >>>>> + if (rc) >>>>> + return rc; >>>>> + >>>>> + return regmap_write(data->regmap, 0x0f, 0x00); >> Ditto. >>