Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp5357658rwi; Sun, 23 Oct 2022 04:54:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6tce2fFtjr/bnWMcpNLL9g249/Mq/pxXIGakCrfCVrHqVhYnC0zuHjovhl5ZSrveDr7zIf X-Received: by 2002:a17:906:8a48:b0:7a5:a8f5:b870 with SMTP id gx8-20020a1709068a4800b007a5a8f5b870mr2002872ejc.458.1666526054241; Sun, 23 Oct 2022 04:54:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666526054; cv=none; d=google.com; s=arc-20160816; b=pfzDKiKGBkBG1mu0bhexWodDwIOQJYT4Ct3IuruoXyaGcevkhSmkaPYcyWHeItgnox US4E9UbhXwCD1eOxVqy9L6uxv2bIvScw4XORgK6/uEJa/VgaAQljFkM4Y+AJlG4O3DBr t+FRqDQ7IecKoeZJfxNu9KlCoHU71tUrfPAlThXzYMuXde8vogjFgeEOY64H+eGoILUL ltMld/pqX0sbgkHx5FzGjYTHd+5E3Y0RiYvHkNBCfcwp5OyKjGABIf32QvJeW67trxyd ERSs9mas6TbYt3+yM1lUbozbAIcQsksMa98CveIlzUvFLo0JSbzq59be4CKnexpljKMT H9ZQ== 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:subject:cc:to:from:date :dkim-signature; bh=h446gCbEUYhjzy6hyj7LftQKI43hc5CyDtq+JuMu5R0=; b=aHZObNbMmIoZ4Qxakl2T8GuSlp7ZQNk/rG+AuJ+FS61Qfg47r40Rp13df7aAM6bxt8 y1RlC1YPkuTso9pFOT1TixmtnQVH+KBIqtPLHnoXeCjSO+QTj5VU5gHeSr68a06lFWKO ODot+BnfHR+9lYO32d5ThdOofE5ket4UJtgxyUqNXIC0EMRESFTIK8CB23+36IsSAqcC 60FllswckrM+DsDAkXcFqk1dm3l9xnYUqxTK2+gdJeN1o8JgNVVIRtYuOnrpA0ixyp+l Y4tZlCWHQR3yG3RFgmUVKr2+/J3BvhCLmp7J4ZyF2O56qrpj2NC0+xYCn6sEcqZwHPlf wFdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=N8zjEReD; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g11-20020a1709065d0b00b007a4feae7adesi1691964ejt.837.2022.10.23.04.53.48; Sun, 23 Oct 2022 04:54:14 -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=@kernel.org header.s=k20201202 header.b=N8zjEReD; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230371AbiJWLL7 (ORCPT + 99 others); Sun, 23 Oct 2022 07:11:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230165AbiJWLL5 (ORCPT ); Sun, 23 Oct 2022 07:11:57 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8769171BE6; Sun, 23 Oct 2022 04:11:52 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 220FBCE0EA9; Sun, 23 Oct 2022 11:11:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E706C433D6; Sun, 23 Oct 2022 11:11:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666523508; bh=PRvB53cA0BIluFQSUcreDKe67RMSVT8jvBYFm8OQYfw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=N8zjEReDEKEkoEbGBZIvz0AuPxdQ3uwuVLWinRlYpGPM/vDQtwUPMQy4oZT4Oogck EHVhoLehe2I7BO45lN8jlz72T7oZeYfqHEVPHv/srGXDIt6P19DNUwUjfyq7muOhCx cGxdWuEmawK7+p+P+uEf8jBRmZr5hkP2uogIOJX7DCZpaKbGjAS5r6oMZtTRqh+tHQ 1dbCwh185LIu9srzj3z31Rd7h48uuB8SSt2Z9e9gDKwtVI8mRGo9MWdDLAqKtiwN8O /k+NhxM3VsuepmCb+r/m7Z68ij7B+Xo/bnsytNNX+t44tw11mZQYw0KUhn8iqOV0YQ uY+Zvbb3oFpNQ== Date: Sun, 23 Oct 2022 12:12:22 +0100 From: Jonathan Cameron To: Marcus Folkesson Cc: Mitja Spes , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Andy Shevchenko , Lee Jones , Mark Brown , Uwe =?UTF-8?B?S2xlaW5lLUvDtm5pZw==?= , Tomasz Duszynski , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/3] iio: pressure: ms5611: changed hardcoded SPI speed to value limited Message-ID: <20221023121222.5fe4a743@jic23-huawei> In-Reply-To: References: <20221021135827.1444793-1-mitja@lxnav.com> <20221021135827.1444793-3-mitja@lxnav.com> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 Fri, 21 Oct 2022 17:32:21 +0200 Marcus Folkesson wrote: > Hi Mitja, > > On Fri, Oct 21, 2022 at 03:58:21PM +0200, Mitja Spes wrote: > > Don't hardcode the ms5611 SPI speed, limit it instead. > > > > Signed-off-by: Mitja Spes > > --- > > drivers/iio/pressure/ms5611_spi.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/iio/pressure/ms5611_spi.c b/drivers/iio/pressure/ms5611_spi.c > > index 432e912096f4..a0a7205c9c3a 100644 > > --- a/drivers/iio/pressure/ms5611_spi.c > > +++ b/drivers/iio/pressure/ms5611_spi.c > > @@ -91,7 +91,7 @@ static int ms5611_spi_probe(struct spi_device *spi) > > spi_set_drvdata(spi, indio_dev); > > > > spi->mode = SPI_MODE_0; > > - spi->max_speed_hz = 20000000; > > + spi->max_speed_hz = min(spi->max_speed_hz, 20000000U); > > max_speed_hz is a limit, and the max frequency the ms5611 support is > 20MHz. Hi Marcus, I'm not following what you are commenting on.. Perhaps give more detail? Thanks, Jonathan > > Best regards, > Marcus Folkesson