From patchwork Sun Mar 14 18:15:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12137891 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D15A2C433E0 for ; Sun, 14 Mar 2021 18:18:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AB11D64EC6 for ; Sun, 14 Mar 2021 18:18:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234111AbhCNSSU (ORCPT ); Sun, 14 Mar 2021 14:18:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:45298 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234015AbhCNSSC (ORCPT ); Sun, 14 Mar 2021 14:18:02 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 04A2D64EC4; Sun, 14 Mar 2021 18:18:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615745882; bh=99z4MoK2Ks8VbYq0nWMzO2heDTN4y0i1IqoIFe+ejJk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DpQmXLJWi/WFreSFzoM1iBoLcBPDdGjR8enBVFKZR8E4sXFe81dbrq0idL8DJ31Bt hWBKPbynAI3ax0eX8uIaUlXUGXQbr4ZdaQGWg8VH11UaF0T9YFJR/hYj2OD8Y+/tzp AYqZ+ATAI9/Ff+du0dZh9LRqoBwFzYpTNIMGHfnEVyQHvfyYGDfOYTu0CrxFLKwKd3 xEuhVTMljeSe5uPwLsKVAIVzLhH0MJEx4y65OgPHVZirqwOiQJSW3AWSwfsAuIGtad GO4kUYWcJYtaM42INFS/OW77jH3+MfYXR/x7Lp/jsbxQYdTuRYfW52IxboYhtTgQvn 6AliW+AmrGdlQ== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Lars-Peter Clausen , Michael Hennerich , Alexandru Ardelean , Robh+dt@kernel.org, Alexandru Ardelean , Jonathan Cameron Subject: [PATCH v2 20/24] staging:iio:cdc:ad7150: Add of_match_table Date: Sun, 14 Mar 2021 18:15:07 +0000 Message-Id: <20210314181511.531414-21-jic23@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210314181511.531414-1-jic23@kernel.org> References: <20210314181511.531414-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron Rather than using the fallback path in the i2c subsystem and hoping for no clashes across vendors, lets put in an explicit table for matching. Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20210207154623.433442-21-jic23@kernel.org Reviewed-by: Alexandru Ardelean --- drivers/staging/iio/cdc/ad7150.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/staging/iio/cdc/ad7150.c b/drivers/staging/iio/cdc/ad7150.c index 30abfacda074..0afad49bcddc 100644 --- a/drivers/staging/iio/cdc/ad7150.c +++ b/drivers/staging/iio/cdc/ad7150.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -655,9 +656,16 @@ static const struct i2c_device_id ad7150_id[] = { MODULE_DEVICE_TABLE(i2c, ad7150_id); +static const struct of_device_id ad7150_of_match[] = { + { "adi,ad7150" }, + { "adi,ad7151" }, + { "adi,ad7156" }, + {} +}; static struct i2c_driver ad7150_driver = { .driver = { .name = "ad7150", + .of_match_table = ad7150_of_match, }, .probe = ad7150_probe, .id_table = ad7150_id,