Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp1339859lqp; Fri, 22 Mar 2024 11:51:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXJgsAc7l0V5OHpLRnBI1Y3S7hkIqk69PbQIVC4U7B6SbwCgaimh2rOApHLPfQmxf169V8lHCLB14y5QRvGrEz5qpV2Um5ZEqLcU9iIUA== X-Google-Smtp-Source: AGHT+IFEB0WabeLmmOeEUxZnzfSBFyeVyvxgKnda3OptWXsP6YU0eXwlLYyLfpnGnoJb5ntEHCvz X-Received: by 2002:a17:902:f745:b0:1e0:1a52:3c6a with SMTP id g5-20020a170902f74500b001e01a523c6amr712742plw.56.1711133509169; Fri, 22 Mar 2024 11:51:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711133509; cv=pass; d=google.com; s=arc-20160816; b=LMjE4gdydn7TCXymzwiQ0s5qV7QuOV/LuNuqssHUK5oQrfaTcYhwHjwNHXKBqLU804 iRhkfz0mhPJ2AXsl7XKaSMB98zmCIwzbIbSaweqez2svRURKQ6UwZttkSX9+VRtateSg T9p/BSzQpCQVIYudXrLVMVachHiHvVTzC3HfHA5ThOpo0RNeGLT/UxiixOIW4hZ1P7tZ SV17HahnVSZAnKQWrqA8ovHaWKfhHVdYlLo33l+TKVxhv5Wpv3eQP+KsGmRbAsnzOvUQ MjX+cxRx2AvzPqEcFqnW2bfu853ytTDLm5FrW3AUpth+PdWUB+Jks/pooLo+s0SjtoJz hcaA== 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=UiMuCZuCE+GDbraTFgLjnezZYv3h2ixZi1ZXPtQOspI=; fh=yeXO5m+N5fRTS96myCoRoX70tVguMpha47xUGJpUlqA=; b=Vg1OnbHxP1BARZH0K9myqjicgIvFVlR9mqFnUwb8unSBP6H5kWEtm9h5/eTsI3mkZj Ysy8tP3sEQDzjEWG+qfXSJi7pPbnqw1kjRDsu/6r40Jgnh+XIIuihDpmYhRYIvwQdi4J MH+G5s4csO4ObsD+aY2XCoPfzPmOM4lhop1BTl1rLY/pJ9F1h8KEJsgvD0vQcaf7ywak n+gs4grzb7zyXsNFzG6zSMmJ9ue2ogdhgifWadvdv7UBkRH4VDUq6VhsT2Ggzse/g5tJ nzD+ljtKlbLz1WuJc/pP7PO+EuXvRGyVDpHOUzu+eQ0ED7ngt/KkxS4oeHTViMSrqv3Z OwaA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=KA7PtXeT; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-111966-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111966-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id k3-20020a170902760300b001e014db7dafsi94972pll.163.2024.03.22.11.51.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Mar 2024 11:51:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-111966-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=KA7PtXeT; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-111966-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111966-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 7C983B226F2 for ; Fri, 22 Mar 2024 18:51:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5A50A73507; Fri, 22 Mar 2024 18:51:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="KA7PtXeT" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (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 BBEE7629E2; Fri, 22 Mar 2024 18:51:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711133494; cv=none; b=XjHHDNlQbkPbUy1vwCO70nEm1pZTLAjx6chdES8MRwD+l2AGdHztgMnhqESc32Tjr3QKK1hXMCaFPAD6U3B27NddaR7EJDUdcRmaK25ptgVayfErNp12LCTu0gYErLqOpE1qd2NIHVmATXSfFmcsBftZYt0UpDOun2w5zKFZyHw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711133494; c=relaxed/simple; bh=knezeFITMrOeKtT2zrfqXKXzWrr8TJ45SZ5iAZ8WBFo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CVksI/blmKVPXe8q542gNfEoxvj2E2XHBaUvxGkq6GLjQuvEOFogOd7pvxXPJe4yqiKiiLj7Sx5MRYi1oqcnOV5QJ+KxlH+ph+guBjs/2/Ynvheu4D2XnJgsAThOck5GmRAW2KDyBigYEVD6ZdJHZBy0IIGeNxaLbEILvxhWLsE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=KA7PtXeT; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=UiMuCZuCE+GDbraTFgLjnezZYv3h2ixZi1ZXPtQOspI=; b=KA7PtXeTDDxMMDvhwcNlopN79C axGXt6HfyXpXMRQ6iSLvZBqBPY+Wgyzv70AlZ1kuUgGWwk1WcJcMhpilere+va8+jV+srPuBPtAIa 40v4LkmOPmrYyWcwnJvuiR9BkwJiCfRl0PI5M2K6PyaD3gsda2FUioXdxyG08MirHMI8=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rnjz6-00Ayph-VK; Fri, 22 Mar 2024 19:51:20 +0100 Date: Fri, 22 Mar 2024 19:51:20 +0100 From: Andrew Lunn To: Ayush Singh Cc: open list , jkridner@beagleboard.org, robertcnelson@beagleboard.org, lorforlinux@beagleboard.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Derek Kiernan , Dragan Cvetic , Arnd Bergmann , Greg Kroah-Hartman , Vaishnav M A , Mark Brown , Johan Hovold , Alex Elder , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/TEXAS INSTRUMENTS K3 ARCHITECTURE" , "open list:SPI SUBSYSTEM" , "moderated list:GREYBUS SUBSYSTEM" , Vaishnav M A , Michael Walle Subject: Re: [PATCH v4 1/5] dt-bindings: misc: Add mikrobus-connector Message-ID: <362aace1-2e6a-4b50-acf8-6dccafd44973@lunn.ch> References: <20240317193714.403132-1-ayushdevel1325@gmail.com> <20240317193714.403132-2-ayushdevel1325@gmail.com> <711ff5ea-244d-4b64-a39c-3f2da63e30c0@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <711ff5ea-244d-4b64-a39c-3f2da63e30c0@gmail.com> > After going through all the discussions here, I have a few questions: > > 1. Is the old `*_register_device(controller, board_info)` style discouraged > in favor of using device tree, at least for drivers using multiple > fundamental buses (i2c, spi, etc)? Historically, they were used in board files, where you needed to write C code for every single board. That did not scale, which is why we swapped to DT. board_info is still useful, e.g. for platforms which don't have DT. I support a few amd64 boards where i need to use a platform driver to instantiate some I2C and MDIO devices. But in general DT is much easier to use. > 2. Is the preferred way to handle virtual devices (like those created by > greybus subsystem) now device tree? Is that one of the blockers for greybus > i2c, spi etc to still be in staging? I would not say they are virtual. They do exist. They are just not memory mapped like most devices, but in another address space, one which you access via RPCs. > > 3. How are virtual devices created in device tree? If I register an i2c > adapter using `i2c_add_adapter`, is the device tree entry is dynamically > created, which can then be used by a device tree overlay? As far as i'm aware, there are no examples today. You are doing something different, something new. Adding these dynamic devices to DT is just a suggestion from me, as a good way to solve your problem. You will need to look into the DT core and figure out how to do it. Andrew