aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-sh/i2c-sh7760.h22
-rw-r--r--include/linux/Kbuild6
-rw-r--r--include/linux/dlm.h7
-rw-r--r--include/linux/dlm_device.h11
-rw-r--r--include/linux/dlm_plock.h50
-rw-r--r--include/linux/dlmconstants.h4
-rw-r--r--include/linux/hid.h17
-rw-r--r--include/linux/hidraw.h1
-rw-r--r--include/linux/i2c-algo-pca.h37
-rw-r--r--include/linux/i2c-pca-platform.h12
-rw-r--r--include/linux/lock_dlm_plock.h41
-rw-r--r--include/linux/udf_fs.h51
-rw-r--r--include/linux/udf_fs_i.h31
-rw-r--r--include/linux/udf_fs_sb.h117
14 files changed, 146 insertions, 261 deletions
diff --git a/include/asm-sh/i2c-sh7760.h b/include/asm-sh/i2c-sh7760.h
new file mode 100644
index 00000000000..24182116711
--- /dev/null
+++ b/include/asm-sh/i2c-sh7760.h
@@ -0,0 +1,22 @@
+/*
+ * MMIO/IRQ and platform data for SH7760 I2C channels
+ */
+
+#ifndef _I2C_SH7760_H_
+#define _I2C_SH7760_H_
+
+#define SH7760_I2C_DEVNAME "sh7760-i2c"
+
+#define SH7760_I2C0_MMIO 0xFE140000
+#define SH7760_I2C0_MMIOEND 0xFE14003B
+#define SH7760_I2C0_IRQ 62
+
+#define SH7760_I2C1_MMIO 0xFE150000
+#define SH7760_I2C1_MMIOEND 0xFE15003B
+#define SH7760_I2C1_IRQ 63
+
+struct sh7760_i2c_platdata {
+ unsigned int speed_khz;
+};
+
+#endif
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index b3d9ccde0c2..cbb5ccb27de 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -100,7 +100,7 @@ header-y += ixjuser.h
header-y += jffs2.h
header-y += keyctl.h
header-y += limits.h
-header-y += lock_dlm_plock.h
+header-y += dlm_plock.h
header-y += magic.h
header-y += major.h
header-y += matroxfb.h
@@ -150,6 +150,7 @@ header-y += tiocl.h
header-y += tipc.h
header-y += tipc_config.h
header-y += toshiba.h
+header-y += udf_fs_i.h
header-y += ultrasound.h
header-y += un.h
header-y += utime.h
@@ -210,7 +211,9 @@ unifdef-y += hdlcdrv.h
unifdef-y += hdlc.h
unifdef-y += hdreg.h
unifdef-y += hdsmart.h
+unifdef-y += hid.h
unifdef-y += hiddev.h
+unifdef-y += hidraw.h
unifdef-y += hpet.h
unifdef-y += i2c.h
unifdef-y += i2c-dev.h
@@ -334,7 +337,6 @@ unifdef-y += time.h
unifdef-y += timex.h
unifdef-y += tty.h
unifdef-y += types.h
-unifdef-y += udf_fs_i.h
unifdef-y += udp.h
unifdef-y += uinput.h
unifdef-y += uio.h
diff --git a/include/linux/dlm.h b/include/linux/dlm.h
index c743fbc769d..203a025e30e 100644
--- a/include/linux/dlm.h
+++ b/include/linux/dlm.h
@@ -21,10 +21,7 @@
/* Lock levels and flags are here */
#include <linux/dlmconstants.h>
-
-
-#define DLM_RESNAME_MAXLEN 64
-
+#include <linux/types.h>
typedef void dlm_lockspace_t;
@@ -63,7 +60,7 @@ typedef void dlm_lockspace_t;
struct dlm_lksb {
int sb_status;
- uint32_t sb_lkid;
+ __u32 sb_lkid;
char sb_flags;
char * sb_lvbptr;
};
diff --git a/include/linux/dlm_device.h b/include/linux/dlm_device.h
index 9642277a152..c6034508fed 100644
--- a/include/linux/dlm_device.h
+++ b/include/linux/dlm_device.h
@@ -11,10 +11,16 @@
*******************************************************************************
******************************************************************************/
+#ifndef _LINUX_DLM_DEVICE_H
+#define _LINUX_DLM_DEVICE_H
+
/* This is the device interface for dlm, most users will use a library
* interface.
*/
+#include <linux/dlm.h>
+#include <linux/types.h>
+
#define DLM_USER_LVB_LEN 32
/* Version of the device interface */
@@ -94,10 +100,9 @@ struct dlm_lock_result {
#define DLM_USER_PURGE 6
#define DLM_USER_DEADLOCK 7
-/* Arbitrary length restriction */
-#define MAX_LS_NAME_LEN 64
-
/* Lockspace flags */
#define DLM_USER_LSFLG_AUTOFREE 1
#define DLM_USER_LSFLG_FORCEFREE 2
+#endif
+
diff --git a/include/linux/dlm_plock.h b/include/linux/dlm_plock.h
new file mode 100644
index 00000000000..18d5fdbceb7
--- /dev/null
+++ b/include/linux/dlm_plock.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2005-2008 Red Hat, Inc. All rights reserved.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License v.2.
+ */
+
+#ifndef __DLM_PLOCK_DOT_H__
+#define __DLM_PLOCK_DOT_H__
+
+#define DLM_PLOCK_MISC_NAME "dlm_plock"
+
+#define DLM_PLOCK_VERSION_MAJOR 1
+#define DLM_PLOCK_VERSION_MINOR 1
+#define DLM_PLOCK_VERSION_PATCH 0
+
+enum {
+ DLM_PLOCK_OP_LOCK = 1,
+ DLM_PLOCK_OP_UNLOCK,
+ DLM_PLOCK_OP_GET,
+};
+
+struct dlm_plock_info {
+ __u32 version[3];
+ __u8 optype;
+ __u8 ex;
+ __u8 wait;
+ __u8 pad;
+ __u32 pid;
+ __s32 nodeid;
+ __s32 rv;
+ __u32 fsid;
+ __u64 number;
+ __u64 start;
+ __u64 end;
+ __u64 owner;
+};
+
+#ifdef __KERNEL__
+int dlm_posix_lock(dlm_lockspace_t *lockspace, u64 number, struct file *file,
+ int cmd, struct file_lock *fl);
+int dlm_posix_unlock(dlm_lockspace_t *lockspace, u64 number, struct file *file,
+ struct file_lock *fl);
+int dlm_posix_get(dlm_lockspace_t *lockspace, u64 number, struct file *file,
+ struct file_lock *fl);
+#endif /* __KERNEL__ */
+
+#endif
+
diff --git a/include/linux/dlmconstants.h b/include/linux/dlmconstants.h
index fddb3d3ff32..47bf08dc756 100644
--- a/include/linux/dlmconstants.h
+++ b/include/linux/dlmconstants.h
@@ -18,6 +18,10 @@
* Constants used by DLM interface.
*/
+#define DLM_LOCKSPACE_LEN 64
+#define DLM_RESNAME_MAXLEN 64
+
+
/*
* Lock Modes
*/
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 74ff57596eb..d951ec41124 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -284,6 +284,7 @@ struct hid_item {
#define HID_QUIRK_2WHEEL_MOUSE_HACK_B8 0x02000000
#define HID_QUIRK_HWHEEL_WHEEL_INVERT 0x04000000
#define HID_QUIRK_MICROSOFT_KEYS 0x08000000
+#define HID_QUIRK_FULLSPEED_INTERVAL 0x10000000
/*
* Separate quirks for runtime report descriptor fixup
@@ -296,6 +297,8 @@ struct hid_item {
#define HID_QUIRK_RDESC_MACBOOK_JIS 0x00000010
#define HID_QUIRK_RDESC_BUTTON_CONSUMER 0x00000020
#define HID_QUIRK_RDESC_SAMSUNG_REMOTE 0x00000040
+#define HID_QUIRK_RDESC_MICROSOFT_RECV_1028 0x00000080
+#define HID_QUIRK_RDESC_SUNPLUS_WDESKTOP 0x00000100
/*
* This is the global environment of the parser. This information is
@@ -320,7 +323,7 @@ struct hid_global {
* This is the local environment. It is persistent up the next main-item.
*/
-#define HID_MAX_USAGES 8192
+#define HID_MAX_USAGES 12288
#define HID_DEFAULT_NUM_COLLECTIONS 16
struct hid_local {
@@ -421,6 +424,7 @@ struct hid_control_fifo {
#define HID_RESET_PENDING 4
#define HID_SUSPENDED 5
#define HID_CLEAR_HALT 6
+#define HID_DISCONNECTED 7
struct hid_input {
struct list_head list;
@@ -452,8 +456,6 @@ struct hid_device { /* device report descriptor */
void *hidraw;
int minor; /* Hiddev minor number */
- wait_queue_head_t wait; /* For sleeping */
-
int open; /* is the device open by anyone? */
char name[128]; /* Device name */
char phys[64]; /* Device physical location */
@@ -530,14 +532,12 @@ int hidinput_find_field(struct hid_device *hid, unsigned int type, unsigned int
int hidinput_mapping_quirks(struct hid_usage *, struct input_dev *, unsigned long **, int *);
int hidinput_event_quirks(struct hid_device *, struct hid_field *, struct hid_usage *, __s32);
int hidinput_apple_event(struct hid_device *, struct input_dev *, struct hid_usage *, __s32);
-void hid_input_field(struct hid_device *hid, struct hid_field *field, __u8 *data, int interrupt);
void hid_output_report(struct hid_report *report, __u8 *data);
void hid_free_device(struct hid_device *device);
struct hid_device *hid_parse_report(__u8 *start, unsigned size);
/* HID quirks API */
u32 usbhid_lookup_quirk(const u16 idVendor, const u16 idProduct);
-int usbhid_modify_dquirk(const u16 idVendor, const u16 idProduct, const u32 quirks);
int usbhid_quirks_init(char **quirks_param);
void usbhid_quirks_exit(void);
void usbhid_fixup_report_descriptor(const u16, const u16, char *, unsigned, char **);
@@ -546,6 +546,7 @@ void usbhid_fixup_report_descriptor(const u16, const u16, char *, unsigned, char
int hid_ff_init(struct hid_device *hid);
int hid_lgff_init(struct hid_device *hid);
+int hid_lg2ff_init(struct hid_device *hid);
int hid_plff_init(struct hid_device *hid);
int hid_tmff_init(struct hid_device *hid);
int hid_zpff_init(struct hid_device *hid);
@@ -566,7 +567,11 @@ static inline int hid_ff_init(struct hid_device *hid) { return -1; }
#define dbg_hid_line(format, arg...) if (hid_debug) \
printk(format, ## arg)
#else
-#define dbg_hid(format, arg...) do {} while (0)
+static inline int __attribute__((format(printf, 1, 2)))
+dbg_hid(const char *fmt, ...)
+{
+ return 0;
+}
#define dbg_hid_line dbg_hid
#endif
diff --git a/include/linux/hidraw.h b/include/linux/hidraw.h
index 0536f299f7f..dbb5c8c374f 100644
--- a/include/linux/hidraw.h
+++ b/include/linux/hidraw.h
@@ -16,6 +16,7 @@
*/
#include <linux/hid.h>
+#include <linux/types.h>
struct hidraw_report_descriptor {
__u32 size;
diff --git a/include/linux/i2c-algo-pca.h b/include/linux/i2c-algo-pca.h
index fce47c051bb..adcb3dc7ac2 100644
--- a/include/linux/i2c-algo-pca.h
+++ b/include/linux/i2c-algo-pca.h
@@ -1,14 +1,41 @@
#ifndef _LINUX_I2C_ALGO_PCA_H
#define _LINUX_I2C_ALGO_PCA_H
+/* Clock speeds for the bus */
+#define I2C_PCA_CON_330kHz 0x00
+#define I2C_PCA_CON_288kHz 0x01
+#define I2C_PCA_CON_217kHz 0x02
+#define I2C_PCA_CON_146kHz 0x03
+#define I2C_PCA_CON_88kHz 0x04
+#define I2C_PCA_CON_59kHz 0x05
+#define I2C_PCA_CON_44kHz 0x06
+#define I2C_PCA_CON_36kHz 0x07
+
+/* PCA9564 registers */
+#define I2C_PCA_STA 0x00 /* STATUS Read Only */
+#define I2C_PCA_TO 0x00 /* TIMEOUT Write Only */
+#define I2C_PCA_DAT 0x01 /* DATA Read/Write */
+#define I2C_PCA_ADR 0x02 /* OWN ADR Read/Write */
+#define I2C_PCA_CON 0x03 /* CONTROL Read/Write */
+
+#define I2C_PCA_CON_AA 0x80 /* Assert Acknowledge */
+#define I2C_PCA_CON_ENSIO 0x40 /* Enable */
+#define I2C_PCA_CON_STA 0x20 /* Start */
+#define I2C_PCA_CON_STO 0x10 /* Stop */
+#define I2C_PCA_CON_SI 0x08 /* Serial Interrupt */
+#define I2C_PCA_CON_CR 0x07 /* Clock Rate (MASK) */
+
struct i2c_algo_pca_data {
- int (*get_own) (struct i2c_algo_pca_data *adap); /* Obtain own address */
- int (*get_clock) (struct i2c_algo_pca_data *adap);
- void (*write_byte) (struct i2c_algo_pca_data *adap, int reg, int val);
- int (*read_byte) (struct i2c_algo_pca_data *adap, int reg);
- int (*wait_for_interrupt) (struct i2c_algo_pca_data *adap);
+ void *data; /* private low level data */
+ void (*write_byte) (void *data, int reg, int val);
+ int (*read_byte) (void *data, int reg);
+ int (*wait_for_completion) (void *data);
+ void (*reset_chip) (void *data);
+ /* i2c_clock values are defined in linux/i2c-algo-pca.h */
+ unsigned int i2c_clock;
};
int i2c_pca_add_bus(struct i2c_adapter *);
+int i2c_pca_add_numbered_bus(struct i2c_adapter *);
#endif /* _LINUX_I2C_ALGO_PCA_H */
diff --git a/include/linux/i2c-pca-platform.h b/include/linux/i2c-pca-platform.h
new file mode 100644
index 00000000000..3d191873f2d
--- /dev/null
+++ b/include/linux/i2c-pca-platform.h
@@ -0,0 +1,12 @@
+#ifndef I2C_PCA9564_PLATFORM_H
+#define I2C_PCA9564_PLATFORM_H
+
+struct i2c_pca9564_pf_platform_data {
+ int gpio; /* pin to reset chip. driver will work when
+ * not supplied (negative value), but it
+ * cannot exit some error conditions then */
+ int i2c_clock_speed; /* values are defined in linux/i2c-algo-pca.h */
+ int timeout; /* timeout = this value * 10us */
+};
+
+#endif /* I2C_PCA9564_PLATFORM_H */
diff --git a/include/linux/lock_dlm_plock.h b/include/linux/lock_dlm_plock.h
deleted file mode 100644
index fc341511397..00000000000
--- a/include/linux/lock_dlm_plock.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2005 Red Hat, Inc. All rights reserved.
- *
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU General Public License v.2.
- */
-
-#ifndef __LOCK_DLM_PLOCK_DOT_H__
-#define __LOCK_DLM_PLOCK_DOT_H__
-
-#define GDLM_PLOCK_MISC_NAME "lock_dlm_plock"
-
-#define GDLM_PLOCK_VERSION_MAJOR 1
-#define GDLM_PLOCK_VERSION_MINOR 1
-#define GDLM_PLOCK_VERSION_PATCH 0
-
-enum {
- GDLM_PLOCK_OP_LOCK = 1,
- GDLM_PLOCK_OP_UNLOCK,
- GDLM_PLOCK_OP_GET,
-};
-
-struct gdlm_plock_info {
- __u32 version[3];
- __u8 optype;
- __u8 ex;
- __u8 wait;
- __u8 pad;
- __u32 pid;
- __s32 nodeid;
- __s32 rv;
- __u32 fsid;
- __u64 number;
- __u64 start;
- __u64 end;
- __u64 owner;
-};
-
-#endif
-
diff --git a/include/linux/udf_fs.h b/include/linux/udf_fs.h
deleted file mode 100644
index aa88654eb76..00000000000
--- a/include/linux/udf_fs.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * udf_fs.h
- *
- * PURPOSE
- * Included by fs/filesystems.c
- *
- * DESCRIPTION
- * OSTA-UDF(tm) = Optical Storage Technology Association
- * Universal Disk Format.
- *
- * This code is based on version 2.50 of the UDF specification,
- * and revision 3 of the ECMA 167 standard [equivalent to ISO 13346].
- * http://www.osta.org/ * http://www.ecma.ch/
- * http://www.iso.org/
- *
- * COPYRIGHT
- * This file is distributed under the terms of the GNU General Public
- * License (GPL). Copies of the GPL can be obtained from:
- * ftp://prep.ai.mit.edu/pub/gnu/GPL
- * Each contributing author retains all rights to their own work.
- *
- * (C) 1999-2004 Ben Fennema
- * (C) 1999-2000 Stelias Computing Inc
- *
- * HISTORY
- *
- */
-
-#ifndef _UDF_FS_H
-#define _UDF_FS_H 1
-
-#define UDF_PREALLOCATE
-#define UDF_DEFAULT_PREALLOC_BLOCKS 8
-
-#undef UDFFS_DEBUG
-
-#ifdef UDFFS_DEBUG
-#define udf_debug(f, a...) \
- do { \
- printk (KERN_DEBUG "UDF-fs DEBUG %s:%d:%s: ", \
- __FILE__, __LINE__, __FUNCTION__); \
- printk (f, ##a); \
- } while (0)
-#else
-#define udf_debug(f, a...) /**/
-#endif
-
-#define udf_info(f, a...) \
- printk (KERN_INFO "UDF-fs INFO " f, ##a);
-
-#endif /* _UDF_FS_H */
diff --git a/include/linux/udf_fs_i.h b/include/linux/udf_fs_i.h
index ffaf05679ff..3536965913b 100644
--- a/include/linux/udf_fs_i.h
+++ b/include/linux/udf_fs_i.h
@@ -9,41 +9,10 @@
* ftp://prep.ai.mit.edu/pub/gnu/GPL
* Each contributing author retains all rights to their own work.
*/
-
#ifndef _UDF_FS_I_H
#define _UDF_FS_I_H 1
-#ifdef __KERNEL__
-
-struct udf_inode_info
-{
- struct timespec i_crtime;
- /* Physical address of inode */
- kernel_lb_addr i_location;
- __u64 i_unique;
- __u32 i_lenEAttr;
- __u32 i_lenAlloc;
- __u64 i_lenExtents;
- __u32 i_next_alloc_block;
- __u32 i_next_alloc_goal;
- unsigned i_alloc_type : 3;
- unsigned i_efe : 1;
- unsigned i_use : 1;
- unsigned i_strat4096 : 1;
- unsigned reserved : 26;
- union
- {
- short_ad *i_sad;
- long_ad *i_lad;
- __u8 *i_data;
- } i_ext;
- struct inode vfs_inode;
-};
-
-#endif
-
/* exported IOCTLs, we have 'l', 0x40-0x7f */
-
#define UDF_GETEASIZE _IOR('l', 0x40, int)
#define UDF_GETEABLOCK _IOR('l', 0x41, void *)
#define UDF_GETVOLIDENT _IOR('l', 0x42, void *)
diff --git a/include/linux/udf_fs_sb.h b/include/linux/udf_fs_sb.h
deleted file mode 100644
index 9bc47352b6b..00000000000
--- a/include/linux/udf_fs_sb.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * udf_fs_sb.h
- *
- * This include file is for the Linux kernel/module.
- *
- * COPYRIGHT
- * This file is distributed under the terms of the GNU General Public
- * License (GPL). Copies of the GPL can be obtained from:
- * ftp://prep.ai.mit.edu/pub/gnu/GPL
- * Each contributing author retains all rights to their own work.
- */
-
-#ifndef _UDF_FS_SB_H
-#define _UDF_FS_SB_H 1
-
-#include <linux/mutex.h>
-
-#pragma pack(1)
-
-#define UDF_MAX_BLOCK_LOADED 8
-
-#define UDF_TYPE1_MAP15 0x1511U
-#define UDF_VIRTUAL_MAP15 0x1512U
-#define UDF_VIRTUAL_MAP20 0x2012U
-#define UDF_SPARABLE_MAP15 0x1522U
-
-struct udf_sparing_data
-{
- __u16 s_packet_len;
- struct buffer_head *s_spar_map[4];
-};
-
-struct udf_virtual_data
-{
- __u32 s_num_entries;
- __u16 s_start_offset;
-};
-
-struct udf_bitmap
-{
- __u32 s_extLength;
- __u32 s_extPosition;
- __u16 s_nr_groups;
- struct buffer_head **s_block_bitmap;
-};
-
-struct udf_part_map
-{
- union
- {
- struct udf_bitmap *s_bitmap;
- struct inode *s_table;
- } s_uspace;
- union
- {
- struct udf_bitmap *s_bitmap;
- struct inode *s_table;
- } s_fspace;
- __u32 s_partition_root;
- __u32 s_partition_len;
- __u16 s_partition_type;
- __u16 s_partition_num;
- union
- {
- struct udf_sparing_data s_sparing;
- struct udf_virtual_data s_virtual;
- } s_type_specific;
- __u32 (*s_partition_func)(struct super_block *, __u32, __u16, __u32);
- __u16 s_volumeseqnum;
- __u16 s_partition_flags;
-};
-
-#pragma pack()
-
-struct udf_sb_info
-{
- struct udf_part_map *s_partmaps;
- __u8 s_volume_ident[32];
-
- /* Overall info */
- __u16 s_partitions;
- __u16 s_partition;
-
- /* Sector headers */
- __s32 s_session;
- __u32 s_anchor[4];
- __u32 s_last_block;
-
- struct buffer_head *s_lvid_bh;
-
- /* Default permissions */
- mode_t s_umask;
- gid_t s_gid;
- uid_t s_uid;
-
- /* Root Info */
- struct timespec s_record_time;
-
- /* Fileset Info */
- __u16 s_serial_number;
-
- /* highest UDF revision we have recorded to this media */
- __u16 s_udfrev;
-
- /* Miscellaneous flags */
- __u32 s_flags;
-
- /* Encoding info */
- struct nls_table *s_nls_map;
-
- /* VAT inode */
- struct inode *s_vat_inode;
-
- struct mutex s_alloc_mutex;
-};
-
-#endif /* _UDF_FS_SB_H */