Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2400301lqp; Sun, 24 Mar 2024 17:54:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWGna3VY2BE3ml+OObeD3dVcFifLZCdQquCcgb8+6u/U4iCOhUMv+enpZQ9xZKgdZKRSoi4IcE6xYS5fKoVN3MpOf5s3LAGfRUpoPlekQ== X-Google-Smtp-Source: AGHT+IEBMKGzrbTHOrc+NlsF1u/yLYWN8OIZ72f4FOP0vPsx7CGfw13JWAQPHWBUxItgFDTe69dy X-Received: by 2002:a05:6870:9687:b0:222:7a41:b6a0 with SMTP id o7-20020a056870968700b002227a41b6a0mr7205049oaq.6.1711328068994; Sun, 24 Mar 2024 17:54:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711328068; cv=pass; d=google.com; s=arc-20160816; b=AxO0SMEhvMo1kKaG0mLu3h0G8CUM+05MSWSQpZhvFHYDY2bga/VLE4ZA3M507PaeKe 9Fc+45Vk3B0fMAlDw6TytCL39VbY9PjEuxHJxikJFfqVk1jKcO6VqVSj6g3VUI/RrcMK EPnV3jMVKeUPcHgiyl1jr1GIZqE5U/DupOWNT5Po0A4CJXa1nynQ48wH4mCMul04wCT3 ljSJQry8Asaq7qq8hUwcX3suMC7K4J5C5JuL5A1UmcdKAaDYOhZOl2GSlDPnRtvXQuWy vy5LyG8SQpMjsovGKzTcqa24HdBwiYpduDFvoh4VMfQpbLTzFCtYxXJ4rD44V4aVvc49 QWcQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=OMQLtKqYhGHYrjAtJfZj/Ei2aHU3wmUzi4cMzmJ3hy0=; fh=x4iyYyV4vw2TVy46FxG2dS6b99CjYDyACBLWdj4L8mg=; b=IJHUcX9bqh9eOcbAGnr44UXCDlZzpdTY2X6ZipG5PbdHPS1GgpYUJXj8WgvXqCvo4X xVzZpf70Vz5Lj1dOSVCL2iZyMtvBsN3tpPKCzsUzgHJIKJjZUUBRbsFN/O8AfyxkSbJx OP3B2qFaBEkN9N77Q9S1F3KJWBoe5SRdr5O+H65Yl/uiMhmhNP68csA2t6L8B1M9gTo5 ikvM50UWvDJDO0Gc0DP1yL/TIGezXuKVyxYy6QYMgZeFibr0nOnuVRM5wfvyqDfPvnOz pe6rzNKbUWY6mKfMbNOXxVN8lY+3blhosmCi/G+EkGnT/vsEGvq1D9uUNH0HO1rq5r/Q PJGg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rDuMvQYH; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113502-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113502-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id i13-20020a63e44d000000b005dc47dd5dd2si6721271pgk.791.2024.03.24.17.54.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 17:54:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113502-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rDuMvQYH; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113502-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113502-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id BF61C28553C for ; Mon, 25 Mar 2024 00:52:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A30A813D62E; Sun, 24 Mar 2024 22:45:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rDuMvQYH" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B0D0313D60F; Sun, 24 Mar 2024 22:45:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320303; cv=none; b=QUmNSKnl6lumkN0n42G1gckKiwdcp+2Hvh2IT4bceWrC5BKs2YYyfqPFK/A71qg03gKfJTgmGfuWlgxiakyM2dKuSyuGQmoLjohBR/yKIGG9yEPifMhWmkELvuVMROqHKB3PV+qShoLL9jRaZCIENfwaimOxFjs9Tarb3lLBHqU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320303; c=relaxed/simple; bh=UbjWhGw39eex7ufjYGS0Vx+EZJu97EnVJ9Dwgi425+M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FVea9nmRujQEore+dJRx+LaQEWWsgb3p5nGM0aPO5c4DcGVpl0Nj0nHlVAwjz/iFbGI+bO81Xn4wlcpyTWh3chaoOqwFfG5srHsIDrh1HsAU+gee3BLAE2mwHuVz/Z4HRERMt3QJFuJKutbQvNqc96Yt7gDy7bNNMhAvW6o1DMA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rDuMvQYH; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id F0873C43394; Sun, 24 Mar 2024 22:45:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320303; bh=UbjWhGw39eex7ufjYGS0Vx+EZJu97EnVJ9Dwgi425+M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rDuMvQYHz2WGVVau6axavwzaSDPgkKpR0C0meXy1IScskskq3SHRhzCu6ijqhAg3n qDdSSuRv7u9pqbjmialyHjVKWIfq3iYtAU7lweABaGNyGfb9mB0miUaeSqwHN2HYyd RA16R5JH9xWYgVx60a9WEN9jmEBkx79iYBcyJ9M8LJ1Y2B55yfZY+3/VtOxO49+9Ys sjKnqFFv3IR2NlODX+83B7e86aMDjAi5tzepqdW2mutQYcp4UFx80TUR6dwhKuJQ2b QVG+I0gv3H3ICGo44xYk0ix5I+Q5T8F9KWC8Ga19aZmYFayqtc1a2Yg21WfIwzguZe 8WlPFKMC3ZQFw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Sean Anderson , Greg Kroah-Hartman , Sasha Levin Subject: [PATCH 6.8 611/715] usb: phy: generic: Get the vbus supply Date: Sun, 24 Mar 2024 18:33:10 -0400 Message-ID: <20240324223455.1342824-612-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Sean Anderson [ Upstream commit 75fd6485cccef269ac9eb3b71cf56753341195ef ] While support for working with a vbus was added, the regulator was never actually gotten (despite what was documented). Fix this by actually getting the supply from the device tree. Fixes: 7acc9973e3c4 ("usb: phy: generic: add vbus support") Signed-off-by: Sean Anderson Link: https://lore.kernel.org/r/20240123225111.1629405-3-sean.anderson@seco.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/usb/phy/phy-generic.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c index 9ab50f26db607..16494030209ea 100644 --- a/drivers/usb/phy/phy-generic.c +++ b/drivers/usb/phy/phy-generic.c @@ -274,6 +274,13 @@ int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop) return dev_err_probe(dev, PTR_ERR(nop->vbus_draw), "could not get vbus regulator\n"); + nop->vbus_draw = devm_regulator_get_exclusive(dev, "vbus"); + if (PTR_ERR(nop->vbus_draw) == -ENODEV) + nop->vbus_draw = NULL; + if (IS_ERR(nop->vbus_draw)) + return dev_err_probe(dev, PTR_ERR(nop->vbus_draw), + "could not get vbus regulator\n"); + nop->dev = dev; nop->phy.dev = nop->dev; nop->phy.label = "nop-xceiv"; -- 2.43.0