From: John Mcgrath Date: Thu, 19 Mar 2009 00:17:11 +0000 Subject: [lm-sensors] Adding driver for embedded sensors in an FPGA Message-Id: <20090319001714.28D68818054@mail202-wa4.bigfish.com> MIME-Version: 1 Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01C9A828.0D1BE23D" List-Id: To: lm-sensors@vger.kernel.org --===============8796560768818033892== Content-Class: urn:content-classes:message Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C9A828.0D1BE23D" ------_=_NextPart_001_01C9A828.0D1BE23D Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi All, = I have two very much newbie questions regarding adding support/a driver for temperature/voltage sensors in an FPGA. The Xilinx Virtex-5 FPGAs support embedded linux, and also have an in-built hardware module that can monitor temperature and 2 system voltages, so lm_sensors seem like a perfect fit! = I would be very interested in adding support for these sensors to the embedded linux. = So my two questions are: 1) These sensors are internal to the FPGA, and can be accessed via a system bus, which is not I2C or PCI, etc. How should this driver be written to fit in with the other drivers that are supported by lm_sensors? a. My guess is to 'fake' being a PCI/I2C device, by simply calling it PCI, while the actual HW access will not use these interfaces, but the driver would take care of talking to the sensors via the system bus. b. How would this affect the sensor detection scripts, any suggestions for this? 2) Is there a guide somewhere that shows how to start writing a driver? I've briefly looked at a few under the drivers/hwmon location, but if there was a template/tutorial on what exactly was required, that would be excellent! = = Any advice at all is greatly appreciated! = Cheers, John = This email and any attachments are intended for the sole use of the named r= ecipient(s) and contain(s) confidential information that may be proprietary= , privileged or copyrighted under applicable law. If you are not the intend= ed recipient, do not read, copy, or forward this email message or any attac= hments. Delete this email message and any attachments immediately. ------_=_NextPart_001_01C9A828.0D1BE23D Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable =

Hi All,

 

I have two very much newbie questions regarding adding s= upport/a driver for temperature/voltage sensors in an FPGA.=

The Xilinx Virtex-5 FPGAs support embedded linux, and al= so have an in-built hardware module that can monitor temperature and 2 system = voltages, so lm_sensors seem like a perfect fit!

 

I would be very interested in adding support for these sensors to the embedded linux.

 

So my two questions are:

1)      = Th= ese sensors are internal to the FPGA, and can be accessed via a system bus, whi= ch is not I2C or PCI, etc. How should this driver be written to fit in with th= e other drivers that are supported by lm_sensors?

a.      = My= guess is to ‘fake’ being a PCI/I2C device, by simply calling it PCI, whi= le the actual HW access will not use these interfaces, but the driver would take c= are of talking to the sensors via the system bus.

b.      = Ho= w would this affect the sensor detection scripts, any suggestions for this?

2)      = Is= there a guide somewhere that shows how to start writing a driver? I’ve briefl= y looked at a few under the drivers/hwmon location, but if there was a template/tuto= rial on what exactly was required, that would be excellent!

 

 

Any advice at all is greatly appreciated!

 

Cheers,

John

 


This email and any attachments are intended for the sole u= se of the named recipient(s) and contain(s) confidential information that m= ay be proprietary, privileged or copyrighted under applicable law. If you a= re not the intended recipient, do not read, copy, or forward this email mes= sage or any attachments. Delete this email message and any attachments imme= diately. ------_=_NextPart_001_01C9A828.0D1BE23D-- --===============8796560768818033892== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ lm-sensors mailing list lm-sensors@lm-sensors.org http://lists.lm-sensors.org/mailman/listinfo/lm-sensors --===============8796560768818033892==--