From patchwork Wed Feb 12 03:06:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henry Shen X-Patchwork-Id: 11377449 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F1C721820 for ; Wed, 12 Feb 2020 03:06:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C81842070A for ; Wed, 12 Feb 2020 03:06:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=alliedtelesis.co.nz header.i=@alliedtelesis.co.nz header.b="QmeLXajW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727710AbgBLDGf (ORCPT ); Tue, 11 Feb 2020 22:06:35 -0500 Received: from gate2.alliedtelesis.co.nz ([202.36.163.20]:39390 "EHLO gate2.alliedtelesis.co.nz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727649AbgBLDG1 (ORCPT ); Tue, 11 Feb 2020 22:06:27 -0500 Received: from mmarshal3.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id DD9B0891A9; Wed, 12 Feb 2020 16:06:25 +1300 (NZDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1581476785; bh=wzVDWD1jSWue8uIc83BSf3hD3sfh6Kd3M5RcGfClNfA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=QmeLXajWG0s9jfkkkPOA6nHTF+sB4z4EMpxU+6r9E7jjhv4+ESg+KYUp7BtKf9v9k ngBGeZaRgAyxnq5KYQpqU2a8oR/LYP6uT7r62CVU+lsNi4CFfmFj9V+ZFS/3wjZ1ga hAll8nNvTArRpd8HXdmsBaJqjHedeoZtRvpPiNx7WVsqhoApRxNIhmMqgjnBUWohsB bNDt/E1zQp6IrXJvVIPTIJtkvFnvw3HD80Yc9hq+bp1ew/kxoI5UF/6hyfnFyMImSn 3ApZGImpsGw/le5mFQDjzMmrhHJjBCu7pkx6xsSK04uhen5xTn78QeBS/3RW0nh0jA 58AI/2BRVJutA== Received: from smtp (Not Verified[10.32.16.33]) by mmarshal3.atlnz.lc with Trustwave SEG (v7,5,8,10121) id ; Wed, 12 Feb 2020 16:06:25 +1300 Received: from henrys-dl.ws.atlnz.lc (henrys-dl.ws.atlnz.lc [10.33.23.26]) by smtp (Postfix) with ESMTP id B744B13EED4; Wed, 12 Feb 2020 16:06:24 +1300 (NZDT) Received: by henrys-dl.ws.atlnz.lc (Postfix, from userid 1052) id DFAE14E1463; Wed, 12 Feb 2020 16:06:24 +1300 (NZDT) From: Henry Shen To: robh+dt@kernel.org, mark.rutland@arm.com, guillaume.ligneul@gmail.com, jdelvare@suse.com, linux@roeck-us.net, trivial@kernel.org, venture@google.com Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, Henry Shen Subject: [PATCH v2 1/2] dt-bindings: Add TI LM73 as a trivial device Date: Wed, 12 Feb 2020 16:06:14 +1300 Message-Id: <20200212030615.28537-2-henry.shen@alliedtelesis.co.nz> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200212030615.28537-1-henry.shen@alliedtelesis.co.nz> References: <20200212030615.28537-1-henry.shen@alliedtelesis.co.nz> MIME-Version: 1.0 x-atlnz-ls: pat Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org The Texas Instruments LM73 is a digital temperature sensor with 2-wire interface. Add LM73 as a trivial device. Signed-off-by: Henry Shen Acked-by: Rob Herring --- Changes in v2: - add missing sign-off Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml index 978de7d37c66..20e6bae68fec 100644 --- a/Documentation/devicetree/bindings/trivial-devices.yaml +++ b/Documentation/devicetree/bindings/trivial-devices.yaml @@ -350,6 +350,8 @@ properties: - ti,ads7830 # Temperature Monitoring and Fan Control - ti,amc6821 + # Temperature sensor with 2-wire interface + - ti,lm73 # Temperature sensor with integrated fan control - ti,lm96000 # I2C Touch-Screen Controller From patchwork Wed Feb 12 03:06:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henry Shen X-Patchwork-Id: 11377447 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BD6441395 for ; Wed, 12 Feb 2020 03:06:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9CC532082F for ; Wed, 12 Feb 2020 03:06:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=alliedtelesis.co.nz header.i=@alliedtelesis.co.nz header.b="z+tmd1Ba" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727641AbgBLDGf (ORCPT ); Tue, 11 Feb 2020 22:06:35 -0500 Received: from gate2.alliedtelesis.co.nz ([202.36.163.20]:39400 "EHLO gate2.alliedtelesis.co.nz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727742AbgBLDG1 (ORCPT ); Tue, 11 Feb 2020 22:06:27 -0500 Received: from mmarshal3.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id 0E90D891AA; Wed, 12 Feb 2020 16:06:26 +1300 (NZDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1581476786; bh=BS4SIJJXkPfD3uRSfaxuBqFgO6t+gHHcevTuB9owsIE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=z+tmd1BaPSpks5VQvfdyS3YdeIQddbiXVMpVyvByPVuKU9Tpp8k/LZpCuZrAN6qYN S4azscTOe1qdxbho+BJOgQVkZVObciwjZYg8O7YACab+95l8iuVCjbmEIXwXAM5ZPZ yO6qSvuyYv6pPgkyDmnQ0nLB4iOtAfLWcoxOgCGlZJqZy5Oo9vDq7y870AvA+gLXAr 2ILKQ6/kubB4ajpkiKSyTx3hkjP677CHe4c/NCyY62YHArwAdwf+i3tF4np9byt/n/ X8uH7Nvljg8pzFS3kEIuRTHx53qtHuKbc+Acghv6JEnBpi2nXYuwaWVpYqkPgRFrhg Rp1O66kYOZbDw== Received: from smtp (Not Verified[10.32.16.33]) by mmarshal3.atlnz.lc with Trustwave SEG (v7,5,8,10121) id ; Wed, 12 Feb 2020 16:06:25 +1300 Received: from henrys-dl.ws.atlnz.lc (henrys-dl.ws.atlnz.lc [10.33.23.26]) by smtp (Postfix) with ESMTP id 9BF0413EED4; Wed, 12 Feb 2020 16:06:25 +1300 (NZDT) Received: by henrys-dl.ws.atlnz.lc (Postfix, from userid 1052) id C40CB4E1463; Wed, 12 Feb 2020 16:06:25 +1300 (NZDT) From: Henry Shen To: robh+dt@kernel.org, mark.rutland@arm.com, guillaume.ligneul@gmail.com, jdelvare@suse.com, linux@roeck-us.net, trivial@kernel.org, venture@google.com Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, Henry Shen Subject: [PATCH v2 2/2] hwmon: (lm73) Add support for of_match_table Date: Wed, 12 Feb 2020 16:06:15 +1300 Message-Id: <20200212030615.28537-3-henry.shen@alliedtelesis.co.nz> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200212030615.28537-1-henry.shen@alliedtelesis.co.nz> References: <20200212030615.28537-1-henry.shen@alliedtelesis.co.nz> MIME-Version: 1.0 x-atlnz-ls: pat Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org Add the of_match_table. Signed-off-by: Henry Shen --- Change in v2: - add missing sign-off drivers/hwmon/lm73.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/hwmon/lm73.c b/drivers/hwmon/lm73.c index 1eeb9d7de2a0..733c48bf6c98 100644 --- a/drivers/hwmon/lm73.c +++ b/drivers/hwmon/lm73.c @@ -262,10 +262,20 @@ static int lm73_detect(struct i2c_client *new_client, return 0; } +static const struct of_device_id lm73_of_match[] = { + { + .compatible = "ti,lm73", + }, + { }, +}; + +MODULE_DEVICE_TABLE(of, lm73_of_match); + static struct i2c_driver lm73_driver = { .class = I2C_CLASS_HWMON, .driver = { .name = "lm73", + .of_match_table = lm73_of_match, }, .probe = lm73_probe, .id_table = lm73_ids,