From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752507AbcFCLnk (ORCPT ); Fri, 3 Jun 2016 07:43:40 -0400 Received: from hqemgate16.nvidia.com ([216.228.121.65]:12516 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751312AbcFCLni (ORCPT ); Fri, 3 Jun 2016 07:43:38 -0400 X-PGP-Universal: processed; by hqnvupgp07.nvidia.com on Fri, 03 Jun 2016 04:40:43 -0700 Message-ID: <57516A74.4060008@nvidia.com> Date: Fri, 3 Jun 2016 17:01:00 +0530 From: Laxman Dewangan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Jonathan Cameron , , , CC: , , , , , Jean Delvare , "Guenter Roeck" Subject: Re: [PATCH 2/3] iio: adc: ina3221: Add support for IIO ADC driver for TI INA3221 References: <1464784454-7988-1-git-send-email-ldewangan@nvidia.com> <1464784454-7988-2-git-send-email-ldewangan@nvidia.com> <44e28639-67b6-7586-5e6d-c0180ccded79@kernel.org> <20f70b31-afb5-e012-0baf-ba0b83ac6d36@kernel.org> In-Reply-To: <20f70b31-afb5-e012-0baf-ba0b83ac6d36@kernel.org> X-Originating-IP: [10.19.65.30] X-ClientProxiedBy: BGMAIL104.nvidia.com (10.25.59.13) To bgmail102.nvidia.com (10.25.59.11) Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 03 June 2016 03:46 PM, Jonathan Cameron wrote: > On 03/06/16 11:06, Jonathan Cameron wrote: >> >> Code looks good, bu these more fundamental bits need sorting. > Another minor point - why do the power calculations in driver? > no hardware support for it, so why not just leave it to userspace? Device supports the bus and shunt voltage monitoring. So even no current. Also the warning/critical limit is for the voltage across shunt. So should we only expose the shunt/bus voltage, no power/current? I am thinking that user space should not know the platform and hence shunt resistance and so exposing the current and power on bus is better option.