cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer
Observer
422 Views
Registered: ‎01-27-2016

How to use LM70.c

Hi 

our board have tmp123 through spi on ps, may I know how to use LM70.c? How to compile it as module? I need create a module project myself ?

https://github.com/spotify/linux/blob/master/drivers/hwmon/lm70.c

Thanks

0 Kudos
2 Replies
Highlighted
Moderator
Moderator
392 Views
Registered: ‎02-07-2018

Re: How to use LM70.c

Hi @lynn.zhang

 

Please follow the steps mentioned in this link:https://www.xilinx.com/support/documentation/sw_manuals/xilinx2018_2/ug1144-petalinux-tools-reference-guide.pdf (Sections:Creating and Adding Custom Modules & Building User Applications )

 

Thanks & regards

Aravind

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------

 

0 Kudos
Observer
Observer
381 Views
Registered: ‎01-27-2016

Re: How to use LM70.c

hanks for reply. Based on following:

https://github.com/Xilinx/linux-xlnx/blob/master/Documentation/devicetree/bindings/hwmon/lm70.txt

Where should I put following? at system-user.dtsi?

spi_master {
temperature-sensor@0 {
compatible = "ti,lm70";
reg = <0>;
spi-max-frequency = <1000000>;
};

};

Also lm70.c is xilinx kernel driver, I need create an module on my own like your said?

Thanks

0 Kudos