From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752158AbbJXMpQ (ORCPT ); Sat, 24 Oct 2015 08:45:16 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:39788 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750762AbbJXMpO (ORCPT ); Sat, 24 Oct 2015 08:45:14 -0400 Subject: Re: [RFC] hwmon: ina2xx: port to using remap, improve bandwidth. To: Marc Titinger , jdelvare@suse.com References: <56263973.300@roeck-us.net> <1445616800-21329-1-git-send-email-mtitinger@baylibre.com> <562A65D3.8090306@roeck-us.net> <562A9A0A.5040503@baylibre.com> Cc: lm-sensors@lm-sensors.org, linux-kernel@vger.kernel.org, mturquette@baylibre.com, bcousson@baylibre.com From: Guenter Roeck Message-ID: <562B7D56.3010700@roeck-us.net> Date: Sat, 24 Oct 2015 05:45:10 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <562A9A0A.5040503@baylibre.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated_sender: linux@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: linux@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/23/2015 01:35 PM, Marc Titinger wrote: > Hi Guenter > > thanks for the review, answers bellow. > [ ... ] >>> /* shunt voltage */ >>> -static SENSOR_DEVICE_ATTR(in0_input, S_IRUGO, ina2xx_show_value, NULL, >>> +static SENSOR_DEVICE_ATTR(in0_input, S_IRUGO, ina2xx_show_shunt, NULL, >>> INA2XX_SHUNT_VOLTAGE); >> >> If you no longer use the register parameter, there is no need to provide it. >> But then I'll have to spend some time trying to understand _why_ you don't >> use it anymore and why you introduced separate show functions. >> Some explanation might help. >> > The interval value is no longer needed to compute a read "gard" delay, but the client Application may still need to set a different averaging value through this interval setting, based on the DUT characteristics. I don't really understand what you are saying here, sorry, and what it has to do with the switch from a single to multiple show functions. > As of using separate functions, it fits better in the new logic of "per-register" accesses. It does not bloat the code either. > "It does not bloat the code" is not a valid reason for making such a change, nor "it fits better" (because that is an opinion). Reducing code size, or simplifying the code, could be valid reasons. The change is also technically unrelated to the switch to regmap. Also, while it may not bloat the code, it definitely bloats the patch size and makes it much more difficult to review the patch. Please make only one logical change per patch. So far, we have identified three independent sets of changes: - switch to regmap - switch to separate show functions - switch to prioritize devicetree data over platform data and I am not sure if there are more, given the complexity of the patch. I would expect separate patches to address those changes. Please split the patch accordingly. Thanks, Guenter