Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3429981pxb; Mon, 16 Nov 2020 14:39:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJx81Xla7Kedh+iSg40JWnSjEJGBFqKcbIeMygMSO1S3aH/OlOY7HGwrc/xBxd5gTzUWh7DK X-Received: by 2002:a17:906:a43:: with SMTP id x3mr16696969ejf.197.1605566388308; Mon, 16 Nov 2020 14:39:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605566388; cv=none; d=google.com; s=arc-20160816; b=ApNo0pFC/qPYaocPIqW+qqCkzXYETS0jb98J879AJ0uP3OkMLHCg9lbMXza2EDOB7x 92bo/CRlrJ4Wotp5zHRLXZUTLq7ik1Phvr9yQrEsV0g8D9BfdO8g+CX1ekbuwQCtAkuO 7jkIUTTx4h4nZW3gkw3O2CCVVOzx9hpvG/puPQbUmBmzNKG0s20W68pazrlm9ogrwGe6 BfcCb08n6OrQzonHBglM7HdRk9erYNadmHO0pUKpNjVBr+siukFQBB5uItsF/8R93CgC JGuD3TLU/qz3vfh7onDOis0N04jp/Ak+zokSV20B+Iec+Fwx8gdshC6RdsCD9j6nMOw1 g8Hg== 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:date :dkim-signature; bh=jH3VZa/ioT1f47HtOjy/blkSNKca6H9ws/LNUcIcjq8=; b=ynmbFFTcr/mkxO0Z3trCxbu9I89JzvL23e/cHnRGmoWWQqlq6Fh00h44wlYkHdmr48 UBs4M7zH762JqtnZvXxkz7foTndeCrrOhxWfCVVhjMBexHZuofYCDpxoxPLx8wK/SO/B 4snZV+3Uy7JUspzLkaCJGIP4WFjdp01hot3soaN+ez3RR04JLMBmhmmEjWE9u4mbOH/X 5BZG/1TZEHMY0JLuhcDseCJK16iJ1q60Nuik3PPy08AWTmEhmQvgC6pWdeKK8pKDmnGD AKQ96bcnBnAMUsVzEAbaejntV7Yerv96tCNFO+AJmAWoyneQ7uOACA31Iqi35db/fFzQ IBaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=g+XRRmiG; 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 a10si13517645edq.316.2020.11.16.14.39.25; Mon, 16 Nov 2020 14:39:48 -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=default header.b=g+XRRmiG; 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 S1731803AbgKPVGx (ORCPT + 99 others); Mon, 16 Nov 2020 16:06:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:47490 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729667AbgKPVGw (ORCPT ); Mon, 16 Nov 2020 16:06:52 -0500 Received: from localhost (fw-tnat.cambridge.arm.com [217.140.96.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5D86D20825; Mon, 16 Nov 2020 21:06:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605560811; bh=fuNTyBy/idm3OAiNlwROP8Ya2ltDw2L98K9AwZjlfiQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=g+XRRmiG0cyq9ttuJ5EUSJyf8LmEfbDq5FfzkPsP+VzZWEMRKHOYDYYbxdAOVYLHc Bj/B/xayrnZF8ikobwvQbnYv/Rh2RIKSqnadCEEqS2e619XdOVrDxaVZvhErxtNfUk d6QkejfhVYkVG76CulfvkINgpgSDaFgiTk7KRKiM= Date: Mon, 16 Nov 2020 21:06:32 +0000 From: Mark Brown To: Linus Walleij Cc: Grant Likely , Rob Herring , Sven Van Asbroeck , Andy Shevchenko , Jonathan Cameron , Simon Han , Lukas Wunner , linux-spi , Linux Kernel Mailing List Subject: Re: [PATCH v1] spi: fix client driver breakages when using GPIO descriptors Message-ID: <20201116210632.GJ4739@sirena.org.uk> References: <20201106150706.29089-1-TheSven73@gmail.com> <20201111123327.GB4847@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="lYetfuAxy9ic4HK3" Content-Disposition: inline In-Reply-To: X-Cookie: Immanuel doesn't pun, he Kant. User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --lYetfuAxy9ic4HK3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Nov 11, 2020 at 02:36:07PM +0100, Linus Walleij wrote: > On Wed, Nov 11, 2020 at 1:33 PM Mark Brown wrote: > > On Wed, Nov 11, 2020 at 02:05:19AM +0100, Linus Walleij wrote: > > This is not clear to me, most of these settings are things that are > > constant for the device so it's not clear that they should be being set > > by the device tree in the first place. > This was added initially with some two properties > in drivers/of/of_spi.c in 2008: > commit 284b01897340974000bcc84de87a4e1becc8a83d > "spi: Add OF binding support for SPI busses" > This was around the time ARM was first starting to migrate > to device tree, so I suppose it made sense to them/us back > then. That's from PowerPC days, not ARM, and frankly a lot of DT conversions were just fairly mechanical conversions of what was in platform data to DT so they may not have been especially considered. > compatible-string. It was later that especially Rob pointed out that > random properties on device nodes was overused and that simply > knowing the compatible is often enough. I've been pushing this since forever as well, as far as I remember it's been a thing since we started doing this. > I don't know if we ever formalized it, there is nowadays a rule akin to > "if a property can be determined from the compatible-string, and if the > compatible-string is identifying the variant of the electronic component, > then do not add this property to the device tree description. Just > deduce it from the compatible-string, assign it with code to the device > model of the operating system and handle it inside the operating system." > I think this, while clear and intuitive, wasn't at all clear and intuitive in > the recent past. I think the main push in the other direction has always been people who want to not have to write a driver at all and put absolutely everything into DT which has scaling issues :/ --lYetfuAxy9ic4HK3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl+y6dcACgkQJNaLcl1U h9C8Fwf+JPWQKo+85ISelGvSFPu9Ppf21g+ZXLvJ1rWuVL0tbja42GJZz2uPE4XY zm3Lkdxroj0NK0NmeuWszPG+mW0DoGkyYHoiXADe1yjzETfXhZT+EJnIryth2QIs z6kUfHxZpwdoa+QaA0iSmh/oxysjUHilo6TnzTPNQwnNV9T23712BVlT02O+JOli /dlc2CG6K/geaSIuP53EpHUgTO9kIp/NFs+OGueDo/3dMIzeJ20jb8+XYKCTKT0f 9nLE44FlL62h0DqB0ixoF9f5yQu/Y5n8A37ac0R72K8S0fUDsKxEX5RF4+efrN2I +UPmhAFR2pnmvnCbhwRpjUJlN+c7+Q== =+rYT -----END PGP SIGNATURE----- --lYetfuAxy9ic4HK3--