mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
From: Marek Szyprowski <m.szyprowski@samsung.com>
To: "Ricardo Cañuelo" <ricardo.canuelo@collabora.com>
Cc: dri-devel@lists.freedesktop.org,
	linux-amlogic@lists.infradead.org,
	Matti Vaittinen <mazziesaccount@gmail.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	Kevin Hilman <khilman@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH] drm/meson: dw-hdmi: Fix devm_regulator_*get_enable*() conversion
Date: Thu, 9 Mar 2023 16:06:25 +0100	[thread overview]
Message-ID: <098ef3a5-937c-e094-7aa5-6ed4955e2722@samsung.com> (raw)
In-Reply-To: <20230309085501.et7ngd32u25befqu@rcn-XPS-13-9305>

Hi Ricardo,

On 09.03.2023 09:55, Ricardo Cañuelo wrote:
> On lun 09-01-2023 23:00:33, Marek Szyprowski wrote:
>> devm_regulator_get_enable_optional() function returns 0 on success, so
>> use it for the check if function succeded instead of the -ENODEV value.
>>
>> Fixes: 429e87063661 ("drm/meson: dw-hdmi: Use devm_regulator_*get_enable*()")
>> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
>> ---
>>   drivers/gpu/drm/meson/meson_dw_hdmi.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/meson_dw_hdmi.c
>> index 7642f740272b..534621a13a34 100644
>> --- a/drivers/gpu/drm/meson/meson_dw_hdmi.c
>> +++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c
>> @@ -718,7 +718,7 @@ static int meson_dw_hdmi_bind(struct device *dev, struct device *master,
>>   	dw_plat_data = &meson_dw_hdmi->dw_plat_data;
>>   
>>   	ret = devm_regulator_get_enable_optional(dev, "hdmi");
>> -	if (ret != -ENODEV)
>> +	if (ret < 0)
>>   		return ret;
>>   
>>   	meson_dw_hdmi->hdmitx_apb = devm_reset_control_get_exclusive(dev,
>> -- 
>> 2.39.0
> This patch seems to have caused (or uncovered) a regression in the
> bootrr.deferred-probe-empty test for meson-g12a-sei510. Apparently, this
> causes a driver to stay in the deferred probe list after boot.

Indeed my fix causes regression on the platform, which doesn't have 
"hdmi" regulator. Thanks for pointing that. I was really convinced that 
devm_regulator_get_enable_*optional*() returns 0 if requested regulator 
is not present (as "_optional" suffix suggests). Unfortunately it 
returns -ENODEV, what breaks meson_dw_hdmi driver. I will send a fix in 
a few minutes.


Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

      reply	other threads:[~2023-03-09 15:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20230109220056eucas1p26418012878272961a3a21a365192ef60@eucas1p2.samsung.com>
2023-01-09 22:00 ` Marek Szyprowski
2023-01-10  8:26   ` Neil Armstrong
2023-01-10  8:32   ` Neil Armstrong
2023-03-09  8:55   ` Ricardo Cañuelo
2023-03-09 15:06     ` Marek Szyprowski [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=098ef3a5-937c-e094-7aa5-6ed4955e2722@samsung.com \
    --to=m.szyprowski@samsung.com \
    --cc=airlied@gmail.com \
    --cc=broonie@kernel.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jbrunet@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=mazziesaccount@gmail.com \
    --cc=neil.armstrong@linaro.org \
    --cc=ricardo.canuelo@collabora.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®