From patchwork Wed Aug 7 14:36:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marco Felsch X-Patchwork-Id: 13756378 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 141DE84A27 for ; Wed, 7 Aug 2024 14:37:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723041432; cv=none; b=jlycO8X/BCBknPVj6tRghQE9I9CeTIpGDPXRWWtT/d0v7PGAFDjcu6Cff1LvBypn1+SQ7hOzYlxwy10HzMN8PpHU/a0XyCmvKLjwyN5UN6j385WKX2U2IIuCG6/hyG/l/wvKFq2Mmye259btT5MdFAjDso5x4ISuA0+1P87Yt38= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723041432; c=relaxed/simple; bh=/ShUO5gWWyQPEk/n/IYfO27GTJqaZHpFeEF6y5w9DLs=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=knDNUeEl15/BBByuCKF4R6y97nNwQePXsLNyqhqZaymkZQ1QFynF0mVO4ob/3bW+MHz+HKuQmwR7Z5sTLsgzT+AJxizIqRixKWiBl8OwzVrDULsPfeD7uyu+vn5jM4kqj1MRJu76fzTfKS6Fjnxmnb8166PBBC5Zpcv22un+mMk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from dude02.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::28]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1sbhme-0004Iv-G5; Wed, 07 Aug 2024 16:37:00 +0200 From: Marco Felsch Subject: [PATCH 0/3] External VBUS port power handling for onboard USB devices Date: Wed, 07 Aug 2024 16:36:50 +0200 Message-Id: <20240807-b4-v6-10-topic-usb-onboard-dev-v1-0-f33ce21353c9@pengutronix.de> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAIOGs2YC/x3NywqDMBBG4VeRWfvDGIKXvkpxYczYziaRRENBf PcGl9/mnIuyJJVMr+aiJEWzxlDRtQ2t3yV8BOqrybCxPPIAZ1F6dIwj7rrizA4xuLgkDy8FdmL Lw2i82SaqkT3Jpr9n8J7v+w/z3qe+cAAAAA== To: Greg Kroah-Hartman , Matthias Kaehlcke , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Fabio Estevam , Liam Girdwood , Mark Brown Cc: kernel@pengutronix.de, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Marco Felsch X-Mailer: b4 0.14.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:1101:1d::28 X-SA-Exim-Mail-From: m.felsch@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-usb@vger.kernel.org Hi, some PCB designs don't connect the USB hub port power line to the dedicated hub port power pin. Instead they use a host controllable GPIO line to enable the VBUS power. This patchset addresses this use-case by hooking into the usb_clear/set_port_feature() function and call the usb-onboard-dev hook if available. The usb-onboard-dev driver is taking care of the rest. Regards, Marco Signed-off-by: Marco Felsch --- Marco Felsch (3): usb: hub: add infrastructure to pass onboard_dev port features dt-bindings: usb: microchip,usb2514: add support for port vbus-supply usb: misc: onboard_dev: add ext-vbus-supply handling .../devicetree/bindings/usb/microchip,usb2514.yaml | 7 ++ drivers/usb/core/hub.c | 22 ++++++- drivers/usb/misc/onboard_usb_dev.c | 76 ++++++++++++++++++++++ drivers/usb/misc/onboard_usb_dev.h | 2 + include/linux/usb/onboard_dev.h | 6 ++ 5 files changed, 111 insertions(+), 2 deletions(-) --- base-commit: 0c3836482481200ead7b416ca80c68a29cfdaabd change-id: 20240807-b4-v6-10-topic-usb-onboard-dev-49040782d2f9 Best regards,