From patchwork Sun Dec 8 19:58:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Gamari X-Patchwork-Id: 298859 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 002CE2C00A0 for ; Mon, 9 Dec 2013 06:58:49 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755302Ab3LHT6t (ORCPT ); Sun, 8 Dec 2013 14:58:49 -0500 Received: from mail-qc0-f173.google.com ([209.85.216.173]:52155 "EHLO mail-qc0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755416Ab3LHT6t (ORCPT ); Sun, 8 Dec 2013 14:58:49 -0500 Received: by mail-qc0-f173.google.com with SMTP id m20so2062639qcx.18 for ; Sun, 08 Dec 2013 11:58:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=zKBxDZCs8zbyVEXhEgVJHj6TF6HFpudd4+MfUzY7NCQ=; b=klPJ0K2hZkMKDgOR+dyGdp8rgFGOAsSaMahA6S0uu3hDgHSZKzhbHm/e1Qh9mDIEIj 352+VFpfTI9BIGPZ9hCUbyModfThijEQpweXldr24SLuGawuX7t48Bn0Nde0IKzDOLMf sF9bGi9QqoN1qYInVIpDK4JGX4KfMys9sgazHyFOcBovg0nUWf9W9BwFEoLz9ZH/g5Wk JtUCpTPm4qC/K3VQgxDj9sQBUYdcflRt4fjDF5/pM8wuccmtosiu0WnKHpw/8oXXsy/j KQDAEA+DcagOy0VR9mwd2rR0OLVOmXwJ7CjOM+RVzlFHTPvk9/yFaWyr9U+fkbv4lqIm EQuQ== X-Received: by 10.49.41.104 with SMTP id e8mr27774072qel.1.1386532728601; Sun, 08 Dec 2013 11:58:48 -0800 (PST) Received: from localhost.localdomain (pool-74-106-118-27.spfdma.east.verizon.net. [74.106.118.27]) by mx.google.com with ESMTPSA id p20sm22548420qay.0.2013.12.08.11.58.47 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 08 Dec 2013 11:58:48 -0800 (PST) From: Ben Gamari To: devicetree@vger.kernel.org, lm-sensors@lm-sensors.org Cc: Ben Gamari Subject: [PATCH 1/1] hwmon/adt7411: Add devicetree bindings Date: Sun, 8 Dec 2013 14:58:38 -0500 Message-Id: <1386532718-13586-2-git-send-email-bgamari.foss@gmail.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1386532718-13586-1-git-send-email-bgamari.foss@gmail.com> References: <1386532718-13586-1-git-send-email-bgamari.foss@gmail.com> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org There isn't reallly any configuration necessary so the bindings are consequently quite simple. Signed-off-by: Ben Gamari --- Documentation/devicetree/bindings/hwmon/adt7411.txt | 11 +++++++++++ drivers/hwmon/adt7411.c | 8 ++++++++ 2 files changed, 19 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/adt7411.txt diff --git a/Documentation/devicetree/bindings/hwmon/adt7411.txt b/Documentation/devicetree/bindings/hwmon/adt7411.txt new file mode 100644 index 0000000..04ec1bb --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/adt7411.txt @@ -0,0 +1,11 @@ +ADT7411 (I2C) + +This device is a dual interface (I2C and SPI) 8-channel 10-bit ADC & +temperature sensor. This driver currently only supports the I2C interface. + +Required properties: + + - compatible : must be "analog,adt7411" + - reg : I2C bus address of the device + - #address-cells : must be <1> + - #size-cells : must be <0> diff --git a/drivers/hwmon/adt7411.c b/drivers/hwmon/adt7411.c index d9299de..ece2308 100644 --- a/drivers/hwmon/adt7411.c +++ b/drivers/hwmon/adt7411.c @@ -334,9 +334,17 @@ static const struct i2c_device_id adt7411_id[] = { }; MODULE_DEVICE_TABLE(i2c, adt7411_id); +static const struct of_device_id adt7411_dt_ids[] = { + { .compatible = "analog,adt7411", }, + { } +}; +MODULE_DEVICE_TABLE(of, adt7411_dt_ids); + static struct i2c_driver adt7411_driver = { .driver = { .name = "adt7411", + .owner = THIS_MODULE, + .of_match_table = adt7411_dt_ids, }, .probe = adt7411_probe, .remove = adt7411_remove,