[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACRpkdYvEsxaP=iqXurBz43M_GPKkYRpOp0pOHQqAWx6UPEEiA@mail.gmail.com>
Date: Wed, 16 Apr 2025 13:10:28 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Alexander Stein <alexander.stein@...tq-group.com>
Cc: Shenghao Ding <shenghao-ding@...com>, Kevin Lu <kevin-lu@...com>, Baojun Xu <baojun.xu@...com>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>, Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>, Bartosz Golaszewski <brgl@...ev.pl>,
Peter Ujfalusi <peter.ujfalusi@...il.com>, David Rhodes <david.rhodes@...rus.com>,
Richard Fitzgerald <rf@...nsource.cirrus.com>, "Peng Fan (OSS)" <peng.fan@....nxp.com>,
linux-sound@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-gpio@...r.kernel.org, patches@...nsource.cirrus.com,
Peng Fan <peng.fan@....com>, Markus Niebel <Markus.Niebel@...tq-group.com>
Subject: Re: [PATCH 2/7] ASoC: codec: tlv320aic32x4: Convert to GPIO descriptors
On Tue, Apr 15, 2025 at 3:53 PM Alexander Stein
<alexander.stein@...tq-group.com> wrote:
> > + /* Assert reset using GPIOD_OUT_HIGH, because reset is GPIO_ACTIVE_LOW */
>
> As stated above this comment shouldn't be necessary, it might be even
> confusing if there is some external inverter to the GPIO.
I have added comments like this to many patches due to spurious comments
from developers who were not aware that gpiolib handles polarity inversion
and are confused when we set the value to "1" to reset an active low reset
line.
At some point I wanted to define something like
#define GPIO_ASSERTED 1
#define GPIO_UNASSERTED 0
And use these defines to make it absolutely clear what is going on...
But I didn't get around to.
Yours,
Linus Walleij
Powered by blists - more mailing lists