[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+M3ks5pV=j_DeQ9ohhtv62WL=pzWH0Q5jdKtQby5vs=NUZT-Q@mail.gmail.com>
Date: Mon, 6 Nov 2017 15:42:04 +0100
From: Benjamin Gaignard <benjamin.gaignard@...aro.org>
To: Mark Brown <broonie@...nel.org>
Cc: Greg KH <gregkh@...uxfoundation.org>,
Laura Abbott <labbott@...hat.com>,
Sumit Semwal <sumit.semwal@...aro.org>,
Arve Hjønnevåg <arve@...roid.com>,
Riley Andrews <riandrews@...roid.com>,
Dan Carpenter <dan.carpenter@...cle.com>,
driverdevel <devel@...verdev.osuosl.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
linux-api@...r.kernel.org
Subject: Re: [PATCH v6 2/2] staging: ion: create one device entry per heap
2017-11-02 12:10 GMT+01:00 Mark Brown <broonie@...nel.org>:
> 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 ?
Benjamin
Powered by blists - more mailing lists