Re: [PATCH v3 03/11] dmaengine: dw: set polarity of handshake interface

From: Maarten Brock
Date: Fri May 06 2016 - 11:48:20 EST


----- Original Message -----
From: Andy Shevchenko [mailto:andy.shevchenko@xxxxxxxxx]
To: Maarten Brock [mailto:m.brock@xxxxxxxxxxxxx]
Cc: Andy Shevchenko [mailto:andriy.shevchenko@xxxxxxxxxxxxxxx], Bryan O'Donoghue [mailto:pure.logic@xxxxxxxxxxxxxxxxx], Peter Hurley [mailto:peter@xxxxxxxxxxxxxxxxxx], linux-serial@xxxxxxxxxxxxxxx [mailto:linux-serial@xxxxxxxxxxxxxxx], Vinod Koul [mailto:vinod.koul@xxxxxxxxx], linux-kernel@xxxxxxxxxxxxxxx [mailto:linux-kernel@xxxxxxxxxxxxxxx], dmaengine [mailto:dmaengine@xxxxxxxxxxxxxxx], Greg Kroah-Hartman [mailto:gregkh@xxxxxxxxxxxxxxxxxxx], Puustinen, Ismo [mailto:ismo.puustinen@xxxxxxxxx], Heikki Krogerus [mailto:heikki.krogerus@xxxxxxxxxxxxxxx]
Sent: Fri, 06 May 2016 13:38:44 +0200
Subject: Re: [PATCH v3 03/11] dmaengine: dw: set polarity of handshake interface


> On Fri, May 6, 2016 at 2:20 PM, Maarten Brock <m.brock@xxxxxxxxxxxxx> wrote:
> >> > >
> >> > > + bool polarity;
> >> > So this variable is not very intuitively named.
> >>
> >> There is a help above. This is a property of the Synopsys DesignWare DMA
> >> engine. Anyone familiar with datasheet easily understands this.
> >>
> >> >
> >> > You end up setting somepointer->polarity = true; in a later patch.
> >> >
> >> > Since you're respining a V4 I'd suggest a name that describes a little
> >> > bit better than polarity. Setting polarity = true is a little bit
> >> > liked being asked "you you like ice-cream or apple pie" and then
> >> > saying "yes please".
> >>
> >> It's about handshake interface polarity, so, what about hs_polarity?
> >
> > So it means: handshake has polarity (true) or handshake has no polarity
> > (omnidirectional?) (false), right?
>
> It means that handshake polarity _signal_ is inverted (true) or
> default (false) in terms of hardware gates.

Would it not be better then to name it handshake_inverted ? That is
something you can ask and answer with true or false.

Maarten

> --
> With Best Regards,
> Andy Shevchenko
>