Add fan presence support configurations
Add configurations and allow entity manager to export
gpios.
Change-Id: Ib2564a9860ff223b8ea75b3e8ac7c2d97f2c2f59
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/configurations/R2000 Chassis.json b/configurations/R2000 Chassis.json
index d59f66d..0a4424e 100644
--- a/configurations/R2000 Chassis.json
+++ b/configurations/R2000 Chassis.json
@@ -28,6 +28,7 @@
"BindConnector": "2U System Fan connector 1",
"Index": 0,
"Name": "Fan 1",
+ "BindPresence": "Fan 0 Present",
"Thresholds": [
{
"Direction": "less than",
@@ -48,6 +49,7 @@
"BindConnector": "2U System Fan connector 2",
"Index": 2,
"Name": "Fan 2",
+ "BindPresence": "Fan 1 Present",
"Thresholds": [
{
"Direction": "less than",
@@ -68,6 +70,7 @@
"BindConnector": "2U System Fan connector 3",
"Index": 4,
"Name": "Fan 3",
+ "BindPresence": "Fan 2 Present",
"Thresholds": [
{
"Direction": "less than",
@@ -88,6 +91,7 @@
"BindConnector": "2U System Fan connector 4",
"Index": 6,
"Name": "Fan 4",
+ "BindPresence": "Fan 3 Present",
"Thresholds": [
{
"Direction": "less than",
@@ -108,6 +112,7 @@
"BindConnector": "2U System Fan connector 5",
"Index": 8,
"Name": "Fan 5",
+ "BindPresence": "Fan 4 Present",
"Thresholds": [
{
"Direction": "less than",
@@ -128,6 +133,7 @@
"BindConnector": "2U System Fan connector 6",
"Index": 10,
"Name": "Fan 6",
+ "BindPresence": "Fan 5 Present",
"Thresholds": [
{
"Direction": "less than",
diff --git a/configurations/WFT Baseboard.json b/configurations/WFT Baseboard.json
index 9e5a8ac..369e409 100644
--- a/configurations/WFT Baseboard.json
+++ b/configurations/WFT Baseboard.json
@@ -915,6 +915,70 @@
},
{
"Direction": "Input",
+ "Index": 64,
+ "Name": "Fan 0 Present",
+ "Polarity": "Low",
+ "Status": "disabled",
+ "Type": "Gpio"
+ },
+ {
+ "Direction": "Input",
+ "Index": 65,
+ "Name": "Fan 1 Present",
+ "Polarity": "Low",
+ "Status": "disabled",
+ "Type": "Gpio"
+ },
+ {
+ "Direction": "Input",
+ "Index": 66,
+ "Name": "Fan 2 Present",
+ "Polarity": "Low",
+ "Status": "disabled",
+ "Type": "Gpio"
+ },
+ {
+ "Direction": "Input",
+ "Index": 67,
+ "Name": "Fan 3 Present",
+ "Polarity": "Low",
+ "Status": "disabled",
+ "Type": "Gpio"
+ },
+ {
+ "Direction": "Input",
+ "Index": 68,
+ "Name": "Fan 4 Present",
+ "Polarity": "Low",
+ "Status": "disabled",
+ "Type": "Gpio"
+ },
+ {
+ "Direction": "Input",
+ "Index": 69,
+ "Name": "Fan 5 Present",
+ "Polarity": "Low",
+ "Status": "disabled",
+ "Type": "Gpio"
+ },
+ {
+ "Direction": "Input",
+ "Index": 70,
+ "Name": "Fan 6 Present",
+ "Polarity": "Low",
+ "Status": "disabled",
+ "Type": "Gpio"
+ },
+ {
+ "Direction": "Input",
+ "Index": 71,
+ "Name": "Fan 7 Present",
+ "Polarity": "Low",
+ "Status": "disabled",
+ "Type": "Gpio"
+ },
+ {
+ "Direction": "Input",
"Index": 217,
"Name": "Nmi Button",
"Polarity": "High",
diff --git a/include/devices.hpp b/include/devices.hpp
index 95cdd96..a72624b 100644
--- a/include/devices.hpp
+++ b/include/devices.hpp
@@ -40,6 +40,7 @@
exportTemplates{
{{"EEPROM", ExportTemplate("eeprom $Address",
"/sys/bus/i2c/devices/i2c-$Bus/new_device")},
+ {"Gpio", ExportTemplate("$Index", "/sys/class/gpio/export")},
{"PCA9543Mux",
ExportTemplate("pca9543 $Address",
"/sys/bus/i2c/devices/i2c-$Bus/new_device")},