From patchwork Wed Oct 9 08:01:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 833940 Delivered-To: patch@linaro.org Received: by 2002:adf:a1d9:0:b0:367:895a:4699 with SMTP id v25csp671232wrv; Wed, 9 Oct 2024 01:02:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVpXUtd01vHvJM88fT2KIUhasIdc+c9yOj0iQawcOzLCNSa0B2wQ2n3m/qayG0kuPn7P1stXg==@linaro.org X-Google-Smtp-Source: AGHT+IFdUsm2QwCwYRVCtqg7wsHeVkf6Cj6gmf0fGBG0s2mnZZfw3xlfAFQdbSOIT28ZMmAXRxMu X-Received: by 2002:a05:600c:4f05:b0:42c:ba1f:5482 with SMTP id 5b1f17b1804b1-430d748ff34mr9078055e9.35.1728460928064; Wed, 09 Oct 2024 01:02:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728460928; cv=none; d=google.com; s=arc-20240605; b=Co5Jo83LDZaoVsUpUkwZicGXGfiMcPJYyXuuqqhe5tZMIUzQkwY+HDFNT5PFuFA9p6 tcuII7zn1Xd6kKwWZordiTBq++1fTf9eYTGFrnn0VslpmOp7q3g9cdPCa0xnTSrgC5Cn usNTq0Vi1YjHtDQkBlx9QvnPVx3dLNZ58+jRsHZnwnfrEbBhGcU2di0Sem2OlmkZ9oq2 bHFkfoXzKmZj2pUdqkRqlXCP0UwTzVH3zVWPN5ZfYViYjyGc9sp0lzL4h6fb0qqZj2ga 3u5JKvRYdsixetan916kpoGmq5fSId64XnpHjCMXRP3ZuBtkIQZYKWz86QOmYT5JRIHh eE6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:cc:to:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=jrizSI+ELeBvfxtAi3OSK9ynlbK/KOEjGCmCUv3PK3I=; fh=cNSmnR2CH0Yz2ozJxTyldZ6EaZ05bYFfmneQp4NClYA=; b=NGHgRXDTEiJCJ28EByoR/HaNsbsCZ4IuobACvHX6wNeEeIPvHvWpUlSnhw1kp/qJqa H1vfQJCVxlydxv8k7deBowgJMHYD4vf8yXusp3VnXfAMtdoKb8Ofqnigc8wW6M5nTVzq WM7MxS5hKW9k4mepT/lEiSkYJjQ3S7NEay4/DNeU3YHYSZuaVREbMtBQmsm6ZXOSPDEv jLSf6P4aqqnWQ6l57g3n6WegpSAiaL2a+K6YUgADETCBp0UdQdZkZTdr7jTYDpGFT8mn dJpzyaf+KbGtU6gVGvD2hCsSQhoZ3XVfDHRc7SOxFPo+JNRxeWLqo0NAWa6HVzI47GF2 qyXA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pQsA7gjl; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id 5b1f17b1804b1-430ccf1f0b4si4848075e9.12.2024.10.09.01.02.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Oct 2024 01:02:08 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pQsA7gjl; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8DB6A88F4B; Wed, 9 Oct 2024 10:02:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="pQsA7gjl"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1026788EBA; Wed, 9 Oct 2024 10:02:05 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id F1C2E88F4B for ; Wed, 9 Oct 2024 10:02:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=neil.armstrong@linaro.org Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-42f6bec84b5so67166775e9.1 for ; Wed, 09 Oct 2024 01:02:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1728460921; x=1729065721; darn=lists.denx.de; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:from:to:cc:subject:date:message-id:reply-to; bh=jrizSI+ELeBvfxtAi3OSK9ynlbK/KOEjGCmCUv3PK3I=; b=pQsA7gjlWseAFs16bTlNOh31h4dRapbKvuSVsiE/ifgQjmlISsEqUNnK2748dCRFzn y5M3roYSWn9JtRbAGll/wCeZ4vkmVCzkge+whvIiw63yxgssDe0vN3h+AZAddbEQmWhJ sETLSI2n2JjQJL8btcvAugA4DnGiskQmwI9x+lJsEXU1g+wW9eA44/tzWnHv6sZVuqBa UliovpvIPrUaG2we+Ga+6wFnrI+JcVgT31VJK6W1it8vZHuKV+BUxW6wpGSuPcC3z/n5 bcE9fPpdw+FhN+jW/UUb3bhgL7j6+wQFRoSiH08f4NUrwRALB+z261zFL8jL9mfTClJj 8dmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728460921; x=1729065721; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jrizSI+ELeBvfxtAi3OSK9ynlbK/KOEjGCmCUv3PK3I=; b=T1Cnr1a6Mxj8qKywZianqgJfC2QcoTxd8pnqgykQ9zFELbdheoSeOH3t0qxneS1LoP sC2WhT/SSdeoAaZ8tTOLIQ8ZAPSQJFyPnl3eHgp2rwu52cqsn0AiJkoPzxbRBC0v62Fd poZjeo+3Su++zPWw+ykD4TWcmE/xL1tZUtrl4NAdwe0uVy0GRUG8HX5ZHdG6IqKmoZit y/obLa3nFTV2AccEaZLp5xmsfzy//ZS79eNU/8hV2uUO6CPgAvGtnAJMVEYofDbzMsMA /UxKJfKKo4c4gPd6UV6CPR94BX8gCMSZMcttXmKM5DNOPtjfCq9zFrqjCQ9MKChkGkK7 XuEA== X-Forwarded-Encrypted: i=1; AJvYcCXUh999UAXcW7iY1+Pk6evlB2l+asJSihS7J5wER457YpHqci+76HhbBr9xfl0EctarIPh+kN0=@lists.denx.de X-Gm-Message-State: AOJu0YxiWogY1wGLedZZiXInJbixrrPvb2OWnhlnsgEQtZUntvBNjTbn SicQKd+44PA7h7erCrO3+37iwibai57Ctuh/Rb/llYdx6kWoLYc+RRF/KFdmMGc= X-Received: by 2002:a05:600c:1c8b:b0:42c:bbd5:af60 with SMTP id 5b1f17b1804b1-430d6faca75mr12231315e9.24.1728460921392; Wed, 09 Oct 2024 01:02:01 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-430ccf5f462sm11991225e9.23.2024.10.09.01.02.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Oct 2024 01:02:00 -0700 (PDT) From: Neil Armstrong Date: Wed, 09 Oct 2024 10:01:56 +0200 Subject: [PATCH v2] video: meson: dw-hdmi: do not fail probe if HDMI regulator is already enabled MIME-Version: 1.0 Message-Id: <20241009-u-boot-video-fix-hdmi-supply-already-on-v2-1-4478a28d1f49@linaro.org> X-B4-Tracking: v=1; b=H4sIAHM4BmcC/5WNQQ6CMBBFr0K6dgwtRtSV9zAsCp3CJNghU2gkh LtbuYHL9/Pz3qYiCmFUj2JTgokicchgToXqBht6BHKZlSnNRZflDRZomWdI5JDB0wcG9yaIyzS NK9hR0LoVOABe7d16U7caW5Vtk2B+H6VXk3mgOLOsRzjp3/p/I2nQUFlturryvvL6OVKwwmeWX jX7vn8Bo0/PCd8AAAA= To: Anatolij Gustschin , Tom Rini Cc: u-boot-amlogic@groups.io, u-boot@lists.denx.de, Jonas Karlman , Neil Armstrong X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=1312; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=IXHFvbVWLsi7Byr7b1kFIvrgdwygIPJYK6vOYIuphXw=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBnBjh3tpt0WZKKGqSIqO8c/FqgwbIOAavBcdSbAKta Ya0tX42JAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZwY4dwAKCRB33NvayMhJ0QEbD/ 9Kq498cpAgZcrhgjI04kb+9LuN3zIYsBgFef8n+JwVwf6I8T/jRvY8SaquuDM0MA3cG3UjMhcgoL1i INeONlv7kWgTUODyMQkcw56mcxBxfjySAipedhERFvGERPYqnUCvmkwQ4dL6JmtZxw022WBnLz2m2Q mhOjq9O06WzlmvDeAs+I7iss9zYXxy+AmQA3GT6w3VeR1/A9qVoinM3jd0TKNnJgc+ezzurwoU2a1v UOgCLIszTVGY1ostCza+mhyCXysKUEp3Pq340T0RQOceFQDY+Zf/UTldX1FNdI0WntAuc9KJ+TmjtD JBFbRvjTXuOvEIPY5QaPA11TC2UZCHsP7mzpnQRWzT4EBmuh7oWwdA2FMeA1PORn8yFuJSCX8Z0DjT D5AeVZUzAzvVgWIEgjDUR3Yux9kH6Lbf4Xh4JY/mbQfJV5AioINmyL/rMVkhjZp6bNx90G+b1aGP40 ZElzkcfrPLYsnLgySaKAQCMP5Y8yUQucuYhIP7u8fxxkE/nZLkMXbHhiJ5BHWyVp2O5osxNVx+WX5y /JHGAfaqN4mdRtzn9ZBk2LGnTBIXgkD55b71Qt1tK/yVEEEFMMeL/IjxW9UodTzX0KxTO0PzqGkwrG J5kTFWYMH9pfhTULXcp0WL6hVuViOVm6kKkf+Ceghue/aKoNardOQg7UjBHA== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean If the regulator is already enabled, this happens if the regulator is set in regulator-always-on, regulator_set_enable() return -EALREADY. Ignore the -EALREADY return since it's not an error. Suggested-by: Jonas Karlman Signed-off-by: Neil Armstrong --- Changes in v2: - Switch to regulator_set_enable_if_allowed thanks to Jonas's suggestion - Link to v1: https://lore.kernel.org/r/20241008-u-boot-video-fix-hdmi-supply-already-on-v1-1-3a12c73ff3f1@linaro.org --- drivers/video/meson/meson_dw_hdmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- base-commit: 28dc47038edc4e93f32d75a357131bcf01a18d85 change-id: 20241008-u-boot-video-fix-hdmi-supply-already-on-e6a9af27b1eb Best regards, diff --git a/drivers/video/meson/meson_dw_hdmi.c b/drivers/video/meson/meson_dw_hdmi.c index 587df7beb9b..1631dc38416 100644 --- a/drivers/video/meson/meson_dw_hdmi.c +++ b/drivers/video/meson/meson_dw_hdmi.c @@ -418,8 +418,8 @@ static int meson_dw_hdmi_probe(struct udevice *dev) } if (!ret) { - ret = regulator_set_enable(supply, true); - if (ret) + ret = regulator_set_enable_if_allowed(supply, true); + if (ret && ret != -ENOSYS) return ret; } #endif