From patchwork Fri May 18 18:22:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Veenstra X-Patchwork-Id: 10411801 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0A41D6031B for ; Fri, 18 May 2018 18:22:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ED29428A7F for ; Fri, 18 May 2018 18:22:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E1C3828A81; Fri, 18 May 2018 18:22:47 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 7FEAF28A7F for ; Fri, 18 May 2018 18:22:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751488AbeERSWq (ORCPT ); Fri, 18 May 2018 14:22:46 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:37085 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751049AbeERSWq (ORCPT ); Fri, 18 May 2018 14:22:46 -0400 Received: by mail-wm0-f67.google.com with SMTP id l1-v6so16825769wmb.2; Fri, 18 May 2018 11:22:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=mUtQO+lEHRH8Lz2vxcG+BBIB93fglsmWCfYbJ/Z5HEw=; b=d3YZzsZMNj56vrcAqQ9r4BnikYOhLXZ3QlgNgXXWQ5Iqk90l1eSmCYHrJ4rV734+ZG I8VsHVLnWXWxE36YzFU8Idku/A9UvL1iAkETvw+d2+54xgFyproEgL6THjjgDloibCKz XnPCF/aHVS8KynrxSiwEVeQCR5ogzDaODhIgL3H5nLov/zUTEu5ihYvbJ4wviMwdnPrx Xta2stCJxaMrMOZL60uVAwqNr6RiacIZNC5FxOfLrpqxOkRkJggDKmpugkhNMBgmMUL4 2ce1WxbFOMFMILD2TEpP3NC3n/u0sjTrT3T83hhbVQLq2eX7RTqK81mjcpFe//JlyJ51 tDqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=mUtQO+lEHRH8Lz2vxcG+BBIB93fglsmWCfYbJ/Z5HEw=; b=em/UcwoxB+B9Mekl6d1i3bpoDIiQVmR8JVjEi8XYNHbCE9UK7RtBbqHbTT/5qiufds 4yIpiGKVyEH96ANAW/ihFpjAZZxPKz3LsJPrMc6kEaVmRy25FiZIt/hebw9ioG2p2HlX FOlhGJxj3t3C/DIqklE2lPnFpfFMQZK9E8mu52mV2kHFgShdCIAcxH2i4u0VuRaLb793 ++UiUTMQAZncJOPIxGzXbP4x5aND0Aoi7o+g/bpPnnhcUufm/wdCWmvSx/3ES2Z6nW01 ag8kErwm6/ZasCr4bPFdF9z22ySeBjlk9fAc0pR2yKZs4ae4UuYtgDQMiv9/p1WFPoyZ Dhtg== X-Gm-Message-State: ALKqPwdY5d+xWHTOsSOCar5PR2BlZDTo868gbdKFCFL74tSUfMfNonrm mN/M0zq7YpyVlxRUnQSlh6Q= X-Google-Smtp-Source: AB8JxZrtWdm9ISFM162Hjnq27VzI+paeRrDzBX9MfNmi59eUcTTLSYCTuQVPzzwn3uwzrxCS7MZt1w== X-Received: by 2002:a50:97d8:: with SMTP id f24-v6mr13002333edb.256.1526667764889; Fri, 18 May 2018 11:22:44 -0700 (PDT) Received: from zenbook-arch (s559434a1.adsl.online.nl. [85.148.52.161]) by smtp.gmail.com with ESMTPSA id d89-v6sm4050444edc.58.2018.05.18.11.22.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 18 May 2018 11:22:44 -0700 (PDT) Date: Fri, 18 May 2018 20:22:41 +0200 From: David Veenstra To: jic23@kernel.org, lars@metafoo.de, pmeerw@pmeerw.net, robh+dt@kernel.org Cc: Michael.Hennerich@analog.com, knaack.h@gmx.de, linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, devicetree@vger.kernel.org Subject: [PATCH v4 07/12] staging: iio: ad2s1200: Add dt table Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.5 (2018-04-13) 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 Add device tree table for matching with the vendor ID. Signed-off-by: David Veenstra --- Changes in v4: - Introduced in this version. drivers/staging/iio/resolver/ad2s1200.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/staging/iio/resolver/ad2s1200.c b/drivers/staging/iio/resolver/ad2s1200.c index 9a8aa2448897..67d9747f88a6 100644 --- a/drivers/staging/iio/resolver/ad2s1200.c +++ b/drivers/staging/iio/resolver/ad2s1200.c @@ -154,6 +154,13 @@ static int ad2s1200_probe(struct spi_device *spi) return devm_iio_device_register(&spi->dev, indio_dev); } +static const struct of_device_id ad2s1200_of_match[] = { + { .compatible = "adi,ad2s1200", }, + { .compatible = "adi,ad2s1205", }, + { } +}; +MODULE_DEVICE_TABLE(of, ad2s1200_of_match); + static const struct spi_device_id ad2s1200_id[] = { { "ad2s1200" }, { "ad2s1205" }, @@ -164,6 +171,7 @@ MODULE_DEVICE_TABLE(spi, ad2s1200_id); static struct spi_driver ad2s1200_driver = { .driver = { .name = DRV_NAME, + .of_match_table = of_match_ptr(ad2s1200_of_match), }, .probe = ad2s1200_probe, .id_table = ad2s1200_id,