Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
This commit is contained in:
commit
a54bfa40fd
801 changed files with 32347 additions and 30329 deletions
|
|
@ -377,7 +377,21 @@ struct cpu_vfs_cap_data {
|
|||
#define CAP_FOR_EACH_U32(__capi) \
|
||||
for (__capi = 0; __capi < _KERNEL_CAPABILITY_U32S; ++__capi)
|
||||
|
||||
/*
|
||||
* CAP_FS_MASK and CAP_NFSD_MASKS:
|
||||
*
|
||||
* The fs mask is all the privileges that fsuid==0 historically meant.
|
||||
* At one time in the past, that included CAP_MKNOD and CAP_LINUX_IMMUTABLE.
|
||||
*
|
||||
* It has never meant setting security.* and trusted.* xattrs.
|
||||
*
|
||||
* We could also define fsmask as follows:
|
||||
* 1. CAP_FS_MASK is the privilege to bypass all fs-related DAC permissions
|
||||
* 2. The security.* and trusted.* xattrs are fs-related MAC permissions
|
||||
*/
|
||||
|
||||
# define CAP_FS_MASK_B0 (CAP_TO_MASK(CAP_CHOWN) \
|
||||
| CAP_TO_MASK(CAP_MKNOD) \
|
||||
| CAP_TO_MASK(CAP_DAC_OVERRIDE) \
|
||||
| CAP_TO_MASK(CAP_DAC_READ_SEARCH) \
|
||||
| CAP_TO_MASK(CAP_FOWNER) \
|
||||
|
|
@ -392,11 +406,12 @@ struct cpu_vfs_cap_data {
|
|||
# define CAP_EMPTY_SET ((kernel_cap_t){{ 0, 0 }})
|
||||
# define CAP_FULL_SET ((kernel_cap_t){{ ~0, ~0 }})
|
||||
# define CAP_INIT_EFF_SET ((kernel_cap_t){{ ~CAP_TO_MASK(CAP_SETPCAP), ~0 }})
|
||||
# define CAP_FS_SET ((kernel_cap_t){{ CAP_FS_MASK_B0, CAP_FS_MASK_B1 } })
|
||||
# define CAP_FS_SET ((kernel_cap_t){{ CAP_FS_MASK_B0 \
|
||||
| CAP_TO_MASK(CAP_LINUX_IMMUTABLE), \
|
||||
CAP_FS_MASK_B1 } })
|
||||
# define CAP_NFSD_SET ((kernel_cap_t){{ CAP_FS_MASK_B0 \
|
||||
| CAP_TO_MASK(CAP_SYS_RESOURCE) \
|
||||
| CAP_TO_MASK(CAP_MKNOD), \
|
||||
CAP_FS_MASK_B1 } })
|
||||
| CAP_TO_MASK(CAP_SYS_RESOURCE), \
|
||||
CAP_FS_MASK_B1 } })
|
||||
|
||||
#endif /* _KERNEL_CAPABILITY_U32S != 2 */
|
||||
|
||||
|
|
|
|||
|
|
@ -2,12 +2,19 @@
|
|||
#define __LINUX_DEBUG_LOCKING_H
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <asm/atomic.h>
|
||||
|
||||
struct task_struct;
|
||||
|
||||
extern int debug_locks;
|
||||
extern int debug_locks_silent;
|
||||
|
||||
|
||||
static inline int __debug_locks_off(void)
|
||||
{
|
||||
return xchg(&debug_locks, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Generic 'turn off all lock debugging' function:
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -116,7 +116,6 @@ void dm_put_device(struct dm_target *ti, struct dm_dev *d);
|
|||
/*
|
||||
* Target features
|
||||
*/
|
||||
#define DM_TARGET_SUPPORTS_BARRIERS 0x00000001
|
||||
|
||||
struct target_type {
|
||||
uint64_t features;
|
||||
|
|
|
|||
|
|
@ -357,7 +357,7 @@ struct ftrace_graph_ret {
|
|||
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
|
||||
|
||||
/* for init task */
|
||||
#define INIT_FTRACE_GRAPH .ret_stack = NULL
|
||||
#define INIT_FTRACE_GRAPH .ret_stack = NULL,
|
||||
|
||||
/*
|
||||
* Stack of return addresses for functions
|
||||
|
|
@ -511,33 +511,4 @@ static inline void trace_hw_branch_oops(void) {}
|
|||
|
||||
#endif /* CONFIG_HW_BRANCH_TRACER */
|
||||
|
||||
/*
|
||||
* A syscall entry in the ftrace syscalls array.
|
||||
*
|
||||
* @name: name of the syscall
|
||||
* @nb_args: number of parameters it takes
|
||||
* @types: list of types as strings
|
||||
* @args: list of args as strings (args[i] matches types[i])
|
||||
*/
|
||||
struct syscall_metadata {
|
||||
const char *name;
|
||||
int nb_args;
|
||||
const char **types;
|
||||
const char **args;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_FTRACE_SYSCALLS
|
||||
extern void arch_init_ftrace_syscalls(void);
|
||||
extern struct syscall_metadata *syscall_nr_to_meta(int nr);
|
||||
extern void start_ftrace_syscalls(void);
|
||||
extern void stop_ftrace_syscalls(void);
|
||||
extern void ftrace_syscall_enter(struct pt_regs *regs);
|
||||
extern void ftrace_syscall_exit(struct pt_regs *regs);
|
||||
#else
|
||||
static inline void start_ftrace_syscalls(void) { }
|
||||
static inline void stop_ftrace_syscalls(void) { }
|
||||
static inline void ftrace_syscall_enter(struct pt_regs *regs) { }
|
||||
static inline void ftrace_syscall_exit(struct pt_regs *regs) { }
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_FTRACE_H */
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ struct i2c_board_info {
|
|||
* are provided using conventional syntax.
|
||||
*/
|
||||
#define I2C_BOARD_INFO(dev_type, dev_addr) \
|
||||
.type = (dev_type), .addr = (dev_addr)
|
||||
.type = dev_type, .addr = (dev_addr)
|
||||
|
||||
|
||||
/* Add-on boards should register/unregister their devices; e.g. a board
|
||||
|
|
|
|||
|
|
@ -239,66 +239,39 @@ typedef enum {
|
|||
ide_started, /* a drive operation was started, handler was set */
|
||||
} ide_startstop_t;
|
||||
|
||||
enum {
|
||||
IDE_VALID_ERROR = (1 << 1),
|
||||
IDE_VALID_FEATURE = IDE_VALID_ERROR,
|
||||
IDE_VALID_NSECT = (1 << 2),
|
||||
IDE_VALID_LBAL = (1 << 3),
|
||||
IDE_VALID_LBAM = (1 << 4),
|
||||
IDE_VALID_LBAH = (1 << 5),
|
||||
IDE_VALID_DEVICE = (1 << 6),
|
||||
IDE_VALID_LBA = IDE_VALID_LBAL |
|
||||
IDE_VALID_LBAM |
|
||||
IDE_VALID_LBAH,
|
||||
IDE_VALID_OUT_TF = IDE_VALID_FEATURE |
|
||||
IDE_VALID_NSECT |
|
||||
IDE_VALID_LBA,
|
||||
IDE_VALID_IN_TF = IDE_VALID_NSECT |
|
||||
IDE_VALID_LBA,
|
||||
IDE_VALID_OUT_HOB = IDE_VALID_OUT_TF,
|
||||
IDE_VALID_IN_HOB = IDE_VALID_ERROR |
|
||||
IDE_VALID_NSECT |
|
||||
IDE_VALID_LBA,
|
||||
};
|
||||
|
||||
enum {
|
||||
IDE_TFLAG_LBA48 = (1 << 0),
|
||||
IDE_TFLAG_OUT_HOB_FEATURE = (1 << 1),
|
||||
IDE_TFLAG_OUT_HOB_NSECT = (1 << 2),
|
||||
IDE_TFLAG_OUT_HOB_LBAL = (1 << 3),
|
||||
IDE_TFLAG_OUT_HOB_LBAM = (1 << 4),
|
||||
IDE_TFLAG_OUT_HOB_LBAH = (1 << 5),
|
||||
IDE_TFLAG_OUT_HOB = IDE_TFLAG_OUT_HOB_FEATURE |
|
||||
IDE_TFLAG_OUT_HOB_NSECT |
|
||||
IDE_TFLAG_OUT_HOB_LBAL |
|
||||
IDE_TFLAG_OUT_HOB_LBAM |
|
||||
IDE_TFLAG_OUT_HOB_LBAH,
|
||||
IDE_TFLAG_OUT_FEATURE = (1 << 6),
|
||||
IDE_TFLAG_OUT_NSECT = (1 << 7),
|
||||
IDE_TFLAG_OUT_LBAL = (1 << 8),
|
||||
IDE_TFLAG_OUT_LBAM = (1 << 9),
|
||||
IDE_TFLAG_OUT_LBAH = (1 << 10),
|
||||
IDE_TFLAG_OUT_TF = IDE_TFLAG_OUT_FEATURE |
|
||||
IDE_TFLAG_OUT_NSECT |
|
||||
IDE_TFLAG_OUT_LBAL |
|
||||
IDE_TFLAG_OUT_LBAM |
|
||||
IDE_TFLAG_OUT_LBAH,
|
||||
IDE_TFLAG_OUT_DEVICE = (1 << 11),
|
||||
IDE_TFLAG_WRITE = (1 << 12),
|
||||
IDE_TFLAG_CUSTOM_HANDLER = (1 << 13),
|
||||
IDE_TFLAG_DMA_PIO_FALLBACK = (1 << 14),
|
||||
IDE_TFLAG_IN_HOB_ERROR = (1 << 15),
|
||||
IDE_TFLAG_IN_HOB_NSECT = (1 << 16),
|
||||
IDE_TFLAG_IN_HOB_LBAL = (1 << 17),
|
||||
IDE_TFLAG_IN_HOB_LBAM = (1 << 18),
|
||||
IDE_TFLAG_IN_HOB_LBAH = (1 << 19),
|
||||
IDE_TFLAG_IN_HOB_LBA = IDE_TFLAG_IN_HOB_LBAL |
|
||||
IDE_TFLAG_IN_HOB_LBAM |
|
||||
IDE_TFLAG_IN_HOB_LBAH,
|
||||
IDE_TFLAG_IN_HOB = IDE_TFLAG_IN_HOB_ERROR |
|
||||
IDE_TFLAG_IN_HOB_NSECT |
|
||||
IDE_TFLAG_IN_HOB_LBA,
|
||||
IDE_TFLAG_IN_ERROR = (1 << 20),
|
||||
IDE_TFLAG_IN_NSECT = (1 << 21),
|
||||
IDE_TFLAG_IN_LBAL = (1 << 22),
|
||||
IDE_TFLAG_IN_LBAM = (1 << 23),
|
||||
IDE_TFLAG_IN_LBAH = (1 << 24),
|
||||
IDE_TFLAG_IN_LBA = IDE_TFLAG_IN_LBAL |
|
||||
IDE_TFLAG_IN_LBAM |
|
||||
IDE_TFLAG_IN_LBAH,
|
||||
IDE_TFLAG_IN_TF = IDE_TFLAG_IN_NSECT |
|
||||
IDE_TFLAG_IN_LBA,
|
||||
IDE_TFLAG_IN_DEVICE = (1 << 25),
|
||||
IDE_TFLAG_HOB = IDE_TFLAG_OUT_HOB |
|
||||
IDE_TFLAG_IN_HOB,
|
||||
IDE_TFLAG_TF = IDE_TFLAG_OUT_TF |
|
||||
IDE_TFLAG_IN_TF,
|
||||
IDE_TFLAG_DEVICE = IDE_TFLAG_OUT_DEVICE |
|
||||
IDE_TFLAG_IN_DEVICE,
|
||||
IDE_TFLAG_WRITE = (1 << 1),
|
||||
IDE_TFLAG_CUSTOM_HANDLER = (1 << 2),
|
||||
IDE_TFLAG_DMA_PIO_FALLBACK = (1 << 3),
|
||||
/* force 16-bit I/O operations */
|
||||
IDE_TFLAG_IO_16BIT = (1 << 26),
|
||||
IDE_TFLAG_IO_16BIT = (1 << 4),
|
||||
/* struct ide_cmd was allocated using kmalloc() */
|
||||
IDE_TFLAG_DYN = (1 << 27),
|
||||
IDE_TFLAG_FS = (1 << 28),
|
||||
IDE_TFLAG_MULTI_PIO = (1 << 29),
|
||||
IDE_TFLAG_DYN = (1 << 5),
|
||||
IDE_TFLAG_FS = (1 << 6),
|
||||
IDE_TFLAG_MULTI_PIO = (1 << 7),
|
||||
};
|
||||
|
||||
enum {
|
||||
|
|
@ -309,45 +282,34 @@ enum {
|
|||
};
|
||||
|
||||
struct ide_taskfile {
|
||||
u8 hob_data; /* 0: high data byte (for TASKFILE IOCTL) */
|
||||
/* 1-5: additional data to support LBA48 */
|
||||
union {
|
||||
u8 hob_error; /* read: error */
|
||||
u8 hob_feature; /* write: feature */
|
||||
u8 data; /* 0: data byte (for TASKFILE ioctl) */
|
||||
union { /* 1: */
|
||||
u8 error; /* read: error */
|
||||
u8 feature; /* write: feature */
|
||||
};
|
||||
|
||||
u8 hob_nsect;
|
||||
u8 hob_lbal;
|
||||
u8 hob_lbam;
|
||||
u8 hob_lbah;
|
||||
|
||||
u8 data; /* 6: low data byte (for TASKFILE IOCTL) */
|
||||
|
||||
union { /* 7: */
|
||||
u8 error; /* read: error */
|
||||
u8 feature; /* write: feature */
|
||||
};
|
||||
|
||||
u8 nsect; /* 8: number of sectors */
|
||||
u8 lbal; /* 9: LBA low */
|
||||
u8 lbam; /* 10: LBA mid */
|
||||
u8 lbah; /* 11: LBA high */
|
||||
|
||||
u8 device; /* 12: device select */
|
||||
|
||||
union { /* 13: */
|
||||
u8 status; /* read: status */
|
||||
u8 nsect; /* 2: number of sectors */
|
||||
u8 lbal; /* 3: LBA low */
|
||||
u8 lbam; /* 4: LBA mid */
|
||||
u8 lbah; /* 5: LBA high */
|
||||
u8 device; /* 6: device select */
|
||||
union { /* 7: */
|
||||
u8 status; /* read: status */
|
||||
u8 command; /* write: command */
|
||||
};
|
||||
};
|
||||
|
||||
struct ide_cmd {
|
||||
union {
|
||||
struct ide_taskfile tf;
|
||||
u8 tf_array[14];
|
||||
};
|
||||
struct ide_taskfile tf;
|
||||
struct ide_taskfile hob;
|
||||
struct {
|
||||
struct {
|
||||
u8 tf;
|
||||
u8 hob;
|
||||
} out, in;
|
||||
} valid;
|
||||
|
||||
u8 tf_flags;
|
||||
u8 ftf_flags; /* for TASKFILE ioctl */
|
||||
u32 tf_flags;
|
||||
int protocol;
|
||||
|
||||
int sg_nents; /* number of sg entries */
|
||||
|
|
@ -662,8 +624,8 @@ struct ide_tp_ops {
|
|||
void (*write_devctl)(struct hwif_s *, u8);
|
||||
|
||||
void (*dev_select)(ide_drive_t *);
|
||||
void (*tf_load)(ide_drive_t *, struct ide_cmd *);
|
||||
void (*tf_read)(ide_drive_t *, struct ide_cmd *);
|
||||
void (*tf_load)(ide_drive_t *, struct ide_taskfile *, u8);
|
||||
void (*tf_read)(ide_drive_t *, struct ide_taskfile *, u8);
|
||||
|
||||
void (*input_data)(ide_drive_t *, struct ide_cmd *,
|
||||
void *, unsigned int);
|
||||
|
|
@ -1162,7 +1124,8 @@ extern int ide_devset_execute(ide_drive_t *drive,
|
|||
void ide_complete_cmd(ide_drive_t *, struct ide_cmd *, u8, u8);
|
||||
int ide_complete_rq(ide_drive_t *, int, unsigned int);
|
||||
|
||||
void ide_tf_dump(const char *, struct ide_taskfile *);
|
||||
void ide_tf_readback(ide_drive_t *drive, struct ide_cmd *cmd);
|
||||
void ide_tf_dump(const char *, struct ide_cmd *);
|
||||
|
||||
void ide_exec_command(ide_hwif_t *, u8);
|
||||
u8 ide_read_status(ide_hwif_t *);
|
||||
|
|
@ -1170,8 +1133,8 @@ u8 ide_read_altstatus(ide_hwif_t *);
|
|||
void ide_write_devctl(ide_hwif_t *, u8);
|
||||
|
||||
void ide_dev_select(ide_drive_t *);
|
||||
void ide_tf_load(ide_drive_t *, struct ide_cmd *);
|
||||
void ide_tf_read(ide_drive_t *, struct ide_cmd *);
|
||||
void ide_tf_load(ide_drive_t *, struct ide_taskfile *, u8);
|
||||
void ide_tf_read(ide_drive_t *, struct ide_taskfile *, u8);
|
||||
|
||||
void ide_input_data(ide_drive_t *, struct ide_cmd *, void *, unsigned int);
|
||||
void ide_output_data(ide_drive_t *, struct ide_cmd *, void *, unsigned int);
|
||||
|
|
@ -1529,7 +1492,7 @@ static inline void ide_set_hwifdata (ide_hwif_t * hwif, void *data)
|
|||
|
||||
extern void ide_toggle_bounce(ide_drive_t *drive, int on);
|
||||
|
||||
u64 ide_get_lba_addr(struct ide_taskfile *, int);
|
||||
u64 ide_get_lba_addr(struct ide_cmd *, int);
|
||||
u8 ide_dump_status(ide_drive_t *, const char *, u8);
|
||||
|
||||
struct ide_timing {
|
||||
|
|
|
|||
|
|
@ -487,6 +487,16 @@ static inline void init_copy_desc_masks(struct irq_desc *old_desc,
|
|||
#endif
|
||||
}
|
||||
|
||||
static inline void free_desc_masks(struct irq_desc *old_desc,
|
||||
struct irq_desc *new_desc)
|
||||
{
|
||||
free_cpumask_var(old_desc->affinity);
|
||||
|
||||
#ifdef CONFIG_GENERIC_PENDING_IRQ
|
||||
free_cpumask_var(old_desc->pending_mask);
|
||||
#endif
|
||||
}
|
||||
|
||||
#else /* !CONFIG_SMP */
|
||||
|
||||
static inline bool init_alloc_desc_masks(struct irq_desc *desc, int cpu,
|
||||
|
|
@ -500,6 +510,10 @@ static inline void init_copy_desc_masks(struct irq_desc *old_desc,
|
|||
{
|
||||
}
|
||||
|
||||
static inline void free_desc_masks(struct irq_desc *old_desc,
|
||||
struct irq_desc *new_desc)
|
||||
{
|
||||
}
|
||||
#endif /* CONFIG_SMP */
|
||||
|
||||
#endif /* _LINUX_IRQ_H */
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ extern int __request_module(bool wait, const char *name, ...) \
|
|||
#define request_module(mod...) __request_module(true, mod)
|
||||
#define request_module_nowait(mod...) __request_module(false, mod)
|
||||
#define try_then_request_module(x, mod...) \
|
||||
((x) ?: (__request_module(false, mod), (x)))
|
||||
((x) ?: (__request_module(true, mod), (x)))
|
||||
#else
|
||||
static inline int request_module(const char *name, ...) { return -ENOSYS; }
|
||||
static inline int request_module_nowait(const char *name, ...) { return -ENOSYS; }
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@ struct pcf50633_platform_data {
|
|||
char **batteries;
|
||||
int num_batteries;
|
||||
|
||||
int charging_restart_interval;
|
||||
|
||||
/* Callbacks */
|
||||
void (*probe_done)(struct pcf50633 *);
|
||||
void (*mbc_event_callback)(struct pcf50633 *, int);
|
||||
|
|
|
|||
|
|
@ -128,7 +128,6 @@ enum pcf50633_reg_mbcs3 {
|
|||
int pcf50633_mbc_usb_curlim_set(struct pcf50633 *pcf, int ma);
|
||||
|
||||
int pcf50633_mbc_get_status(struct pcf50633 *);
|
||||
void pcf50633_mbc_set_status(struct pcf50633 *, int what, int status);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@ struct pda_power_pdata {
|
|||
unsigned int wait_for_status; /* msecs, default is 500 */
|
||||
unsigned int wait_for_charger; /* msecs, default is 500 */
|
||||
unsigned int polling_interval; /* msecs, default is 2000 */
|
||||
|
||||
unsigned long ac_max_uA; /* current to draw when on AC */
|
||||
};
|
||||
|
||||
#endif /* __PDA_POWER_H__ */
|
||||
|
|
|
|||
|
|
@ -168,4 +168,56 @@ static inline void free_percpu(void *p)
|
|||
#define alloc_percpu(type) (type *)__alloc_percpu(sizeof(type), \
|
||||
__alignof__(type))
|
||||
|
||||
/*
|
||||
* Optional methods for optimized non-lvalue per-cpu variable access.
|
||||
*
|
||||
* @var can be a percpu variable or a field of it and its size should
|
||||
* equal char, int or long. percpu_read() evaluates to a lvalue and
|
||||
* all others to void.
|
||||
*
|
||||
* These operations are guaranteed to be atomic w.r.t. preemption.
|
||||
* The generic versions use plain get/put_cpu_var(). Archs are
|
||||
* encouraged to implement single-instruction alternatives which don't
|
||||
* require preemption protection.
|
||||
*/
|
||||
#ifndef percpu_read
|
||||
# define percpu_read(var) \
|
||||
({ \
|
||||
typeof(per_cpu_var(var)) __tmp_var__; \
|
||||
__tmp_var__ = get_cpu_var(var); \
|
||||
put_cpu_var(var); \
|
||||
__tmp_var__; \
|
||||
})
|
||||
#endif
|
||||
|
||||
#define __percpu_generic_to_op(var, val, op) \
|
||||
do { \
|
||||
get_cpu_var(var) op val; \
|
||||
put_cpu_var(var); \
|
||||
} while (0)
|
||||
|
||||
#ifndef percpu_write
|
||||
# define percpu_write(var, val) __percpu_generic_to_op(var, (val), =)
|
||||
#endif
|
||||
|
||||
#ifndef percpu_add
|
||||
# define percpu_add(var, val) __percpu_generic_to_op(var, (val), +=)
|
||||
#endif
|
||||
|
||||
#ifndef percpu_sub
|
||||
# define percpu_sub(var, val) __percpu_generic_to_op(var, (val), -=)
|
||||
#endif
|
||||
|
||||
#ifndef percpu_and
|
||||
# define percpu_and(var, val) __percpu_generic_to_op(var, (val), &=)
|
||||
#endif
|
||||
|
||||
#ifndef percpu_or
|
||||
# define percpu_or(var, val) __percpu_generic_to_op(var, (val), |=)
|
||||
#endif
|
||||
|
||||
#ifndef percpu_xor
|
||||
# define percpu_xor(var, val) __percpu_generic_to_op(var, (val), ^=)
|
||||
#endif
|
||||
|
||||
#endif /* __LINUX_PERCPU_H */
|
||||
|
|
|
|||
|
|
@ -388,6 +388,12 @@ struct phy_driver {
|
|||
/* Enables or disables interrupts */
|
||||
int (*config_intr)(struct phy_device *phydev);
|
||||
|
||||
/*
|
||||
* Checks if the PHY generated an interrupt.
|
||||
* For multi-PHY devices with shared PHY interrupt pin
|
||||
*/
|
||||
int (*did_interrupt)(struct phy_device *phydev);
|
||||
|
||||
/* Clears up any memory if needed */
|
||||
void (*remove)(struct phy_device *phydev);
|
||||
|
||||
|
|
|
|||
13
include/linux/rotary_encoder.h
Normal file
13
include/linux/rotary_encoder.h
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#ifndef __ROTARY_ENCODER_H__
|
||||
#define __ROTARY_ENCODER_H__
|
||||
|
||||
struct rotary_encoder_platform_data {
|
||||
unsigned int steps;
|
||||
unsigned int axis;
|
||||
unsigned int gpio_a;
|
||||
unsigned int gpio_b;
|
||||
unsigned int inverted_a;
|
||||
unsigned int inverted_b;
|
||||
};
|
||||
|
||||
#endif /* __ROTARY_ENCODER_H__ */
|
||||
|
|
@ -205,7 +205,8 @@ extern unsigned long long time_sync_thresh;
|
|||
#define task_is_stopped_or_traced(task) \
|
||||
((task->state & (__TASK_STOPPED | __TASK_TRACED)) != 0)
|
||||
#define task_contributes_to_load(task) \
|
||||
((task->state & TASK_UNINTERRUPTIBLE) != 0)
|
||||
((task->state & TASK_UNINTERRUPTIBLE) != 0 && \
|
||||
(task->flags & PF_FROZEN) == 0)
|
||||
|
||||
#define __set_task_state(tsk, state_value) \
|
||||
do { (tsk)->state = (state_value); } while (0)
|
||||
|
|
|
|||
52
include/linux/serial_max3100.h
Normal file
52
include/linux/serial_max3100.h
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
*
|
||||
* Copyright (C) 2007 Christian Pellegrin
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _LINUX_SERIAL_MAX3100_H
|
||||
#define _LINUX_SERIAL_MAX3100_H 1
|
||||
|
||||
|
||||
/**
|
||||
* struct plat_max3100 - MAX3100 SPI UART platform data
|
||||
* @loopback: force MAX3100 in loopback
|
||||
* @crystal: 1 for 3.6864 Mhz, 0 for 1.8432
|
||||
* @max3100_hw_suspend: MAX3100 has a shutdown pin. This is a hook
|
||||
* called on suspend and resume to activate it.
|
||||
* @poll_time: poll time for CTS signal in ms, 0 disables (so no hw
|
||||
* flow ctrl is possible but you have less CPU usage)
|
||||
*
|
||||
* You should use this structure in your machine description to specify
|
||||
* how the MAX3100 is connected. Example:
|
||||
*
|
||||
* static struct plat_max3100 max3100_plat_data = {
|
||||
* .loopback = 0,
|
||||
* .crystal = 0,
|
||||
* .poll_time = 100,
|
||||
* };
|
||||
*
|
||||
* static struct spi_board_info spi_board_info[] = {
|
||||
* {
|
||||
* .modalias = "max3100",
|
||||
* .platform_data = &max3100_plat_data,
|
||||
* .irq = IRQ_EINT12,
|
||||
* .max_speed_hz = 5*1000*1000,
|
||||
* .chip_select = 0,
|
||||
* },
|
||||
* };
|
||||
*
|
||||
**/
|
||||
struct plat_max3100 {
|
||||
int loopback;
|
||||
int crystal;
|
||||
void (*max3100_hw_suspend) (int suspend);
|
||||
int poll_time;
|
||||
};
|
||||
|
||||
#endif
|
||||
35
include/linux/spi/ad7879.h
Normal file
35
include/linux/spi/ad7879.h
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
/* linux/spi/ad7879.h */
|
||||
|
||||
/* Touchscreen characteristics vary between boards and models. The
|
||||
* platform_data for the device's "struct device" holds this information.
|
||||
*
|
||||
* It's OK if the min/max values are zero.
|
||||
*/
|
||||
struct ad7879_platform_data {
|
||||
u16 model; /* 7879 */
|
||||
u16 x_plate_ohms;
|
||||
u16 x_min, x_max;
|
||||
u16 y_min, y_max;
|
||||
u16 pressure_min, pressure_max;
|
||||
|
||||
/* [0..255] 0=OFF Starts at 1=550us and goes
|
||||
* all the way to 9.440ms in steps of 35us.
|
||||
*/
|
||||
u8 pen_down_acc_interval;
|
||||
/* [0..15] Starts at 0=128us and goes all the
|
||||
* way to 4.096ms in steps of 128us.
|
||||
*/
|
||||
u8 first_conversion_delay;
|
||||
/* [0..3] 0 = 2us, 1 = 4us, 2 = 8us, 3 = 16us */
|
||||
u8 acquisition_time;
|
||||
/* [0..3] Average X middle samples 0 = 2, 1 = 4, 2 = 8, 3 = 16 */
|
||||
u8 averaging;
|
||||
/* [0..3] Perform X measurements 0 = OFF,
|
||||
* 1 = 4, 2 = 8, 3 = 16 (median > averaging)
|
||||
*/
|
||||
u8 median;
|
||||
/* 1 = AUX/VBAT/GPIO set to GPIO Output */
|
||||
u8 gpio_output;
|
||||
/* Initial GPIO pin state (valid if gpio_output = 1) */
|
||||
u8 gpio_default;
|
||||
};
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
* converts to "bar".
|
||||
*/
|
||||
|
||||
#define __stringify_1(x) #x
|
||||
#define __stringify(x) __stringify_1(x)
|
||||
#define __stringify_1(x...) #x
|
||||
#define __stringify(x...) __stringify_1(x)
|
||||
|
||||
#endif /* !__LINUX_STRINGIFY_H */
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ struct old_linux_dirent;
|
|||
#include <asm/signal.h>
|
||||
#include <linux/quota.h>
|
||||
#include <linux/key.h>
|
||||
#include <linux/ftrace.h>
|
||||
#include <trace/syscall.h>
|
||||
|
||||
#define __SC_DECL1(t1, a1) t1 a1
|
||||
#define __SC_DECL2(t2, a2, ...) t2 a2, __SC_DECL1(__VA_ARGS__)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue