From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932464AbdKFOqj (ORCPT ); Mon, 6 Nov 2017 09:46:39 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:59382 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752923AbdKFOqh (ORCPT ); Mon, 6 Nov 2017 09:46:37 -0500 Date: Mon, 6 Nov 2017 15:46:50 +0100 From: Greg KH To: Benjamin Gaignard Cc: Mark Brown , Laura Abbott , Sumit Semwal , Arve =?iso-8859-1?B?SGr4bm5lduVn?= , Riley Andrews , Dan Carpenter , driverdevel , Linux Kernel Mailing List , "dri-devel@lists.freedesktop.org" , linux-api@vger.kernel.org Subject: Re: [PATCH v6 2/2] staging: ion: create one device entry per heap Message-ID: <20171106144650.GA8743@kroah.com> References: <1508774137-13835-1-git-send-email-benjamin.gaignard@linaro.org> <1508774137-13835-3-git-send-email-benjamin.gaignard@linaro.org> <3e3af8e3-76c5-754c-caaa-3f8c9b54723f@redhat.com> <20171031191153.avolosp6n5gb3xao@sirena.co.uk> <20171102104407.GA14048@kroah.com> <20171102111019.kpsvobvzfiezdndp@sirena.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 06, 2017 at 03:42:04PM +0100, Benjamin Gaignard wrote: > 2017-11-02 12:10 GMT+01:00 Mark Brown : > > On Thu, Nov 02, 2017 at 11:44:07AM +0100, Greg KH wrote: > >> On Tue, Oct 31, 2017 at 07:11:53PM +0000, Mark Brown wrote: > > > >> > There was a discussion a while ago in the context of I2C/SPI MFDs > >> > which concluded that if you need a bus and it's going to be effectively > >> > noop then you should just use the platform bus as anything else will > >> > consist almost entirely of cut'n'paste from the platform bus with some > >> > light sed usage and code duplication is bad. It's not super lovely as > >> > it's not actually a memory mapped device but it's the best idea we've > >> > got. > > > >> Ugh, I hate that. What's wrong with using a "virtual" device instead? > > > > It was the duplication, initially everyone was making buses. > > > >> I can create a "virtual" bus for things like this if they really want a > >> "simple" bus, abusing platform for this is the major reason I hate the > >> platform bus code... > > > > In the MFD case they're physical devices, they're just usually on the > > wrong side of an I2C or SPI link. Plus MFD already handles platform > > devices for things that are memory mapped so it's a bit of a more > > natural fit there. > > What I can do is to register an ion bus (like cec one for example), > add one ion parent device so heaps will appear in /sys/bus/ion/ion* > and /sys/devices/ion/ion* > > Does that could sound good enough ? I would like to see that... thanks, greg k-h