Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp354041pxu; Thu, 3 Dec 2020 01:51:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJw+KfoR4uc6oUUAhSmNCS/NpXL5yRDDJlZ15nXhwH2zJNWvEV064TEd9OD8fD6Pu1mOkFhx X-Received: by 2002:a50:c2ca:: with SMTP id u10mr2098682edf.355.1606989095178; Thu, 03 Dec 2020 01:51:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606989095; cv=none; d=google.com; s=arc-20160816; b=aOiLj2Lb3JvDcFD8I2cg9TAlQpHswQ7jxqof/0/1RGGw4aLkBlj2dsVD1uJGmf/mME QcFWKtjWNQgHNZcip1Ut/izIdC0THKXFTVoJEyxa3u3F0iJ3ub3oO6eEoCWpa16FVAXP 1N0T4cpEl+Jqlgr+dLSZxOJWNareMiWPAdNWvUtK5iuVJrfIP44gwX33SUn/yBZGEv26 01BDUnF4wGLnVUdsm61QQa7ttVUVt4Q+NSz/j+KtWsuVDBgeUEsjj9V2t/qbuJjsqkkX vipZeEs2jV/SodJZvgHS8QVm0qe4rGR18O49smrQKiEGyQWzYX9XU/vlF4052PBRCo8v Ej7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from :dkim-signature:date; bh=lMnLaofXWoMwiy+ksxQh0TkcuZfi8mAGMAJG/om6MBQ=; b=bK90BDMXA6AzmYnaCQgDsJ4I3/FZk4MjKophojcdCSisGhd3Oud2BlW5urQMc6J3xL L0gShOTJVbjbmGdoBXRXiowpftvz30qB870U81dV8og4Yy8BurKPyzSPpiAOuqXWsRUt zWNFIg0QAMzp8E/5C5VwT+1pmEvKXWVgbXm39t6Q4xwPQVc6De4/HG2Ix9r2XG4PWjH/ t5DS2ckR8gLJXzIXbzX2ywmv/FWZUeBXeZob6TgEduF7kneEZWnWETLqMMWNAXALU/hj WVYfB8GCA3HxGily3If9a4wJUNtHaEZVowDb5esx8T1eNb+umyjQ8C7sJcDwrQ2Ppv4k 7POw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aROK9D3o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id en21si762526ejc.393.2020.12.03.01.51.11; Thu, 03 Dec 2020 01:51:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aROK9D3o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1730164AbgLCJsv (ORCPT + 99 others); Thu, 3 Dec 2020 04:48:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:33570 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728900AbgLCJsu (ORCPT ); Thu, 3 Dec 2020 04:48:50 -0500 Date: Thu, 3 Dec 2020 09:47:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1606988889; bh=5X99CjF/w6FuCzH9ST9VSYb0yNBNDgAFDj6aEVF7hRE=; h=From:To:Cc:Subject:References:In-Reply-To:From; b=aROK9D3oy/hXocbzQlxP1a9VxjKCwjp/rA+Azd9Jw16exRpgg5LyekFUUki7Nwy7o Ajlr9geQHGbW0V0AOHJBExkMQnyr2DGGVEnkCSI+tlsy6z79sAz9QRmgaldF9iRxuN JIn/A3HobTBLeGCpiPRcsPjOwp1Q27FV70dlUtx3BfU02hXJflgjnErfNZDu9pncGZ 8SzUeszP5AgPLA0U8QCzJpV+jm6V/IFc1YY8RG59R/qlhJ46dZJqdQiLF8/4E2ODB2 cbQ2dYorXPvmgcIsSPPujZZWmRYVtU4tvQAd3eMOhHcDInfnLWs9eDbrggoutcN0/k VAjvo2k1EiD9g== From: Mark Brown To: "Ardelean, Alexandru" Cc: Andy Shevchenko , linux-spi , devicetree , Linux Kernel Mailing List , Rob Herring , "Bogdan, Dragos" Subject: Re: [PATCH v3 2/3] spi: Add SPI_NO_TX/RX support Message-ID: <20201203094739.GB4700@sirena.org.uk> References: <20201127130834.136348-1-alexandru.ardelean@analog.com> <20201127130834.136348-2-alexandru.ardelean@analog.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="hHWLQfXTYDoKhP50" Content-Disposition: inline In-Reply-To: X-Cookie: Sacred cows make great hamburgers. User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --hHWLQfXTYDoKhP50 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Dec 03, 2020 at 08:20:57AM +0000, Ardelean, Alexandru wrote: > > > > @@ -43,5 +43,7 @@ > > > > #define SPI_TX_OCTAL 0x2000 /* transmit with 8 wires */ > > > > #define SPI_RX_OCTAL 0x4000 /* receive with 8 wires */ > > > > #define SPI_3WIRE_HIZ 0x8000 /* high impedance turnaround > > */ > > > > +#define SPI_NO_TX 0x10000 /* no transmit wire */ > > > > +#define SPI_NO_RX 0x20000 /* no receive wire */ > > > Is it really material for uAPI? > > > Perhaps we may have something like > > > SPI_MODE_USER_MASK in uAPI and > > > in internal headers > Hmm, in a way this could make sense for some SPIDEVs as well, to set these flags and get an error if they try to TX with the NO_TX flag set. > Not really sure about this. > Initially I mechanically added these here as an inertia to the previous patch which is just unifying the headers. > Any other opinions? Thoughts? > Mark? spidev is hacky at the best of times... It *is* probably better to only have the usefully mainpulable modes exposed in uapi and then define the rest internally though. --hHWLQfXTYDoKhP50 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl/ItDoACgkQJNaLcl1U h9Ckwgf/VrYn5fwTeqHxZl9gZCMMNNATL4F7b+ly/CACve6HcvslrstmDsD7tOoV +wKtnrhgYWzqwHpNzk1ts5IBZSq37RDXbbvylJ/DfWLQLelRYR5ZLrWyThtXnCHP uBqM/YppX3AqWLfIAcwObA+QHzLhoxvVOIeMx2cOJrbYZN/5vg/BwvIucZ5aSAvU Tv+0HRVGTKG7Ul4CJKnxthqjjr2R3xu+oscuTymdibWSU0yYslpIicdkn13179ZK wDzRNXVmaJUPMn5vBSfgHh/GFe9P7287bhf5FksmN2HMkD8p9ZjCrUNDt4g4oVKg GJPCc7X4m35E6fZch0J4YViffIvvAA== =SB4J -----END PGP SIGNATURE----- --hHWLQfXTYDoKhP50--