Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp3007031lqp; Mon, 25 Mar 2024 16:41:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWsMwP9linIgKFgHsva/TwItMOnWmbs15Bv8ibB8zIR5OF5POtEBFEZLJTzWFB59+IIGm3cO5qMP+TI+LN6hAD2FZ+aY8DAGSUKFt/5xA== X-Google-Smtp-Source: AGHT+IGytnHoUJ5GN8dzJh4ONV4qQU7pwgUtCxiN87NgAPbl8oaPmHeoihrjXIjY9o96yoB341Ru X-Received: by 2002:a05:6358:8a7:b0:17a:bd36:5156 with SMTP id m39-20020a05635808a700b0017abd365156mr10944775rwj.26.1711410085195; Mon, 25 Mar 2024 16:41:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711410085; cv=pass; d=google.com; s=arc-20160816; b=TQ+Fed1QHpj7+E5gn4w0E1Z5hkV6nCr0sUEX3HemIIsUVTBeVR8Vdnvjb56z8c2j0S iN86q2ek3RK8g8cbNoQNkS3g6cjBVQ8+QLo0OmuAdBOUKuRX7i6I0GWHKoS1IxzCr/HC SbarFaXeVqEoHEMkZ+K/S9y3Q+AzjYRHUg7K+a2OnH0sUvhDfKs/IpNqBNZeixqezkKU 9BltEMgZS9P4cUhN8vasdNB7d1JZMiTyoWAyAdf4oga/3lA6ogQ4iXGInVgIHyy45hiL EXPPTRL7WwgmYQyhu1OMwb7tApJkepQFdamNlmhpE4Ezmg6bWkhm3fA0BvLF+km7QQ9F odPw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=y3CuCyRHTu8Y+x7TnndHxfKYZUhwTrZXGwEdH6kI93s=; fh=aO7VwMzXorvFb/cjS7UqKL2BI3mnI34qIdePd4Zg25U=; b=QrBMRtL36pYgah5xiczuoD6FiKiEMg5L5YjuPyjAle/V2wrDNlFzAu2yQJ3SNYtW0q GMWakfqN2kCNDbSiLc0osU5TUZUdRFC9YXHHVm0EjW1EnJCTLb2itx9tlSxB2XNaoy9u kYfPRJpE2063r35zBGyfissVY6a+lLBalCGozrFgCRx+1M1WcIobMzslFTARsYwiNYN+ Z+4ke/N8EshrikB3IgEOzAc/5YTDW1Mc/d7DG9/QCw7kqUuK+SV5rAUBlvG9YTB3qakz bgzovltfNtRll4PeYpOqjcX7YQmLFw8AHFIrOLhzkhygjRz+MkwScnyrASGWtd/ivZrP W2og==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bZJISpcc; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-117938-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117938-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id y16-20020a63ce10000000b005e0c8027182si5048794pgf.831.2024.03.25.16.41.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 16:41:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-117938-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bZJISpcc; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-117938-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117938-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 1363FC60061 for ; Mon, 25 Mar 2024 20:34:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CB22E52F99; Mon, 25 Mar 2024 20:33:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bZJISpcc" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EA6028C0B; Mon, 25 Mar 2024 20:33:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711398809; cv=none; b=NPJEFOMmygm8QzrzfBYhCmkdCSv2ocv3iC00WGN13AbU20rV3ZRZwFm9kBJ7X8rrZERtmlIGEqAwLXqAgOK/HXjBg45c4ETrilC6WhCK+o9idkmZklD5PQshMCHnHGDoEY3PItS2mRSVokrNEJTrD4HFDQy8hCztOtmSyQLSDGo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711398809; c=relaxed/simple; bh=LoJZZc8lLg4OzXpkA2ycYXgYtXUDNWL6Odll9mD4tWM=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ny10/KAzSOdl0fSlFvGNuckFTONoaJ/5doGbviWiim31Fbt2+OzhnxQNIeyJprkbac9CRSVBiFrz8NYoz5IPn61AV17jxCl1asg8DZ4YdJ5JzEiEq1CbXP6wUXq4R5EmpM8tPaF6WlX1vm/0aDUU5vu8XzzA3FP9ai2mBoO6DIk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bZJISpcc; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3A6C4C433F1; Mon, 25 Mar 2024 20:33:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711398808; bh=LoJZZc8lLg4OzXpkA2ycYXgYtXUDNWL6Odll9mD4tWM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=bZJISpccY6df5u2Uv/LE6GqQMtLlRwfa6SLj4YMnCutsQM4DPgpOmtIGjI7v0ILei AoEeY/hEUVpEXF0Sy+pMcd2J9iX0MWoHZWnErny+F9YT9hvpx3g0uGEoOXDRTAv4/E ai6zHjRI1d6IL0BaJESWdp6FUfCM9yDvrquaY20c43O9J2XEJzREKxz9jmoRJBpDi1 T4Re4A/xDaiFH4gFLae4/bBi25NmS4xaro7egK5tnH9JeB9WF64yIXsg2p1y9pcDKF CJzkY/G++XdakCxibW3c26aDPBgyuAaF5GUiE2puIVb4VMSREGKaXVTWoqV3bvYfIJ aBwz4NGYEs5Bg== Date: Mon, 25 Mar 2024 20:33:12 +0000 From: Jonathan Cameron To: Lothar Rubusch Cc: lars@metafoo.de, Michael.Hennerich@analog.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, eraretuya@gmail.com Subject: Re: [PATCH v4 2/7] iio: accel: adxl345: Group bus configuration Message-ID: <20240325203312.684391ef@jic23-huawei> In-Reply-To: <20240325153356.46112-3-l.rubusch@gmail.com> References: <20240325153356.46112-1-l.rubusch@gmail.com> <20240325153356.46112-3-l.rubusch@gmail.com> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 25 Mar 2024 15:33:51 +0000 Lothar Rubusch wrote: > In the probe function group bus configuration and the > indio_dev initialization to improve readability. > > Signed-off-by: Lothar Rubusch > --- > drivers/iio/accel/adxl345_core.c | 13 +++++++------ > 1 file changed, 7 insertions(+), 6 deletions(-) > > diff --git a/drivers/iio/accel/adxl345_core.c b/drivers/iio/accel/adxl345_core.c > index be6758015..469015e9c 100644 > --- a/drivers/iio/accel/adxl345_core.c > +++ b/drivers/iio/accel/adxl345_core.c > @@ -218,22 +218,23 @@ int adxl345_core_probe(struct device *dev, struct regmap *regmap) > > data = iio_priv(indio_dev); > data->regmap = regmap; > - /* Enable full-resolution mode */ The naming of the written value gives this comment away + it's obviously misplaced after previous patch. I'd just drop the comment in patch 1. > + > data->info = device_get_match_data(dev); > if (!data->info) > return -ENODEV; > > - ret = regmap_update_bits(regmap, ADXL345_REG_DATA_FORMAT, > - ADXL345_DATA_FORMAT_MSK, ADXL345_DATA_FORMAT_FULL_RES); > - if (ret) > - return dev_err_probe(dev, ret, "Failed to set data range\n"); > - > indio_dev->name = data->info->name; > indio_dev->info = &adxl345_info; > indio_dev->modes = INDIO_DIRECT_MODE; > indio_dev->channels = adxl345_channels; > indio_dev->num_channels = ARRAY_SIZE(adxl345_channels); > > + /* Enable full-resolution mode */ > + ret = regmap_update_bits(regmap, ADXL345_REG_DATA_FORMAT, > + ADXL345_DATA_FORMAT_MSK, ADXL345_DATA_FORMAT_FULL_RES); > + if (ret) > + return dev_err_probe(dev, ret, "Failed to set data range\n"); > + > /* Enable measurement mode */ > ret = adxl345_powerup(data->regmap); > if (ret < 0)