From patchwork Thu Jan 15 01:34:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 43141 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9D23220D60 for ; Thu, 15 Jan 2015 01:35:08 +0000 (UTC) Received: by mail-wi0-f199.google.com with SMTP id bs8sf6726810wib.2 for ; Wed, 14 Jan 2015 17:35:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=wRK2N57Y9GcGds9toe7t+txGLobHVWdH0jjoeSqx7Yg=; b=HWCjTpWIqVR3VofB9wbCJITcPhdGY4r1ulZBaW7/7Yp84vhgqfEf8Yi/ub5PmBRlQe f48i8gQot6ZV30wpDlSVmMIadYpgRN7kp6LfoAbjTvle31ay3TPMvFsFRjHk9sOv37h1 lMT4VMuzH5kjHeeqUWzfD3dZEJgH9SAOKWENIviusfA9FCOedjoQ8g23WGssQTOBBp0G gLQqP2tz/aBSiCbSuHvxM6wErurmuqetxX0Ci3Yigydj1BVam5mq/Id1zFFJFLwfvVy4 ZQmZYyhbjyBsn2dyfW5adwF+elddEYZ/eygBrdZQ0I+CnkUqqYYxHmesCLkqIb9/8BtF y7fQ== X-Gm-Message-State: ALoCoQn8PREI+r014yGz/z8lwRfkkpjyohhAvlF7Ozw4eOexb1RNzCITt5TGDZCPENNq9XKcVHAY X-Received: by 10.152.170.201 with SMTP id ao9mr1588lac.5.1421285707829; Wed, 14 Jan 2015 17:35:07 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.43.97 with SMTP id v1ls196316lal.29.gmail; Wed, 14 Jan 2015 17:35:07 -0800 (PST) X-Received: by 10.152.37.105 with SMTP id x9mr1157603laj.96.1421285707719; Wed, 14 Jan 2015 17:35:07 -0800 (PST) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id ay17si7414185lab.132.2015.01.14.17.35.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 Jan 2015 17:35:07 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by mail-la0-f47.google.com with SMTP id hz20so11227369lab.6 for ; Wed, 14 Jan 2015 17:35:07 -0800 (PST) X-Received: by 10.112.64.35 with SMTP id l3mr7016277lbs.82.1421285707389; Wed, 14 Jan 2015 17:35:07 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.9.200 with SMTP id c8csp1876779lbb; Wed, 14 Jan 2015 17:35:06 -0800 (PST) X-Received: by 10.66.184.206 with SMTP id ew14mr10004142pac.3.1421285705555; Wed, 14 Jan 2015 17:35:05 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id uf4si32821976pab.122.2015.01.14.17.35.04; Wed, 14 Jan 2015 17:35:05 -0800 (PST) Received-SPF: none (google.com: linux-samsung-soc-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751363AbbAOBfD (ORCPT + 4 others); Wed, 14 Jan 2015 20:35:03 -0500 Received: from mail.kernel.org ([198.145.29.136]:47691 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751145AbbAOBfB (ORCPT ); Wed, 14 Jan 2015 20:35:01 -0500 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 85D13201B9; Thu, 15 Jan 2015 01:35:00 +0000 (UTC) Received: from localhost (c-67-160-101-93.hsd1.wa.comcast.net [67.160.101.93]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8C8FC20138; Thu, 15 Jan 2015 01:34:59 +0000 (UTC) From: Kevin Hilman To: Guenter Roeck , lm-sensors@lm-sensors.org Cc: linux-samsung-soc@vger.kernel.org, linaro-kernel@lists.linaro.org, Jean Delvare , Jonathan Corbet , linux-doc@vger.kernel.org (open list:DOCUMENTATION), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v2] hwmon: (ina2xx) Add ina231 compatible string Date: Wed, 14 Jan 2015 17:34:58 -0800 Message-Id: <1421285699-8469-1-git-send-email-khilman@kernel.org> X-Mailer: git-send-email 2.1.3 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Kevin Hilman Add support for "ina231" as compatible string, and update Documentation and Kconfig accordingly. Tested with the Exynos5422-based odroid-xu3 board which has on-board INA231 sensors. Signed-off-by: Kevin Hilman --- Documentation/hwmon/ina2xx | 9 +++++++++ drivers/hwmon/Kconfig | 4 ++-- drivers/hwmon/ina2xx.c | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Documentation/hwmon/ina2xx b/Documentation/hwmon/ina2xx index 4223c2d3b508..c2f838f65ee4 100644 --- a/Documentation/hwmon/ina2xx +++ b/Documentation/hwmon/ina2xx @@ -26,6 +26,12 @@ Supported chips: Datasheet: Publicly available at the Texas Instruments website http://www.ti.com/ + * Texas Instruments INA231 + Prefix: 'ina231' + Addresses: I2C 0x40 - 0x4f + Datasheet: Publicly available at the Texas Instruments website + http://www.ti.com/ + Author: Lothar Felten Description @@ -44,6 +50,9 @@ The INA226 monitors both a shunt voltage drop and bus supply voltage. The INA230 is a high or low side current shunt and power monitor with an I2C interface. The INA230 monitors both a shunt voltage drop and bus supply voltage. +The INA231 is a high or low side current shunt and power monitor with an I2C +interface. The INA230 monitors both a shunt voltage drop and bus supply voltage. + The shunt value in micro-ohms can be set via platform data or device tree. Please refer to the Documentation/devicetree/bindings/i2c/ina2xx.txt for bindings if the device tree is used. diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig index 6529c09c46f0..408fb6f5f055 100644 --- a/drivers/hwmon/Kconfig +++ b/drivers/hwmon/Kconfig @@ -1420,8 +1420,8 @@ config SENSORS_INA2XX tristate "Texas Instruments INA219 and compatibles" depends on I2C help - If you say yes here you get support for INA219, INA220, INA226, and - INA230 power monitor chips. + If you say yes here you get support for INA219, INA220, INA226, + INA230, and INA231 power monitor chips. The INA2xx driver is configured for the default configuration of the part as described in the datasheet. diff --git a/drivers/hwmon/ina2xx.c b/drivers/hwmon/ina2xx.c index e01feba909c3..8c4a29bd2eaf 100644 --- a/drivers/hwmon/ina2xx.c +++ b/drivers/hwmon/ina2xx.c @@ -287,6 +287,7 @@ static const struct i2c_device_id ina2xx_id[] = { { "ina220", ina219 }, { "ina226", ina226 }, { "ina230", ina226 }, + { "ina231", ina226 }, { } }; MODULE_DEVICE_TABLE(i2c, ina2xx_id);