Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1081335ybl; Thu, 12 Dec 2019 09:20:30 -0800 (PST) X-Google-Smtp-Source: APXvYqxiwKft9khvROZD3J7BXbp4Z4qScFCZwFjtfdWaqDA8UuLAfzLtx9uNEnuox5h8ukrNLNCt X-Received: by 2002:a05:6830:114f:: with SMTP id x15mr8970951otq.291.1576171230677; Thu, 12 Dec 2019 09:20:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576171230; cv=none; d=google.com; s=arc-20160816; b=QA1kG6V9QPmab77t3kOVAc22vPSWjD8f62XEoUk6n97BFEq1oL0KTWVzELrBhWup5M xXP1zG/geZ/W/0QD2mLfwqkWehdQTkTRY+nFNf5Wl3puxlUorCwAkCukkPlqOicMkNxX sS5Je8iVg/nWnSuwh8qn7o7Kd7cbq6PyGqAC/vXTMyKe/C5DmtgVHhwd3RM7Hi/Aj/Et aUDBoEKakHqyOSHSqR1tkNJEFQYE94roNet2Xhmjpdj0bfd43VpqEWJDxmsHMBoaEiDU q/44sAASNlqC8bi4sWF//aqRZiXRVN7a8tLPXvf1pynqQ1LFReL0DebuIfcad2MuA4H2 +jdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=N8mhtSMLeEYjIp8ID5qUMzhNvTk/aPYyWjeD9bG0b6c=; b=UXHC0kClhRD0KUSJcx2NJESZgMwuyz33pCdYbWmx1KX3frQWBgjhqxVoby1Itz2G7h Psjad1Sms1pgd0FNP8RItiLbJPwNOolrHqDtSXGUJ4pYU3qgGpBd1a/prQKU59+706X1 QY0BSC4TTMEZxXWs4Qk30HpwfUXW1H54EzTDVPREK1bS25JLmpWxw7PBtCiKwBoj0vU8 vJh8SDV1qGUDujuI4LFdOX65aDgDuvZdKI520AZs8lwS5WjATXQ2YZs7MWUOQ1IVMgu8 Zb5H5Y99GgNfVyFEgasgqgf6436ygOVMqQ4CbZCVWL89ZQibhSKxQEhXLrdlgEKpS3ve 34aw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 7si5042514otk.79.2019.12.12.09.20.09; Thu, 12 Dec 2019 09:20:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730143AbfLLRTZ (ORCPT + 99 others); Thu, 12 Dec 2019 12:19:25 -0500 Received: from foss.arm.com ([217.140.110.172]:54264 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730047AbfLLRTZ (ORCPT ); Thu, 12 Dec 2019 12:19:25 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6C24430E; Thu, 12 Dec 2019 09:19:24 -0800 (PST) Received: from localhost (unknown [10.37.6.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DF2B83F6CF; Thu, 12 Dec 2019 09:19:23 -0800 (PST) Date: Thu, 12 Dec 2019 17:19:22 +0000 From: Mark Brown To: Andreas =?iso-8859-1?Q?F=E4rber?= Cc: Geert Uytterhoeven , linux-realtek-soc@lists.infradead.org, linux-leds@vger.kernel.org, Linux Kernel Mailing List , linux-spi , Jacek Anaszewski , Pavel Machek , Linux ARM , Dan Murphy Subject: Re: [RFC 04/25] spi: gpio: Implement LSB First bitbang support Message-ID: <20191212171922.GM4310@sirena.org.uk> References: <20191212033952.5967-1-afaerber@suse.de> <20191212033952.5967-5-afaerber@suse.de> <9b4b6287-c1d9-1b41-88a8-7ac9fe222642@suse.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="EOHJn1TVIJfeVXv2" Content-Disposition: inline In-Reply-To: <9b4b6287-c1d9-1b41-88a8-7ac9fe222642@suse.de> X-Cookie: We have DIFFERENT amounts of HAIR -- User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --EOHJn1TVIJfeVXv2 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 12, 2019 at 04:14:59PM +0100, Andreas F=E4rber wrote: > Am 12.12.19 um 09:40 schrieb Geert Uytterhoeven: > > On Thu, Dec 12, 2019 at 4:41 AM Andreas F=E4rber wro= te: > >> Add support for slave DT property spi-lsb-first, i.e., SPI_LSB_FIRST m= ode. > >> Duplicate the inline helpers bitbang_txrx_be_cpha{0,1} as LE versions. > >> Make checkpatch.pl happy by changing "unsigned" to "unsigned int". Separate patch for this? > So from that angle I don't see a better way than either duplicating the > functions or using some macro magic to #include the header twice. If we > wanted to go down that path, we could probably de-duplicate the existing > two functions, too, but I was trying to err on the cautious side, since > I don't have setups to test all four code paths myself (and a ton of > more relevant but less fun patches to flush out ;)). Yeah, I don't think there's any great options here with the potential performance issues - probably the nicest thing would be to autogenerate lots of variants but I think that's far more trouble than it's worth. --EOHJn1TVIJfeVXv2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl3ydpkACgkQJNaLcl1U h9Crxwf9Hh/o+0lRcCax6Pd2t3iPgF+uG4xJ6LUUNfzNsOdYWHhRoEJC3NQAdbh+ erqhW4a1HuHtkFy9hM1gCLsfRyr9eA3x0+xVgj9WsbOe11mebr08oS+BaPHU2yUT 4XgXr/Fyi1s2x6q3R9C48jEGRyKy6nCKC9Lkh8dXitfznpmufSAEKzkYxZLo8hPs At9L7La3QdwGjOTgHJ0DZD9Q6gQpsjhzWA8fkgHwzwjGsaw6pZair0XkaBPcg3/q xyZyIzQejgHy5DhWRg9m+WSsoARvtMwSGv+061AOmafWOPBgAWM2z1wCH/+F0jqM q/B0X6vyCHo7spdDxq+dhgsXrkrcBQ== =OqPq -----END PGP SIGNATURE----- --EOHJn1TVIJfeVXv2--