Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1933349imu; Thu, 10 Jan 2019 05:38:38 -0800 (PST) X-Google-Smtp-Source: ALg8bN79taVwR6fev5Z3MaE+1jK05nlQadt6tghOjs618SkErdAYbbbRJKTWq93IRk6Yb2yzl5GN X-Received: by 2002:a17:902:50e3:: with SMTP id c32mr10452310plj.318.1547127518254; Thu, 10 Jan 2019 05:38:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547127518; cv=none; d=google.com; s=arc-20160816; b=mnmJqFQrfwl7b0rzUxvc9uONo1akzrwI3f8Bz1ADn3ut+iASBILDPI9P1BOJmY8lgr GSJ+Tp2Bdb3gyT6cmW1DJPZc7wOo6SIT+uW+jsLyM8Rl+jDuk1DtbvbXXQbBVKFKpDIK 3LVPzwnr18UMvEXTctGh9MxNMENo1PXRb13xzaPOL6WFUpIsySJb+wE62GZJYfXTzF+f vj3+DSSsAjYrwQLcX4X4xZH71Pyms8NSkl/eqxfOmMHAzAf2jsA7HbM3cuyKYuvJn5Ze JlfiSLFflBBKEYnLdAcUlvBwCCI6v0frOz2kpMJfde66h8YnjEX1GJ1gB6ltM5Z6zrLo 0UGw== 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=y6x70HDfpOVTaqs0BzNGMeOkw6Plbds0nsWUN9mORg4=; b=nwM6weTwT5WCrFDMT9kYbKIrrPJKqGcoqYYb89MlEgEEvld+PBk7BVN7qPXZQjbT6i CeEhTJ4vAr12k12OnYHAq7hUpCpouEN3HVbSdsnVCFXN7rgqt5IUCYBCCSBRb/9++wzL cChRSk4i180fpZepeqwkdTiz7fEx/WZ105UEzoq3eokKUW6GVYMINbN+g4RNFE5ZCqZj sjkM26X9E3QUCkL+jO9OluxXOUaWxImilSNwy5L0yc8tHgf/OUuQyaL4mymr/Ppr22Cj 1JbpNYSHUHxz5OKmpZ8AfJK59McguNxbQcgZN8kBHdBJqD0Z1H1RAZKPPwDUQWAJ3PWG bW5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@crapouillou.net header.s=mail header.b=scZ9CSd4; 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 az11si8809496plb.386.2019.01.10.05.38.23; Thu, 10 Jan 2019 05:38:38 -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=scZ9CSd4; 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 S1728988AbfAJNhR (ORCPT + 99 others); Thu, 10 Jan 2019 08:37:17 -0500 Received: from outils.crapouillou.net ([89.234.176.41]:51496 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728733AbfAJNhP (ORCPT ); Thu, 10 Jan 2019 08:37:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1547127433; 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=y6x70HDfpOVTaqs0BzNGMeOkw6Plbds0nsWUN9mORg4=; b=scZ9CSd4sDdiB8vDl+Xw9oCDfWW0nUMZKMDNsJE1sdNVHBtAleF+jp71usGQGVFPlF2uEe DR8LA0vYE6IGNSawEbLoxQZuh18m+0EVeWuHu/xeVh7fR+UJGDq7zHYS0K2bSV7Ukgv7RA fwonRTbZXEOFjpZ8S4N1AYUuqyggjR8= 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 v2 2/4] usb: musb: jz4740: Add support for devicetree Date: Thu, 10 Jan 2019 10:36:58 -0300 Message-Id: <20190110133700.4471-2-paul@crapouillou.net> In-Reply-To: <20190110133700.4471-1-paul@crapouillou.net> References: <20190110133700.4471-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 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