Re: [PATCH] hwmon (ina3221) Add single-shot mode support

2018-11-23 Thread Guenter Roeck
On 11/19/18 2:18 PM, Nicolin Chen wrote: On Mon, Nov 19, 2018 at 09:45:59AM -0800, Guenter Roeck wrote: In short, other than exposing it via a generic ABI to the user space, how about defining some policy to maintaining it within the driver? I think that would be a bad idea. It changes

Re: [PATCH] hwmon (ina3221) Add single-shot mode support

2018-11-19 Thread Nicolin Chen
On Mon, Nov 19, 2018 at 09:45:59AM -0800, Guenter Roeck wrote: > > In short, other than exposing it via a generic ABI to the user > > space, how about defining some policy to maintaining it within > > the driver? > I think that would be a bad idea. It changes timing for everyone > curently using

Re: [PATCH] hwmon (ina3221) Add single-shot mode support

2018-11-19 Thread Guenter Roeck
On Fri, Nov 16, 2018 at 05:51:34PM -0800, Nicolin Chen wrote: > Hello Guenter, > > On Wed, Nov 14, 2018 at 09:23:30AM -0800, Guenter Roeck wrote: > > > An alternative way (without the sysfs node), after looking at > > > other hwmon code, could be to have a timed polling thread and > > > read data

Re: [PATCH] hwmon (ina3221) Add single-shot mode support

2018-11-16 Thread Nicolin Chen
Hello Guenter, On Wed, Nov 14, 2018 at 09:23:30AM -0800, Guenter Roeck wrote: > > An alternative way (without the sysfs node), after looking at > > other hwmon code, could be to have a timed polling thread and > > read data using an update_interval value from ABI. This might > > turn out to be

Re: [PATCH] hwmon (ina3221) Add single-shot mode support

2018-11-14 Thread Guenter Roeck
On Tue, Nov 13, 2018 at 04:11:42PM -0800, Nicolin Chen wrote: > Hi Guenter, > > On Tue, Nov 13, 2018 at 09:21:02AM -0800, Guenter Roeck wrote: > > > > > INA3221 supports both continuous and single-shot modes. When > > > > > running in the continuous mode, it keeps measuring the inputs > > > > >

Re: [PATCH] hwmon (ina3221) Add single-shot mode support

2018-11-13 Thread Nicolin Chen
Hi Guenter, On Tue, Nov 13, 2018 at 09:21:02AM -0800, Guenter Roeck wrote: > > > > INA3221 supports both continuous and single-shot modes. When > > > > running in the continuous mode, it keeps measuring the inputs > > > > and converting them to the data register even if there are no > > > > users

Re: [PATCH] hwmon (ina3221) Add single-shot mode support

2018-11-13 Thread Guenter Roeck
On Mon, Nov 12, 2018 at 08:58:24PM -0800, Nicolin Chen wrote: > Hi Guenter, > > On Mon, Nov 12, 2018 at 08:32:48PM -0800, Guenter Roeck wrote: > > On Mon, Nov 12, 2018 at 08:23:53PM -0800, Nicolin Chen wrote: > > > INA3221 supports both continuous and single-shot modes. When > > > running in the

Re: [PATCH] hwmon (ina3221) Add single-shot mode support

2018-11-12 Thread Nicolin Chen
Hi Guenter, On Mon, Nov 12, 2018 at 08:32:48PM -0800, Guenter Roeck wrote: > On Mon, Nov 12, 2018 at 08:23:53PM -0800, Nicolin Chen wrote: > > INA3221 supports both continuous and single-shot modes. When > > running in the continuous mode, it keeps measuring the inputs > > and converting them to

Re: [PATCH] hwmon (ina3221) Add single-shot mode support

2018-11-12 Thread Guenter Roeck
On Mon, Nov 12, 2018 at 08:23:53PM -0800, Nicolin Chen wrote: > INA3221 supports both continuous and single-shot modes. When > running in the continuous mode, it keeps measuring the inputs > and converting them to the data register even if there are no > users reading the data out. In this use