Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp286157lqr; Wed, 5 Jun 2024 06:13:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWv0OJYHrSC3/cqea+CTNjB107F/7LQN8UKvZrY3ogA5Ny/H3HTbUxK47DPz8exAMWLnQAq+7litlQbtXqORpMJsUWflnfB77nYlUk9uA== X-Google-Smtp-Source: AGHT+IHPCieZVoNrsmuXhv/mI2gKkO+/t8T+oiBGLlM7KMnvuZFRfMen0EVw9/7vJ9BSRoaDhUAI X-Received: by 2002:a50:aac4:0:b0:57a:2417:5ef4 with SMTP id 4fb4d7f45d1cf-57a8b6aa068mr1668527a12.17.1717593235345; Wed, 05 Jun 2024 06:13:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717593235; cv=pass; d=google.com; s=arc-20160816; b=ENGmSJ7OXOrkvD4jR8UW2jVM8NbvhU1BEnq6fervNSMHnzfAm+5BWR2uCHEiwn4k6t ou9kCrFzzb/Msh1MCEd4XdIAtLcXMoplOsPEdyka6iz8IWlo++5EQIco6ovEai638YVi gmIwG/qj4l+Mv1uyYfd91qlcEpn/CwvjD/z/ZlMEfw72ZjfoPFpG0saTzalfScwTjd5S G1CclIre8IsspNSdl2C5YzsGh2IWSigNFUOL3/5M+T6KkiBgoRwHcrQgpFRb1RByFExx 816k48IMRUnsw4fvCbaD7jEQtqBnG6aXNIZsRZosPJQnasGnWrcv2p55ezZw1GkyCUUM ABzQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=IfbBkk58GEW1jaelJm193v9j1yjL8CcEQGJYNO+wi4s=; fh=c6J4tndz7VJ7TKK4UirhQFrXVx8xrLwSk4QZ2VqrLS0=; b=eNDfXWxNtm/fkRxVcOIe89GanyXeetQCVNZ+frrPON5p0YIy6Qtatv5MUZ9PJTWqUF AbrxS4prbzav/wviGqsawmQoGi1LMMVVggDuyIAYyPMjHJdiznOCGOG0/+cTjnre2O/e LGUUkBuRHh1nvu6ZZxSDeJEcPJtIcnvTrA3MPZgQsCT3g1vyww7L6cxAjzWF+Rswx3eY fFP2Xhk7C75v8Zyx7esjLLuf4oOtcceuxK7Rv0ZAdclQ025oEQx5m8Eais6s7yMiYR4d jNbJ3mhOSctdThupRgsZ3PNoeYInqrgU3CdETRrgvIWUDODPb8RVWhosKqLN5N0wT6A4 TGMg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RejSWuMT; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-202599-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202599-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57a4b75337bsi4894362a12.306.2024.06.05.06.13.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 06:13:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202599-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RejSWuMT; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-202599-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202599-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 5DCB51F297D4 for ; Wed, 5 Jun 2024 13:10:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 18E8019AD4D; Wed, 5 Jun 2024 12:24:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RejSWuMT" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 38AE719AD92; Wed, 5 Jun 2024 12:24:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717590281; cv=none; b=ZyOW6BORxqRCbJircAjMMMD+ZM/fv7MU3Xh2Qr8L9POsa34kDSMCpS7G58pBzHOFe7/uHeljpkbUDtNqdEl/D46hUjI26IxSiz+fYYdnOdzwMBslgWT2kgq4CbzreBQ1CPJZZEqXZx6ZG0aukLLmR/EiP+QaOpbwtNIsEqAY/VU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717590281; c=relaxed/simple; bh=nGTFRil33Cf7booPAwWDBm5uj0Ablwum3J22FiGthRM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=cykCUg1FSQ0Aan+XsZEVNnWCf5v+3hD6lj6clslxSGKpdKScfo1J6tkM+d4Rm7vbGrnTmlBXh7npXU2+60JtiNQw/2MHFNo3Bi4kvEXm4P0WjmbxGbZvYusxxZVTWdf05LkEEpk0JLNkFVng4Xjddzz09khsmlvrJUcjx7VxOmM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RejSWuMT; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id ED176C3277B; Wed, 5 Jun 2024 12:24:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717590281; bh=nGTFRil33Cf7booPAwWDBm5uj0Ablwum3J22FiGthRM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RejSWuMT9WnUO7WLChIm6whFz9uS1iD1LLLju+n/vwAuvlzEmMtHcYhIgSCFRV0Ra ccBNdi0Yg7hoI9t+55l/W2CUe5DEEDPhYP0MABEfcSxHFnT4wG0ecAU1QG+zNWYlrL qznLhW3Azkp4ri2VAwkPxhyY0ArvF2ZJv//o+ls+BxupRN4ki06hXpQhr1m6om5tUH sd24EE2ZcNONIy3DeOteDQwm/Mz0pgVAbNXeGNMAyJBos7ESNMBILxTSlcK7kZCJgY D8oE/ZMDrmmbd7PNZysY3vKcGgb7dL7iJgU4UJiyYixp0Fpp9mcn/r8g4gfKxXlATA SU2WenzpdeMSA== Date: Wed, 5 Jun 2024 13:24:33 +0100 From: Mark Brown To: Marcelo Schmitt Cc: lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, nuno.sa@analog.com, dlechner@baylibre.com, marcelo.schmitt1@gmail.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 1/6] spi: Add SPI mode bit for MOSI idle state configuration Message-ID: <0a716b10-0ae0-425f-919a-ea5d8b7975b6@sirena.org.uk> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="/ai5QVhWnEmXwiWy" Content-Disposition: inline In-Reply-To: X-Cookie: Simulated picture. --/ai5QVhWnEmXwiWy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jun 04, 2024 at 07:41:47PM -0300, Marcelo Schmitt wrote: > The behavior of an SPI controller data output line (SDO or MOSI or COPI > (Controller Output Peripheral Input) for disambiguation) is not specified > when the controller is not clocking out data on SCLK edges. However, there > exist SPI peripherals that require specific COPI line state when data is > not being clocked out of the controller. This is an optimisation for accelerating devices that need a specific value, really if these devices need a value they should send it. > #define SPI_MOSI_IDLE_LOW _BITUL(17) /* leave mosi line low when idle */ > +#define SPI_MOSI_IDLE_HIGH _BITUL(18) /* leave mosi line high when idle */ Realistically we'll have a large set of drivers that are expecting the line to be held low so I'm not sure we need that option. I would also expect to have an implementation of these options in the core which supplies buffers with the relevant data for use with controllers that don't have the feature (similar to how _MUST_TX and _MUST_RX are done). Even without that we'd need feature detection so that drivers that try to use this aren't just buggy when used with a controller that doesn't implement it, but once you're detecting you may as well just make things work. --/ai5QVhWnEmXwiWy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmZgWQEACgkQJNaLcl1U h9BzVwf/XOcTR4d09YYBn0fjTHLD5RTAADKdYqwP/EXFklqqszGee4v3Q6MrGCke 1sfN9zIt5WxA7ETFjlpAF+jOjOxk/uaRgytTArEdFGh92N7fsIvcXpR+bKG6L5h5 DoHrUaEMPoWSC0ZPtCtE/Mtp/CIfa8zwjHMfkmYRgh+YIL1XnA+0BZ8H7N5bEQ5e T4SLBCfgfqck2SlIDFU/+X3Z3nM4TF9g4/D2E1dLH5W/KHhX6ErFbhZVUcRvWh8R mT3qNkxo+0hx+t5gwZR6TUSIUulew59oyKfDSr6yRvUj0RhdI1BvJsm74GlubUpw fQerDO3rspJBANa5nCTDRkubmDR0Ag== =7FcH -----END PGP SIGNATURE----- --/ai5QVhWnEmXwiWy--