Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2994232lqp; Mon, 25 Mar 2024 16:05:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX9RlDAwQ4pvZmUUR0gPbuOYG8h2g9F6rRJXeKi/tqLEPPMDaEQlUXX+tpdavRuoTcEBm+bgSvov2cjOg/bt5Ehw3EB8xRa8+3l+qbQww== X-Google-Smtp-Source: AGHT+IFwVymZdVIrRWSTVqIKIUh2nG2nA/Kk8PYyv7/ChyjgPHW7z6s9XrRRxpgf9vEq1BOy4BAi X-Received: by 2002:a05:6a20:549f:b0:1a3:69a9:e403 with SMTP id i31-20020a056a20549f00b001a369a9e403mr1468215pzk.39.1711407915751; Mon, 25 Mar 2024 16:05:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711407915; cv=pass; d=google.com; s=arc-20160816; b=o7KBBF/3f8X1ZGfYF6jiGEleaZjImQpWYCyQddWCfLJpYSrYMWZh4yhNcC9Wd//BMf 8Q//wk940KRM+YRhwG3PXJPKRv0eHM/HIG25zUtRW7tDpkZjm50mcpty40YoZ1M0dFfm NaP79noKl2MbbfVXVzibIpgd32DHfW/9oIHKtWUECMnrYuaQb1Af2NIi8aFQ9nmp8PUI gtrvQ2veJFn+CAzROYFzcnQTPIWyQDM6xONAvZYq6QepCTBCk51C5HJ874okpesRuhUP E8+N8Q0LMjGWDZaajeajeCl+DgapQOrbfxz7/T9MgK6dLsTZEWEJaWQ+AkG3zMzA62xn nsYw== 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:organization:references :in-reply-to:message-id:subject:cc:to:from:date; bh=QmPxsGwMTVkZ2rldsODM9eUFukCciO0PR7mh8ZtteqU=; fh=iA7cwQoKJh1evK2tlv+GlGtaFSFcAWWZ4qkgziYIO98=; b=voG26DPbycNZgmCs5P/W+QhSLS86NhRsBiNb26486jKgXPgB9SaQEFGEMK+u5KNjes NybCWvqoCXkCaXYsSaRPD/QrQTN3gIf5hTkHwyO4BS0f/YVzSTc6A1zBGaGwnVymO4nK dGwXin7us5sDLoE/KAc5I3UTqUIVQsNhb4I8LsdPDKO94HqFXwMow65i7KpC8yV1s34q vZDknr66Dhbjt4SEW4CMJnXhbJmCQg1gbn73aqCkvY5OGERFwS09ABZVlmvifwIquGke Z7x/5LzlnXPelGfhoUmz9Bmh0Qr+RW2izCiWgT4ou0AVSYOZAPmjyYXASlHiXbM1CgTP uL8Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-117286-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117286-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=QUARANTINE) header.from=huawei.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id e11-20020a17090a4a0b00b0029b09c53385si8356208pjh.43.2024.03.25.16.05.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 16:05:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-117286-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-117286-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-117286-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=QUARANTINE) header.from=huawei.com 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 8911CC04D7C for ; Mon, 25 Mar 2024 16:38:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9FA1213F44F; Mon, 25 Mar 2024 14:46:49 +0000 (UTC) Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (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 259A113C8FA; Mon, 25 Mar 2024 14:46:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.176.79.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711378009; cv=none; b=d8EVaiiP/oz0pficQ2GIVkLQPaC7eHNyW8iHS+XCkkBGlHemej/dC+NYxxTBSczRaj2fTZWJUveTT6Lsz+cWbyrY66vBH6Xu+W9HZSluUtgN7JVeJ3gakYTBMRmmGITgySaOXEAbnajryKmPOmmX+9p0L24AzY5iHabFAjUADoo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711378009; c=relaxed/simple; bh=sWygChFX3/WLpSsznDXG7/eJr9ItIKtyMdVZzjow3K0=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=UK5WZh7cHdtvzyHujBVtCh3bo1kjX/PDt1/8g2reMdN535yKGxztdux2ZFKe6tCqFRFskMUIfYJ6yi3S1Xh6rG+KSVjhQiyAMCB447F2mvWUqB0jan4X5wchJ2/66SCRmTZtrYTnRiy3IuFPmfMoxx+aL/MLKqf9tqM89lO1CSM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=185.176.79.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.231]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4V3G2R0Qvqz6D8Z0; Mon, 25 Mar 2024 22:45:51 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id DBD72140D30; Mon, 25 Mar 2024 22:46:44 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Mon, 25 Mar 2024 14:46:44 +0000 Date: Mon, 25 Mar 2024 14:46:43 +0000 From: Jonathan Cameron To: Lothar Rubusch CC: Jonathan Cameron , , , , , , , , , Subject: Re: [PATCH v3 3/6] iio: accel: adxl345: Add spi-3wire option Message-ID: <20240325144643.00006175@Huawei.com> In-Reply-To: References: <20240323122030.21800-1-l.rubusch@gmail.com> <20240323122030.21800-4-l.rubusch@gmail.com> <20240324133238.61d5f989@jic23-huawei> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) 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="UTF-8" Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: lhrpeml100004.china.huawei.com (7.191.162.219) To lhrpeml500005.china.huawei.com (7.191.163.240) On Sun, 24 Mar 2024 19:59:39 +0100 Lothar Rubusch wrote: > On Sun, Mar 24, 2024 at 2:32=E2=80=AFPM Jonathan Cameron wrote: > > > > On Sat, 23 Mar 2024 12:20:27 +0000 > > Lothar Rubusch wrote: > > =20 > > > Add a setup function implementation to the spi module to enable > > > spi-3wire as option when specified in the device-tree. > > > > > > Signed-off-by: Lothar Rubusch > > > --- > > > drivers/iio/accel/adxl345.h | 3 +++ > > > drivers/iio/accel/adxl345_spi.c | 12 +++++++++++- > > > 2 files changed, 14 insertions(+), 1 deletion(-) > > > > > > diff --git a/drivers/iio/accel/adxl345.h b/drivers/iio/accel/adxl345.h > > > index 3c1ded0c2..6b84a2cee 100644 > > > --- a/drivers/iio/accel/adxl345.h > > > +++ b/drivers/iio/accel/adxl345.h > > > @@ -8,6 +8,9 @@ > > > #ifndef _ADXL345_H_ > > > #define _ADXL345_H_ > > > > > > +#define ADXL345_REG_DATA_FORMAT 0x31 > > > +#define ADXL345_DATA_FORMAT_SPI BIT(6) /* spi-3wire */ =20 > > Name it that, rather than using a comment. No need to precisely > > match datasheet naming - you are naming the value not the field here. > > > > ADXL345_DATA_FORMAT_SPI_3_WRITE perhaps? > > =20 >=20 > Would you accept the following instead? > ADXL345_DATA_FORMAT_SPI_3WIRE >=20 > In the OF binding it is SPI_3WIRE. So, from this perspective I think it w= ould > be consistent naming. That's fine. Precise naming up to you. Jonathan >=20 > (...) >=20