Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4171620imm; Tue, 11 Sep 2018 08:01:22 -0700 (PDT) X-Google-Smtp-Source: ANB0VdalTEzJUomAITGL4l/lkaPDKMrcieh39ZGycQ89XjCZJoC8OrhQvR4U7ZyXyV5dTvEmtY+w X-Received: by 2002:a63:1a1a:: with SMTP id a26-v6mr28773729pga.449.1536678082055; Tue, 11 Sep 2018 08:01:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1536678082; cv=pass; d=google.com; s=arc-20160816; b=KEsqYnOgl17+jTG6RD5pVCecBd8naVVd/WVtlxvPUy9Y7JxO1fkz9RO/v+vwJ1SsUe ce1GiYBAGsV5sMv7AHS6Q6zTSt8uJq+Z/ADZih4jAjUOQgnE0I0dbYNO0FRY0s6Rarb9 5MQZ007cjFWCe9lTpR4angrX2WHtNQ0MZSo8zH+TusxfB8880D/yDri+AD8XK4VX4VJM /4PnIE+v3ps6yQb2vlzYdeQ3y1YUPWh5I9Velib9hK80fzHtvYCDqsJSWJyIs5TJCjXw sF9IXm+kARpXMm3Hk9vcnKxrX/duh3AvsBsi/Jw3W442TlC76NX8P3GB5tkDrGKOUC8U YBWg== ARC-Message-Signature: i=2; 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=kwaKAEKkiHDuPbatLtRuiq06oBkvc5vjFR9gREl3xtY=; b=uyOc46QZT6xYued+xq931omCaULH2t2RExfdAYpvN3yrCQ8QAIeGREeZwhBrKY0CJz D5TAgwwVsUu3TsBs5/dfAeml+I2H0ImvG8JAMJw8lpR5L44zRHlCm1xK73jRUC6aEiCI hMC/JfBYP3kzutTkzrA0UhGyuU9hBb3q/pYhMWuHtmL1ylrKjMj6cEq4Atd4eN3pDPVV yVNIRidBJMYeQ+vsZrJgruPumLv9hokgnGqUQgpQZ4GvDlh4PsAxb7DSXPqX5j3EZg6U Sb/LeGiqLhKjg/Mb9Aj4dOe+0q355mF947CXIzUx/wxP+HfngxeVGWfb7edKN5N9m4pY b5UA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@az8.co header.s=dkimmail header.b=QySoZ0Tj; arc=pass (i=1 spf=pass spfdomain=az8.co dkim=pass dkdomain=az8.co dmarc=pass fromdomain=az8.co>); 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=pass (p=NONE sp=NONE dis=NONE) header.from=az8.co Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a61-v6si21056096plc.239.2018.09.11.08.01.06; Tue, 11 Sep 2018 08:01:22 -0700 (PDT) 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=pass header.i=@az8.co header.s=dkimmail header.b=QySoZ0Tj; arc=pass (i=1 spf=pass spfdomain=az8.co dkim=pass dkdomain=az8.co dmarc=pass fromdomain=az8.co>); 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=pass (p=NONE sp=NONE dis=NONE) header.from=az8.co Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727998AbeIKUAb (ORCPT + 99 others); Tue, 11 Sep 2018 16:00:31 -0400 Received: from sender-of-o52.zoho.com ([135.84.80.217]:21431 "EHLO sender-of-o52.zoho.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726782AbeIKUAa (ORCPT ); Tue, 11 Sep 2018 16:00:30 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1536678023; cv=none; d=zoho.com; s=zohoarc; b=WU2NGX/Q5uFOOoOejBJfj684GlH3dWGT9WC8+VUGfi7B3su7NZcKeFUYn7yBIbkZKInxr3wLtKIglNqwJQS0H9FfWu9vzEKIjTuZd1LNmOsewgKj8nveL+NMor3RVw8UhGhMj1Llob+gFCwQF7d3cD+xsT5uWYEPHewtnwaouk0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1536678023; h=Cc:Date:From:In-Reply-To:Message-ID:References:Subject:To:ARC-Authentication-Results; bh=kwaKAEKkiHDuPbatLtRuiq06oBkvc5vjFR9gREl3xtY=; b=TP/S08Ep5FCkFMSANU2ksFmRd2n91QasUSlgeo7tqt+zHTiUkpSNpeFQtBZ42CVJ6XNhmeCv1SwRejJyzbcisP7w8juxfhjkhtjP35wRvfT2NkZWrpQoIPCpgTOEaT5MwTxeub70VQ/Rz2CefkGoHJAn+ZIlqhjyEqJy0tEfi48= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass header.i=az8.co; spf=pass smtp.mailfrom=afonsobordado@az8.co; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1536678023; s=dkimmail; d=az8.co; i=afonsobordado@az8.co; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; l=1222; bh=kwaKAEKkiHDuPbatLtRuiq06oBkvc5vjFR9gREl3xtY=; b=QySoZ0Tjx98eP73uv5wS7v4lDVEAtEZXGgzWKybkOZmTvzSb4O7vJ7e2R5UB5Y8R o5L7ZzYiA4rBQ9QqMO/n/YS+tnYK6RaCbb9D3bU7FjG83AellL9IMkW4hD+TzWetOJY xH2sA3smQJmE7i6+HM3D8frnBD/2Jp5O9Ri/GLp8= Received: from localhost (bl9-77-228.dsl.telepac.pt [85.242.77.228]) by mx.zohomail.com with SMTPS id 1536678022251349.7712885126558; Tue, 11 Sep 2018 08:00:22 -0700 (PDT) From: Afonso Bordado To: jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v4 2/5] iio: gyro: add device tree support for fxas21002c Date: Tue, 11 Sep 2018 16:00:08 +0100 Message-Id: <20180911150011.31964-2-afonsobordado@az8.co> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180911150011.31964-1-afonsobordado@az8.co> References: <20180911150011.31964-1-afonsobordado@az8.co> X-ZohoMailClient: External Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch adds device tree support for the fxas21002c driver. Signed-off-by: Afonso Bordado --- drivers/iio/gyro/fxas21002c.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/iio/gyro/fxas21002c.c b/drivers/iio/gyro/fxas21002c.c index 649316c26f5b..e2ce0622944b 100644 --- a/drivers/iio/gyro/fxas21002c.c +++ b/drivers/iio/gyro/fxas21002c.c @@ -8,7 +8,6 @@ * Datasheet: https://www.nxp.com/docs/en/data-sheet/FXAS21002.pdf * TODO: * ODR / Scale Support - * Devicetree * Scale Boost Mode * Power management * GPIO Reset @@ -357,6 +356,12 @@ static int fxas21002c_probe(struct i2c_client *client, return ret; } +static const struct of_device_id fxas21002c_of_ids[] = { + {.compatible = "fsl,fxas21002c"}, + {} +}; +MODULE_DEVICE_TABLE(of, fxas21002c_of_ids); + static const struct i2c_device_id fxas21002c_id[] = { {"fxas21002c", ID_FXAS21002C}, {} @@ -366,6 +371,7 @@ MODULE_DEVICE_TABLE(i2c, fxas21002c_id); static struct i2c_driver fxas21002c_driver = { .driver = { .name = FXAS21002C_DRV_NAME, + .of_match_table = fxas21002c_of_ids, }, .probe = fxas21002c_probe, .id_table = fxas21002c_id, -- 2.18.0