From patchwork Tue Jul 5 16:44:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 9214885 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 EDA6B6048F for ; Tue, 5 Jul 2016 16:47:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE86527B13 for ; Tue, 5 Jul 2016 16:47:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D1F7E27B2F; Tue, 5 Jul 2016 16:47:08 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5E57127B13 for ; Tue, 5 Jul 2016 16:47:08 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bKTTi-0002tW-M9; Tue, 05 Jul 2016 16:45:42 +0000 Received: from bh-25.webhostbox.net ([208.91.199.152]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bKTTg-0001Wn-5p for linux-arm-kernel@lists.infradead.org; Tue, 05 Jul 2016 16:45:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=roeck-us.net; s=default; h=References:In-Reply-To:Message-Id:Date:Subject: Cc:To:From; bh=8WYt3WaTIuR6JRUwdxNSw0d60Fd66n3M8J5/ah9ahGQ=; b=GHLF4/dHIHGb8O tI+d9xc7poHv3V2iUubsAHQHPJmEkyBJd5nIYElzPlzn3b4datluH0826fofcfR3/hhq9xLe6pVL9 ZoBboVsknEwdJR3wyjzwtafwX7Q0nm6ZEhxxrbuGe249T/DIjxBBT6yvfykP00xzW2ciOt+mWesmZ Mhd64YVLL8+M4rxxq4Hctmo1qJz56p6Ouim96ePAMXhSZUKYhgzbKkIUQHGzv6PESIhXP/LTpFDpJ KxCUPCWECJLsuyKGR3Dn09zuUQcvqwfBJ9FzrYLDOGBcf1PwwkFJkw0iJcGkJkEevj4UHdPETgMO4 AUv99b7+J3WCIE9aNWvQ==; Received: from 108-223-40-66.lightspeed.sntcca.sbcglobal.net ([108.223.40.66]:58622 helo=localhost) by bh-25.webhostbox.net with esmtpa (Exim 4.86_1) (envelope-from ) id 1bKTSc-0013fy-2T; Tue, 05 Jul 2016 16:44:34 +0000 From: Guenter Roeck To: Rob Herring Subject: [PATCH 2/3] hwmon: (jc42) Add support for generic JC-42.4 devicetree binding Date: Tue, 5 Jul 2016 09:44:32 -0700 Message-Id: <1467737073-7949-2-git-send-email-linux@roeck-us.net> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1467737073-7949-1-git-send-email-linux@roeck-us.net> References: <1467737073-7949-1-git-send-email-linux@roeck-us.net> X-Authenticated_sender: guenter@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - lists.infradead.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: guenter@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: guenter@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160705_094540_337469_AC8E74FF X-CRM114-Status: UNSURE ( 7.68 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Jean Delvare , Joachim Eastwood , linux-kernel@vger.kernel.org, Guenter Roeck , linux-hwmon@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP With this change, JC-42.4 compatible temperature sensors can be configured in devicetree by providing a generic "jedec,jc-42.4-temp" binding. Signed-off-by: Guenter Roeck --- drivers/hwmon/jc42.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/hwmon/jc42.c b/drivers/hwmon/jc42.c index 9887d3224a86..374630bab137 100644 --- a/drivers/hwmon/jc42.c +++ b/drivers/hwmon/jc42.c @@ -31,6 +31,7 @@ #include #include #include +#include /* Addresses to scan */ static const unsigned short normal_i2c[] = { @@ -537,11 +538,20 @@ static const struct i2c_device_id jc42_id[] = { }; MODULE_DEVICE_TABLE(i2c, jc42_id); +#ifdef CONFIG_OF +static const struct of_device_id jc42_of_ids[] = { + { .compatible = "jedec,jc-42.4-temp", }, + { } +}; +MODULE_DEVICE_TABLE(of, jc42_of_ids); +#endif + static struct i2c_driver jc42_driver = { .class = I2C_CLASS_SPD, .driver = { .name = "jc42", .pm = JC42_DEV_PM_OPS, + .of_match_table = of_match_ptr(jc42_of_ids), }, .probe = jc42_probe, .remove = jc42_remove,