From patchwork Sat May 18 22:44:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?B=C3=A1rbara_Fernandes?= X-Patchwork-Id: 10949223 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3805A76 for ; Sat, 18 May 2019 22:44:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2435828562 for ; Sat, 18 May 2019 22:44:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 107E828565; Sat, 18 May 2019 22:44:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A931428562 for ; Sat, 18 May 2019 22:44:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727506AbfERWop (ORCPT ); Sat, 18 May 2019 18:44:45 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:46069 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727179AbfERWop (ORCPT ); Sat, 18 May 2019 18:44:45 -0400 Received: by mail-qt1-f196.google.com with SMTP id t1so12129409qtc.12 for ; Sat, 18 May 2019 15:44:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=usp-br.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=i3ucxkelR/HQP9bUpvsE26VSnR/v3o3kZTaDa44EE1c=; b=NSLlyVD+sot79DZNAp+7bapx2pe7mQWtHWl2n7rYW0aNAulOevYUObNVSK/WIj69Wm zvmy7eIdht+lswEINUDsOO8tgn1xSCWaRIcrBpyHxEcAikmye973KYkoO8zj/c7RRNLA kenAJ44zOX7+0ut94DG+/TfbhhC6hijbZxkh0PfwIkRtJ4mWwlD3W1D7HbDCl02592DO PW/lPwKpFHfhzQFcgRqcxdi/bqBq97suuh2xWsjn0RBOxnqfXhBrpSEoiaFKCbQ8VMNv frXCkj4ROZSBPRPgx+FMl4alrxTcI/iq8WP5jFrM36PZZz2VWkS85c1iBb6HLC28aV5l XcxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=i3ucxkelR/HQP9bUpvsE26VSnR/v3o3kZTaDa44EE1c=; b=MRtilgicdRGrha29qS0M4vnTxD96OAt/kmIe3hmBqiCSLCCEtMXIvYinuVAMlOv6pG qFM0Mp3IF5hyP6S9Y2XgUmGLP90ndfxwX3wciROoiJmZ3PIokK1cK8xcRca2GcsbKfxZ py0jUKumV2oVkGH5auByNYaC3fKSWeMdLeoi7ni7w0/SChsN7UnELERsPXM1rl2/bzwU u/OJQV5T//3+bDI/ypCy8twRROFPKI+eKkac3fux3QXbublf3M9Mfm1/pxIF9lBSWuiW iaNdrYdGNI2xFdIWkSvkVQNykn/qvkfyMzTZuBmR5FNd9YRSKfj31gRGBhNxijvHoZzr YLwg== X-Gm-Message-State: APjAAAXfFiKAG2yjJEd0UayqRp7jaJh7bOJZthksKu7Tn/EU9T5pZWCC 1/Yw8CRXMh6y9t5rFa+GTdQJ3w== X-Google-Smtp-Source: APXvYqyD+ao6l0Q3bobEplwWIc3zM/JALZvdkkwNOg8qh0e27mVn+AOrOUl2njaNZVt4DsBDeCcYnw== X-Received: by 2002:a0c:986e:: with SMTP id e43mr41615006qvd.78.1558219484113; Sat, 18 May 2019 15:44:44 -0700 (PDT) Received: from greta.semfio.usp.br ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id g15sm7225889qta.31.2019.05.18.15.44.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 18 May 2019 15:44:43 -0700 (PDT) From: =?utf-8?q?B=C3=A1rbara_Fernandes?= To: Lars-Peter Clausen , Michael Hennerich , Stefan Popa , Jonathan Cameron , Hartmut Knaack , Peter Meerwald-Stadler , Greg Kroah-Hartman Cc: linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, =?utf-8?q?B=C3=A1rbara_Fernandes?= , Wilson Sales Subject: [RESEND PATCH] staging: iio: ad7192: create of_device_id array Date: Sat, 18 May 2019 19:44:35 -0300 Message-Id: <20190518224435.18266-1-barbara.fernandes@usp.br> X-Mailer: git-send-email 2.22.0.rc0.1.g337bb99195.dirty MIME-Version: 1.0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Create list of compatible device ids to be matched with those stated in the device tree. Signed-off-by: Bárbara Fernandes Signed-off-by: Wilson Sales Co-developed by: Wilson Sales Acked-by: Alexandru Ardelean --- drivers/staging/iio/adc/ad7192.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/staging/iio/adc/ad7192.c b/drivers/staging/iio/adc/ad7192.c index 3d74da9d37e7..cc886f944dbf 100644 --- a/drivers/staging/iio/adc/ad7192.c +++ b/drivers/staging/iio/adc/ad7192.c @@ -810,11 +810,23 @@ static const struct spi_device_id ad7192_id[] = { {"ad7195", ID_AD7195}, {} }; + +static const struct of_device_id ad7192_of_spi_match[] = { + { .compatible = "adi,ad7190" }, + { .compatible = "adi,ad7192" }, + { .compatible = "adi,ad7193" }, + { .compatible = "adi,ad7195" }, + {} +}; + +MODULE_DEVICE_TABLE(of, ad7192_of_spi_match); + MODULE_DEVICE_TABLE(spi, ad7192_id); static struct spi_driver ad7192_driver = { .driver = { .name = "ad7192", + .of_match_table = ad7192_of_spi_match, }, .probe = ad7192_probe, .remove = ad7192_remove,