public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marc Titinger <mtitinger@baylibre.com>
To: "Andrew F. Davis" <afd@ti.com>,
	jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de,
	pmeerw@pmeerw.net
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH-vs-togreg 1/2] iio: ina2xx-adc: update the CALIB. register when RShunt changes
Date: Fri, 11 Mar 2016 16:26:52 +0100	[thread overview]
Message-ID: <56E2E3BC.6090405@baylibre.com> (raw)
In-Reply-To: <56E2DE7E.5090905@ti.com>



On 11/03/2016 16:04, Andrew F. Davis wrote:
...

>>
>> @@ -599,6 +621,8 @@ static const struct iio_info ina2xx_info = {
>>   	.debugfs_reg_access = ina2xx_debug_reg,
>>   };
>>
>> +
>> +
>
> ?
>

Ok, will fix in v2, thanks !

M.

>>   /* Initialize the configuration and calibration registers. */
>>   static int ina2xx_init(struct ina2xx_chip_info *chip, unsigned int config)
>>   {
>> @@ -609,17 +633,7 @@ static int ina2xx_init(struct ina2xx_chip_info *chip, unsigned int config)
>>   	if (ret)
>>   		return ret;
>>
>> -	/*
>> -	 * Set current LSB to 1mA, shunt is in uOhms
>> -	 * (equation 13 in datasheet). We hardcode a Current_LSB
>> -	 * of 1.0 x10-6. The only remaining parameter is RShunt.
>> -	 * There is no need to expose the CALIBRATION register
>> -	 * to the user for now.
>> -	 */
>> -	regval = DIV_ROUND_CLOSEST(chip->config->calibration_factor,
>> -				   chip->shunt_resistor);
>> -
>> -	return regmap_write(chip->regmap, INA2XX_CALIBRATION, regval);
>> +	return ina2xx_set_calibration(chip);
>>   }
>>
>>   static int ina2xx_probe(struct i2c_client *client,
>>

  reply	other threads:[~2016-03-11 15:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-11 14:52 [PATCH-vs-togreg 1/2] iio: ina2xx-adc: update the CALIB. register when RShunt changes Marc Titinger
2016-03-11 14:52 ` [PATCH-vs-togreg 2/2] iio: ina2xx-adc: fix scale for VShunt Marc Titinger
2016-03-11 15:04 ` [PATCH-vs-togreg 1/2] iio: ina2xx-adc: update the CALIB. register when RShunt changes Andrew F. Davis
2016-03-11 15:26   ` Marc Titinger [this message]
2016-03-11 16:01 ` kbuild test robot
2016-03-12  9:19 ` Jonathan Cameron
2016-03-14  9:24   ` Marc Titinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56E2E3BC.6090405@baylibre.com \
    --to=mtitinger@baylibre.com \
    --cc=afd@ti.com \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox