summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2021-03-23 12:15:22 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2021-03-23 12:15:22 +0100
commitbb2873db3ef11e7b1299b1cca129f5d002e47f59 (patch)
treee53a1697f6ffb81d8f866ddadf3862ab0c04ceef /include
parent31343957ea42a9340345c17288e56cfa07304bb8 (diff)
parent176bd2605edfd7d64370736abe8c44833068788b (diff)
downloadbarebox-bb2873db3ef11e7b1299b1cca129f5d002e47f59.tar.gz
barebox-bb2873db3ef11e7b1299b1cca129f5d002e47f59.tar.xz
Merge branch 'for-next/misc'
Diffstat (limited to 'include')
-rw-r--r--include/linux/platform_data/simplefb.h46
-rw-r--r--include/linux/reset.h7
-rw-r--r--include/linux/stat.h12
-rw-r--r--include/stringlist.h2
4 files changed, 48 insertions, 19 deletions
diff --git a/include/linux/platform_data/simplefb.h b/include/linux/platform_data/simplefb.h
new file mode 100644
index 0000000000..a4f07eccd8
--- /dev/null
+++ b/include/linux/platform_data/simplefb.h
@@ -0,0 +1,46 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * simplefb.h - Simple Framebuffer Device
+ *
+ * Copyright (C) 2013 David Herrmann <dh.herrmann@gmail.com>
+ */
+
+#ifndef __PLATFORM_DATA_SIMPLEFB_H__
+#define __PLATFORM_DATA_SIMPLEFB_H__
+
+#include <video/fourcc.h>
+#include <fb.h>
+#include <linux/types.h>
+
+/* format array, use it to initialize a "struct simplefb_format" array */
+#define SIMPLEFB_FORMATS \
+{ \
+ { "r5g6b5", 16, {11, 5}, {5, 6}, {0, 5}, {0, 0}, DRM_FORMAT_RGB565 }, \
+ { "x1r5g5b5", 16, {10, 5}, {5, 5}, {0, 5}, {0, 0}, DRM_FORMAT_XRGB1555 }, \
+ { "a1r5g5b5", 16, {10, 5}, {5, 5}, {0, 5}, {15, 1}, DRM_FORMAT_ARGB1555 }, \
+ { "r8g8b8", 24, {16, 8}, {8, 8}, {0, 8}, {0, 0}, DRM_FORMAT_RGB888 }, \
+ { "x8r8g8b8", 32, {16, 8}, {8, 8}, {0, 8}, {0, 0}, DRM_FORMAT_XRGB8888 }, \
+ { "a8r8g8b8", 32, {16, 8}, {8, 8}, {0, 8}, {24, 8}, DRM_FORMAT_ARGB8888 }, \
+ { "a8b8g8r8", 32, {0, 8}, {8, 8}, {16, 8}, {24, 8}, DRM_FORMAT_ABGR8888 }, \
+ { "x2r10g10b10", 32, {20, 10}, {10, 10}, {0, 10}, {0, 0}, DRM_FORMAT_XRGB2101010 }, \
+ { "a2r10g10b10", 32, {20, 10}, {10, 10}, {0, 10}, {30, 2}, DRM_FORMAT_ARGB2101010 }, \
+}
+
+/*
+ * Data-Format for Simple-Framebuffers
+ * @name: unique 0-terminated name that can be used to identify the mode
+ * @red,green,blue: Offsets and sizes of the single RGB parts
+ * @transp: Offset and size of the alpha bits. length=0 means no alpha
+ * @fourcc: 32bit DRM four-CC code (see drm_fourcc.h)
+ */
+struct simplefb_format {
+ const char *name;
+ u32 bits_per_pixel;
+ struct fb_bitfield red;
+ struct fb_bitfield green;
+ struct fb_bitfield blue;
+ struct fb_bitfield transp;
+ u32 fourcc;
+};
+
+#endif /* __PLATFORM_DATA_SIMPLEFB_H__ */
diff --git a/include/linux/reset.h b/include/linux/reset.h
index 4a92a177bc..a166fe1cfe 100644
--- a/include/linux/reset.h
+++ b/include/linux/reset.h
@@ -21,43 +21,36 @@ int __must_check device_reset_us(struct device_d *dev, int us);
static inline int reset_control_reset(struct reset_control *rstc)
{
- WARN_ON(1);
return 0;
}
static inline int reset_control_assert(struct reset_control *rstc)
{
- WARN_ON(1);
return 0;
}
static inline int reset_control_deassert(struct reset_control *rstc)
{
- WARN_ON(1);
return 0;
}
static inline struct reset_control *
reset_control_get(struct device_d *dev, const char *id)
{
- WARN_ON(1);
return NULL;
}
static inline void reset_control_put(struct reset_control *rstc)
{
- WARN_ON(1);
}
static inline int device_reset_us(struct device_d *dev, int us)
{
- WARN_ON(1);
return 0;
}
static inline int device_reset(struct device_d *dev)
{
- WARN_ON(1);
return 0;
}
diff --git a/include/linux/stat.h b/include/linux/stat.h
index 87fe068396..f5043d8bce 100644
--- a/include/linux/stat.h
+++ b/include/linux/stat.h
@@ -45,8 +45,6 @@ extern "C" {
#define S_IRWXUGO (S_IRWXU|S_IRWXG|S_IRWXO)
struct stat {
- unsigned short st_dev;
- unsigned short __pad1;
unsigned long st_ino;
unsigned short st_mode;
unsigned short st_nlink;
@@ -55,16 +53,6 @@ struct stat {
unsigned short st_rdev;
unsigned short __pad2;
loff_t st_size;
- unsigned long st_blksize;
- unsigned long st_blocks;
- unsigned long st_atime;
- unsigned long __unused1;
- unsigned long st_mtime;
- unsigned long __unused2;
- unsigned long st_ctime;
- unsigned long __unused3;
- unsigned long __unused4;
- unsigned long __unused5;
};
#ifdef __cplusplus
diff --git a/include/stringlist.h b/include/stringlist.h
index 5cd452ca5f..c5d6e70a36 100644
--- a/include/stringlist.h
+++ b/include/stringlist.h
@@ -12,12 +12,14 @@ struct string_list {
int string_list_add(struct string_list *sl, const char *str);
int string_list_add_asprintf(struct string_list *sl, const char *fmt, ...);
int string_list_add_sorted(struct string_list *sl, const char *str);
+int string_list_add_sort_uniq(struct string_list *sl, const char *str);
int string_list_contains(struct string_list *sl, const char *str);
void string_list_print_by_column(struct string_list *sl);
static inline void string_list_init(struct string_list *sl)
{
INIT_LIST_HEAD(&sl->list);
+ sl->str = NULL;
}
static inline void string_list_free(struct string_list *sl)