Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3841196pxb; Mon, 1 Nov 2021 22:30:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrlTJxg7GVjLAfW/zwvvWqpcbPty45RP/qHkcynvLm2zIubYXIDjjaj+huSLHApyF4aOzd X-Received: by 2002:a05:6402:26cb:: with SMTP id x11mr156692edd.127.1635831029668; Mon, 01 Nov 2021 22:30:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635831029; cv=none; d=google.com; s=arc-20160816; b=gdGdZgQZI8u6zjBZEMDZInpW+FEg/P1intiJtZs+ZVOpeorVfuA67MTVXIr/p/IYCJ ZtEHhthlgIBew1ICFqFfosTJaMNRvqJdKlbzw/FQ5hChiQuASBvSfjtAni1omdQOYb50 cG5AK4a1vrlGk1QP+J+E2dVGizE31bBoQFRl8zM/6GHfHTuSrhAeySqnLkbOviB7uPPw IBc2TIlmvC2cfxOVSiFc80fz5WQ+mM+H3K2vrkaIrglVdik4jaT/dcv3kRnAPTYDsyDD /fPaFnAd8W6gtoyQa7Hob3XKN1fzGrOBudElP7AaHxNLyLU+ND+I554D13xGCJDF9vOu Yq+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding:subject :cc:to:from:message-id:date:dkim-signature; bh=QlpUYZWJN3/9X1Sv9NBkaK62CkOEjlr+CDsqVlIgJIQ=; b=nPGwvEpV+fNRbbGglBfeSr6Cpx6nYyFM0GcKjHLC+oDv36leE03k5DRht8Xf+6nWqa npIg8Yb+SLguSFwWU5dclzOdMWP8eae+9PGiNUp7Nk/878r/b3EC/oaTnOwEC+QXoPzU mF2KNGVys/Deo3KpCX6BNhxyYZEFPgU8NcC+l2/bsrVq4E1K2dZL16fU2zfBB5ABdiWk WioNpdJRcuJDen0R/tCGs55djVKwD7LTUI3I2FBC/Y/wVPcFdFr+KhCUiR5KOUbHhzaF 3eLh+f0WiHwdhey1lQWzNp9oMGqq+P2MNH3s3OQ6TPdVieoKwaFfEUxNFDusMB+NxxGC IMTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nathanrossi.com header.s=google header.b=VcRT5oMz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nathanrossi.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 9si21029883edw.603.2021.11.01.22.30.04; Mon, 01 Nov 2021 22:30:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nathanrossi.com header.s=google header.b=VcRT5oMz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nathanrossi.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229693AbhKBFas (ORCPT + 99 others); Tue, 2 Nov 2021 01:30:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229770AbhKBFaq (ORCPT ); Tue, 2 Nov 2021 01:30:46 -0400 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 173BBC061767 for ; Mon, 1 Nov 2021 22:28:12 -0700 (PDT) Received: by mail-pl1-x634.google.com with SMTP id b13so2820830plg.2 for ; Mon, 01 Nov 2021 22:28:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nathanrossi.com; s=google; h=date:message-id:from:to:cc:subject:content-transfer-encoding :mime-version; bh=QlpUYZWJN3/9X1Sv9NBkaK62CkOEjlr+CDsqVlIgJIQ=; b=VcRT5oMz40A1iuJxETkuWzR1Vl5jIU1zwV/Vro2E9brtgZli9NpwLSQKlH2s4IE6oH g7pmk0/qRVgI5jdFOD8YJRh/sQH3LafWUwnmSXUruakT2vOdlynLgjAkzTGCklI5Sj9d 5iO2/BUISEvk50LuONeKmuUoiItmIswzmo81uOikqbYiih9FNMdXCw/aUee/A0NG55UU G/gZNRjX7wmqsGmyFlul5tUD+ELOdwrL45jq70t5i/nWHcNWJj5dHGxM4RH1Y+m55kG4 jBl7Zb5JDDPM5agzjC+1+5clMPwgrsgfjzdd63FFsJkxrYcNV+zkuyx5jzL8zWv13Hjy Ycew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:message-id:from:to:cc:subject :content-transfer-encoding:mime-version; bh=QlpUYZWJN3/9X1Sv9NBkaK62CkOEjlr+CDsqVlIgJIQ=; b=S4BhgKCOy/zeg6E4Iw1ooNNmDca95rzzb9JSXXWNWLnMmfGpXYvwS/0F/ZrwOA1JCV ix0KNWTEiTCLWuwBOwTRaMM//m3NP1PRB/53bT0Po3p+fny0NaZNmNq8KflVhZuUXtu4 iHjFmgdFCuxUixx9xcDGvK8vAoadcPDP0Cr/Com568Iirg6Dpz2s6k8fhVeQqKsVoAjD Le1EchP5Ha785ZrG9T4gvUBmek1gYVRimpHdEVsR/b1lf+b53Wsy8ZAg4x+t0fotybDO fBX6YVByOz+sP/A2FUdl0TwAgWhNj2qR4TOzA1EHguueQdsLA+BHam0tQe/DJNqIGiZs 3Lbg== X-Gm-Message-State: AOAM531jG89OE0K4XMMosZHlFPfvMXe98Da8Hd/YNAzpFXmFQoy4k60Q BMqPzaxWTYFcm1M8Kta4iK0eNJJ7xsx4mocm X-Received: by 2002:a17:90a:34b:: with SMTP id 11mr4146832pjf.188.1635830891243; Mon, 01 Nov 2021 22:28:11 -0700 (PDT) Received: from [127.0.1.1] (117-20-69-24.751445.bne.nbn.aussiebb.net. [117.20.69.24]) by smtp.gmail.com with UTF8SMTPSA id j6sm14293344pgq.0.2021.11.01.22.28.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Nov 2021 22:28:10 -0700 (PDT) Date: Tue, 02 Nov 2021 05:27:54 +0000 Message-Id: <20211102052754.817220-0-nathan@nathanrossi.com> From: Nathan Rossi To: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Cc: Nathan Rossi , Nathan Rossi , Guenter Roeck , Jean Delvare , Rob Herring , Jonathan Corbet Subject: [PATCH v4 0/3] Driver for TI INA238 I2C Power Monitor Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nathan Rossi Changes in v2: - Added device tree binding for ti,shunt-gain to specify the target ADCRANGE for the ina238 - Reworked ina238 driver to use hwmon_chip_info API, and addressed various review comments Changes in v3: - Fix schema error for ti,shunt-gain binding - Address review comments Changes in v4: - Change ina238_data.gain type to int Nathan Rossi (3): dt-bindings: hwmon: ti,ina2xx: Document ti,ina238 compatible string dt-bindings: hwmon: ti,ina2xx: Add ti,shunt-gain property hwmon: Driver for Texas Instruments INA238 .../devicetree/bindings/hwmon/ti,ina2xx.yaml | 22 + Documentation/hwmon/ina238.rst | 56 ++ Documentation/hwmon/index.rst | 1 + drivers/hwmon/Kconfig | 12 + drivers/hwmon/Makefile | 1 + drivers/hwmon/ina238.c | 644 ++++++++++++++++++ 6 files changed, 736 insertions(+) create mode 100644 Documentation/hwmon/ina238.rst create mode 100644 drivers/hwmon/ina238.c --- 2.33.0