From: Johan Hovold <johan@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Bjorn Andersson <quic_bjorande@quicinc.com>,
Bjorn Andersson <andersson@kernel.org>,
Brian Norris <computersforpeace@gmail.com>,
Jaiganesh Narayanan <njaigane@codeaurora.org>,
Doug Anderson <dianders@chromium.org>,
linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pinctrl: qcom: Fix behavior in abscense of open-drain support
Date: Fri, 3 May 2024 09:35:05 +0200 [thread overview]
Message-ID: <ZjSTqfxgrox0IceO@hovoldconsulting.com> (raw)
In-Reply-To: <CACRpkdYw8jzFH5n377G76iMqri70Tf-1Vc=P5D6ESU_U0qRXWQ@mail.gmail.com>
On Fri, May 03, 2024 at 09:28:41AM +0200, Linus Walleij wrote:
> On Thu, Apr 25, 2024 at 5:46 AM Bjorn Andersson
> <quic_bjorande@quicinc.com> wrote:
>
> > When a GPIO is configured as OPEN_DRAIN gpiolib will in
> > gpiod_direction_output() attempt to configure the open-drain property of
> > the hardware and if this fails fall back to software emulation of this
> > state.
> >
> > The TLMM block in most Qualcomm platform does not implement such
> > functionality, so this call would be expected to fail. But due to lack
> > of checks for this condition, the zero-initialized od_bit will cause
> > this request to silently corrupt the lowest bit in the config register
> > (which typically is part of the bias configuration) and happily continue
> > on.
> >
> > Fix this by checking if the od_bit value is unspecified and if so fail
> > the request to avoid the unexpected state, and to make sure the software
> > fallback actually kicks in.
> >
> > It is assumed for now that no implementation will come into existence
> > with BIT(0) being the open-drain bit, simply for convenience sake.
> >
> > Fixes: 13355ca35cd1 ("pinctrl: qcom: ipq4019: add open drain support")
> > Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
>
> I tried to follow the discussion but couldn't get to a verdict on this patch,
> should it be applied or not, and if it should be applied, should the Fixes:
> tag be dropped or left and considered a nonurgent fix as it does not
> affect current behaviour?
It should not be applied in its current form (e.g. as the commit message
is incorrect). Bjorn will be sending a v2.
Johan
prev parent reply other threads:[~2024-05-03 7:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-25 3:45 [PATCH] pinctrl: qcom: Fix behavior in abscense of open-drain support Bjorn Andersson
2024-04-25 12:02 ` Johan Hovold
2024-04-25 13:47 ` Bjorn Andersson
2024-04-26 22:08 ` Brian Norris
2024-04-26 23:43 ` Bjorn Andersson
2024-04-27 6:18 ` Brian Norris
2024-05-03 7:28 ` Linus Walleij
2024-05-03 7:35 ` Johan Hovold [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZjSTqfxgrox0IceO@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=andersson@kernel.org \
--cc=computersforpeace@gmail.com \
--cc=dianders@chromium.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=njaigane@codeaurora.org \
--cc=quic_bjorande@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.