From patchwork Tue Jun 28 00:23:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alison Schofield X-Patchwork-Id: 9201553 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 47F6A6075F for ; Tue, 28 Jun 2016 00:23:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D8332780C for ; Tue, 28 Jun 2016 00:23:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 21EB7285CB; Tue, 28 Jun 2016 00:23:44 +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=-6.0 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB, 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 9ABED2780C for ; Tue, 28 Jun 2016 00:23:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751999AbcF1AXn (ORCPT ); Mon, 27 Jun 2016 20:23:43 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:33590 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751888AbcF1AXm (ORCPT ); Mon, 27 Jun 2016 20:23:42 -0400 Received: by mail-pf0-f195.google.com with SMTP id c74so111534pfb.0; Mon, 27 Jun 2016 17:23:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=+zUrLBHEA1JY2rlJ4dCmQDq238O8R+5eojR2Zb5rZKE=; b=gmVfxXKiIBRGQ89sBfUgd9aP6Tz5BYcLaW/C/KwtvnszWHmYZOuh/9s9G3mIgVdsaB Ak0HbSed1b3RQ+AcuUOF+zxeNcFKmzpbI1TzwDZ21MB0hTR85ZLef98RNGPmko2VkSm3 D+glikemRHu8vOkUHFfjaQeHPPIHdIOBBGpVYfdTAfpuizkgplUd7PZfaRnlQTgVV5ED sKUShtTGROwnGOmT3adc5Hjpt4oqxr0Y06eTbRA+VHU5XezOkD9fk5zNh97sCh1x2JAR Afm/KN4Mxur3g9yvp4SniGDU55IVLDT9xfZGIVjWAiap/U7FunbPdBO4POZpJ7YLtOy/ LqPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=+zUrLBHEA1JY2rlJ4dCmQDq238O8R+5eojR2Zb5rZKE=; b=dkfo5dkiYiQux7mC8LquwhhYg8zk/Pshz5hDtUJnuAz9HGptBV1jjHcJkwaHtWkkzY bM9X2fJhWzcOVCQadRveHO3bbCt9Ttehp1u0Cq89A8vEPMXWlL2G1BLl92qBl//oRE58 lslvwp/B/p2NGuXvMLElnf54Z66lHHy52SUnYYzEAYusy1bqMZbYAXs6VG+d7eFEctCW IknzzHXUn1ywQF3Xrq6Yf0qk1PLu/Crom/MpE2SUdF0C62fEd26q3YdvFF6zWytfXxvg L6dLtw4gGcbzH6pACjWvcu2Ak8dAhGigi5YCKr5zC8x0zfJGZtsicx0ktiAjk9fHOBQu SYAw== X-Gm-Message-State: ALyK8tIrqM4Yo2b3fNRPPf6ER8h3LzFS1jgi/2rcycI+fGp3A3yg4PMBsMr/vWCVu24Cpg== X-Received: by 10.98.70.144 with SMTP id o16mr141042pfi.126.1467073408640; Mon, 27 Jun 2016 17:23:28 -0700 (PDT) Received: from d830 (or-67-232-78-142.dhcp.embarqhsd.net. [67.232.78.142]) by smtp.gmail.com with ESMTPSA id p1sm2046191paz.8.2016.06.27.17.23.27 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 27 Jun 2016 17:23:28 -0700 (PDT) Date: Mon, 27 Jun 2016 17:23:27 -0700 From: Alison Schofield To: linux@roeck-us.net Cc: jdelvare@suse.com, corbet@lwn.net, linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, daniel.baluta@gmail.com Subject: [PATCH] hwmon: (jc42) Add support for Microchip MCP9808 temperature sensor Message-ID: <20160628002319.GA5474@d830.WORKGROUP> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP MCP9808 is not officially compliant to JC-42, similar to MCP9804, but its registers are compatible to JC-42. Signed-off-by: Alison Schofield Cc: Daniel Baluta --- Documentation/hwmon/jc42 | 3 ++- drivers/hwmon/Kconfig | 4 ++-- drivers/hwmon/jc42.c | 4 ++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Documentation/hwmon/jc42 b/Documentation/hwmon/jc42 index f7f1830a..b4b671f 100644 --- a/Documentation/hwmon/jc42 +++ b/Documentation/hwmon/jc42 @@ -18,10 +18,11 @@ Supported chips: * Maxim MAX6604 Datasheets: http://datasheets.maxim-ic.com/en/ds/MAX6604.pdf - * Microchip MCP9804, MCP9805, MCP98242, MCP98243, MCP98244, MCP9843 + * Microchip MCP9804, MCP9805, MCP9808, MCP98242, MCP98243, MCP98244, MCP9843 Datasheets: http://ww1.microchip.com/downloads/en/DeviceDoc/22203C.pdf http://ww1.microchip.com/downloads/en/DeviceDoc/21977b.pdf + http://ww1.microchip.com/downloads/en/DeviceDoc/25095A.pdf http://ww1.microchip.com/downloads/en/DeviceDoc/21996a.pdf http://ww1.microchip.com/downloads/en/DeviceDoc/22153c.pdf http://ww1.microchip.com/downloads/en/DeviceDoc/22327A.pdf diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig index 5c2d13a..7dfc763 100644 --- a/drivers/hwmon/Kconfig +++ b/drivers/hwmon/Kconfig @@ -644,8 +644,8 @@ config SENSORS_JC42 temperature sensors, which are used on many DDR3 memory modules for mobile devices and servers. Support will include, but not be limited to, ADT7408, AT30TS00, CAT34TS02, CAT6095, MAX6604, MCP9804, MCP9805, - MCP98242, MCP98243, MCP98244, MCP9843, SE97, SE98, STTS424(E), - STTS2002, STTS3000, TSE2002, TSE2004, TS3000, and TS3001. + MCP9808, MCP98242, MCP98243, MCP98244, MCP9843, SE97, SE98, + STTS424(E), STTS2002, STTS3000, TSE2002, TSE2004, TS3000, and TS3001. This driver can also be built as a module. If so, the module will be called jc42. diff --git a/drivers/hwmon/jc42.c b/drivers/hwmon/jc42.c index 9887d32..f67c1bb 100644 --- a/drivers/hwmon/jc42.c +++ b/drivers/hwmon/jc42.c @@ -104,6 +104,9 @@ static const unsigned short normal_i2c[] = { #define MCP9804_DEVID 0x0200 #define MCP9804_DEVID_MASK 0xfffc +#define MCP9808_DEVID 0x0400 +#define MCP9808_DEVID_MASK 0xfffc + #define MCP98242_DEVID 0x2000 #define MCP98242_DEVID_MASK 0xfffc @@ -160,6 +163,7 @@ static struct jc42_chips jc42_chips[] = { { IDT_MANID, TS3001_DEVID, TS3001_DEVID_MASK }, { MAX_MANID, MAX6604_DEVID, MAX6604_DEVID_MASK }, { MCP_MANID, MCP9804_DEVID, MCP9804_DEVID_MASK }, + { MCP_MANID, MCP9808_DEVID, MCP9808_DEVID_MASK }, { MCP_MANID, MCP98242_DEVID, MCP98242_DEVID_MASK }, { MCP_MANID, MCP98243_DEVID, MCP98243_DEVID_MASK }, { MCP_MANID, MCP98244_DEVID, MCP98244_DEVID_MASK },