Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp654720rwb; Fri, 13 Jan 2023 02:31:03 -0800 (PST) X-Google-Smtp-Source: AMrXdXuzgGcyERWvPTmECweK+VHoB9HfxkLDs/K72/i+VraYgvcHXDbOFfoNBYWz2YvKxSvVV1NV X-Received: by 2002:a05:6402:299b:b0:499:b320:fc2d with SMTP id eq27-20020a056402299b00b00499b320fc2dmr16216626edb.33.1673605863477; Fri, 13 Jan 2023 02:31:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673605863; cv=none; d=google.com; s=arc-20160816; b=09iXeSHN0YmeAoDk6viZGz5zRg9wks+GbHzUQgcuaL1CxmP9U2Y7Bkp6jsn/No55YL Y6ckvU2jss6Gic/Zr6OQlr0qpGhqkODakT9ddJ2l0nNbOSzj4uIfFs76E6EtTy0b6XrP ef7sHqELaHNpNLcFYnosJ1TksrRAXK7hrKm8bl100MVQ9pIW0WwFDmTHf0kScAk2iFCL HhHifYZgKR7xOyQ5xCK7UFhXUk8tVyeBptuztsGNuPVfbgMUTxfqOUS3tzAPNiY/ImVg 57z8DYJ8KP48u8C465e1EaX8oxCbIcxyolDHTOxNMj2ieN2hfNHs/xxerAsUNXyiIcOm ZdFQ== 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 Return-Path: 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.30.50; Fri, 13 Jan 2023 02:31:03 -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 + 51 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 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: X-Mailing-List: linux-kernel@vger.kernel.org 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