[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0675b35f-217d-4261-9e3f-2eb24753d43c@lunn.ch>
Date: Sun, 30 Nov 2025 02:11:05 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Chen Minqiang <ptpt52@...il.com>
Cc: Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
"Chester A. Unal" <chester.a.unal@...nc9.com>,
Daniel Golle <daniel@...rotopia.org>,
DENG Qingfang <dqfext@...il.com>,
Sean Wang <sean.wang@...iatek.com>, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, netdev@...r.kernel.org
Subject: Re: [PATCH v3 2/2] net: dsa: mt7530: Use GPIO polarity to generate
correct reset sequence
> - gpiod_set_value_cansleep(priv->reset, 0);
> + int is_active_low = !!gpiod_is_active_low(priv->reset);
> + gpiod_set_value_cansleep(priv->reset, is_active_low);
I think you did not correctly understand what Russell said. You pass
the logical value to gpiod_set_value(). If the GPIO has been marked as
active LOW, the GPIO core will invert the logical values to the raw
value. You should not be using gpiod_is_active_low().
But as i said to the previous patch, i would just leave everything as
it is, except document the issue.
Andrew
Powered by blists - more mailing lists