Merge tag 'linux-watchdog-5.1-rc1' of git://www.linux-watchdog.org/linux-watchdog
[sfrench/cifs-2.6.git] / include / linux / platform_data / mlxreg.h
index 19f5cb618c55dbf7bd54f9b6785f2892aecbc28a..6d54fe3bcac9c934e679d53d8101e3da81a88d4e 100644 (file)
 #define __LINUX_PLATFORM_DATA_MLXREG_H
 
 #define MLXREG_CORE_LABEL_MAX_SIZE     32
+#define MLXREG_CORE_WD_FEATURE_NOWAYOUT                BIT(0)
+#define MLXREG_CORE_WD_FEATURE_START_AT_BOOT   BIT(1)
+
+/**
+ * enum mlxreg_wdt_type - type of HW watchdog
+ *
+ * TYPE1 HW watchdog implementation exist in old systems.
+ * All new systems have TYPE2 HW watchdog.
+ */
+enum mlxreg_wdt_type {
+       MLX_WDT_TYPE1,
+       MLX_WDT_TYPE2,
+};
 
 /**
  * struct mlxreg_hotplug_device - I2C device data:
@@ -61,6 +74,7 @@ struct mlxreg_hotplug_device {
  * @reg: attribute register;
  * @mask: attribute access mask;
  * @bit: attribute effective bit;
+ * @capability: attribute capability register;
  * @mode: access mode;
  * @np - pointer to node platform associated with attribute;
  * @hpdev - hotplug device data;
@@ -72,6 +86,7 @@ struct mlxreg_core_data {
        u32 reg;
        u32 mask;
        u32 bit;
+       u32 capability;
        umode_t mode;
        struct device_node *np;
        struct mlxreg_hotplug_device hpdev;
@@ -107,14 +122,20 @@ struct mlxreg_core_item {
 /**
  * struct mlxreg_core_platform_data - platform data:
  *
- * @led_data: led private data;
+ * @data: instance private data;
  * @regmap: register map of parent device;
- * @counter: number of led instances;
+ * @counter: number of instances;
+ * @features: supported features of device;
+ * @version: implementation version;
+ * @identity: device identity name;
  */
 struct mlxreg_core_platform_data {
        struct mlxreg_core_data *data;
        void *regmap;
        int counter;
+       u32 features;
+       u32 version;
+       char identity[MLXREG_CORE_LABEL_MAX_SIZE];
 };
 
 /**