From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?VGVyamUgQmVyZ3N0csO2bQ==?= Subject: Re: [RFC v2 5/5] drm: Add NVIDIA Tegra support Date: Tue, 22 May 2012 09:19:23 +0300 Message-ID: <4FBB2FEB.6000000@nvidia.com> References: <1335347102-14905-1-git-send-email-thierry.reding@avionic-design.de> <1335347102-14905-6-git-send-email-thierry.reding@avionic-design.de> <4FA78CBD.5010606@nvidia.com> <4FA7F80F.5090002@wwwdotorg.org> <20120521110514.GC27686@avionic-0098.mockup.avionic-design.de> <4FBA28FD.2060504@nvidia.com> <20120521135838.GA15046@avionic-0098.mockup.avionic-design.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20120521135838.GA15046-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org> Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Thierry Reding Cc: Stephen Warren , "linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Olof Johansson , Colin Cross , Jon Mayo , Lucas Stach , "dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org" , David Airlie , "iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org" , Joerg Roedel , Hiroshi Doyu , "devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org" , Grant Likely , Rob Herring , Liam Girdwood , Mark Brown , Ben Dooks , Wolfram Sang , "linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" List-Id: linux-i2c@vger.kernel.org On 21.05.2012 16:58, Thierry Reding wrote: > I agree that reflecting the hardware hierarchy within the device tree makes > sense. I'll need to add some code to tear down child devices in the cleanup > path, but that shouldn't be too difficult. > > However, adding a whole bus_type implementation would pretty much duplicate > the platform bus code. I guess host1x could just provide struct host1x_client > a set of corresponding APIs to create them, request channels, etc. Hi, There is a reason for existence of bus_type in Linux kernel. It exposes the various busses to developers, and give a framework for drivers to work in. It just makes the drivers easier to develop, and makes the big picture easier to understand. The problem is that bus_type is cumbersome to implement, and most implementations seem to duplicate significant amount of code from platform bus. This is the problem that we should tackle. If I manage to get the boilerplate code in nvhost for bus_type small enough, that's the structure we should use. If bus_type is just inherently fat and broken, I'll need to migrate nvhost away from it. Terje