Message ID | 20230113102309.18308-1-marcan@marcan.st |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp192458wrt; Fri, 13 Jan 2023 02:29:59 -0800 (PST) X-Google-Smtp-Source: AMrXdXvZm+oc+kBlVOExtW8W4fS8350sHw0oehC2UfGWJnCNv63twKQ2VSFTRdRwdBl6ptls6lND X-Received: by 2002:a05:6402:2409:b0:493:597e:2192 with SMTP id t9-20020a056402240900b00493597e2192mr28572032eda.38.1673605799407; Fri, 13 Jan 2023 02:29:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673605799; cv=none; d=google.com; s=arc-20160816; b=Nk2+UK2K6J85JcOmuQ8ve0yRdOQdhCfdDxkPOnkD5PwP3/BKQKjd8TPtdHGCGT6rOG a6N5FO2dxsvfiuH0MV+dJ/WffmAawxmWzA55CrFkUUA622uimOhEOS3UCPi8vIRKpX36 m+uZv5uyHU81UHZ+cMtPCd/cjzi61aKV+JkNorPeqok2cyGhByiGJV5CHboDGBKMy9CI 4nTmDsg3FSUE6E4MZWIUNPiP//StnUoEwqSTjvx7ohsbzHj9cyOZl5zS9rn8goPYHbqC N/MpARCm4u5Ln/bL9w9dhiHQB3LZWaV7Jli3Hm/2noJwoyeFuglLlJeKZoZTbB0yOBu6 dpMA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=R7ArpM+bX2nR6dDXMFkYSH4C2j3SMfQJwf/H1fhhBmw=; b=f6KmXWXY+VhYE4PyAIGxyeKnKsqy733QRmlV1L65iQprelsA0Qq/PUhdGbi6wdkoNX GZ3r9iOzVVIy/RJ1JUNuDOGMz2i6Kzyig6dhvwmdsj/dA3jSOBf31xmsOdaW/4EJ9V6a vP/gRGZ/mgau8RRPpYTv4K/qn6PGjiTBXsGcQF/P/ZHN8hFqJihymmXKCs2M8k/QwiVW QKNRkL3JdAhhP8j9mmMdlRhJ1r2gr7GAEoZNYITokwM9yTaDHLfNWxCTdcStZcIhVNU+ SUiC599WFtlHzx4QpZOM0oaRWcM2usAmLKQwR5rIft+a5/dGB7JtFEOEhsGtHFIdmbAA vLfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marcan.st header.s=default header.b="l/RI4vKR"; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=marcan.st Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bm2-20020a0564020b0200b0049bac85dfb6si2714178edb.19.2023.01.13.02.29.35; Fri, 13 Jan 2023 02:29:59 -0800 (PST) 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=@marcan.st header.s=default header.b="l/RI4vKR"; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=marcan.st Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238192AbjAMKXy (ORCPT <rfc822;callmefire3@gmail.com> + 99 others); Fri, 13 Jan 2023 05:23:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241096AbjAMKXd (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 13 Jan 2023 05:23:33 -0500 Received: from mail.marcansoft.com (marcansoft.com [212.63.210.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A55A560EB; Fri, 13 Jan 2023 02:23:31 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sendonly@marcansoft.com) by mail.marcansoft.com (Postfix) with ESMTPSA id ECE8341A42; Fri, 13 Jan 2023 10:23:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=marcan.st; s=default; t=1673605409; bh=Qk0SZhUSDcUli3ukUepHX62c899A3JbfgCFO6jDV0xw=; h=From:To:Cc:Subject:Date; b=l/RI4vKRdxtkr1dgBIidcWG5huYub+Hd8IQ4/8AQ9V+BjXniGnGiU7aIFRlbq/vxE dK8mHJeu6jhqseny7hhgTLMcPfw+YXb154e8BipO9gRGyOO2RcT8qZtqsPak13kkLh IGgXh82uSQGygDRIJQn6rNEdRI8f1YGPhIix1NOMGljo9TSMplT3v3/x1zyAw4UZh4 9jJxba6lyvTo2g+bEa5jpYzUAFq7WnLQdwVdRVaQN/hAqns+goLBeSRMCn6sHaEDlP QhugQLLKCicRknkAnVE25f2+/4BS/2Zn8wyKIJOzBFBk5G6F5alMKkPUA6iw8L8dyn gEGvHEbkbAXWA== From: Hector Martin <marcan@marcan.st> To: Mark Brown <broonie@kernel.org> Cc: Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Tudor Ambarus <tudor.ambarus@microchip.com>, linux-spi@vger.kernel.org, devicetree@vger.kernel.org, Janne Grunau <j@jannau.net>, Alyssa Rosenzweig <alyssa@rosenzweig.io>, asahi@lists.linux.dev, linux-kernel@vger.kernel.org, Hector Martin <marcan@marcan.st> Subject: [PATCH v2 0/3] SPI core CS delay fixes and additions Date: Fri, 13 Jan 2023 19:23:07 +0900 Message-Id: <20230113102309.18308-1-marcan@marcan.st> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754902874672765327?= X-GMAIL-MSGID: =?utf-8?q?1754902874672765327?= |
Series | SPI core CS delay fixes and additions | |
Message
Hector Martin
Jan. 13, 2023, 10:23 a.m. UTC
Commits f6c911f3308c ("spi: dt-bindings: Introduce spi-cs-setup-ns property") and 33a2fde5f77b ("spi: Introduce spi-cs-setup-ns property") introduced a new property to represent the CS setup delay in the device tree, but they have some issues: - The property is only parsed as a 16-bit integer number of nanoseconds, which limits the maximum value to ~65us. This is not a reasonable upper limit, as some devices might need a lot more. - The property name is inconsistent with other delay properties, which use a "*-delay-ns" naming scheme. - Only the setup delay is introduced, but not the related hold and inactive delay times. This series fixes the issues and adds support for the two missing properties. Please pull in the first 3 patches as fixes for 6.2, to avoid introducing a problematic DT API in this release. The last two patches can wait until 6.3, though are probably harmless to throw in as fixes too, since they're trivial. v2: Removed a stray variable declaration that was triggering a warning, and dropped the first two patches which have already been applied. Janne Grunau (3): spi: Use a 32-bit DT property for spi-cs-setup-delay-ns spi: dt-bindings: Add hold/inactive CS delay peripheral properties spi: Parse hold/inactive CS delay values from the DT .../bindings/spi/spi-peripheral-props.yaml | 10 ++++++++ drivers/spi/spi.c | 25 +++++++++++++++---- 2 files changed, 30 insertions(+), 5 deletions(-) -- 2.35.1
Comments
On Fri, 13 Jan 2023 19:23:07 +0900, Hector Martin wrote: > Commits f6c911f3308c ("spi: dt-bindings: Introduce > spi-cs-setup-ns property") and 33a2fde5f77b ("spi: Introduce > spi-cs-setup-ns property") introduced a new property to represent the > CS setup delay in the device tree, but they have some issues: > > - The property is only parsed as a 16-bit integer number of nanoseconds, > which limits the maximum value to ~65us. This is not a reasonable > upper limit, as some devices might need a lot more. > - The property name is inconsistent with other delay properties, which > use a "*-delay-ns" naming scheme. > - Only the setup delay is introduced, but not the related hold and > inactive delay times. > > [...] Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next Thanks! [1/3] spi: Use a 32-bit DT property for spi-cs-setup-delay-ns commit: f276aacf5d2f7fb57e400db44c807ea3b9525fd6 [2/3] spi: dt-bindings: Add hold/inactive CS delay peripheral properties commit: 34f89f238c545d4fd0166e37c201d96c10443953 [3/3] spi: Parse hold/inactive CS delay values from the DT commit: 5827b31d858e399e0ba9fbd33da7a39b31769e11 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark
On Fri, Jan 13, 2023 at 03:57:26PM +0000, Mark Brown wrote: > On Fri, 13 Jan 2023 19:23:07 +0900, Hector Martin wrote: > > Commits f6c911f3308c ("spi: dt-bindings: Introduce > > spi-cs-setup-ns property") and 33a2fde5f77b ("spi: Introduce > > spi-cs-setup-ns property") introduced a new property to represent the > > CS setup delay in the device tree, but they have some issues: > > > > - The property is only parsed as a 16-bit integer number of nanoseconds, > > which limits the maximum value to ~65us. This is not a reasonable > > upper limit, as some devices might need a lot more. > > - The property name is inconsistent with other delay properties, which > > use a "*-delay-ns" naming scheme. > > - Only the setup delay is introduced, but not the related hold and > > inactive delay times. > > > > [...] > > Applied to > > https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next > > Thanks! > > [1/3] spi: Use a 32-bit DT property for spi-cs-setup-delay-ns > commit: f276aacf5d2f7fb57e400db44c807ea3b9525fd6 Hi, Shouldn't this be sent to 6.2 before the property becomes a stable ABI? Thanks, Kazuki >
Hej Mark, On 2023-02-15 03:52:34 +0900, Kazuki wrote: > On Fri, Jan 13, 2023 at 03:57:26PM +0000, Mark Brown wrote: > > On Fri, 13 Jan 2023 19:23:07 +0900, Hector Martin wrote: > > > Commits f6c911f3308c ("spi: dt-bindings: Introduce > > > spi-cs-setup-ns property") and 33a2fde5f77b ("spi: Introduce > > > spi-cs-setup-ns property") introduced a new property to represent the > > > CS setup delay in the device tree, but they have some issues: > > > > > > - The property is only parsed as a 16-bit integer number of nanoseconds, > > > which limits the maximum value to ~65us. This is not a reasonable > > > upper limit, as some devices might need a lot more. > > > - The property name is inconsistent with other delay properties, which > > > use a "*-delay-ns" naming scheme. > > > - Only the setup delay is introduced, but not the related hold and > > > inactive delay times. > > > > > > [...] > > > > Applied to > > > > https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next > > > > Thanks! > > > > [1/3] spi: Use a 32-bit DT property for spi-cs-setup-delay-ns > > commit: f276aacf5d2f7fb57e400db44c807ea3b9525fd6 > > Shouldn't this be sent to 6.2 before the property becomes a stable ABI? can we still get "spi: Use a 32-bit DT property for spi-cs-setup-delay-ns" into 6.2? If not I can send a single line patch which switches of_property_read_u16() to of_property_read_u32() to avoid defining "spi-cs-setup-delay-ns" to u16 as stable devicetree ABI. sorry this comes so late before 6.2, we missed to track the patches. Thanks, Janne
On Thu, Feb 16, 2023 at 10:04:11AM +0100, Janne Grunau wrote: > can we still get "spi: Use a 32-bit DT property for > spi-cs-setup-delay-ns" into 6.2? I think I sent a pull request for this already.
On 2023-02-16 15:55:52 +0000, Mark Brown wrote: > On Thu, Feb 16, 2023 at 10:04:11AM +0100, Janne Grunau wrote: > > > can we still get "spi: Use a 32-bit DT property for > > spi-cs-setup-delay-ns" into 6.2? > > I think I sent a pull request for this already. I see today's "[GIT PULL] SPI updates for v6.2-rc8-abi" https://lore.kernel.org/lkml/20230216131125.4A6FAC433D2@smtp.kernel.org/ but it was neither in "SPI fixes for v6.2-rc3" or "SPI fixes for v6.2-rc7" or in Linus' tree as of today. I think something went wrong with "[GIT PULL] SPI updates for v6.2-rc8-abi". The message reads is if you intended to just send "spi: Use a 32-bit DT property for spi-cs-setup-delay-ns" and not 62 commits. Janne
On Thu, Feb 16, 2023 at 05:21:07PM +0100, Janne Grunau wrote: > I think something went wrong with "[GIT PULL] SPI updates for > v6.2-rc8-abi". The message reads is if you intended to just send > "spi: Use a 32-bit DT property for spi-cs-setup-delay-ns" and not 62 > commits. You're right, thanks for noticing.