Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2451229imu; Thu, 17 Jan 2019 14:35:45 -0800 (PST) X-Google-Smtp-Source: ALg8bN4V0MgZRtYEZk4T9glMb7xUT7ZRW0AuLj4k57wA+vvNHiH4qN8COIHbBqh66yhSppWBpg4R X-Received: by 2002:a62:8add:: with SMTP id o90mr16628766pfk.210.1547764545343; Thu, 17 Jan 2019 14:35:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547764545; cv=none; d=google.com; s=arc-20160816; b=gKh0Wy/UeD6ePyVJZKK6oa2Fu78/qlEF+IKPHbYxwy8q9I2VFd4Tp1Lk2fvxt8+HTM U+dCyALU+njhYcmw9IOJeop5V6xwWZ4rt4hzzBjB+LMmzw22/HJlbF5ysdXNQYc1Dsy7 R9R5AooljdwctSVGSTmvZpKEhGjtxlHGbYnNX+4QQ/jQ9bQFgb32CpFfpAznW7tK+SSk 1wRltjuxjchYGHtRsB9wEVtviOIYp2+ZHAVHK7HH2wnD4E2dDgqeEPvIBR33xpUEg/bE V8uYKI+lCXg8Oi4fVN9zh7CGxrSdap7N0x6tRRRYxZauKpi5+udRHgSgfjid6UtWRFqU UWnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=O2W0ohq1LIQRifQX2S3OaPRnUptWOb9NY2ONW+RNpW4=; b=pk56KTU2uipukGuJgf4bGFVrp/FYOWiXiiVu8SIqpRuuqrWk9E5E3FOAl9LNE6vw/x rSfWLckosVXVmHiUvVNnrysITU8pV1l3AFal9gdMyFrGMzoqJCCelnPzL3lvvJl/m/VC mt41FlnEyyZ86ppEHtx1yljcIuhdpYXMOIMnw3Se35Ke+kZQVETSbLbD9btZJ5awEmE5 53HAHIbAtEYciVtgchdYYQa7J4Evues6wJseitofBEoX3uEEUGOqZui/YWzumsy/DYSu /t5n6nFCbWSSsa/DuCzgJjQ+aiJxyl2b01+iiZJlJLnLT768mCp5kC9B3qj23rzQytno OWXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@crapouillou.net header.s=mail header.b=bZjxv5nL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f11si2478442plr.341.2019.01.17.14.35.30; Thu, 17 Jan 2019 14:35:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@crapouillou.net header.s=mail header.b=bZjxv5nL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726853AbfAQWds (ORCPT + 99 others); Thu, 17 Jan 2019 17:33:48 -0500 Received: from outils.crapouillou.net ([89.234.176.41]:34142 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726002AbfAQWdr (ORCPT ); Thu, 17 Jan 2019 17:33:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1547764425; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=O2W0ohq1LIQRifQX2S3OaPRnUptWOb9NY2ONW+RNpW4=; b=bZjxv5nLymwQm4ueRERTYnvj4OzxKab9VaGdHS+96UzRD9HwEcpXW4+62ZuDwMRJfVbtSE pwk+XgKmlu9Zg+mjhV/n0PVEa/byH9rKSQlH1IJtmtZciQzQ0+XJSK5kCsE6IwLZB4r1c9 DMOJD2Zej2H2QJqFAZqqUW8tk0IBJWk= From: Paul Cercueil To: Bin Liu Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Cercueil Subject: [PATCH v3 2/4] usb: musb: jz4740: Add support for devicetree Date: Thu, 17 Jan 2019 19:33:28 -0300 Message-Id: <20190117223330.16631-2-paul@crapouillou.net> In-Reply-To: <20190117223330.16631-1-paul@crapouillou.net> References: <20190117223330.16631-1-paul@crapouillou.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add support for probing the driver from devicetree. Signed-off-by: Paul Cercueil --- v2: Add MODULE_DEVICE_TABLE and wrap inside CONFIG_OF v3: No change drivers/usb/musb/jz4740.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/usb/musb/jz4740.c b/drivers/usb/musb/jz4740.c index 04d8b2bc205a..a60627bf7be3 100644 --- a/drivers/usb/musb/jz4740.c +++ b/drivers/usb/musb/jz4740.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -188,11 +189,20 @@ static int jz4740_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_OF +static const struct of_device_id jz4740_musb_of_match[] = { + { .compatible = "ingenic,jz4740-musb" }, + {}, +}; +MODULE_DEVICE_TABLE(of, jz4740_musb_of_match); +#endif + static struct platform_driver jz4740_driver = { .probe = jz4740_probe, .remove = jz4740_remove, .driver = { .name = "musb-jz4740", + .of_match_table = of_match_ptr(jz4740_musb_of_match), }, }; -- 2.11.0