From patchwork Fri Feb 23 16:05:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Th=C3=A9o_Lebrun?= X-Patchwork-Id: 13569401 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 CD278C5478C for ; Fri, 23 Feb 2024 16:07:38 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/U4Psgb5QDETI7rr9EbQdz65LNiS9o6JhvadP6gTdfg=; b=E1w2j43xXseTDJ aaeDCC1BjYD+L1rt6EU3LZlZmqvRAU5+KzusxfLuruny1IZfCle0B4wD1bq1pQLTuQqgBy+EsiZp1 8p5whksGjFXR8fp90QyteyRDQ3yhPEsezcc+UpXF7HWcmUc2qnUk8Xjse5HJBR6Q9EMRhbIKzosdX eQYNT8LWJIeiAHVLdcn/nh7jY35Z5JgjAhRYj7pXRESvGW/6kDkJJCSbY+WApOfyCsAGQc8O7j5F3 sVnlXKWnIcFOnumGb7GZELqUGwnDuQVsfbSgj0MA5tStjRS9pYp713Jx43yg3/U9rWTkY9U+6fa4V ImfEdM4CJq6vyP/ULxyA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rdY56-0000000A8ml-0dK7; Fri, 23 Feb 2024 16:07:24 +0000 Received: from relay5-d.mail.gandi.net ([2001:4b98:dc4:8::225]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rdY3M-0000000A7wh-33QJ for linux-arm-kernel@lists.infradead.org; Fri, 23 Feb 2024 16:05:39 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 820951C0002; Fri, 23 Feb 2024 16:05:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1708704335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gQ4y/VEIeiumEnjB4J+Uqc13LinCxq5gzHE+LkRNKeM=; b=mLuKiL/YjpInWAvicL9rw00uFm5cJOy0efmORr8oL2qc7i+CLbyBhQtE8gjJ0hsZDsAUhc aQL1K+k/N+D1RNfQbCsstk+mXxrRlmBdtSSL6oX+Mq3YKU03m6MCGeGLVBh0/DuETcHxYd 2x/y9k1XwUBNp/OOKksMsiMc22SubR0orf6rEN2FNv1+aU5XPQFUFhDOG5aYaqs0TPM2+b 0yufs8EcgQ2wyo9kPAUyetqeYnxhKUUxyH0DtCnvHrW8yS7oaIEVYN+O8GFeIdyayp0lKS qZRUS3607Gkw3hSqhYTjWvtc5JgQ+d1PucmK1lQQTHSU8ZpCOq7mK8iz6Jn5jw== From: =?utf-8?q?Th=C3=A9o_Lebrun?= Date: Fri, 23 Feb 2024 17:05:29 +0100 Subject: [PATCH v3 5/8] usb: cdns3-ti: pass auxdata from match data to of_platform_populate() MIME-Version: 1.0 Message-Id: <20240223-j7200-usb-suspend-v3-5-b41c9893a130@bootlin.com> References: <20240223-j7200-usb-suspend-v3-0-b41c9893a130@bootlin.com> In-Reply-To: <20240223-j7200-usb-suspend-v3-0-b41c9893a130@bootlin.com> To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Roger Quadros , Peter Chen , Pawel Laszczak , Nishanth Menon , Vignesh Raghavendra , Tero Kristo Cc: Thomas Petazzoni , =?utf-8?q?Gr=C3=A9gory_?= =?utf-8?q?Clement?= , Kevin Hilman , Alan Stern , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, =?utf-8?q?Th=C3=A9o_Lebrun?= X-Mailer: b4 0.13.0 X-GND-Sasl: theo.lebrun@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240223_080537_021650_B13A4A58 X-CRM114-Status: GOOD ( 13.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Allow compatible to pick auxdata given to child platform devices. No compatible exploits this functionality, just yet. Signed-off-by: Théo Lebrun --- drivers/usb/cdns3/cdns3-ti.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/usb/cdns3/cdns3-ti.c b/drivers/usb/cdns3/cdns3-ti.c index f76327566798..29fb24c811b3 100644 --- a/drivers/usb/cdns3/cdns3-ti.c +++ b/drivers/usb/cdns3/cdns3-ti.c @@ -62,7 +62,8 @@ struct cdns_ti { }; struct cdns_ti_match_data { - bool reset_on_resume; + bool reset_on_resume; + const struct of_dev_auxdata *auxdata; }; static const int cdns_ti_rate_table[] = { /* in KHZ */ @@ -95,6 +96,7 @@ static int cdns_ti_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct device_node *node = pdev->dev.of_node; + const struct of_dev_auxdata *auxdata = NULL; struct cdns_ti *data; unsigned long rate; int error, i; @@ -149,7 +151,9 @@ static int cdns_ti_probe(struct platform_device *pdev) goto err; } - error = of_platform_populate(node, NULL, NULL, dev); + if (data->match_data) + auxdata = data->match_data->auxdata; + error = of_platform_populate(node, NULL, auxdata, dev); if (error) { dev_err(dev, "failed to create children: %d\n", error); goto err;