01-10-2019 05:38 PM
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
01-11-2019 01:44 AM
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.
----------------------------------------------------------------------------------------------
01-11-2019 07:49 AM
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