|
@@ -8,6 +8,7 @@
|
|
|
|
|
|
#include <linux/of.h>
|
|
|
#include <linux/of_gpio.h>
|
|
|
+#include <linux/version.h>
|
|
|
|
|
|
#ifdef CONFIG_DSI_PARSER
|
|
|
void *dsi_parser_get(struct device *dev);
|
|
@@ -45,8 +46,13 @@ int dsi_parser_count_strings(const struct device_node *np,
|
|
|
int dsi_parser_read_string_index(const struct device_node *np,
|
|
|
const char *propname,
|
|
|
int index, const char **output);
|
|
|
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0))
|
|
|
int dsi_parser_get_named_gpio(const struct device_node *np,
|
|
|
const char *propname, int index);
|
|
|
+#else
|
|
|
+int dsi_parser_get_named_gpio(struct device_node *np,
|
|
|
+ const char *propname, int index);
|
|
|
+#endif
|
|
|
#else /* CONFIG_DSI_PARSER */
|
|
|
static inline void *dsi_parser_get(struct device *dev)
|
|
|
{
|
|
@@ -155,11 +161,19 @@ static inline int dsi_parser_read_string_index(const struct device_node *np,
|
|
|
return -ENODEV;
|
|
|
}
|
|
|
|
|
|
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0))
|
|
|
static inline int dsi_parser_get_named_gpio(const struct device_node *np,
|
|
|
const char *propname, int index)
|
|
|
{
|
|
|
return -ENODEV;
|
|
|
}
|
|
|
+#else
|
|
|
+static inline int dsi_parser_get_named_gpio(struct device_node *np,
|
|
|
+ char *propname, int index)
|
|
|
+{
|
|
|
+ return -ENODEV;
|
|
|
+}
|
|
|
+#endif
|
|
|
|
|
|
#endif /* CONFIG_DSI_PARSER */
|
|
|
|
|
@@ -201,8 +215,13 @@ struct dsi_parser_utils {
|
|
|
const char *propname);
|
|
|
int (*count_strings)(const struct device_node *np,
|
|
|
const char *propname);
|
|
|
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0))
|
|
|
int (*get_named_gpio)(const struct device_node *np,
|
|
|
const char *propname, int index);
|
|
|
+#else
|
|
|
+ int (*get_named_gpio)(struct device_node *np,
|
|
|
+ const char *propname, int index);
|
|
|
+#endif
|
|
|
int (*get_available_child_count)(const struct device_node *np);
|
|
|
};
|
|
|
|