lkml.org 
[lkml]   [2012]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/7 v2] dma: sh: use an integer slave ID to improve API compatibility
On Mon, 16 Jul 2012, Vinod Koul wrote:

> On Thu, 2012-07-05 at 12:29 +0200, Guennadi Liakhovetski wrote:
> > diff --git a/include/linux/sh_dma.h b/include/linux/sh_dma.h
> > index a79f10a..4e83f3e 100644
> > --- a/include/linux/sh_dma.h
> > +++ b/include/linux/sh_dma.h
> > @@ -27,10 +27,10 @@ struct sh_dmae_slave {
> > * a certain peripheral
> > */
> > struct sh_dmae_slave_config {
> > - unsigned int slave_id;
> > - dma_addr_t addr;
> > - u32 chcr;
> > - char mid_rid;
> > + int slave_id;
> > + dma_addr_t addr;
> > + u32 chcr;
> > + char mid_rid;
> > };
> why would you want to keep your own slave_id and addr fields when they
> are already provided in struct dma_slave_config.

Modifying the driver's API would break all its clients.

> Also while at it, what
> would be the use of last tow fields, what do they describe?

They tell the driver how the channel has to be configured to support this
specific client. They are values of two specific registers. In fact, CHCR
means exactly that - CHannel Control Register.

> Would it be possible to get rid of this structure completely? At least
> first two fields should go away.

Migration has to be performed gradually. If this approach and patches are
accepted, then all client drivers can be migrated, then thr legacy API can
be dropped.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/


\
 
 \ /
  Last update: 2012-07-16 09:01    [W:0.086 / U:1.528 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site