From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752649AbdFLOtj (ORCPT ); Mon, 12 Jun 2017 10:49:39 -0400 Received: from lelnx193.ext.ti.com ([198.47.27.77]:32968 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752074AbdFLOtf (ORCPT ); Mon, 12 Jun 2017 10:49:35 -0400 From: Michael Stecklein To: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Rob Herring , Mark Rutland CC: , , , Andrew Davis , Michael Stecklein Subject: [PATCH 3/3] iio: humidity: hdc100x: add match table and device id's Date: Mon, 12 Jun 2017 09:49:10 -0500 Message-ID: <1497278950-12973-3-git-send-email-m-stecklein@ti.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497278950-12973-1-git-send-email-m-stecklein@ti.com> References: <1497278950-12973-1-git-send-email-m-stecklein@ti.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add of_match_table and point it to a list of compatible device tree device id's. Signed-off-by: Michael Stecklein --- drivers/iio/humidity/hdc100x.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/iio/humidity/hdc100x.c b/drivers/iio/humidity/hdc100x.c index 0e5962f..659d7da 100644 --- a/drivers/iio/humidity/hdc100x.c +++ b/drivers/iio/humidity/hdc100x.c @@ -427,9 +427,19 @@ static const struct i2c_device_id hdc100x_id[] = { }; MODULE_DEVICE_TABLE(i2c, hdc100x_id); +static const struct of_device_id hdc100x_dt_ids[] = { + { .compatible = "ti,hdc100x" }, + { .compatible = "ti,hdc1010" }, + { .compatible = "ti,hdc1050" }, + { .compatible = "ti,hdc1080" }, + { } +}; +MODULE_DEVICE_TABLE(of, hdc100x_dt_ids); + static struct i2c_driver hdc100x_driver = { .driver = { .name = "hdc100x", + .of_match_table = of_match_ptr(hdc100x_dt_ids), }, .probe = hdc100x_probe, .remove = hdc100x_remove, -- 2.7.4