This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Ina219 with linux kernel driver

Other Parts Discussed in Thread: INA219

Hi,

I am trying to use ina219 sensor (http://www.adafruit.com/products/904) with linux kernel driver on beaglebone black.

I want to use device tree overlay to use the sensor. I follow kernel indications (http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/i2c/ina2xx.txt) and the sensor works as expected. 

But adafruit board use 0.1ohms and default driver value for shunt-resistor is 10mOhms so return value are wrong.

I want to modify value in device tree as indicated 

ina219@40 {
          compatible = "ti,ina219";
          reg = <0x40>;
          shunt-resistor = <100000>;
 };

but changing shunt-resistor value does nothing. The sensor is always create with 10mOhms value

ina2xx 1-0040: power monitor ina219 (Rshunt = 10000 uOhm)

How can i change the shunt-resistor value to get the proper return?

thanks,

Pierre

  • Pierre,

    I am investigating your issue and looking for someone here at TI that can really look into this linux driver and figure out what is going on.  I agree that you should be able to change the shunt resistor value.

    - Jason Bridgmon

  • Hi,

    Thanks for your answer. But I got an answer on lm-sensors mailing list.

    Here is the answer :

    > I am using beaglebone black default kernel, here is its informations :
    > Linux arm 3.8.13-bone40 #1 SMP Fri Jan 31 10:36:05 UTC 2014 armv7l
    > DISTRIB_ID=Ubuntu
    > DISTRIB_RELEASE=13.10
    > DISTRIB_CODENAME=saucy
    > DISTRIB_DESCRIPTION="Ubuntu 13.10"
    >
    Devicetree support was only added to the ina2xx driver with
    kernel version 3.11. You would have to back-port commit 31e7ad7
    into your kernel to get it.

    It just need to update the kernel to easyly change shunt resistor value

     

     

  • Pierre,

    I'm glad you were able to get the INA219 driver working!

    Jason Bridgmon