<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Hi,</div><div><br></div><div>Currently in the IPMID (net and host) shared libraries, SDR and sensor ipmi commands are addressed by querying the "IdInfoMap" data structure (sensorhandler.cpp). This data structure is being filled up using phosphor-sensor-inventory/config.yaml, during build time (as mentioned by Patrick and Lei). </div><div><br></div><div>Assuming that we are not able to pre-fill the config yaml, is there a way in the current implementation, where we can add sensors to this sensors "IdInfoMap" data structure dynamically during run time? </div><div><br></div><div>Thanks,</div><div>Guhan</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Date: Wed, 14 Feb 2018 10:36:23 -0800<br>
From: Patrick Venture <<a href="mailto:venture@google.com" target="_blank">venture@google.com</a>><br>
To: Lei YU <<a href="mailto:mine260309@gmail.com" target="_blank">mine260309@gmail.com</a>><br>
Cc: "Sachin Naik (sachnaik)" <<a href="mailto:sachnaik@cisco.com" target="_blank">sachnaik@cisco.com</a>>,<br>
        "<a href="mailto:openbmc@lists.ozlabs.org" target="_blank">openbmc@lists.ozlabs.org</a>" <<a href="mailto:openbmc@lists.ozlabs.org" target="_blank">openbmc@lists.ozlabs.org</a>><br>
Subject: Re: Porting hwmon sensors to openBMC<br>
Message-ID:<br>
        <CAO=notwMecK=<a href="mailto:GhvVUtgeVUZFV38K71Q5SSF0TeCS0CxY2W%2Baxw@mail.gmail.com" target="_blank">GhvVUtgeVUZFV38K<wbr>71Q5SSF0TeCS0CxY2W+axw@mail.gm<wbr>ail.com</a>><br>
Content-Type: text/plain; charset="UTF-8"<br>
<br>
Lei is correct. If you want, however, to read the sensors over IPMI<br>
you'll need to add a yaml configuration for the sensors as well for<br>
phosphor-host-ipmid.<br>
See <a href="https://github.com/openbmc/openbmc/blob/master/meta-openbmc-machines/meta-x86/meta-quanta/meta-q71l/recipes-phosphor/ipmi/q71l-ipmi-sensor-map/config.yaml" rel="noreferrer" target="_blank">https://github.com/openbmc/ope<wbr>nbmc/blob/master/meta-openbmc-<wbr>machines/meta-x86/meta-quanta/<wbr>meta-q71l/recipes-phosphor/<wbr>ipmi/q71l-ipmi-sensor-map/<wbr>config.yaml</a><br>
for an example.<br>
<br>
On Tue, Jan 23, 2018 at 11:04 PM, Lei YU <<a href="mailto:mine260309@gmail.com" target="_blank">mine260309@gmail.com</a>> wrote:<br>
> On Tue, Jan 23, 2018 at 3:33 PM, Sachin Naik (sachnaik)<br>
> <<a href="mailto:sachnaik@cisco.com" target="_blank">sachnaik@cisco.com</a>> wrote:<br>
>> Hi All<br>
>><br>
>> I am porting a new board to openbmc.<br>
>> I have question on mapping hwmon type sensors to Dbus<br>
>><br>
>> So far I have created machine layer and added U-boot config, Kernel config and device tree. In kernel config I have enabled lm75 hwmon driver for LM75 temperature device. Corresponding entry added in device tree.<br>
>><br>
>> Right now I have created hwmon temperature sensors entry in our machine layer by extending recipes-phosphor/sensors/phosp<wbr>hor-hwmon%.bbappend<br>
>> and created conf file with temperature sensors label.<br>
>><br>
>> Now my question is how do implement/map dbus temperature sensor value interface to our hwmon temperature sensors? Is above implementation is enough or it requires<br>
>> Some mapping for dbus to hwmon instance?<br>
><br>
> After you added config files for the temperature sensors with<br>
> phosphor-hwmon%.bbappend, phosphor-hwmon will read from<br>
> hwmon instance and create dbus objects at<br>
> /xyz/openbmc_project/sensors/, which will at least have "Value",<br>
> “Scale" and "Unit" properties.<br>
><br>
> I do not think it requires other configs, unless I misunderstand<br>
> your case?<br>
><br>
>><br>
>> Thanks and regards<br>
>> Sachin<br>
>><br>
>><br></blockquote></div></div></div>