Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp835010rwl; Fri, 24 Mar 2023 02:38:41 -0700 (PDT) X-Google-Smtp-Source: AK7set+O6QeSUDek73ixhXwgBN5BIdbdUr3mQ9gZK//9Eby9pxQuJZ69YmF/YrX1UnYMsHQ+lG1i X-Received: by 2002:a05:6a20:bca9:b0:da:2d16:db8c with SMTP id fx41-20020a056a20bca900b000da2d16db8cmr2411148pzb.35.1679650721597; Fri, 24 Mar 2023 02:38:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679650721; cv=none; d=google.com; s=arc-20160816; b=VtMSZ5fulOWvEsQOywZ7f/cNv/86y98nJTo61GgIN5omMdfhf1R6aMGBoHZsbQ2t5D KqX51Qftk1/WGem0fjNOoGtEy6RNlvIar9Bkl+cUGBoGlr+G+tdrtuEPGbeLQFxzM7ba LC+AdjjEE3hwz/BCkptz2gssPXbX9WBMzFzIW9qqFz0b4dxA6yB6tscgkvcyQZL/67SI Bl1hO/2niq/0jRd5HUhO2AgVepiGga26GLGx/EUHcZes6KB8cy8Z1i6SKLK1hLixUsZ1 P3uL7Fk+BvIDmSv6yDMg2z2S0dZYV8LR3qny8QFJofohnCbS2uPwIbpm6qZ9owLyQuSK q0LA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=PjAcdhdUxcOsTOcGYGylxKe370xV/9wJPyxiOPxbjJQ=; b=Jw5kRe2S8jLo023BeNKMtsUyT53mHqfiOctN1fcuvYMLLANMVCYtcqrpquqnn+8rNs WiHffkXsgDSGPL8WXJTM0is/VSVjuRQQs1ft2UhxhURnLpaLw9uhVWOKDn5jya+LlXAo hEeMPWyQkVOQ7TYQ6P4ZbtHx/OueSCQAtD75YWZKITc9m/MAT6kcNXo26/B9MqR4E7jN AB5KeSIVq1foG6qja+wlJRvXlVUO3V/8A4KeTmTFskKHxpjY0fL5wbEx04FWUCFCNy45 pZpxp2jioi0ECPHgaNVohar7ej7wjes/cR0scRsn+aOagi3Z+WGfMaqsIxIIk3nVFPLc X5dQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=aD7qwCNe; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r20-20020a6560d4000000b004e22265da03si20834391pgv.652.2023.03.24.02.38.29; Fri, 24 Mar 2023 02:38:41 -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=@bootlin.com header.s=gm1 header.b=aD7qwCNe; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231704AbjCXJhj (ORCPT + 99 others); Fri, 24 Mar 2023 05:37:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231824AbjCXJha (ORCPT ); Fri, 24 Mar 2023 05:37:30 -0400 Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [IPv6:2001:4b98:dc4:8::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 086CD2596C; Fri, 24 Mar 2023 02:37:11 -0700 (PDT) Received: (Authenticated sender: maxime.chevallier@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 902EF100007; Fri, 24 Mar 2023 09:37:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1679650630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PjAcdhdUxcOsTOcGYGylxKe370xV/9wJPyxiOPxbjJQ=; b=aD7qwCNeffDbZvrw87ON/4Mt8iFPClmi2/+tKAwBZZmLe+K46FDsiAApGI5eDGo3psk9tB XojG9bMLW7hZrFLpDOdHywmG2hVDGbtcktohEHjX7mlNd0moM4T1metH7P5MYrwnBbkn7W rAOhJvnie7dXxkGDQqePWgx6LKj1X+eFOdUdQG5X9Pq+RfSkI2fGxyTKqXHoILYg440PID AC2M0aIFq5J3hbR/wdld0ZasvVgzYptp6fMZ1jKfay2GMFjlWsVUAggbnKnqoH7pi0hpXN 8jyB5xCFZXrosWTqvEgcgf0j9SEu6RT3VBooWtrIeCIYRmVGsZ6YF9ZHB+vPVw== From: Maxime Chevallier To: Mark Brown , Greg Kroah-Hartman , rafael@kernel.org, Colin Foster , Vladimir Oltean , Lee Jones , davem@davemloft.net, Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , Heiner Kallweit , Russell King Cc: Maxime Chevallier , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, thomas.petazzoni@bootlin.com Subject: [RFC 4/7] mfd: ocelot-spi: Change the regmap stride to reflect the real one Date: Fri, 24 Mar 2023 10:36:41 +0100 Message-Id: <20230324093644.464704-5-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230324093644.464704-1-maxime.chevallier@bootlin.com> References: <20230324093644.464704-1-maxime.chevallier@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 When used over SPI, the register addresses needs to be translated, compared to when used over MMIO. The translation consists in applying an offset with reg_base, then downshifting the registers by 2. This actually changes the register stride from 4 to 1. Signed-off-by: Maxime Chevallier --- drivers/mfd/ocelot-spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/ocelot-spi.c b/drivers/mfd/ocelot-spi.c index 2d1349a10ca9..107cda0544aa 100644 --- a/drivers/mfd/ocelot-spi.c +++ b/drivers/mfd/ocelot-spi.c @@ -124,7 +124,7 @@ static int ocelot_spi_initialize(struct device *dev) static const struct regmap_config ocelot_spi_regmap_config = { .reg_bits = 24, - .reg_stride = 4, + .reg_stride = 1, .reg_shift = REGMAP_DOWNSHIFT(2), .val_bits = 32, -- 2.39.2