Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp464112lqe; Sat, 6 Apr 2024 08:19:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXBqvxMYSjIThSZNyPpsrkht2LKwoVEAfMmJCLrEb2Cdw86Pl5Cw+X3cZ15SFXUPXAC5CuJs7m36v8cm5kzpuq6XUYze5NW7Z8Aqo1YkQ== X-Google-Smtp-Source: AGHT+IF9l31wmipC81R+FzaRankdEJybB1zjRj7slHD1ZrpZ8p3ormrdpfmk0WU2WUDIeo8jSHCQ X-Received: by 2002:a05:6a00:1486:b0:6ec:f1b3:8518 with SMTP id v6-20020a056a00148600b006ecf1b38518mr7492552pfu.5.1712416797731; Sat, 06 Apr 2024 08:19:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712416797; cv=pass; d=google.com; s=arc-20160816; b=d+T8qyNcD/L3MrlPc08tUQo6LileUT/40T51jRmuVKClAdikn8ePaKt/FGl9oNt4+Q O6h/C91Wr6LfrdZdpHqzEnOwSVtdqdmiga5S+6kWVIkKmIGrKhqfY76efKW3xUYcr/Eq m/M8wIvv3Bjszzrt9e15EljiKUl2p14US68ivld79QC3CJmG2CdCdea0i/cpytcPpwKs zcPSGYGA2Ry50cFpT18LoB/u1fkm23u+93HRY5/B3R5/RrC9b+iwSgoGs5ArmmwDUzYh feBxd7H9OmG1oLFuVbc0RCNf+MLweClpPjgjMB3N/SD6ALhodl6iYQwal7dGYIPSLLBA VXPA== 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=q2rbEfmmyh+KhKlR4RVDA/1nvCfZinzDT7NX7RO1Nv8=; fh=aO7VwMzXorvFb/cjS7UqKL2BI3mnI34qIdePd4Zg25U=; b=Rd7mOUH+vGnlL3tyHOml3weckUIiTMR6LjLshir2yyQm+EPB2WpjQZIa8NU77gi7rW FhQVYmyQIp8SJflyT7OAOhXDy1uqFz3eFyFV+jeiMMKNA/9AiqkmAAuZD5idjukIcE6/ OtcgcsrbqPSXLn9768D5SfnEGpZCtqzKdM2+ivEqpP02fYVnxhMdnNh4slOSZCLBRjj5 GPbpuS9mfSVazN7Ai2NbzMEVLNuR6G/0x5ffjWVA4umrUisa0G7KL2n+u8PRI66ifQ/3 Im/wfQ209XPvJYYE6KMCVBxhBibb9vuhJlxvT+sfi/H4cmkTxI3/rNrbwpFDFVJFgVpY qNHQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mEQ5BuWm; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-133970-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133970-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id x23-20020a634a17000000b005e456ac163bsi3224704pga.107.2024.04.06.08.19.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Apr 2024 08:19:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-133970-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mEQ5BuWm; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-133970-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133970-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 5BC8F282403 for ; Sat, 6 Apr 2024 15:19:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2DCD639FF4; Sat, 6 Apr 2024 15:19:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mEQ5BuWm" 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 3FE19381A4; Sat, 6 Apr 2024 15:19:48 +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=1712416789; cv=none; b=EW9HXyT2FFKhhJQA2yY6vh/pyvMTvOPt0RmYBCPn0lRWXB7E3hwxilY+s3j/dZVRqGHJeUaXinlYLmdMA78PuE63I3I/cmVEiexOU+MHrUH29SHPwqbwFLs/MAj7E/6GA8/ckSriof5OXBHjrvRI9GSTBvRl0ZRTOMw09lMcaP0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712416789; c=relaxed/simple; bh=F0yD2te0Q85dmAD07i6O7OobeJIw3035Mh6eXZKnERY=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=KPZOdXkiS9mpeVl8geYkDrNUJG+9KzJtUUOOVZ0CQ2/vAlpYjuK6UkkvSf+1FfEgCcSnZluGdu1YGC3TrmK8GW/vFiymXd7KMWRaYFo9QbVBe6b/xYErKD1oPxjA+2zFIUUEe+JDJnayZI6Uh5C9bdFSh6gIwTA//R6mhx/ujAE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mEQ5BuWm; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D9E45C433C7; Sat, 6 Apr 2024 15:19:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712416788; bh=F0yD2te0Q85dmAD07i6O7OobeJIw3035Mh6eXZKnERY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=mEQ5BuWmG8QsLe9rfJTRZ8DTfgoFzmPBoWN905oUQ+1V6iOLJbX9u+jG0Nw9PAK4x De7bd6r8v/z8XFHt6e+5+mYLOq4RKQNNEH9aZ56rvoKTViutm5rXUmVjCB7N4gwHKb JyGoPYl5Rg4BMNOhux4bliCmxeJLBbPNMvdLfVvri4ujp9uQepgSoD/CJKsQRTGV/e YBCn9XqIXgBF9/qwfdb0Y3x9nIwacbMpFlNos3YBYtDEj9hMD+0/SeUsVFRQncv/Cy CrJktO5MDDaBf3zzD5DjmuCqL0W9OiK/8Rfx9S26SX2/b1rksFLh9ufdSK0cPOfjUZ RXdPVCz1Aaxlg== Date: Sat, 6 Apr 2024 16:19:33 +0100 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 v7 0/8] iio: accel: adxl345: Add spi-3wire feature Message-ID: <20240406161933.56da10a0@jic23-huawei> In-Reply-To: <20240401194906.56810-1-l.rubusch@gmail.com> References: <20240401194906.56810-1-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, 1 Apr 2024 19:48:58 +0000 Lothar Rubusch wrote: > Pass a function setup() as pointer from SPI/I2C specific modules to the > core module. Implement setup() to pass the spi-3wire bus option, if > declared in the device-tree. > > In the core module then update data_format register configuration bits > instead of overwriting it. The changes allow to remove a data_range field. > > Signed-off-by: Lothar Rubusch Series applied to the togreg branch of iio.git and pushed out initially as testing to let 0-day work it's magic (find build issues for us!) I'll push it out for linux-next to pick up sometime in next week (ish) Jonathan > --- > V1 -> V2: Split into spi-3wire and refactoring > V2 -> V3: Split further, focus on needed changesets > V3 -> V4: Drop "Remove single info instances"; > split "Group bus configuration" into separat > comment patch; reorder patch set > V4 -> V5: Refrase comments; Align comments to 75; rebuild FORMAT_MASK by > available flags; fix indention > V5 -> V6: Remove FORMAT_MASK by a local variable on call site; > Refrase comments; > Remove unneeded include > V6 -> V7: Restructure optional passing the setup() to core's probe() > Guarantee that initially a regmap_write() was called to init > all bits to a defined state > - When a setup() e.g. for 3wire is passed, then call > regmap_write() inside the setup(). In the following > core's probe() has to call regmap_update() > - When NULL is passed, then call regmap_write() in core's > probe() > - Refactoring: remove obvious comments and simplify code > > Lothar Rubusch (8): > iio: accel: adxl345: Make data_range obsolete > iio: accel: adxl345: Group bus configuration > iio: accel: adxl345: Move defines to header > dt-bindings: iio: accel: adxl345: Add spi-3wire > iio: accel: adxl345: Pass function pointer to core > iio: accel: adxl345: Reorder probe initialization > iio: accel: adxl345: Add comment to probe > iio: accel: adxl345: Add spi-3wire option > > .../bindings/iio/accel/adi,adxl345.yaml | 2 + > drivers/iio/accel/adxl345.h | 36 +++++++- > drivers/iio/accel/adxl345_core.c | 92 ++++++++++--------- > drivers/iio/accel/adxl345_i2c.c | 2 +- > drivers/iio/accel/adxl345_spi.c | 10 +- > 5 files changed, 94 insertions(+), 48 deletions(-) >