Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp5354486rwi; Sun, 23 Oct 2022 04:49:41 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7hceIf6xqV8oXjvT+XWCpLBrbpk8t/T+ZeLbTI1tlkxWmnAMcSh9KdVuPI+XRInUyNdUDs X-Received: by 2002:aa7:de9a:0:b0:44d:8191:44c5 with SMTP id j26-20020aa7de9a000000b0044d819144c5mr25612659edv.232.1666525781351; Sun, 23 Oct 2022 04:49:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666525781; cv=none; d=google.com; s=arc-20160816; b=XyXRkVx0s6jRVGuGqbZVQVU3KVztmNGDn8uikFWHm2+71Ak0qNYjdZBcwq1/yC5WJk vKWQeUzumllvIRyAlaYzsBF9ad3SGMkGV63vFVWBu9bJd3FybdvLc5SHY4jyl6k2OdnT RVLhqRjYPG6eYzO99dyG615jnu3CMvlSv15EhT7IIu5oR0mx5qNXTZv9rViOwLeCLCcq QEFIskBXjUhSwFLW9e1i1yKagJB9Sn1Y6ltYDCVhSLSrVCqOBKmtH8qe23jLQ4EGscIb DhyAC0OVO59B6wkRY56VYz1NdYePlEUxYOMsAiViaTP+LDRaUkEH555nh5q2Ym5Fhktz XynQ== 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=KpkLZs3c/+a4gcgwtPKVxBIKyBJxeZuQi5axncPSybk=; b=B5HVWkYK+cUuk04ngSofc9RjlZZZTW9kZNnnz4+kkudCGn6EGDenDsDGQSjIyMteW8 wY24zuplAuORZ554ta2LXU9TmlKnj2o/q/Kv/wzTBKKS/qODXnR7Qo3MXuy8Q1di24q4 wIcrxthy5csSsRmwU50wq4kw3qfotGPnGxKfnf0uvNSRXmRs1sQVE6FRCT+NuswOYsSj LZrn7gcdcLF/P4ckIgHL/pZ+3YjMRnuGBFe8JJsH2i1l9fisvPPu0rjaRrkC+97Es2k0 SJ+ztVhpu0v9SzjZ5DlGXdlP91h2ZudXxxsQi0XI8OrCXus8SiOa7H53i9ivs5qKMiuL tI4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nzcbqZou; 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.49.13; Sun, 23 Oct 2022 04:49: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=@kernel.org header.s=k20201202 header.b=nzcbqZou; 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 S229618AbiJWLJh (ORCPT + 99 others); Sun, 23 Oct 2022 07:09:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229973AbiJWLJe (ORCPT ); Sun, 23 Oct 2022 07:09:34 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44765B4A1; Sun, 23 Oct 2022 04:09:31 -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 ams.source.kernel.org (Postfix) with ESMTPS id EDB39B80D19; Sun, 23 Oct 2022 11:09:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6FEF5C433C1; Sun, 23 Oct 2022 11:09:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666523368; bh=hiZr0V8wLCVK725mDTsg+Vkx2ABBUDMJRSowxO1xsOE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=nzcbqZoukgqsGngCsoasbc3DUs/PIuJup7jsyBYc5ztDIvRUFEEGnst53E/LSwJ7m DQ6vj8QU/IM91WlLGg9JWICdYqqaY6VNRAwTjxiDUxDvkBB6OXWZplT0r47jddXyhO 8o6AMrATI6a6iEnePYL0RHhgd/HIe7O5gOfDcTgpwcYNlyRxOK4bSI3Pm9WxhTLTAo e2/HQBthr4c8D6mm91FhQDrxLkuXwYdYLX3/J8XqUWV3+290By6AdJIzHc9Vjqy+Na QeSyXdPScNCtiOa2QrfeetG66hankx6k6a4l/WfPJ5KmTaoC1PeoAogd98SzCM+iOZ XIMdMubqJ/oGA== Date: Sun, 23 Oct 2022 12:10:02 +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: <20221023121002.742bc48f@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 Please give a fixes tag for this one as well. The driver should never have been doing this. Jonathan > > --- > > 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. > > Best regards, > Marcus Folkesson