From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A0F11C5479D for ; Mon, 9 Jan 2023 15:24:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:Reply-To:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:References:Cc:To:Subject: From:MIME-Version:Date:Message-ID:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=BGxQaTtNtaL0CWNAT7kewWf0Hl/ffLAlpqLgmQvvNq4=; b=ndvOxgYkdoGynjb2Xd0jm/0kRZ Z+cNdfzs13fvkHvxJOwBnsaQYjpmRKd1Sosc9+lWA1vQkpap1+dUlanrpkogFBOzWsxJuT23o+rA8 yB3ERfp4NRlPgG5O8YFUn3APbCkuLVQKIEiVgmu5AcbLrVHkLEswmfUSPtJKwE2TTI0bDtGvM3kAD 5kn+2w2xjbgpxjo7jsjddG4hYQaKNyxtrhWsBwWCGXV/AJVbAj0nYPWEB5fn28TInXVEYMakngIjk yvQS1DBkr83w9NH2fMsDVflK2ci/AnPsPOhKZ7lGisHQHnDIIKxPUmlGobm7kR/a3NXEQKSPZ3im0 iTr+EmHA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pEu0E-002Dew-1E; Mon, 09 Jan 2023 15:23:58 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pEu0B-002DcK-L7 for linux-amlogic@lists.infradead.org; Mon, 09 Jan 2023 15:23:57 +0000 Received: by mail-wr1-x42e.google.com with SMTP id z5so7470684wrt.6 for ; Mon, 09 Jan 2023 07:23:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:organization:references:cc:to :content-language:subject:reply-to:from:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=mwDtK5SOlKp9s6llajUedXIC1HMAZ5M22CTtekH3LV8=; b=S6ySBI7uqigQXENnTykYBBbp14SKe41Pt2NWwDA1dxeXXL2HK40XJbP1xs2Ik0w3Cp a0KdEICHraIPQUO/98sNK3gWydNFLPlGJqDuhNWk+JBS5GD3la9ERT0jAp/ecgXXQOQ6 gijfZqFWEJ0wCcNygOL//+hNYl49FywqUK0DFHdeP0wy4WS8pt+VQhpftkaWg1yi1TGL 4TDZrUMk4gHiN1Rn3Oc9R9JeJhcax7llDqj0la+kcFJFt/bTur4WKKeo8lkPIc2/Vn18 TMeN54nHffkkBJlb726WhnqINHNoAoyNvM2+c0Q+68Jo6htDrYM+Zaj3YOUmL068HsJR AMOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:references:cc:to :content-language:subject:reply-to:from:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=mwDtK5SOlKp9s6llajUedXIC1HMAZ5M22CTtekH3LV8=; b=lRt8CjfsTrbn4tqUR9lz67jgTLTyikKX/Eb3C01w/YWd7SfIeCvfi27MB0Cmpd3vgr qRdbFHoWlPPc86ltOBWRFPn53okb6BfOerpy/+C1j3TrzAskfTw9bo2dHh1Kp3zEQSFh T9wfQsL12AsaW5o+lqN5OW4/IHjb01K6c9D2HFjkNNzIfdAelo+MnHPJxWgZq87HCKvU bvjHo3Shnp7N3F3SY3gmQG/v9n5fuWrwqaOcL2yU3P749+Ns7OniIrLN/8zBMS1sdDod PcXwq/RJT9WwjkMmVfIilwerI46l49GwqzR6UNFFaaZ0t3w8JcxUUKKgCC6FkID9tLiC uFpw== X-Gm-Message-State: AFqh2ko/Qcy5SPmlViuGU3rWslJPFI6tS3BJzdXg2lQrUVWXuG9+9CXJ pxRlQn0UTSV1BgJAvoY1HvA4qg== X-Google-Smtp-Source: AMrXdXt+xgkeF/UUCTq0onixJ8Cw93/KniYtVUfF/Twv6688WJirU19TWN8EERjKQcTBYsklqsP3Tg== X-Received: by 2002:adf:cf11:0:b0:24d:5866:fadf with SMTP id o17-20020adfcf11000000b0024d5866fadfmr51172294wrj.3.1673277832796; Mon, 09 Jan 2023 07:23:52 -0800 (PST) Received: from ?IPV6:2a01:e0a:982:cbb0:a010:fe57:993c:4842? ([2a01:e0a:982:cbb0:a010:fe57:993c:4842]) by smtp.gmail.com with ESMTPSA id m1-20020a5d6241000000b002bbdaf21744sm5844384wrv.113.2023.01.09.07.23.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Jan 2023 07:23:52 -0800 (PST) Message-ID: <0ef85cba-fa9b-6d72-ca44-48c4d6cf2752@linaro.org> Date: Mon, 9 Jan 2023 16:23:51 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 From: Neil Armstrong Subject: Re: [RESEND2,v4,2/2] drm/meson: dw-hdmi: Use devm_regulator_*get_enable*() Content-Language: en-US To: Marek Szyprowski , Matti Vaittinen , Matti Vaittinen Cc: Martin Blumenstingl , Kevin Hilman , Liam Girdwood , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Mark Brown , linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Jerome Brunet References: <6c865dd8-b6c3-4491-48ca-df3e3fa45a2d@samsung.com> Organization: Linaro Developer Services In-Reply-To: <6c865dd8-b6c3-4491-48ca-df3e3fa45a2d@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230109_072355_746323_2A30284B X-CRM114-Status: GOOD ( 20.42 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: neil.armstrong@linaro.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org On 09/01/2023 14:46, Marek Szyprowski wrote: > Hi Matti, > > On 30.11.2022 10:23, Matti Vaittinen wrote: >> Simplify using the devm_regulator_get_enable_optional(). Also drop the >> now unused struct member 'hdmi_supply'. >> >> Signed-off-by: Matti Vaittinen >> Martin Blumenstingl >> --- >> v4 resend 2: >> Respinning unchanged code with the commit title changed as wa suggested >> by Robert Foss and commit message changed as was suggested by Martin. >> >> I am doing a clean-up for my local git and encountered this one. >> Respinning as it seems this one fell through the cracks. >> --- >> drivers/gpu/drm/meson/meson_dw_hdmi.c | 23 +++-------------------- >> 1 file changed, 3 insertions(+), 20 deletions(-) >> >> diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/meson_dw_hdmi.c >> index 5cd2b2ebbbd3..7642f740272b 100644 >> --- a/drivers/gpu/drm/meson/meson_dw_hdmi.c >> +++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c >> @@ -140,7 +140,6 @@ struct meson_dw_hdmi { >> struct reset_control *hdmitx_apb; >> struct reset_control *hdmitx_ctrl; >> struct reset_control *hdmitx_phy; >> - struct regulator *hdmi_supply; >> u32 irq_stat; >> struct dw_hdmi *hdmi; >> struct drm_bridge *bridge; >> @@ -665,11 +664,6 @@ static void meson_dw_hdmi_init(struct meson_dw_hdmi *meson_dw_hdmi) >> >> } >> >> -static void meson_disable_regulator(void *data) >> -{ >> - regulator_disable(data); >> -} >> - >> static void meson_disable_clk(void *data) >> { >> clk_disable_unprepare(data); >> @@ -723,20 +717,9 @@ static int meson_dw_hdmi_bind(struct device *dev, struct device *master, >> meson_dw_hdmi->data = match; >> dw_plat_data = &meson_dw_hdmi->dw_plat_data; >> >> - meson_dw_hdmi->hdmi_supply = devm_regulator_get_optional(dev, "hdmi"); >> - if (IS_ERR(meson_dw_hdmi->hdmi_supply)) { >> - if (PTR_ERR(meson_dw_hdmi->hdmi_supply) == -EPROBE_DEFER) >> - return -EPROBE_DEFER; >> - meson_dw_hdmi->hdmi_supply = NULL; >> - } else { >> - ret = regulator_enable(meson_dw_hdmi->hdmi_supply); >> - if (ret) >> - return ret; >> - ret = devm_add_action_or_reset(dev, meson_disable_regulator, >> - meson_dw_hdmi->hdmi_supply); >> - if (ret) >> - return ret; >> - } >> + ret = devm_regulator_get_enable_optional(dev, "hdmi"); >> + if (ret != -ENODEV) > > The above line should be "if (ret < 0)", otherwise it breaks hdmi support. > > I've noticed this once this change has been merged to linux-next and all > my Amlogic Meson based boards failed to initialize HDMI. Is it possible > to fix this in drm tree or do I need to send the incremental fixup? Nop, please send an incremental fix and I'll apply it asap. Thanks, Neil > >> + return ret; >> >> meson_dw_hdmi->hdmitx_apb = devm_reset_control_get_exclusive(dev, >> "hdmitx_apb"); > > Best regards _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic