Re: [PATCH] hwmon: (ina3221) Add voltage conversion time settings

2019-04-17 Thread Nicolin Chen
On Wed, Apr 17, 2019 at 01:12:34PM -0700, Guenter Roeck wrote: > On Wed, Apr 17, 2019 at 12:48:18PM -0700, Nicolin Chen wrote: > > On Wed, Apr 17, 2019 at 11:39:49AM -0700, Nicolin Chen wrote: > > > > > > Thinking about it ... does it even make sense to cache reg_config twice, > > > > or would it

Re: [PATCH] hwmon: (ina3221) Add voltage conversion time settings

2019-04-17 Thread Guenter Roeck
On Wed, Apr 17, 2019 at 12:48:18PM -0700, Nicolin Chen wrote: > On Wed, Apr 17, 2019 at 11:39:49AM -0700, Nicolin Chen wrote: > > > > Thinking about it ... does it even make sense to cache reg_config twice, > > > or would it be better to just update the local copy and use regmap_write() > > > to

Re: [PATCH] hwmon: (ina3221) Add voltage conversion time settings

2019-04-17 Thread Nicolin Chen
On Wed, Apr 17, 2019 at 11:39:49AM -0700, Nicolin Chen wrote: > > Thinking about it ... does it even make sense to cache reg_config twice, > > or would it be better to just update the local copy and use regmap_write() > > to send it to the chip ? > > I remember the reason of adding the read-back

Re: [PATCH] hwmon: (ina3221) Add voltage conversion time settings

2019-04-17 Thread Nicolin Chen
On Wed, Apr 17, 2019 at 07:04:09AM -0700, Guenter Roeck wrote: > > > I am not quite sure if this update_interval is the best way to > > > implement the conversion time settings but I can't find another > > > common approach. This implementation certainly has drawbacks: > > >   1) It can't

Re: [PATCH] hwmon: (ina3221) Add voltage conversion time settings

2019-04-17 Thread Guenter Roeck
On 4/17/19 6:46 AM, Guenter Roeck wrote: On 4/16/19 4:55 PM, Nicolin Chen wrote: The CONFIG register has two 3-bit fields for conversion time settings of Bus-voltage and Shunt-voltage, respectively. The conversion settings, along with averaging mode, allow users to optimize available timing

Re: [PATCH] hwmon: (ina3221) Add voltage conversion time settings

2019-04-17 Thread Guenter Roeck
On 4/16/19 4:55 PM, Nicolin Chen wrote: The CONFIG register has two 3-bit fields for conversion time settings of Bus-voltage and Shunt-voltage, respectively. The conversion settings, along with averaging mode, allow users to optimize available timing requirement. This patch adds an

[PATCH] hwmon: (ina3221) Add voltage conversion time settings

2019-04-16 Thread Nicolin Chen
The CONFIG register has two 3-bit fields for conversion time settings of Bus-voltage and Shunt-voltage, respectively. The conversion settings, along with averaging mode, allow users to optimize available timing requirement. This patch adds an 'update_interval' sysfs node through the