diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/input/fusion_F0710A.h | 20 | ||||
-rw-r--r-- | include/linux/linux_logo.h | 1 | ||||
-rw-r--r-- | include/linux/mfd/syscon.h | 10 | ||||
-rw-r--r-- | include/linux/vf610_mscm.h | 13 | ||||
-rw-r--r-- | include/linux/vf610_sema4.h | 83 |
5 files changed, 127 insertions, 0 deletions
diff --git a/include/linux/input/fusion_F0710A.h b/include/linux/input/fusion_F0710A.h new file mode 100644 index 000000000000..7d152cbdd06e --- /dev/null +++ b/include/linux/input/fusion_F0710A.h @@ -0,0 +1,20 @@ +/* linux/input/fusion_F0710A.h + * + * Platform data for Fusion F0710A driver + * + * Copyright (c) 2013 Toradex AG (stefan.agner@toradex.ch) + * + * For licencing details see kernel-base/COPYING + */ + +#ifndef __LINUX_I2C_FUSION_F0710A_H +#define __LINUX_I2C_FUSION_F0710A_H + +/* Board specific touch screen initial values */ +struct fusion_f0710a_init_data { + int (*pinmux_fusion_pins)(void); + int gpio_int; + int gpio_reset; +}; + +#endif /* __LINUX_I2C_FUSION_F0710A_H */ diff --git a/include/linux/linux_logo.h b/include/linux/linux_logo.h index ca5bd91d12e1..2be299513819 100644 --- a/include/linux/linux_logo.h +++ b/include/linux/linux_logo.h @@ -47,6 +47,7 @@ extern const struct linux_logo logo_superh_vga16; extern const struct linux_logo logo_superh_clut224; extern const struct linux_logo logo_m32r_clut224; extern const struct linux_logo logo_spe_clut224; +extern const struct linux_logo logo_custom_clut224; extern const struct linux_logo *fb_find_logo(int depth); #ifdef CONFIG_FB_LOGO_EXTRA diff --git a/include/linux/mfd/syscon.h b/include/linux/mfd/syscon.h index 75e543b78f53..3c02ed9a6c98 100644 --- a/include/linux/mfd/syscon.h +++ b/include/linux/mfd/syscon.h @@ -26,6 +26,9 @@ extern struct regmap *syscon_regmap_lookup_by_pdevname(const char *s); extern struct regmap *syscon_regmap_lookup_by_phandle( struct device_node *np, const char *property); +extern int syscon_regmap_read_from_offset(struct device_node *np, + const char *s, + unsigned int *val); #else static inline struct regmap *syscon_node_to_regmap(struct device_node *np) { @@ -48,6 +51,13 @@ static inline struct regmap *syscon_regmap_lookup_by_phandle( { return ERR_PTR(-ENOSYS); } + +static inline int syscon_regmap_read_from_offset(struct device_node *np, + const char *s, + unsigned int *val) +{ + return ERR_PTR(-ENOSYS); +} #endif #endif /* __LINUX_MFD_SYSCON_H__ */ diff --git a/include/linux/vf610_mscm.h b/include/linux/vf610_mscm.h new file mode 100644 index 000000000000..c551b50e700c --- /dev/null +++ b/include/linux/vf610_mscm.h @@ -0,0 +1,13 @@ +#ifndef __VF610_MSCM__ +#define __VF610_MSCM__ + +#include <linux/interrupt.h> + +int mscm_request_cpu2cpu_irq(unsigned int intid, irq_handler_t handler, + const char *name, void *priv); +void mscm_free_cpu2cpu_irq(unsigned int intid, void *priv); +void mscm_trigger_cpu2cpu_irq(unsigned int intid, int cpuid); +void mscm_enable_cpu2cpu_irq(unsigned int intid); +void mscm_disable_cpu2cpu_irq(unsigned int intid); + +#endif /* __VF610_MSCM__ */ diff --git a/include/linux/vf610_sema4.h b/include/linux/vf610_sema4.h new file mode 100644 index 000000000000..a57de2303e9a --- /dev/null +++ b/include/linux/vf610_sema4.h @@ -0,0 +1,83 @@ +/* + * Copyright (C) 2016 Toradex AG. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __LINUX_VF610_SEMA4_H__ +#define __LINUX_VF610_SEMA4_H__ + +#define SEMA4_NUM_DEVICES 1 +#define SEMA4_NUM_GATES 16 + +#define SEMA4_UNLOCK 0x00 +#define SEMA4_A5_LOCK 0x01 +#define SEMA4_GATE_MASK 0x03 + +#define CORE_MUTEX_VALID (('c'<<24)|('m'<<24)|('t'<<24)|'x') + +/* + * The enumerates + */ +enum { + /* sema4 registers offset */ + SEMA4_CP0INE = 0x42, + SEMA4_CP1INE = 0x4A, + SEMA4_CP0NTF = 0x82, + SEMA4_CP1NTF = 0x8A, +}; + +static const unsigned int idx_sema4[SEMA4_NUM_GATES] = { + 1 << 15, 1 << 14, 1 << 13, 1 << 12, + 1 << 11, 1 << 10, 1 << 9, 1 << 8, + 1 << 7, 1 << 6, 1 << 5, 1 << 4, + 1 << 3, 1 << 2, 1 << 1, 1 << 0, +}; + +struct vf610_sema4_mutex { + u32 valid; + u32 gate_num; + unsigned char gate_val; + wait_queue_head_t wait_q; +}; + +struct vf610_sema4_mutex_device { + struct device *dev; + u16 cpntf_val; + u16 cpine_val; + void __iomem *ioaddr; /* Mapped address */ + spinlock_t lock; /* Mutex */ + int irq; + + u16 alloced; + struct vf610_sema4_mutex *mutex_ptr[SEMA4_NUM_GATES]; +}; + +struct vf610_sema4_mutex * + vf610_sema4_mutex_create(u32 dev_num, u32 mutex_num); +#ifdef CONFIG_VF610_SEMA4 +int vf610_sema4_mutex_destroy(struct vf610_sema4_mutex *mutex_ptr); +int vf610_sema4_mutex_trylock(struct vf610_sema4_mutex *mutex_ptr); +int vf610_sema4_mutex_lock(struct vf610_sema4_mutex *mutex_ptr); +int vf610_sema4_mutex_unlock(struct vf610_sema4_mutex *mutex_ptr); +#else +static inline int vf610_sema4_mutex_destroy(struct vf610_sema4_mutex *mutex_ptr) +{ + return 0; +} +static inline int vf610_sema4_mutex_trylock(struct vf610_sema4_mutex *mutex_ptr) +{ + return 0; +} +static inline int vf610_sema4_mutex_lock(struct vf610_sema4_mutex *mutex_ptr) +{ + return 0; +} +static inline int vf610_sema4_mutex_unlock(struct vf610_sema4_mutex *mutex_ptr) +{ + return 0; +} +#endif +#endif /* __LINUX_VF610_SEMA4_H__ */ |