From patchwork Fri Jan 13 10:23:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hector Martin X-Patchwork-Id: 3973 Return-Path: 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 + 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 ); 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 To: Mark Brown Cc: Rob Herring , Krzysztof Kozlowski , Tudor Ambarus , linux-spi@vger.kernel.org, devicetree@vger.kernel.org, Janne Grunau , Alyssa Rosenzweig , asahi@lists.linux.dev, linux-kernel@vger.kernel.org, Hector Martin 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 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: 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?= 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