summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSudarsana Kalluru <Sudarsana.Kalluru@qlogic.com>2015-11-30 12:25:03 +0200
committerDavid S. Miller <davem@davemloft.net>2015-12-01 16:02:40 -0500
commit91420b83baa046ada1a899c97f3b2c52a9045705 (patch)
tree793c4c37571a79faee9acaebc8b835f051916d9f /include
parent01ef7e05cc83b83f5bab247cf7b74f953c59e7f0 (diff)
downloadlinux-91420b83baa046ada1a899c97f3b2c52a9045705.tar.bz2
qed: Add support for changing LED state
Physical LEDs are being controlled by the management FW. This adds the qed functionality required to request management FW to change the LED configuration, as well as the necessary APIs for this functionality to later be used by the protocol drivers. Signed-off-by: Sudarsana Kalluru <Sudarsana.Kalluru@qlogic.com> Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/qed/qed_if.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/qed/qed_if.h b/include/linux/qed/qed_if.h
index dc9a1353f971..d4a32e878180 100644
--- a/include/linux/qed/qed_if.h
+++ b/include/linux/qed/qed_if.h
@@ -25,6 +25,12 @@
#include <linux/qed/common_hsi.h>
#include <linux/qed/qed_chain.h>
+enum qed_led_mode {
+ QED_LED_MODE_OFF,
+ QED_LED_MODE_ON,
+ QED_LED_MODE_RESTORE
+};
+
#define DIRECT_REG_WR(reg_addr, val) writel((u32)val, \
(void __iomem *)(reg_addr))
@@ -252,6 +258,17 @@ struct qed_common_ops {
void (*chain_free)(struct qed_dev *cdev,
struct qed_chain *p_chain);
+
+/**
+ * @brief set_led - Configure LED mode
+ *
+ * @param cdev
+ * @param mode - LED mode
+ *
+ * @return 0 on success, error otherwise.
+ */
+ int (*set_led)(struct qed_dev *cdev,
+ enum qed_led_mode mode);
};
/**