lkml.org 
[lkml]   [2011]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCHv2] DMAEngine: Let dmac drivers to set chan_id
From
On Wed, Jul 27, 2011 at 7:50 AM, Jaswinder Singh
<jaswinder.singh@linaro.org> wrote:
> On 27 July 2011 15:29, Mika Westerberg <mika.westerberg@linux.intel.com> wrote:
>
>> As the caps are not per channel, that is the only way I was able to make it
>> work.
> FWIW, my proposal(in other thread) tags capabilities to a channel.
>

Where is that other thread?

>> At least in ep93xx we have even channel numbers for TX and odd for RX (or
>> vice versa, can't rememeber). This is a hardware restriction. So the client
>> code then filters the channels based on that using ->chan_id.
> This should be a piece of cake to handle by my proposal.
>
> If interested please get involved in that thread and help check if it
> can make things better.

I think it is fine for chan_id to be disconnected from sysfs and given
to drivers as common field for some other purpose (not convinced that
1:N client-to-driver is a valid use for this single id, hence why I'd
like to see the full proposal).

But it definitely should not be a field that drivers control in
non-uniform ways and gets exposed to sysfs. The chan_id for the class
device is just an opaque integer just like the host number for scsi
hba's. If the user wants to know device specific details about that
channel that information can be retrieved by following the device
link.

For example:
# cat /sys/class/dma/dma0chan0/device/device
0x3c20

That is the actual hardware specific channel identification. The
class device is not the hardware device, and having drivers set
chan_id to something hardware device specific conflates that fact.
Now, if you want a new/separate attribute of a class device that is
set in some uniform fashion that is a different discussion, but it's
not clear to me why sysfs would need to expose these details?

--
Dan


\
 
 \ /
  Last update: 2011-07-27 18:39    [W:0.570 / U:0.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site