diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/drm/drmP.h | 52 | ||||
| -rw-r--r-- | include/drm/drm_edid.h | 92 | ||||
| -rw-r--r-- | include/drm/drm_memory_debug.h | 309 | ||||
| -rw-r--r-- | include/drm/drm_mm.h | 21 | ||||
| -rw-r--r-- | include/linux/agp_backend.h | 2 | ||||
| -rw-r--r-- | include/linux/ata.h | 14 | ||||
| -rw-r--r-- | include/linux/gameport.h | 3 | ||||
| -rw-r--r-- | include/linux/i2c/lm8323.h | 46 | ||||
| -rw-r--r-- | include/linux/ide.h | 47 | ||||
| -rw-r--r-- | include/linux/input.h | 2 | ||||
| -rw-r--r-- | include/linux/rotary_encoder.h | 2 | ||||
| -rw-r--r-- | include/linux/serio.h | 9 | ||||
| -rw-r--r-- | include/linux/spi/ads7846.h | 1 | ||||
| -rw-r--r-- | include/linux/ucb1400.h | 23 |
14 files changed, 159 insertions, 464 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index d4ddc22e46bb..45b67d9c39c1 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
| @@ -34,9 +34,6 @@ | |||
| 34 | #ifndef _DRM_P_H_ | 34 | #ifndef _DRM_P_H_ |
| 35 | #define _DRM_P_H_ | 35 | #define _DRM_P_H_ |
| 36 | 36 | ||
| 37 | /* If you want the memory alloc debug functionality, change define below */ | ||
| 38 | /* #define DEBUG_MEMORY */ | ||
| 39 | |||
| 40 | #ifdef __KERNEL__ | 37 | #ifdef __KERNEL__ |
| 41 | #ifdef __alpha__ | 38 | #ifdef __alpha__ |
| 42 | /* add include of current.h so that "current" is defined | 39 | /* add include of current.h so that "current" is defined |
| @@ -133,31 +130,6 @@ extern void drm_ut_debug_printk(unsigned int request_level, | |||
| 133 | 130 | ||
| 134 | #define DRM_FLAG_DEBUG 0x01 | 131 | #define DRM_FLAG_DEBUG 0x01 |
| 135 | 132 | ||
| 136 | #define DRM_MEM_DMA 0 | ||
| 137 | #define DRM_MEM_SAREA 1 | ||
| 138 | #define DRM_MEM_DRIVER 2 | ||
| 139 | #define DRM_MEM_MAGIC 3 | ||
| 140 | #define DRM_MEM_IOCTLS 4 | ||
| 141 | #define DRM_MEM_MAPS 5 | ||
| 142 | #define DRM_MEM_VMAS 6 | ||
| 143 | #define DRM_MEM_BUFS 7 | ||
| 144 | #define DRM_MEM_SEGS 8 | ||
| 145 | #define DRM_MEM_PAGES 9 | ||
| 146 | #define DRM_MEM_FILES 10 | ||
| 147 | #define DRM_MEM_QUEUES 11 | ||
| 148 | #define DRM_MEM_CMDS 12 | ||
| 149 | #define DRM_MEM_MAPPINGS 13 | ||
| 150 | #define DRM_MEM_BUFLISTS 14 | ||
| 151 | #define DRM_MEM_AGPLISTS 15 | ||
| 152 | #define DRM_MEM_TOTALAGP 16 | ||
| 153 | #define DRM_MEM_BOUNDAGP 17 | ||
| 154 | #define DRM_MEM_CTXBITMAP 18 | ||
| 155 | #define DRM_MEM_STUB 19 | ||
| 156 | #define DRM_MEM_SGLISTS 20 | ||
| 157 | #define DRM_MEM_CTXLIST 21 | ||
| 158 | #define DRM_MEM_MM 22 | ||
| 159 | #define DRM_MEM_HASHTAB 23 | ||
| 160 | |||
| 161 | #define DRM_MAX_CTXBITMAP (PAGE_SIZE * 8) | 133 | #define DRM_MAX_CTXBITMAP (PAGE_SIZE * 8) |
| 162 | #define DRM_MAP_HASH_OFFSET 0x10000000 | 134 | #define DRM_MAP_HASH_OFFSET 0x10000000 |
| 163 | 135 | ||
| @@ -1517,24 +1489,6 @@ static __inline__ void drm_core_dropmap(struct drm_local_map *map) | |||
| 1517 | { | 1489 | { |
| 1518 | } | 1490 | } |
| 1519 | 1491 | ||
| 1520 | #ifndef DEBUG_MEMORY | ||
| 1521 | /** Wrapper around kmalloc() */ | ||
| 1522 | static __inline__ void *drm_alloc(size_t size, int area) | ||
| 1523 | { | ||
| 1524 | return kmalloc(size, GFP_KERNEL); | ||
| 1525 | } | ||
| 1526 | |||
| 1527 | /** Wrapper around kfree() */ | ||
| 1528 | static __inline__ void drm_free(void *pt, size_t size, int area) | ||
| 1529 | { | ||
| 1530 | kfree(pt); | ||
| 1531 | } | ||
| 1532 | |||
| 1533 | /** Wrapper around kcalloc() */ | ||
| 1534 | static __inline__ void *drm_calloc(size_t nmemb, size_t size, int area) | ||
| 1535 | { | ||
| 1536 | return kcalloc(nmemb, size, GFP_KERNEL); | ||
| 1537 | } | ||
| 1538 | 1492 | ||
| 1539 | static __inline__ void *drm_calloc_large(size_t nmemb, size_t size) | 1493 | static __inline__ void *drm_calloc_large(size_t nmemb, size_t size) |
| 1540 | { | 1494 | { |
| @@ -1555,12 +1509,6 @@ static __inline void drm_free_large(void *ptr) | |||
| 1555 | 1509 | ||
| 1556 | vfree(ptr); | 1510 | vfree(ptr); |
| 1557 | } | 1511 | } |
| 1558 | #else | ||
| 1559 | extern void *drm_alloc(size_t size, int area); | ||
| 1560 | extern void drm_free(void *pt, size_t size, int area); | ||
| 1561 | extern void *drm_calloc(size_t nmemb, size_t size, int area); | ||
| 1562 | #endif | ||
| 1563 | |||
| 1564 | /*@}*/ | 1512 | /*@}*/ |
| 1565 | 1513 | ||
| 1566 | #endif /* __KERNEL__ */ | 1514 | #endif /* __KERNEL__ */ |
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h index a11cc9d32591..c263e4d71754 100644 --- a/include/drm/drm_edid.h +++ b/include/drm/drm_edid.h | |||
| @@ -28,53 +28,49 @@ | |||
| 28 | #define EDID_LENGTH 128 | 28 | #define EDID_LENGTH 128 |
| 29 | #define DDC_ADDR 0x50 | 29 | #define DDC_ADDR 0x50 |
| 30 | 30 | ||
| 31 | #ifdef BIG_ENDIAN | ||
| 32 | #error "EDID structure is little endian, need big endian versions" | ||
| 33 | #else | ||
| 34 | |||
| 35 | struct est_timings { | 31 | struct est_timings { |
| 36 | u8 t1; | 32 | u8 t1; |
| 37 | u8 t2; | 33 | u8 t2; |
| 38 | u8 mfg_rsvd; | 34 | u8 mfg_rsvd; |
| 39 | } __attribute__((packed)); | 35 | } __attribute__((packed)); |
| 40 | 36 | ||
| 37 | /* 00=16:10, 01=4:3, 10=5:4, 11=16:9 */ | ||
| 38 | #define EDID_TIMING_ASPECT_SHIFT 0 | ||
| 39 | #define EDID_TIMING_ASPECT_MASK (0x3 << EDID_TIMING_ASPECT_SHIFT) | ||
| 40 | |||
| 41 | /* need to add 60 */ | ||
| 42 | #define EDID_TIMING_VFREQ_SHIFT 2 | ||
| 43 | #define EDID_TIMING_VFREQ_MASK (0x3f << EDID_TIMING_VFREQ_SHIFT) | ||
| 44 | |||
| 41 | struct std_timing { | 45 | struct std_timing { |
| 42 | u8 hsize; /* need to multiply by 8 then add 248 */ | 46 | u8 hsize; /* need to multiply by 8 then add 248 */ |
| 43 | u8 vfreq:6; /* need to add 60 */ | 47 | u8 vfreq_aspect; |
| 44 | u8 aspect_ratio:2; /* 00=16:10, 01=4:3, 10=5:4, 11=16:9 */ | ||
| 45 | } __attribute__((packed)); | 48 | } __attribute__((packed)); |
| 46 | 49 | ||
| 50 | #define DRM_EDID_PT_HSYNC_POSITIVE (1 << 6) | ||
| 51 | #define DRM_EDID_PT_VSYNC_POSITIVE (1 << 5) | ||
| 52 | #define DRM_EDID_PT_SEPARATE_SYNC (3 << 3) | ||
| 53 | #define DRM_EDID_PT_STEREO (1 << 2) | ||
| 54 | #define DRM_EDID_PT_INTERLACED (1 << 1) | ||
| 55 | |||
| 47 | /* If detailed data is pixel timing */ | 56 | /* If detailed data is pixel timing */ |
| 48 | struct detailed_pixel_timing { | 57 | struct detailed_pixel_timing { |
| 49 | u8 hactive_lo; | 58 | u8 hactive_lo; |
| 50 | u8 hblank_lo; | 59 | u8 hblank_lo; |
| 51 | u8 hblank_hi:4; | 60 | u8 hactive_hblank_hi; |
| 52 | u8 hactive_hi:4; | ||
| 53 | u8 vactive_lo; | 61 | u8 vactive_lo; |
| 54 | u8 vblank_lo; | 62 | u8 vblank_lo; |
| 55 | u8 vblank_hi:4; | 63 | u8 vactive_vblank_hi; |
| 56 | u8 vactive_hi:4; | ||
| 57 | u8 hsync_offset_lo; | 64 | u8 hsync_offset_lo; |
| 58 | u8 hsync_pulse_width_lo; | 65 | u8 hsync_pulse_width_lo; |
| 59 | u8 vsync_pulse_width_lo:4; | 66 | u8 vsync_offset_pulse_width_lo; |
| 60 | u8 vsync_offset_lo:4; | 67 | u8 hsync_vsync_offset_pulse_width_hi; |
| 61 | u8 vsync_pulse_width_hi:2; | ||
| 62 | u8 vsync_offset_hi:2; | ||
| 63 | u8 hsync_pulse_width_hi:2; | ||
| 64 | u8 hsync_offset_hi:2; | ||
| 65 | u8 width_mm_lo; | 68 | u8 width_mm_lo; |
| 66 | u8 height_mm_lo; | 69 | u8 height_mm_lo; |
| 67 | u8 height_mm_hi:4; | 70 | u8 width_height_mm_hi; |
| 68 | u8 width_mm_hi:4; | ||
| 69 | u8 hborder; | 71 | u8 hborder; |
| 70 | u8 vborder; | 72 | u8 vborder; |
| 71 | u8 unknown0:1; | 73 | u8 misc; |
| 72 | u8 hsync_positive:1; | ||
| 73 | u8 vsync_positive:1; | ||
| 74 | u8 separate_sync:2; | ||
| 75 | u8 stereo:1; | ||
| 76 | u8 unknown6:1; | ||
| 77 | u8 interlaced:1; | ||
| 78 | } __attribute__((packed)); | 74 | } __attribute__((packed)); |
| 79 | 75 | ||
| 80 | /* If it's not pixel timing, it'll be one of the below */ | 76 | /* If it's not pixel timing, it'll be one of the below */ |
| @@ -88,18 +84,16 @@ struct detailed_data_monitor_range { | |||
| 88 | u8 min_hfreq_khz; | 84 | u8 min_hfreq_khz; |
| 89 | u8 max_hfreq_khz; | 85 | u8 max_hfreq_khz; |
| 90 | u8 pixel_clock_mhz; /* need to multiply by 10 */ | 86 | u8 pixel_clock_mhz; /* need to multiply by 10 */ |
| 91 | u16 sec_gtf_toggle; /* A000=use above, 20=use below */ /* FIXME: byte order */ | 87 | __le16 sec_gtf_toggle; /* A000=use above, 20=use below */ |
| 92 | u8 hfreq_start_khz; /* need to multiply by 2 */ | 88 | u8 hfreq_start_khz; /* need to multiply by 2 */ |
| 93 | u8 c; /* need to divide by 2 */ | 89 | u8 c; /* need to divide by 2 */ |
| 94 | u16 m; /* FIXME: byte order */ | 90 | __le16 m; |
| 95 | u8 k; | 91 | u8 k; |
| 96 | u8 j; /* need to divide by 2 */ | 92 | u8 j; /* need to divide by 2 */ |
| 97 | } __attribute__((packed)); | 93 | } __attribute__((packed)); |
| 98 | 94 | ||
| 99 | struct detailed_data_wpindex { | 95 | struct detailed_data_wpindex { |
| 100 | u8 white_y_lo:2; | 96 | u8 white_xy_lo; /* Upper 2 bits each */ |
| 101 | u8 white_x_lo:2; | ||
| 102 | u8 pad:4; | ||
| 103 | u8 white_x_hi; | 97 | u8 white_x_hi; |
| 104 | u8 white_y_hi; | 98 | u8 white_y_hi; |
| 105 | u8 gamma; /* need to divide by 100 then add 1 */ | 99 | u8 gamma; /* need to divide by 100 then add 1 */ |
| @@ -134,13 +128,29 @@ struct detailed_non_pixel { | |||
| 134 | #define EDID_DETAIL_MONITOR_SERIAL 0xff | 128 | #define EDID_DETAIL_MONITOR_SERIAL 0xff |
| 135 | 129 | ||
| 136 | struct detailed_timing { | 130 | struct detailed_timing { |
| 137 | u16 pixel_clock; /* need to multiply by 10 KHz */ /* FIXME: byte order */ | 131 | __le16 pixel_clock; /* need to multiply by 10 KHz */ |
| 138 | union { | 132 | union { |
| 139 | struct detailed_pixel_timing pixel_data; | 133 | struct detailed_pixel_timing pixel_data; |
| 140 | struct detailed_non_pixel other_data; | 134 | struct detailed_non_pixel other_data; |
| 141 | } data; | 135 | } data; |
| 142 | } __attribute__((packed)); | 136 | } __attribute__((packed)); |
| 143 | 137 | ||
| 138 | #define DRM_EDID_INPUT_SERRATION_VSYNC (1 << 7) | ||
| 139 | #define DRM_EDID_INPUT_SYNC_ON_GREEN (1 << 5) | ||
| 140 | #define DRM_EDID_INPUT_COMPOSITE_SYNC (1 << 4) | ||
| 141 | #define DRM_EDID_INPUT_SEPARATE_SYNCS (1 << 3) | ||
| 142 | #define DRM_EDID_INPUT_BLANK_TO_BLACK (1 << 2) | ||
| 143 | #define DRM_EDID_INPUT_VIDEO_LEVEL (3 << 1) | ||
| 144 | #define DRM_EDID_INPUT_DIGITAL (1 << 0) /* bits above must be zero if set */ | ||
| 145 | |||
| 146 | #define DRM_EDID_FEATURE_DEFAULT_GTF (1 << 7) | ||
| 147 | #define DRM_EDID_FEATURE_PREFERRED_TIMING (1 << 6) | ||
| 148 | #define DRM_EDID_FEATURE_STANDARD_COLOR (1 << 5) | ||
| 149 | #define DRM_EDID_FEATURE_DISPLAY_TYPE (3 << 3) /* 00=mono, 01=rgb, 10=non-rgb, 11=unknown */ | ||
| 150 | #define DRM_EDID_FEATURE_PM_ACTIVE_OFF (1 << 2) | ||
| 151 | #define DRM_EDID_FEATURE_PM_SUSPEND (1 << 1) | ||
| 152 | #define DRM_EDID_FEATURE_PM_STANDBY (1 << 0) | ||
| 153 | |||
| 144 | struct edid { | 154 | struct edid { |
| 145 | u8 header[8]; | 155 | u8 header[8]; |
| 146 | /* Vendor & product info */ | 156 | /* Vendor & product info */ |
| @@ -153,25 +163,11 @@ struct edid { | |||
| 153 | u8 version; | 163 | u8 version; |
| 154 | u8 revision; | 164 | u8 revision; |
| 155 | /* Display info: */ | 165 | /* Display info: */ |
| 156 | /* input definition */ | 166 | u8 input; |
| 157 | u8 serration_vsync:1; | ||
| 158 | u8 sync_on_green:1; | ||
| 159 | u8 composite_sync:1; | ||
| 160 | u8 separate_syncs:1; | ||
| 161 | u8 blank_to_black:1; | ||
| 162 | u8 video_level:2; | ||
| 163 | u8 digital:1; /* bits below must be zero if set */ | ||
| 164 | u8 width_cm; | 167 | u8 width_cm; |
| 165 | u8 height_cm; | 168 | u8 height_cm; |
| 166 | u8 gamma; | 169 | u8 gamma; |
| 167 | /* feature support */ | 170 | u8 features; |
| 168 | u8 default_gtf:1; | ||
| 169 | u8 preferred_timing:1; | ||
| 170 | u8 standard_color:1; | ||
| 171 | u8 display_type:2; /* 00=mono, 01=rgb, 10=non-rgb, 11=unknown */ | ||
| 172 | u8 pm_active_off:1; | ||
| 173 | u8 pm_suspend:1; | ||
| 174 | u8 pm_standby:1; | ||
| 175 | /* Color characteristics */ | 171 | /* Color characteristics */ |
| 176 | u8 red_green_lo; | 172 | u8 red_green_lo; |
| 177 | u8 black_white_lo; | 173 | u8 black_white_lo; |
| @@ -195,8 +191,6 @@ struct edid { | |||
| 195 | u8 checksum; | 191 | u8 checksum; |
| 196 | } __attribute__((packed)); | 192 | } __attribute__((packed)); |
| 197 | 193 | ||
| 198 | #endif /* little endian structs */ | ||
| 199 | |||
| 200 | #define EDID_PRODUCT_ID(e) ((e)->prod_code[0] | ((e)->prod_code[1] << 8)) | 194 | #define EDID_PRODUCT_ID(e) ((e)->prod_code[0] | ((e)->prod_code[1] << 8)) |
| 201 | 195 | ||
| 202 | #endif /* __DRM_EDID_H__ */ | 196 | #endif /* __DRM_EDID_H__ */ |
diff --git a/include/drm/drm_memory_debug.h b/include/drm/drm_memory_debug.h deleted file mode 100644 index 6463271deea8..000000000000 --- a/include/drm/drm_memory_debug.h +++ /dev/null | |||
| @@ -1,309 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * \file drm_memory_debug.h | ||
| 3 | * Memory management wrappers for DRM. | ||
| 4 | * | ||
| 5 | * \author Rickard E. (Rik) Faith <faith@valinux.com> | ||
| 6 | * \author Gareth Hughes <gareth@valinux.com> | ||
| 7 | */ | ||
| 8 | |||
| 9 | /* | ||
| 10 | * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. | ||
| 11 | * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. | ||
| 12 | * All Rights Reserved. | ||
| 13 | * | ||
| 14 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
| 15 | * copy of this software and associated documentation files (the "Software"), | ||
| 16 | * to deal in the Software without restriction, including without limitation | ||
| 17 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
| 18 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 19 | * Software is furnished to do so, subject to the following conditions: | ||
| 20 | * | ||
| 21 | * The above copyright notice and this permission notice (including the next | ||
| 22 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 23 | * Software. | ||
| 24 | * | ||
| 25 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 26 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 27 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 28 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
| 29 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
| 30 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| 31 | * OTHER DEALINGS IN THE SOFTWARE. | ||
| 32 | */ | ||
| 33 | |||
| 34 | #include "drmP.h" | ||
| 35 | |||
| 36 | typedef struct drm_mem_stats { | ||
| 37 | const char *name; | ||
| 38 | int succeed_count; | ||
| 39 | int free_count; | ||
| 40 | int fail_count; | ||
| 41 | unsigned long bytes_allocated; | ||
| 42 | unsigned long bytes_freed; | ||
| 43 | } drm_mem_stats_t; | ||
| 44 | |||
| 45 | static DEFINE_SPINLOCK(drm_mem_lock); | ||
| 46 | static unsigned long drm_ram_available = 0; /* In pages */ | ||
| 47 | static unsigned long drm_ram_used = 0; | ||
| 48 | static drm_mem_stats_t drm_mem_stats[] = | ||
| 49 | { | ||
| 50 | [DRM_MEM_DMA] = {"dmabufs"}, | ||
| 51 | [DRM_MEM_SAREA] = {"sareas"}, | ||
| 52 | [DRM_MEM_DRIVER] = {"driver"}, | ||
| 53 | [DRM_MEM_MAGIC] = {"magic"}, | ||
| 54 | [DRM_MEM_IOCTLS] = {"ioctltab"}, | ||
| 55 | [DRM_MEM_MAPS] = {"maplist"}, | ||
| 56 | [DRM_MEM_VMAS] = {"vmalist"}, | ||
| 57 | [DRM_MEM_BUFS] = {"buflist"}, | ||
| 58 | [DRM_MEM_SEGS] = {"seglist"}, | ||
| 59 | [DRM_MEM_PAGES] = {"pagelist"}, | ||
| 60 | [DRM_MEM_FILES] = {"files"}, | ||
| 61 | [DRM_MEM_QUEUES] = {"queues"}, | ||
| 62 | [DRM_MEM_CMDS] = {"commands"}, | ||
| 63 | [DRM_MEM_MAPPINGS] = {"mappings"}, | ||
| 64 | [DRM_MEM_BUFLISTS] = {"buflists"}, | ||
| 65 | [DRM_MEM_AGPLISTS] = {"agplist"}, | ||
| 66 | [DRM_MEM_SGLISTS] = {"sglist"}, | ||
| 67 | [DRM_MEM_TOTALAGP] = {"totalagp"}, | ||
| 68 | [DRM_MEM_BOUNDAGP] = {"boundagp"}, | ||
| 69 | [DRM_MEM_CTXBITMAP] = {"ctxbitmap"}, | ||
| 70 | [DRM_MEM_CTXLIST] = {"ctxlist"}, | ||
| 71 | [DRM_MEM_STUB] = {"stub"}, | ||
| 72 | {NULL, 0,} /* Last entry must be null */ | ||
| 73 | }; | ||
| 74 | |||
| 75 | void drm_mem_init (void) { | ||
| 76 | drm_mem_stats_t *mem; | ||
| 77 | struct sysinfo si; | ||
| 78 | |||
| 79 | for (mem = drm_mem_stats; mem->name; ++mem) { | ||
| 80 | mem->succeed_count = 0; | ||
| 81 | mem->free_count = 0; | ||
| 82 | mem->fail_count = 0; | ||
| 83 | mem->bytes_allocated = 0; | ||
| 84 | mem->bytes_freed = 0; | ||
| 85 | } | ||
| 86 | |||
| 87 | si_meminfo(&si); | ||
| 88 | drm_ram_available = si.totalram; | ||
| 89 | drm_ram_used = 0; | ||
| 90 | } | ||
| 91 | |||
| 92 | /* drm_mem_info is called whenever a process reads /dev/drm/mem. */ | ||
| 93 | |||
| 94 | static int drm__mem_info (char *buf, char **start, off_t offset, | ||
| 95 | int request, int *eof, void *data) { | ||
| 96 | drm_mem_stats_t *pt; | ||
| 97 | int len = 0; | ||
| 98 | |||
| 99 | if (offset > DRM_PROC_LIMIT) { | ||
| 100 | *eof = 1; | ||
| 101 | return 0; | ||
| 102 | } | ||
| 103 | |||
| 104 | *eof = 0; | ||
| 105 | *start = &buf[offset]; | ||
| 106 | |||
| 107 | DRM_PROC_PRINT(" total counts " | ||
| 108 | " | outstanding \n"); | ||
| 109 | DRM_PROC_PRINT("type alloc freed fail bytes freed" | ||
| 110 | " | allocs bytes\n\n"); | ||
| 111 | DRM_PROC_PRINT("%-9.9s %5d %5d %4d %10lu kB |\n", | ||
| 112 | "system", 0, 0, 0, | ||
| 113 | drm_ram_available << (PAGE_SHIFT - 10)); | ||
| 114 | DRM_PROC_PRINT("%-9.9s %5d %5d %4d %10lu kB |\n", | ||
| 115 | "locked", 0, 0, 0, drm_ram_used >> 10); | ||
| 116 | DRM_PROC_PRINT("\n"); | ||
| 117 | for (pt = drm_mem_stats; pt->name; pt++) { | ||
| 118 | DRM_PROC_PRINT("%-9.9s %5d %5d %4d %10lu %10lu | %6d %10ld\n", | ||
| 119 | pt->name, | ||
| 120 | pt->succeed_count, | ||
| 121 | pt->free_count, | ||
| 122 | pt->fail_count, | ||
| 123 | pt->bytes_allocated, | ||
| 124 | pt->bytes_freed, | ||
| 125 | pt->succeed_count - pt->free_count, | ||
| 126 | (long)pt->bytes_allocated | ||
| 127 | - (long)pt->bytes_freed); | ||
| 128 | } | ||
| 129 | |||
| 130 | if (len > request + offset) | ||
| 131 | return request; | ||
| 132 | *eof = 1; | ||
| 133 | return len - offset; | ||
| 134 | } | ||
| 135 | |||
| 136 | int drm_mem_info (char *buf, char **start, off_t offset, | ||
| 137 | int len, int *eof, void *data) { | ||
| 138 | int ret; | ||
| 139 | |||
| 140 | spin_lock(&drm_mem_lock); | ||
| 141 | ret = drm__mem_info (buf, start, offset, len, eof, data); | ||
| 142 | spin_unlock(&drm_mem_lock); | ||
| 143 | return ret; | ||
| 144 | } | ||
| 145 | |||
| 146 | void *drm_alloc (size_t size, int area) { | ||
| 147 | void *pt; | ||
| 148 | |||
| 149 | if (!size) { | ||
| 150 | DRM_MEM_ERROR(area, "Allocating 0 bytes\n"); | ||
| 151 | return NULL; | ||
| 152 | } | ||
| 153 | |||
| 154 | if (!(pt = kmalloc(size, GFP_KERNEL))) { | ||
| 155 | spin_lock(&drm_mem_lock); | ||
| 156 | ++drm_mem_stats[area].fail_count; | ||
| 157 | spin_unlock(&drm_mem_lock); | ||
| 158 | return NULL; | ||
| 159 | } | ||
| 160 | spin_lock(&drm_mem_lock); | ||
| 161 | ++drm_mem_stats[area].succeed_count; | ||
| 162 | drm_mem_stats[area].bytes_allocated += size; | ||
| 163 | spin_unlock(&drm_mem_lock); | ||
| 164 | return pt; | ||
| 165 | } | ||
| 166 | |||
| 167 | void *drm_calloc (size_t nmemb, size_t size, int area) { | ||
| 168 | void *addr; | ||
| 169 | |||
| 170 | addr = drm_alloc (nmemb * size, area); | ||
| 171 | if (addr != NULL) | ||
| 172 | memset((void *)addr, 0, size * nmemb); | ||
| 173 | |||
| 174 | return addr; | ||
| 175 | } | ||
| 176 | |||
| 177 | void *drm_realloc (void *oldpt, size_t oldsize, size_t size, int area) { | ||
| 178 | void *pt; | ||
| 179 | |||
| 180 | if (!(pt = drm_alloc (size, area))) | ||
| 181 | return NULL; | ||
| 182 | if (oldpt && oldsize) { | ||
| 183 | memcpy(pt, oldpt, oldsize); | ||
| 184 | drm_free (oldpt, oldsize, area); | ||
| 185 | } | ||
| 186 | return pt; | ||
| 187 | } | ||
| 188 | |||
| 189 | void drm_free (void *pt, size_t size, int area) { | ||
| 190 | int alloc_count; | ||
| 191 | int free_count; | ||
| 192 | |||
| 193 | if (!pt) | ||
| 194 | DRM_MEM_ERROR(area, "Attempt to free NULL pointer\n"); | ||
| 195 | else | ||
| 196 | kfree(pt); | ||
| 197 | spin_lock(&drm_mem_lock); | ||
| 198 | drm_mem_stats[area].bytes_freed += size; | ||
| 199 | free_count = ++drm_mem_stats[area].free_count; | ||
| 200 | alloc_count = drm_mem_stats[area].succeed_count; | ||
| 201 | spin_unlock(&drm_mem_lock); | ||
| 202 | if (free_count > alloc_count) { | ||
| 203 | DRM_MEM_ERROR(area, "Excess frees: %d frees, %d allocs\n", | ||
| 204 | free_count, alloc_count); | ||
| 205 | } | ||
| 206 | } | ||
| 207 | |||
| 208 | #if __OS_HAS_AGP | ||
| 209 | |||
| 210 | DRM_AGP_MEM *drm_alloc_agp (drm_device_t *dev, int pages, u32 type) { | ||
| 211 | DRM_AGP_MEM *handle; | ||
| 212 | |||
| 213 | if (!pages) { | ||
| 214 | DRM_MEM_ERROR(DRM_MEM_TOTALAGP, "Allocating 0 pages\n"); | ||
| 215 | return NULL; | ||
| 216 | } | ||
| 217 | |||
| 218 | if ((handle = drm_agp_allocate_memory (pages, type))) { | ||
| 219 | spin_lock(&drm_mem_lock); | ||
| 220 | ++drm_mem_stats[DRM_MEM_TOTALAGP].succeed_count; | ||
| 221 | drm_mem_stats[DRM_MEM_TOTALAGP].bytes_allocated | ||
| 222 | += pages << PAGE_SHIFT; | ||
| 223 | spin_unlock(&drm_mem_lock); | ||
| 224 | return handle; | ||
| 225 | } | ||
| 226 | spin_lock(&drm_mem_lock); | ||
| 227 | ++drm_mem_stats[DRM_MEM_TOTALAGP].fail_count; | ||
| 228 | spin_unlock(&drm_mem_lock); | ||
| 229 | return NULL; | ||
| 230 | } | ||
| 231 | |||
| 232 | int drm_free_agp (DRM_AGP_MEM * handle, int pages) { | ||
| 233 | int alloc_count; | ||
| 234 | int free_count; | ||
| 235 | int retval = -EINVAL; | ||
| 236 | |||
| 237 | if (!handle) { | ||
| 238 | DRM_MEM_ERROR(DRM_MEM_TOTALAGP, | ||
| 239 | "Attempt to free NULL AGP handle\n"); | ||
| 240 | return retval; | ||
| 241 | } | ||
| 242 | |||
| 243 | if (drm_agp_free_memory (handle)) { | ||
| 244 | spin_lock(&drm_mem_lock); | ||
| 245 | free_count = ++drm_mem_stats[DRM_MEM_TOTALAGP].free_count; | ||
| 246 | alloc_count = drm_mem_stats[DRM_MEM_TOTALAGP].succeed_count; | ||
| 247 | drm_mem_stats[DRM_MEM_TOTALAGP].bytes_freed | ||
| 248 | += pages << PAGE_SHIFT; | ||
| 249 | spin_unlock(&drm_mem_lock); | ||
| 250 | if (free_count > alloc_count) { | ||
| 251 | DRM_MEM_ERROR(DRM_MEM_TOTALAGP, | ||
| 252 | "Excess frees: %d frees, %d allocs\n", | ||
| 253 | free_count, alloc_count); | ||
| 254 | } | ||
| 255 | return 0; | ||
| 256 | } | ||
| 257 | return retval; | ||
| 258 | } | ||
| 259 | |||
| 260 | int drm_bind_agp (DRM_AGP_MEM * handle, unsigned int start) { | ||
| 261 | int retcode = -EINVAL; | ||
| 262 | |||
| 263 | if (!handle) { | ||
| 264 | DRM_MEM_ERROR(DRM_MEM_BOUNDAGP, | ||
| 265 | "Attempt to bind NULL AGP handle\n"); | ||
| 266 | return retcode; | ||
| 267 | } | ||
| 268 | |||
| 269 | if (!(retcode = drm_agp_bind_memory (handle, start))) { | ||
| 270 | spin_lock(&drm_mem_lock); | ||
| 271 | ++drm_mem_stats[DRM_MEM_BOUNDAGP].succeed_count; | ||
| 272 | drm_mem_stats[DRM_MEM_BOUNDAGP].bytes_allocated | ||
| 273 | += handle->page_count << PAGE_SHIFT; | ||
| 274 | spin_unlock(&drm_mem_lock); | ||
| 275 | return retcode; | ||
| 276 | } | ||
| 277 | spin_lock(&drm_mem_lock); | ||
| 278 | ++drm_mem_stats[DRM_MEM_BOUNDAGP].fail_count; | ||
| 279 | spin_unlock(&drm_mem_lock); | ||
| 280 | return retcode; | ||
| 281 | } | ||
| 282 | |||
| 283 | int drm_unbind_agp (DRM_AGP_MEM * handle) { | ||
| 284 | int alloc_count; | ||
| 285 | int free_count; | ||
| 286 | int retcode = -EINVAL; | ||
| 287 | |||
| 288 | if (!handle) { | ||
| 289 | DRM_MEM_ERROR(DRM_MEM_BOUNDAGP, | ||
| 290 | "Attempt to unbind NULL AGP handle\n"); | ||
| 291 | return retcode; | ||
| 292 | } | ||
| 293 | |||
| 294 | if ((retcode = drm_agp_unbind_memory (handle))) | ||
| 295 | return retcode; | ||
| 296 | spin_lock(&drm_mem_lock); | ||
| 297 | free_count = ++drm_mem_stats[DRM_MEM_BOUNDAGP].free_count; | ||
| 298 | alloc_count = drm_mem_stats[DRM_MEM_BOUNDAGP].succeed_count; | ||
| 299 | drm_mem_stats[DRM_MEM_BOUNDAGP].bytes_freed | ||
| 300 | += handle->page_count << PAGE_SHIFT; | ||
| 301 | spin_unlock(&drm_mem_lock); | ||
| 302 | if (free_count > alloc_count) { | ||
| 303 | DRM_MEM_ERROR(DRM_MEM_BOUNDAGP, | ||
| 304 | "Excess frees: %d frees, %d allocs\n", | ||
| 305 | free_count, alloc_count); | ||
| 306 | } | ||
| 307 | return retcode; | ||
| 308 | } | ||
| 309 | #endif | ||
diff --git a/include/drm/drm_mm.h b/include/drm/drm_mm.h index 5662f4278ef3..f8332073d277 100644 --- a/include/drm/drm_mm.h +++ b/include/drm/drm_mm.h | |||
| @@ -59,13 +59,22 @@ struct drm_mm { | |||
| 59 | /* | 59 | /* |
| 60 | * Basic range manager support (drm_mm.c) | 60 | * Basic range manager support (drm_mm.c) |
| 61 | */ | 61 | */ |
| 62 | 62 | extern struct drm_mm_node *drm_mm_get_block_generic(struct drm_mm_node *node, | |
| 63 | extern struct drm_mm_node *drm_mm_get_block(struct drm_mm_node *parent, | 63 | unsigned long size, |
| 64 | unsigned long size, | 64 | unsigned alignment, |
| 65 | unsigned alignment); | 65 | int atomic); |
| 66 | extern struct drm_mm_node *drm_mm_get_block_atomic(struct drm_mm_node *parent, | 66 | static inline struct drm_mm_node *drm_mm_get_block(struct drm_mm_node *parent, |
| 67 | unsigned long size, | 67 | unsigned long size, |
| 68 | unsigned alignment); | 68 | unsigned alignment) |
| 69 | { | ||
| 70 | return drm_mm_get_block_generic(parent, size, alignment, 0); | ||
| 71 | } | ||
| 72 | static inline struct drm_mm_node *drm_mm_get_block_atomic(struct drm_mm_node *parent, | ||
| 73 | unsigned long size, | ||
| 74 | unsigned alignment) | ||
| 75 | { | ||
| 76 | return drm_mm_get_block_generic(parent, size, alignment, 1); | ||
| 77 | } | ||
| 69 | extern void drm_mm_put_block(struct drm_mm_node *cur); | 78 | extern void drm_mm_put_block(struct drm_mm_node *cur); |
| 70 | extern struct drm_mm_node *drm_mm_search_free(const struct drm_mm *mm, | 79 | extern struct drm_mm_node *drm_mm_search_free(const struct drm_mm *mm, |
| 71 | unsigned long size, | 80 | unsigned long size, |
diff --git a/include/linux/agp_backend.h b/include/linux/agp_backend.h index 2b8df8b420fd..76fa794fdac0 100644 --- a/include/linux/agp_backend.h +++ b/include/linux/agp_backend.h | |||
| @@ -70,7 +70,7 @@ struct agp_memory { | |||
| 70 | struct agp_memory *next; | 70 | struct agp_memory *next; |
| 71 | struct agp_memory *prev; | 71 | struct agp_memory *prev; |
| 72 | struct agp_bridge_data *bridge; | 72 | struct agp_bridge_data *bridge; |
| 73 | unsigned long *memory; | 73 | struct page **pages; |
| 74 | size_t page_count; | 74 | size_t page_count; |
| 75 | int key; | 75 | int key; |
| 76 | int num_scratch_pages; | 76 | int num_scratch_pages; |
diff --git a/include/linux/ata.h b/include/linux/ata.h index 915da43edee1..9c75921f0c16 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
| @@ -800,6 +800,20 @@ static inline int ata_id_is_ssd(const u16 *id) | |||
| 800 | return id[ATA_ID_ROT_SPEED] == 0x01; | 800 | return id[ATA_ID_ROT_SPEED] == 0x01; |
| 801 | } | 801 | } |
| 802 | 802 | ||
| 803 | static inline int ata_id_pio_need_iordy(const u16 *id, const u8 pio) | ||
| 804 | { | ||
| 805 | /* CF spec. r4.1 Table 22 says no IORDY on PIO5 and PIO6. */ | ||
| 806 | if (pio > 4 && ata_id_is_cfa(id)) | ||
| 807 | return 0; | ||
| 808 | /* For PIO3 and higher it is mandatory. */ | ||
| 809 | if (pio > 2) | ||
| 810 | return 1; | ||
| 811 | /* Turn it on when possible. */ | ||
| 812 | if (ata_id_has_iordy(id)) | ||
| 813 | return 1; | ||
| 814 | return 0; | ||
| 815 | } | ||
| 816 | |||
| 803 | static inline int ata_drive_40wire(const u16 *dev_id) | 817 | static inline int ata_drive_40wire(const u16 *dev_id) |
| 804 | { | 818 | { |
| 805 | if (ata_id_is_sata(dev_id)) | 819 | if (ata_id_is_sata(dev_id)) |
diff --git a/include/linux/gameport.h b/include/linux/gameport.h index 0cd825f7363a..1bc08541c2b9 100644 --- a/include/linux/gameport.h +++ b/include/linux/gameport.h | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | 11 | ||
| 12 | #ifdef __KERNEL__ | 12 | #ifdef __KERNEL__ |
| 13 | #include <asm/io.h> | 13 | #include <asm/io.h> |
| 14 | #include <linux/types.h> | ||
| 14 | #include <linux/list.h> | 15 | #include <linux/list.h> |
| 15 | #include <linux/mutex.h> | 16 | #include <linux/mutex.h> |
| 16 | #include <linux/device.h> | 17 | #include <linux/device.h> |
| @@ -62,7 +63,7 @@ struct gameport_driver { | |||
| 62 | 63 | ||
| 63 | struct device_driver driver; | 64 | struct device_driver driver; |
| 64 | 65 | ||
| 65 | unsigned int ignore; | 66 | bool ignore; |
| 66 | }; | 67 | }; |
| 67 | #define to_gameport_driver(d) container_of(d, struct gameport_driver, driver) | 68 | #define to_gameport_driver(d) container_of(d, struct gameport_driver, driver) |
| 68 | 69 | ||
diff --git a/include/linux/i2c/lm8323.h b/include/linux/i2c/lm8323.h new file mode 100644 index 000000000000..478d668bc590 --- /dev/null +++ b/include/linux/i2c/lm8323.h | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | /* | ||
| 2 | * lm8323.h - Configuration for LM8323 keypad driver. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation (version 2 of the License only). | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program; if not, write to the Free Software | ||
| 15 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 16 | */ | ||
| 17 | |||
| 18 | #ifndef __LINUX_LM8323_H | ||
| 19 | #define __LINUX_LM8323_H | ||
| 20 | |||
| 21 | #include <linux/types.h> | ||
| 22 | |||
| 23 | /* | ||
| 24 | * Largest keycode that the chip can send, plus one, | ||
| 25 | * so keys can be mapped directly at the index of the | ||
| 26 | * LM8323 keycode instead of subtracting one. | ||
| 27 | */ | ||
| 28 | #define LM8323_KEYMAP_SIZE (0x7f + 1) | ||
| 29 | |||
| 30 | #define LM8323_NUM_PWMS 3 | ||
| 31 | |||
| 32 | struct lm8323_platform_data { | ||
| 33 | int debounce_time; /* Time to watch for key bouncing, in ms. */ | ||
| 34 | int active_time; /* Idle time until sleep, in ms. */ | ||
| 35 | |||
| 36 | int size_x; | ||
| 37 | int size_y; | ||
| 38 | bool repeat; | ||
| 39 | const unsigned short *keymap; | ||
| 40 | |||
| 41 | const char *pwm_names[LM8323_NUM_PWMS]; | ||
| 42 | |||
| 43 | const char *name; /* Device name. */ | ||
| 44 | }; | ||
| 45 | |||
| 46 | #endif /* __LINUX_LM8323_H */ | ||
diff --git a/include/linux/ide.h b/include/linux/ide.h index a6c6a2fad7c8..95c6e00a72e8 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
| @@ -157,12 +157,6 @@ enum { | |||
| 157 | #define REQ_UNPARK_HEADS 0x23 | 157 | #define REQ_UNPARK_HEADS 0x23 |
| 158 | 158 | ||
| 159 | /* | 159 | /* |
| 160 | * Check for an interrupt and acknowledge the interrupt status | ||
| 161 | */ | ||
| 162 | struct hwif_s; | ||
| 163 | typedef int (ide_ack_intr_t)(struct hwif_s *); | ||
| 164 | |||
| 165 | /* | ||
| 166 | * hwif_chipset_t is used to keep track of the specific hardware | 160 | * hwif_chipset_t is used to keep track of the specific hardware |
| 167 | * chipset used by each IDE interface, if known. | 161 | * chipset used by each IDE interface, if known. |
| 168 | */ | 162 | */ |
| @@ -185,7 +179,6 @@ struct ide_hw { | |||
| 185 | }; | 179 | }; |
| 186 | 180 | ||
| 187 | int irq; /* our irq number */ | 181 | int irq; /* our irq number */ |
| 188 | ide_ack_intr_t *ack_intr; /* acknowledge interrupt */ | ||
| 189 | struct device *dev, *parent; | 182 | struct device *dev, *parent; |
| 190 | unsigned long config; | 183 | unsigned long config; |
| 191 | }; | 184 | }; |
| @@ -331,11 +324,6 @@ enum { | |||
| 331 | PC_FLAG_WRITING = (1 << 6), | 324 | PC_FLAG_WRITING = (1 << 6), |
| 332 | }; | 325 | }; |
| 333 | 326 | ||
| 334 | /* | ||
| 335 | * With each packet command, we allocate a buffer of IDE_PC_BUFFER_SIZE bytes. | ||
| 336 | * This is used for several packet commands (not for READ/WRITE commands). | ||
| 337 | */ | ||
| 338 | #define IDE_PC_BUFFER_SIZE 64 | ||
| 339 | #define ATAPI_WAIT_PC (60 * HZ) | 327 | #define ATAPI_WAIT_PC (60 * HZ) |
| 340 | 328 | ||
| 341 | struct ide_atapi_pc { | 329 | struct ide_atapi_pc { |
| @@ -347,12 +335,6 @@ struct ide_atapi_pc { | |||
| 347 | 335 | ||
| 348 | /* bytes to transfer */ | 336 | /* bytes to transfer */ |
| 349 | int req_xfer; | 337 | int req_xfer; |
| 350 | /* bytes actually transferred */ | ||
| 351 | int xferred; | ||
| 352 | |||
| 353 | /* data buffer */ | ||
| 354 | u8 *buf; | ||
| 355 | int buf_size; | ||
| 356 | 338 | ||
| 357 | /* the corresponding request */ | 339 | /* the corresponding request */ |
| 358 | struct request *rq; | 340 | struct request *rq; |
| @@ -363,8 +345,6 @@ struct ide_atapi_pc { | |||
| 363 | * those are more or less driver-specific and some of them are subject | 345 | * those are more or less driver-specific and some of them are subject |
| 364 | * to change/removal later. | 346 | * to change/removal later. |
| 365 | */ | 347 | */ |
| 366 | u8 pc_buf[IDE_PC_BUFFER_SIZE]; | ||
| 367 | |||
| 368 | unsigned long timeout; | 348 | unsigned long timeout; |
| 369 | }; | 349 | }; |
| 370 | 350 | ||
| @@ -552,7 +532,7 @@ struct ide_drive_s { | |||
| 552 | 532 | ||
| 553 | unsigned int bios_cyl; /* BIOS/fdisk/LILO number of cyls */ | 533 | unsigned int bios_cyl; /* BIOS/fdisk/LILO number of cyls */ |
| 554 | unsigned int cyl; /* "real" number of cyls */ | 534 | unsigned int cyl; /* "real" number of cyls */ |
| 555 | unsigned int drive_data; /* used by set_pio_mode/dev_select() */ | 535 | void *drive_data; /* used by set_pio_mode/dev_select() */ |
| 556 | unsigned int failures; /* current failure count */ | 536 | unsigned int failures; /* current failure count */ |
| 557 | unsigned int max_failures; /* maximum allowed failure count */ | 537 | unsigned int max_failures; /* maximum allowed failure count */ |
| 558 | u64 probed_capacity;/* initial/native media capacity */ | 538 | u64 probed_capacity;/* initial/native media capacity */ |
| @@ -649,6 +629,7 @@ struct ide_port_ops { | |||
| 649 | void (*maskproc)(ide_drive_t *, int); | 629 | void (*maskproc)(ide_drive_t *, int); |
| 650 | void (*quirkproc)(ide_drive_t *); | 630 | void (*quirkproc)(ide_drive_t *); |
| 651 | void (*clear_irq)(ide_drive_t *); | 631 | void (*clear_irq)(ide_drive_t *); |
| 632 | int (*test_irq)(struct hwif_s *); | ||
| 652 | 633 | ||
| 653 | u8 (*mdma_filter)(ide_drive_t *); | 634 | u8 (*mdma_filter)(ide_drive_t *); |
| 654 | u8 (*udma_filter)(ide_drive_t *); | 635 | u8 (*udma_filter)(ide_drive_t *); |
| @@ -674,6 +655,10 @@ struct ide_dma_ops { | |||
| 674 | u8 (*dma_sff_read_status)(struct hwif_s *); | 655 | u8 (*dma_sff_read_status)(struct hwif_s *); |
| 675 | }; | 656 | }; |
| 676 | 657 | ||
| 658 | enum { | ||
| 659 | IDE_PFLAG_PROBING = (1 << 0), | ||
| 660 | }; | ||
| 661 | |||
| 677 | struct ide_host; | 662 | struct ide_host; |
| 678 | 663 | ||
| 679 | typedef struct hwif_s { | 664 | typedef struct hwif_s { |
| @@ -690,6 +675,8 @@ typedef struct hwif_s { | |||
| 690 | 675 | ||
| 691 | ide_drive_t *devices[MAX_DRIVES + 1]; | 676 | ide_drive_t *devices[MAX_DRIVES + 1]; |
| 692 | 677 | ||
| 678 | unsigned long port_flags; | ||
| 679 | |||
| 693 | u8 major; /* our major number */ | 680 | u8 major; /* our major number */ |
| 694 | u8 index; /* 0 for ide0; 1 for ide1; ... */ | 681 | u8 index; /* 0 for ide0; 1 for ide1; ... */ |
| 695 | u8 channel; /* for dual-port chips: 0=primary, 1=secondary */ | 682 | u8 channel; /* for dual-port chips: 0=primary, 1=secondary */ |
| @@ -708,8 +695,6 @@ typedef struct hwif_s { | |||
| 708 | 695 | ||
| 709 | struct device *dev; | 696 | struct device *dev; |
| 710 | 697 | ||
| 711 | ide_ack_intr_t *ack_intr; | ||
| 712 | |||
| 713 | void (*rw_disk)(ide_drive_t *, struct request *); | 698 | void (*rw_disk)(ide_drive_t *, struct request *); |
| 714 | 699 | ||
| 715 | const struct ide_tp_ops *tp_ops; | 700 | const struct ide_tp_ops *tp_ops; |
| @@ -1130,6 +1115,8 @@ void SELECT_MASK(ide_drive_t *, int); | |||
| 1130 | u8 ide_read_error(ide_drive_t *); | 1115 | u8 ide_read_error(ide_drive_t *); |
| 1131 | void ide_read_bcount_and_ireason(ide_drive_t *, u16 *, u8 *); | 1116 | void ide_read_bcount_and_ireason(ide_drive_t *, u16 *, u8 *); |
| 1132 | 1117 | ||
| 1118 | int ide_check_ireason(ide_drive_t *, struct request *, int, int, int); | ||
| 1119 | |||
| 1133 | int ide_check_atapi_device(ide_drive_t *, const char *); | 1120 | int ide_check_atapi_device(ide_drive_t *, const char *); |
| 1134 | 1121 | ||
| 1135 | void ide_init_pc(struct ide_atapi_pc *); | 1122 | void ide_init_pc(struct ide_atapi_pc *); |
| @@ -1154,7 +1141,8 @@ enum { | |||
| 1154 | REQ_IDETAPE_WRITE = (1 << 3), | 1141 | REQ_IDETAPE_WRITE = (1 << 3), |
| 1155 | }; | 1142 | }; |
| 1156 | 1143 | ||
| 1157 | int ide_queue_pc_tail(ide_drive_t *, struct gendisk *, struct ide_atapi_pc *); | 1144 | int ide_queue_pc_tail(ide_drive_t *, struct gendisk *, struct ide_atapi_pc *, |
| 1145 | void *, unsigned int); | ||
| 1158 | 1146 | ||
| 1159 | int ide_do_test_unit_ready(ide_drive_t *, struct gendisk *); | 1147 | int ide_do_test_unit_ready(ide_drive_t *, struct gendisk *); |
| 1160 | int ide_do_start_stop(ide_drive_t *, struct gendisk *, int); | 1148 | int ide_do_start_stop(ide_drive_t *, struct gendisk *, int); |
| @@ -1524,6 +1512,7 @@ int ide_timing_compute(ide_drive_t *, u8, struct ide_timing *, int, int); | |||
| 1524 | int ide_scan_pio_blacklist(char *); | 1512 | int ide_scan_pio_blacklist(char *); |
| 1525 | const char *ide_xfer_verbose(u8); | 1513 | const char *ide_xfer_verbose(u8); |
| 1526 | u8 ide_get_best_pio_mode(ide_drive_t *, u8, u8); | 1514 | u8 ide_get_best_pio_mode(ide_drive_t *, u8, u8); |
| 1515 | int ide_pio_need_iordy(ide_drive_t *, const u8); | ||
| 1527 | int ide_set_pio_mode(ide_drive_t *, u8); | 1516 | int ide_set_pio_mode(ide_drive_t *, u8); |
| 1528 | int ide_set_dma_mode(ide_drive_t *, u8); | 1517 | int ide_set_dma_mode(ide_drive_t *, u8); |
| 1529 | void ide_set_pio(ide_drive_t *, u8); | 1518 | void ide_set_pio(ide_drive_t *, u8); |
| @@ -1561,6 +1550,16 @@ static inline ide_drive_t *ide_get_pair_dev(ide_drive_t *drive) | |||
| 1561 | return (peer->dev_flags & IDE_DFLAG_PRESENT) ? peer : NULL; | 1550 | return (peer->dev_flags & IDE_DFLAG_PRESENT) ? peer : NULL; |
| 1562 | } | 1551 | } |
| 1563 | 1552 | ||
| 1553 | static inline void *ide_get_drivedata(ide_drive_t *drive) | ||
| 1554 | { | ||
| 1555 | return drive->drive_data; | ||
| 1556 | } | ||
| 1557 | |||
| 1558 | static inline void ide_set_drivedata(ide_drive_t *drive, void *data) | ||
| 1559 | { | ||
| 1560 | drive->drive_data = data; | ||
| 1561 | } | ||
| 1562 | |||
| 1564 | #define ide_port_for_each_dev(i, dev, port) \ | 1563 | #define ide_port_for_each_dev(i, dev, port) \ |
| 1565 | for ((i) = 0; ((dev) = (port)->devices[i]) || (i) < MAX_DRIVES; (i)++) | 1564 | for ((i) = 0; ((dev) = (port)->devices[i]) || (i) < MAX_DRIVES; (i)++) |
| 1566 | 1565 | ||
diff --git a/include/linux/input.h b/include/linux/input.h index 6fed4f6a9c9e..8b3bc3e0d146 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
| @@ -53,6 +53,7 @@ struct input_absinfo { | |||
| 53 | __s32 maximum; | 53 | __s32 maximum; |
| 54 | __s32 fuzz; | 54 | __s32 fuzz; |
| 55 | __s32 flat; | 55 | __s32 flat; |
| 56 | __s32 resolution; | ||
| 56 | }; | 57 | }; |
| 57 | 58 | ||
| 58 | #define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */ | 59 | #define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */ |
| @@ -1109,6 +1110,7 @@ struct input_dev { | |||
| 1109 | int absmin[ABS_MAX + 1]; | 1110 | int absmin[ABS_MAX + 1]; |
| 1110 | int absfuzz[ABS_MAX + 1]; | 1111 | int absfuzz[ABS_MAX + 1]; |
| 1111 | int absflat[ABS_MAX + 1]; | 1112 | int absflat[ABS_MAX + 1]; |
| 1113 | int absres[ABS_MAX + 1]; | ||
| 1112 | 1114 | ||
| 1113 | int (*open)(struct input_dev *dev); | 1115 | int (*open)(struct input_dev *dev); |
| 1114 | void (*close)(struct input_dev *dev); | 1116 | void (*close)(struct input_dev *dev); |
diff --git a/include/linux/rotary_encoder.h b/include/linux/rotary_encoder.h index 12d63a30c347..215278b8df2a 100644 --- a/include/linux/rotary_encoder.h +++ b/include/linux/rotary_encoder.h | |||
| @@ -8,6 +8,8 @@ struct rotary_encoder_platform_data { | |||
| 8 | unsigned int gpio_b; | 8 | unsigned int gpio_b; |
| 9 | unsigned int inverted_a; | 9 | unsigned int inverted_a; |
| 10 | unsigned int inverted_b; | 10 | unsigned int inverted_b; |
| 11 | bool relative_axis; | ||
| 12 | bool rollover; | ||
| 11 | }; | 13 | }; |
| 12 | 14 | ||
| 13 | #endif /* __ROTARY_ENCODER_H__ */ | 15 | #endif /* __ROTARY_ENCODER_H__ */ |
diff --git a/include/linux/serio.h b/include/linux/serio.h index e0417e4d3f15..126d24c9eaa8 100644 --- a/include/linux/serio.h +++ b/include/linux/serio.h | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | 15 | ||
| 16 | #ifdef __KERNEL__ | 16 | #ifdef __KERNEL__ |
| 17 | 17 | ||
| 18 | #include <linux/types.h> | ||
| 18 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
| 19 | #include <linux/list.h> | 20 | #include <linux/list.h> |
| 20 | #include <linux/spinlock.h> | 21 | #include <linux/spinlock.h> |
| @@ -28,7 +29,10 @@ struct serio { | |||
| 28 | char name[32]; | 29 | char name[32]; |
| 29 | char phys[32]; | 30 | char phys[32]; |
| 30 | 31 | ||
| 31 | unsigned int manual_bind; | 32 | bool manual_bind; |
| 33 | bool registered; /* port has been fully registered with driver core */ | ||
| 34 | bool suspended; /* port is suspended */ | ||
| 35 | |||
| 32 | 36 | ||
| 33 | struct serio_device_id id; | 37 | struct serio_device_id id; |
| 34 | 38 | ||
| @@ -47,7 +51,6 @@ struct serio { | |||
| 47 | struct mutex drv_mutex; /* protects serio->drv so attributes can pin driver */ | 51 | struct mutex drv_mutex; /* protects serio->drv so attributes can pin driver */ |
| 48 | 52 | ||
| 49 | struct device dev; | 53 | struct device dev; |
| 50 | unsigned int registered; /* port has been fully registered with driver core */ | ||
| 51 | 54 | ||
| 52 | struct list_head node; | 55 | struct list_head node; |
| 53 | }; | 56 | }; |
| @@ -58,7 +61,7 @@ struct serio_driver { | |||
| 58 | char *description; | 61 | char *description; |
| 59 | 62 | ||
| 60 | struct serio_device_id *id_table; | 63 | struct serio_device_id *id_table; |
| 61 | unsigned int manual_bind; | 64 | bool manual_bind; |
| 62 | 65 | ||
| 63 | void (*write_wakeup)(struct serio *); | 66 | void (*write_wakeup)(struct serio *); |
| 64 | irqreturn_t (*interrupt)(struct serio *, unsigned char, unsigned int); | 67 | irqreturn_t (*interrupt)(struct serio *, unsigned char, unsigned int); |
diff --git a/include/linux/spi/ads7846.h b/include/linux/spi/ads7846.h index 2ea20320c093..51948eb6927a 100644 --- a/include/linux/spi/ads7846.h +++ b/include/linux/spi/ads7846.h | |||
| @@ -17,6 +17,7 @@ struct ads7846_platform_data { | |||
| 17 | u16 vref_mv; /* external vref value, milliVolts */ | 17 | u16 vref_mv; /* external vref value, milliVolts */ |
| 18 | bool keep_vref_on; /* set to keep vref on for differential | 18 | bool keep_vref_on; /* set to keep vref on for differential |
| 19 | * measurements as well */ | 19 | * measurements as well */ |
| 20 | bool swap_xy; /* swap x and y axes */ | ||
| 20 | 21 | ||
| 21 | /* Settling time of the analog signals; a function of Vcc and the | 22 | /* Settling time of the analog signals; a function of Vcc and the |
| 22 | * capacitance on the X/Y drivers. If set to non-zero, two samples | 23 | * capacitance on the X/Y drivers. If set to non-zero, two samples |
diff --git a/include/linux/ucb1400.h b/include/linux/ucb1400.h index 970473bf8d5a..ed889f4168f3 100644 --- a/include/linux/ucb1400.h +++ b/include/linux/ucb1400.h | |||
| @@ -134,28 +134,13 @@ static inline void ucb1400_adc_enable(struct snd_ac97 *ac97) | |||
| 134 | ucb1400_reg_write(ac97, UCB_ADC_CR, UCB_ADC_ENA); | 134 | ucb1400_reg_write(ac97, UCB_ADC_CR, UCB_ADC_ENA); |
| 135 | } | 135 | } |
| 136 | 136 | ||
| 137 | static unsigned int ucb1400_adc_read(struct snd_ac97 *ac97, u16 adc_channel, | ||
| 138 | int adcsync) | ||
| 139 | { | ||
| 140 | unsigned int val; | ||
| 141 | |||
| 142 | if (adcsync) | ||
| 143 | adc_channel |= UCB_ADC_SYNC_ENA; | ||
| 144 | |||
| 145 | ucb1400_reg_write(ac97, UCB_ADC_CR, UCB_ADC_ENA | adc_channel); | ||
| 146 | ucb1400_reg_write(ac97, UCB_ADC_CR, UCB_ADC_ENA | adc_channel | | ||
| 147 | UCB_ADC_START); | ||
| 148 | |||
| 149 | while (!((val = ucb1400_reg_read(ac97, UCB_ADC_DATA)) | ||
| 150 | & UCB_ADC_DAT_VALID)) | ||
| 151 | schedule_timeout_uninterruptible(1); | ||
| 152 | |||
| 153 | return val & UCB_ADC_DAT_MASK; | ||
| 154 | } | ||
| 155 | |||
| 156 | static inline void ucb1400_adc_disable(struct snd_ac97 *ac97) | 137 | static inline void ucb1400_adc_disable(struct snd_ac97 *ac97) |
| 157 | { | 138 | { |
| 158 | ucb1400_reg_write(ac97, UCB_ADC_CR, 0); | 139 | ucb1400_reg_write(ac97, UCB_ADC_CR, 0); |
| 159 | } | 140 | } |
| 160 | 141 | ||
| 142 | |||
| 143 | unsigned int ucb1400_adc_read(struct snd_ac97 *ac97, u16 adc_channel, | ||
| 144 | int adcsync); | ||
| 145 | |||
| 161 | #endif | 146 | #endif |
