Re: [PATCH 2/3] hwmon: Add support for ltc2947

2019-10-11 Thread Sa, Nuno
On Thu, 2019-10-10 at 08:21 -0700, Guenter Roeck wrote: > [External] > > On Thu, Oct 10, 2019 at 07:13:06AM +, Sa, Nuno wrote: > > Quoting the reply I had: > > > > "As the LTC2947 is bi-directional, the most likely use for the > > Min/Max > > Energy thresholds are for monitoring a battery bei

Re: [PATCH 2/3] hwmon: Add support for ltc2947

2019-10-10 Thread Guenter Roeck
On Thu, Oct 10, 2019 at 07:13:06AM +, Sa, Nuno wrote: > > Quoting the reply I had: > > "As the LTC2947 is bi-directional, the most likely use for the Min/Max > Energy thresholds are for monitoring a battery being charged or > discharged. > A limit could be set based around the battery's stor

Re: [PATCH 2/3] hwmon: Add support for ltc2947

2019-10-10 Thread Sa, Nuno
Hi Guenter, I got some feedback about energy max/min... On Mon, 2019-10-07 at 14:51 +, Sa, Nuno wrote: > On Mon, 2019-10-07 at 05:44 -0700, Guenter Roeck wrote: > > On 10/7/19 5:25 AM, Sa, Nuno wrote: > > > On Fri, 2019-10-04 at 08:06 -0700, Guenter Roeck wrote: > > > > On Fri, Oct 04, 2019 a

Re: [PATCH 2/3] hwmon: Add support for ltc2947

2019-10-07 Thread Sa, Nuno
On Mon, 2019-10-07 at 05:44 -0700, Guenter Roeck wrote: > > On 10/7/19 5:25 AM, Sa, Nuno wrote: > > On Fri, 2019-10-04 at 08:06 -0700, Guenter Roeck wrote: > > > On Fri, Oct 04, 2019 at 07:45:07AM +, Sa, Nuno wrote: > > > [ ... ] > > > > > > +static int ltc2947_val_read(struct ltc2947_data *st

Re: [PATCH 2/3] hwmon: Add support for ltc2947

2019-10-07 Thread Guenter Roeck
On 10/7/19 5:25 AM, Sa, Nuno wrote: On Fri, 2019-10-04 at 08:06 -0700, Guenter Roeck wrote: On Fri, Oct 04, 2019 at 07:45:07AM +, Sa, Nuno wrote: [ ... ] +static int ltc2947_val_read(struct ltc2947_data *st, const u8 reg, + const u8 page, const size_t size, s64 *v

Re: [PATCH 2/3] hwmon: Add support for ltc2947

2019-10-07 Thread Sa, Nuno
On Fri, 2019-10-04 at 08:06 -0700, Guenter Roeck wrote: > > On Fri, Oct 04, 2019 at 07:45:07AM +, Sa, Nuno wrote: > [ ... ] > > > > +static int ltc2947_val_read(struct ltc2947_data *st, const u8 > > > > reg, > > > > + const u8 page, const size_t size, > > > > s64 *val

Re: [PATCH 2/3] hwmon: Add support for ltc2947

2019-10-04 Thread Guenter Roeck
On Fri, Oct 04, 2019 at 07:45:07AM +, Sa, Nuno wrote: [ ... ] > > > +static int ltc2947_val_read(struct ltc2947_data *st, const u8 reg, > > > + const u8 page, const size_t size, s64 *val) > > > +{ > > > + int ret; > > > + u64 __val = 0; > > > + > > > + mutex_lock(&st->lock);

Re: [PATCH 2/3] hwmon: Add support for ltc2947

2019-10-04 Thread Sa, Nuno
On Wed, 2019-10-02 at 21:14 -0700, Guenter Roeck wrote: > > On Tue, Sep 24, 2019 at 02:49:44PM +0200, Nuno Sá wrote: > > The ltc2947 is a high precision power and energy monitor with an > > internal sense resistor supporting up to +/- 30A. Three internal no > > Latency ADCs ensure accurate measure

Re: [PATCH 2/3] hwmon: Add support for ltc2947

2019-10-02 Thread Guenter Roeck
On Tue, Sep 24, 2019 at 02:49:44PM +0200, Nuno Sá wrote: > The ltc2947 is a high precision power and energy monitor with an > internal sense resistor supporting up to +/- 30A. Three internal no > Latency ADCs ensure accurate measurement of voltage and current, while > high-bandwidth analog multipli

[PATCH 2/3] hwmon: Add support for ltc2947

2019-09-24 Thread Nuno Sá
The ltc2947 is a high precision power and energy monitor with an internal sense resistor supporting up to +/- 30A. Three internal no Latency ADCs ensure accurate measurement of voltage and current, while high-bandwidth analog multiplication of voltage and current provides accurate power measurement