diff options
| author | David S. Miller <davem@davemloft.net> | 2010-04-03 18:49:14 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2010-04-03 18:49:14 -0400 |
| commit | 87e8b821ed8db3dab03d96cd542e29666bf210aa (patch) | |
| tree | 0027060473aafbbb125655ba027319c8a1a665fc /include | |
| parent | 33cd9dfa3a13e3d8e41aef225a9f98169816723b (diff) | |
| parent | 5e11611a5d22252f3f9c169a3c9377eac0c32033 (diff) | |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'include')
235 files changed, 8438 insertions, 1394 deletions
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h index 3a4767c01c5f..4f7b44866b76 100644 --- a/include/acpi/acpi_drivers.h +++ b/include/acpi/acpi_drivers.h | |||
| @@ -65,6 +65,8 @@ | |||
| 65 | #define ACPI_VIDEO_HID "LNXVIDEO" | 65 | #define ACPI_VIDEO_HID "LNXVIDEO" |
| 66 | #define ACPI_BAY_HID "LNXIOBAY" | 66 | #define ACPI_BAY_HID "LNXIOBAY" |
| 67 | #define ACPI_DOCK_HID "LNXDOCK" | 67 | #define ACPI_DOCK_HID "LNXDOCK" |
| 68 | /* Quirk for broken IBM BIOSes */ | ||
| 69 | #define ACPI_SMBUS_IBM_HID "SMBUSIBM" | ||
| 68 | 70 | ||
| 69 | /* | 71 | /* |
| 70 | * For fixed hardware buttons, we fabricate acpi_devices with HID | 72 | * For fixed hardware buttons, we fabricate acpi_devices with HID |
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 29831768c0e6..86825ddbe14e 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
| @@ -238,7 +238,7 @@ struct acpi_processor_errata { | |||
| 238 | 238 | ||
| 239 | extern int acpi_processor_preregister_performance(struct | 239 | extern int acpi_processor_preregister_performance(struct |
| 240 | acpi_processor_performance | 240 | acpi_processor_performance |
| 241 | *performance); | 241 | __percpu *performance); |
| 242 | 242 | ||
| 243 | extern int acpi_processor_register_performance(struct acpi_processor_performance | 243 | extern int acpi_processor_register_performance(struct acpi_processor_performance |
| 244 | *performance, unsigned int cpu); | 244 | *performance, unsigned int cpu); |
| @@ -320,8 +320,16 @@ static inline int acpi_processor_get_bios_limit(int cpu, unsigned int *limit) | |||
| 320 | 320 | ||
| 321 | #endif /* CONFIG_CPU_FREQ */ | 321 | #endif /* CONFIG_CPU_FREQ */ |
| 322 | 322 | ||
| 323 | /* in processor_pdc.c */ | 323 | /* in processor_core.c */ |
| 324 | void acpi_processor_set_pdc(acpi_handle handle); | 324 | void acpi_processor_set_pdc(acpi_handle handle); |
| 325 | #ifdef CONFIG_SMP | ||
| 326 | int acpi_get_cpuid(acpi_handle, int type, u32 acpi_id); | ||
| 327 | #else | ||
| 328 | static inline int acpi_get_cpuid(acpi_handle handle, int type, u32 acpi_id) | ||
| 329 | { | ||
| 330 | return -1; | ||
| 331 | } | ||
| 332 | #endif | ||
| 325 | 333 | ||
| 326 | /* in processor_throttling.c */ | 334 | /* in processor_throttling.c */ |
| 327 | int acpi_processor_tstate_has_changed(struct acpi_processor *pr); | 335 | int acpi_processor_tstate_has_changed(struct acpi_processor *pr); |
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index 485eeb6c4ef3..979c6a57f2f1 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h | |||
| @@ -136,6 +136,32 @@ extern int __gpio_cansleep(unsigned gpio); | |||
| 136 | 136 | ||
| 137 | extern int __gpio_to_irq(unsigned gpio); | 137 | extern int __gpio_to_irq(unsigned gpio); |
| 138 | 138 | ||
| 139 | #define GPIOF_DIR_OUT (0 << 0) | ||
| 140 | #define GPIOF_DIR_IN (1 << 0) | ||
| 141 | |||
| 142 | #define GPIOF_INIT_LOW (0 << 1) | ||
| 143 | #define GPIOF_INIT_HIGH (1 << 1) | ||
| 144 | |||
| 145 | #define GPIOF_IN (GPIOF_DIR_IN) | ||
| 146 | #define GPIOF_OUT_INIT_LOW (GPIOF_DIR_OUT | GPIOF_INIT_LOW) | ||
| 147 | #define GPIOF_OUT_INIT_HIGH (GPIOF_DIR_OUT | GPIOF_INIT_HIGH) | ||
| 148 | |||
| 149 | /** | ||
| 150 | * struct gpio - a structure describing a GPIO with configuration | ||
| 151 | * @gpio: the GPIO number | ||
| 152 | * @flags: GPIO configuration as specified by GPIOF_* | ||
| 153 | * @label: a literal description string of this GPIO | ||
| 154 | */ | ||
| 155 | struct gpio { | ||
| 156 | unsigned gpio; | ||
| 157 | unsigned long flags; | ||
| 158 | const char *label; | ||
| 159 | }; | ||
| 160 | |||
| 161 | extern int gpio_request_one(unsigned gpio, unsigned long flags, const char *label); | ||
| 162 | extern int gpio_request_array(struct gpio *array, size_t num); | ||
| 163 | extern void gpio_free_array(struct gpio *array, size_t num); | ||
| 164 | |||
| 139 | #ifdef CONFIG_GPIO_SYSFS | 165 | #ifdef CONFIG_GPIO_SYSFS |
| 140 | 166 | ||
| 141 | /* | 167 | /* |
diff --git a/include/asm-generic/local.h b/include/asm-generic/local.h index fc218444e315..c8a5d68541d7 100644 --- a/include/asm-generic/local.h +++ b/include/asm-generic/local.h | |||
| @@ -52,23 +52,4 @@ typedef struct | |||
| 52 | #define __local_add(i,l) local_set((l), local_read(l) + (i)) | 52 | #define __local_add(i,l) local_set((l), local_read(l) + (i)) |
| 53 | #define __local_sub(i,l) local_set((l), local_read(l) - (i)) | 53 | #define __local_sub(i,l) local_set((l), local_read(l) - (i)) |
| 54 | 54 | ||
| 55 | /* Use these for per-cpu local_t variables: on some archs they are | ||
| 56 | * much more efficient than these naive implementations. Note they take | ||
| 57 | * a variable (eg. mystruct.foo), not an address. | ||
| 58 | */ | ||
| 59 | #define cpu_local_read(l) local_read(&__get_cpu_var(l)) | ||
| 60 | #define cpu_local_set(l, i) local_set(&__get_cpu_var(l), (i)) | ||
| 61 | #define cpu_local_inc(l) local_inc(&__get_cpu_var(l)) | ||
| 62 | #define cpu_local_dec(l) local_dec(&__get_cpu_var(l)) | ||
| 63 | #define cpu_local_add(i, l) local_add((i), &__get_cpu_var(l)) | ||
| 64 | #define cpu_local_sub(i, l) local_sub((i), &__get_cpu_var(l)) | ||
| 65 | |||
| 66 | /* Non-atomic increments, ie. preemption disabled and won't be touched | ||
| 67 | * in interrupt, etc. Some archs can optimize this case well. | ||
| 68 | */ | ||
| 69 | #define __cpu_local_inc(l) __local_inc(&__get_cpu_var(l)) | ||
| 70 | #define __cpu_local_dec(l) __local_dec(&__get_cpu_var(l)) | ||
| 71 | #define __cpu_local_add(i, l) __local_add((i), &__get_cpu_var(l)) | ||
| 72 | #define __cpu_local_sub(i, l) __local_sub((i), &__get_cpu_var(l)) | ||
| 73 | |||
| 74 | #endif /* _ASM_GENERIC_LOCAL_H */ | 55 | #endif /* _ASM_GENERIC_LOCAL_H */ |
diff --git a/include/asm-generic/pci-dma-compat.h b/include/asm-generic/pci-dma-compat.h index 37b3706226e7..1437b7da09b2 100644 --- a/include/asm-generic/pci-dma-compat.h +++ b/include/asm-generic/pci-dma-compat.h | |||
| @@ -6,9 +6,6 @@ | |||
| 6 | 6 | ||
| 7 | #include <linux/dma-mapping.h> | 7 | #include <linux/dma-mapping.h> |
| 8 | 8 | ||
| 9 | /* note pci_set_dma_mask isn't here, since it's a public function | ||
| 10 | * exported from drivers/pci, use dma_supported instead */ | ||
| 11 | |||
| 12 | static inline int | 9 | static inline int |
| 13 | pci_dma_supported(struct pci_dev *hwdev, u64 mask) | 10 | pci_dma_supported(struct pci_dev *hwdev, u64 mask) |
| 14 | { | 11 | { |
| @@ -104,4 +101,16 @@ pci_dma_mapping_error(struct pci_dev *pdev, dma_addr_t dma_addr) | |||
| 104 | return dma_mapping_error(&pdev->dev, dma_addr); | 101 | return dma_mapping_error(&pdev->dev, dma_addr); |
| 105 | } | 102 | } |
| 106 | 103 | ||
| 104 | #ifdef CONFIG_PCI | ||
| 105 | static inline int pci_set_dma_mask(struct pci_dev *dev, u64 mask) | ||
| 106 | { | ||
| 107 | return dma_set_mask(&dev->dev, mask); | ||
| 108 | } | ||
| 109 | |||
| 110 | static inline int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask) | ||
| 111 | { | ||
| 112 | return dma_set_coherent_mask(&dev->dev, mask); | ||
| 113 | } | ||
| 114 | #endif | ||
| 115 | |||
| 107 | #endif | 116 | #endif |
diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h index 8087b90d4673..04f91c2d3f7b 100644 --- a/include/asm-generic/percpu.h +++ b/include/asm-generic/percpu.h | |||
| @@ -41,7 +41,11 @@ extern unsigned long __per_cpu_offset[NR_CPUS]; | |||
| 41 | * Only S390 provides its own means of moving the pointer. | 41 | * Only S390 provides its own means of moving the pointer. |
| 42 | */ | 42 | */ |
| 43 | #ifndef SHIFT_PERCPU_PTR | 43 | #ifndef SHIFT_PERCPU_PTR |
| 44 | #define SHIFT_PERCPU_PTR(__p, __offset) RELOC_HIDE((__p), (__offset)) | 44 | /* Weird cast keeps both GCC and sparse happy. */ |
| 45 | #define SHIFT_PERCPU_PTR(__p, __offset) ({ \ | ||
| 46 | __verify_pcpu_ptr((__p)); \ | ||
| 47 | RELOC_HIDE((typeof(*(__p)) __kernel __force *)(__p), (__offset)); \ | ||
| 48 | }) | ||
| 45 | #endif | 49 | #endif |
| 46 | 50 | ||
| 47 | /* | 51 | /* |
| @@ -50,11 +54,11 @@ extern unsigned long __per_cpu_offset[NR_CPUS]; | |||
| 50 | * offset. | 54 | * offset. |
| 51 | */ | 55 | */ |
| 52 | #define per_cpu(var, cpu) \ | 56 | #define per_cpu(var, cpu) \ |
| 53 | (*SHIFT_PERCPU_PTR(&per_cpu_var(var), per_cpu_offset(cpu))) | 57 | (*SHIFT_PERCPU_PTR(&(var), per_cpu_offset(cpu))) |
| 54 | #define __get_cpu_var(var) \ | 58 | #define __get_cpu_var(var) \ |
| 55 | (*SHIFT_PERCPU_PTR(&per_cpu_var(var), my_cpu_offset)) | 59 | (*SHIFT_PERCPU_PTR(&(var), my_cpu_offset)) |
| 56 | #define __raw_get_cpu_var(var) \ | 60 | #define __raw_get_cpu_var(var) \ |
| 57 | (*SHIFT_PERCPU_PTR(&per_cpu_var(var), __my_cpu_offset)) | 61 | (*SHIFT_PERCPU_PTR(&(var), __my_cpu_offset)) |
| 58 | 62 | ||
| 59 | #define this_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, my_cpu_offset) | 63 | #define this_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, my_cpu_offset) |
| 60 | #define __this_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset) | 64 | #define __this_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset) |
| @@ -66,9 +70,9 @@ extern void setup_per_cpu_areas(void); | |||
| 66 | 70 | ||
| 67 | #else /* ! SMP */ | 71 | #else /* ! SMP */ |
| 68 | 72 | ||
| 69 | #define per_cpu(var, cpu) (*((void)(cpu), &per_cpu_var(var))) | 73 | #define per_cpu(var, cpu) (*((void)(cpu), &(var))) |
| 70 | #define __get_cpu_var(var) per_cpu_var(var) | 74 | #define __get_cpu_var(var) (var) |
| 71 | #define __raw_get_cpu_var(var) per_cpu_var(var) | 75 | #define __raw_get_cpu_var(var) (var) |
| 72 | #define this_cpu_ptr(ptr) per_cpu_ptr(ptr, 0) | 76 | #define this_cpu_ptr(ptr) per_cpu_ptr(ptr, 0) |
| 73 | #define __this_cpu_ptr(ptr) this_cpu_ptr(ptr) | 77 | #define __this_cpu_ptr(ptr) this_cpu_ptr(ptr) |
| 74 | 78 | ||
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index ffac157fb5b2..de2f82efb15f 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
| @@ -801,6 +801,7 @@ struct drm_driver { | |||
| 801 | */ | 801 | */ |
| 802 | int (*gem_init_object) (struct drm_gem_object *obj); | 802 | int (*gem_init_object) (struct drm_gem_object *obj); |
| 803 | void (*gem_free_object) (struct drm_gem_object *obj); | 803 | void (*gem_free_object) (struct drm_gem_object *obj); |
| 804 | void (*gem_free_object_unlocked) (struct drm_gem_object *obj); | ||
| 804 | 805 | ||
| 805 | /* vga arb irq handler */ | 806 | /* vga arb irq handler */ |
| 806 | void (*vgaarb_irq)(struct drm_device *dev, bool state); | 807 | void (*vgaarb_irq)(struct drm_device *dev, bool state); |
| @@ -1427,6 +1428,7 @@ extern void drm_sysfs_connector_remove(struct drm_connector *connector); | |||
| 1427 | int drm_gem_init(struct drm_device *dev); | 1428 | int drm_gem_init(struct drm_device *dev); |
| 1428 | void drm_gem_destroy(struct drm_device *dev); | 1429 | void drm_gem_destroy(struct drm_device *dev); |
| 1429 | void drm_gem_object_free(struct kref *kref); | 1430 | void drm_gem_object_free(struct kref *kref); |
| 1431 | void drm_gem_object_free_unlocked(struct kref *kref); | ||
| 1430 | struct drm_gem_object *drm_gem_object_alloc(struct drm_device *dev, | 1432 | struct drm_gem_object *drm_gem_object_alloc(struct drm_device *dev, |
| 1431 | size_t size); | 1433 | size_t size); |
| 1432 | void drm_gem_object_handle_free(struct kref *kref); | 1434 | void drm_gem_object_handle_free(struct kref *kref); |
| @@ -1443,10 +1445,15 @@ drm_gem_object_reference(struct drm_gem_object *obj) | |||
| 1443 | static inline void | 1445 | static inline void |
| 1444 | drm_gem_object_unreference(struct drm_gem_object *obj) | 1446 | drm_gem_object_unreference(struct drm_gem_object *obj) |
| 1445 | { | 1447 | { |
| 1446 | if (obj == NULL) | 1448 | if (obj != NULL) |
| 1447 | return; | 1449 | kref_put(&obj->refcount, drm_gem_object_free); |
| 1450 | } | ||
| 1448 | 1451 | ||
| 1449 | kref_put(&obj->refcount, drm_gem_object_free); | 1452 | static inline void |
| 1453 | drm_gem_object_unreference_unlocked(struct drm_gem_object *obj) | ||
| 1454 | { | ||
| 1455 | if (obj != NULL) | ||
| 1456 | kref_put(&obj->refcount, drm_gem_object_free_unlocked); | ||
| 1450 | } | 1457 | } |
| 1451 | 1458 | ||
| 1452 | int drm_gem_handle_create(struct drm_file *file_priv, | 1459 | int drm_gem_handle_create(struct drm_file *file_priv, |
| @@ -1475,6 +1482,21 @@ drm_gem_object_handle_unreference(struct drm_gem_object *obj) | |||
| 1475 | drm_gem_object_unreference(obj); | 1482 | drm_gem_object_unreference(obj); |
| 1476 | } | 1483 | } |
| 1477 | 1484 | ||
| 1485 | static inline void | ||
| 1486 | drm_gem_object_handle_unreference_unlocked(struct drm_gem_object *obj) | ||
| 1487 | { | ||
| 1488 | if (obj == NULL) | ||
| 1489 | return; | ||
| 1490 | |||
| 1491 | /* | ||
| 1492 | * Must bump handle count first as this may be the last | ||
| 1493 | * ref, in which case the object would disappear before we | ||
| 1494 | * checked for a name | ||
| 1495 | */ | ||
| 1496 | kref_put(&obj->handlecount, drm_gem_object_handle_free); | ||
| 1497 | drm_gem_object_unreference_unlocked(obj); | ||
| 1498 | } | ||
| 1499 | |||
| 1478 | struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev, | 1500 | struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev, |
| 1479 | struct drm_file *filp, | 1501 | struct drm_file *filp, |
| 1480 | u32 handle); | 1502 | u32 handle); |
| @@ -1523,39 +1545,7 @@ static __inline__ void drm_core_dropmap(struct drm_local_map *map) | |||
| 1523 | { | 1545 | { |
| 1524 | } | 1546 | } |
| 1525 | 1547 | ||
| 1526 | 1548 | #include "drm_mem_util.h" | |
| 1527 | static __inline__ void *drm_calloc_large(size_t nmemb, size_t size) | ||
| 1528 | { | ||
| 1529 | if (size != 0 && nmemb > ULONG_MAX / size) | ||
| 1530 | return NULL; | ||
| 1531 | |||
| 1532 | if (size * nmemb <= PAGE_SIZE) | ||
| 1533 | return kcalloc(nmemb, size, GFP_KERNEL); | ||
| 1534 | |||
| 1535 | return __vmalloc(size * nmemb, | ||
| 1536 | GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO, PAGE_KERNEL); | ||
| 1537 | } | ||
| 1538 | |||
| 1539 | /* Modeled after cairo's malloc_ab, it's like calloc but without the zeroing. */ | ||
| 1540 | static __inline__ void *drm_malloc_ab(size_t nmemb, size_t size) | ||
| 1541 | { | ||
| 1542 | if (size != 0 && nmemb > ULONG_MAX / size) | ||
| 1543 | return NULL; | ||
| 1544 | |||
| 1545 | if (size * nmemb <= PAGE_SIZE) | ||
| 1546 | return kmalloc(nmemb * size, GFP_KERNEL); | ||
| 1547 | |||
| 1548 | return __vmalloc(size * nmemb, | ||
| 1549 | GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL); | ||
| 1550 | } | ||
| 1551 | |||
| 1552 | static __inline void drm_free_large(void *ptr) | ||
| 1553 | { | ||
| 1554 | if (!is_vmalloc_addr(ptr)) | ||
| 1555 | return kfree(ptr); | ||
| 1556 | |||
| 1557 | vfree(ptr); | ||
| 1558 | } | ||
| 1559 | /*@}*/ | 1549 | /*@}*/ |
| 1560 | 1550 | ||
| 1561 | #endif /* __KERNEL__ */ | 1551 | #endif /* __KERNEL__ */ |
diff --git a/include/drm/drm_buffer.h b/include/drm/drm_buffer.h new file mode 100644 index 000000000000..322dbff3f861 --- /dev/null +++ b/include/drm/drm_buffer.h | |||
| @@ -0,0 +1,148 @@ | |||
| 1 | /************************************************************************** | ||
| 2 | * | ||
| 3 | * Copyright 2010 Pauli Nieminen. | ||
| 4 | * All Rights Reserved. | ||
| 5 | * | ||
| 6 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
| 7 | * copy of this software and associated documentation files (the | ||
| 8 | * "Software"), to deal in the Software without restriction, including | ||
| 9 | * without limitation the rights to use, copy, modify, merge, publish, | ||
| 10 | * distribute, sub license, and/or sell copies of the Software, and to | ||
| 11 | * permit persons to whom the Software is furnished to do so, subject to | ||
| 12 | * the following conditions: | ||
| 13 | * | ||
| 14 | * The above copyright notice and this permission notice (including the | ||
| 15 | * next paragraph) shall be included in all copies or substantial portions | ||
| 16 | * of the Software. | ||
| 17 | * | ||
| 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL | ||
| 21 | * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, | ||
| 22 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | ||
| 23 | * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE | ||
| 24 | * USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 25 | * | ||
| 26 | * | ||
| 27 | **************************************************************************/ | ||
| 28 | /* | ||
| 29 | * Multipart buffer for coping data which is larger than the page size. | ||
| 30 | * | ||
| 31 | * Authors: | ||
| 32 | * Pauli Nieminen <suokkos-at-gmail-dot-com> | ||
| 33 | */ | ||
| 34 | |||
| 35 | #ifndef _DRM_BUFFER_H_ | ||
| 36 | #define _DRM_BUFFER_H_ | ||
| 37 | |||
| 38 | #include "drmP.h" | ||
| 39 | |||
| 40 | struct drm_buffer { | ||
| 41 | int iterator; | ||
| 42 | int size; | ||
| 43 | char *data[]; | ||
| 44 | }; | ||
| 45 | |||
| 46 | |||
| 47 | /** | ||
| 48 | * Return the index of page that buffer is currently pointing at. | ||
| 49 | */ | ||
| 50 | static inline int drm_buffer_page(struct drm_buffer *buf) | ||
| 51 | { | ||
| 52 | return buf->iterator / PAGE_SIZE; | ||
| 53 | } | ||
| 54 | /** | ||
| 55 | * Return the index of the current byte in the page | ||
| 56 | */ | ||
| 57 | static inline int drm_buffer_index(struct drm_buffer *buf) | ||
| 58 | { | ||
| 59 | return buf->iterator & (PAGE_SIZE - 1); | ||
| 60 | } | ||
| 61 | /** | ||
| 62 | * Return number of bytes that is left to process | ||
| 63 | */ | ||
| 64 | static inline int drm_buffer_unprocessed(struct drm_buffer *buf) | ||
| 65 | { | ||
| 66 | return buf->size - buf->iterator; | ||
| 67 | } | ||
| 68 | |||
| 69 | /** | ||
| 70 | * Advance the buffer iterator number of bytes that is given. | ||
| 71 | */ | ||
| 72 | static inline void drm_buffer_advance(struct drm_buffer *buf, int bytes) | ||
| 73 | { | ||
| 74 | buf->iterator += bytes; | ||
| 75 | } | ||
| 76 | |||
| 77 | /** | ||
| 78 | * Allocate the drm buffer object. | ||
| 79 | * | ||
| 80 | * buf: A pointer to a pointer where the object is stored. | ||
| 81 | * size: The number of bytes to allocate. | ||
| 82 | */ | ||
| 83 | extern int drm_buffer_alloc(struct drm_buffer **buf, int size); | ||
| 84 | |||
| 85 | /** | ||
| 86 | * Copy the user data to the begin of the buffer and reset the processing | ||
| 87 | * iterator. | ||
| 88 | * | ||
| 89 | * user_data: A pointer the data that is copied to the buffer. | ||
| 90 | * size: The Number of bytes to copy. | ||
| 91 | */ | ||
| 92 | extern int drm_buffer_copy_from_user(struct drm_buffer *buf, | ||
| 93 | void __user *user_data, int size); | ||
| 94 | |||
| 95 | /** | ||
| 96 | * Free the drm buffer object | ||
| 97 | */ | ||
| 98 | extern void drm_buffer_free(struct drm_buffer *buf); | ||
| 99 | |||
| 100 | /** | ||
| 101 | * Read an object from buffer that may be split to multiple parts. If object | ||
| 102 | * is not split function just returns the pointer to object in buffer. But in | ||
| 103 | * case of split object data is copied to given stack object that is suplied | ||
| 104 | * by caller. | ||
| 105 | * | ||
| 106 | * The processing location of the buffer is also advanced to the next byte | ||
| 107 | * after the object. | ||
| 108 | * | ||
| 109 | * objsize: The size of the objet in bytes. | ||
| 110 | * stack_obj: A pointer to a memory location where object can be copied. | ||
| 111 | */ | ||
| 112 | extern void *drm_buffer_read_object(struct drm_buffer *buf, | ||
| 113 | int objsize, void *stack_obj); | ||
| 114 | |||
| 115 | /** | ||
| 116 | * Returns the pointer to the dword which is offset number of elements from the | ||
| 117 | * current processing location. | ||
| 118 | * | ||
| 119 | * Caller must make sure that dword is not split in the buffer. This | ||
| 120 | * requirement is easily met if all the sizes of objects in buffer are | ||
| 121 | * multiples of dword and PAGE_SIZE is multiple dword. | ||
| 122 | * | ||
| 123 | * Call to this function doesn't change the processing location. | ||
| 124 | * | ||
| 125 | * offset: The index of the dword relative to the internat iterator. | ||
| 126 | */ | ||
| 127 | static inline void *drm_buffer_pointer_to_dword(struct drm_buffer *buffer, | ||
| 128 | int offset) | ||
| 129 | { | ||
| 130 | int iter = buffer->iterator + offset * 4; | ||
| 131 | return &buffer->data[iter / PAGE_SIZE][iter & (PAGE_SIZE - 1)]; | ||
| 132 | } | ||
| 133 | /** | ||
| 134 | * Returns the pointer to the dword which is offset number of elements from | ||
| 135 | * the current processing location. | ||
| 136 | * | ||
| 137 | * Call to this function doesn't change the processing location. | ||
| 138 | * | ||
| 139 | * offset: The index of the byte relative to the internat iterator. | ||
| 140 | */ | ||
| 141 | static inline void *drm_buffer_pointer_to_byte(struct drm_buffer *buffer, | ||
| 142 | int offset) | ||
| 143 | { | ||
| 144 | int iter = buffer->iterator + offset; | ||
| 145 | return &buffer->data[iter / PAGE_SIZE][iter & (PAGE_SIZE - 1)]; | ||
| 146 | } | ||
| 147 | |||
| 148 | #endif | ||
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index fdf43abc36db..1347524a8e30 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
| @@ -801,4 +801,6 @@ extern struct drm_display_mode *drm_gtf_mode(struct drm_device *dev, | |||
| 801 | bool interlaced, int margins); | 801 | bool interlaced, int margins); |
| 802 | extern int drm_add_modes_noedid(struct drm_connector *connector, | 802 | extern int drm_add_modes_noedid(struct drm_connector *connector, |
| 803 | int hdisplay, int vdisplay); | 803 | int hdisplay, int vdisplay); |
| 804 | |||
| 805 | extern bool drm_edid_is_valid(struct edid *edid); | ||
| 804 | #endif /* __DRM_CRTC_H__ */ | 806 | #endif /* __DRM_CRTC_H__ */ |
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h index d33c3e038606..b4209898f115 100644 --- a/include/drm/drm_edid.h +++ b/include/drm/drm_edid.h | |||
| @@ -201,4 +201,7 @@ struct edid { | |||
| 201 | 201 | ||
| 202 | #define EDID_PRODUCT_ID(e) ((e)->prod_code[0] | ((e)->prod_code[1] << 8)) | 202 | #define EDID_PRODUCT_ID(e) ((e)->prod_code[0] | ((e)->prod_code[1] << 8)) |
| 203 | 203 | ||
| 204 | /* define the number of Extension EDID block */ | ||
| 205 | #define DRM_MAX_EDID_EXT_NUM 4 | ||
| 206 | |||
| 204 | #endif /* __DRM_EDID_H__ */ | 207 | #endif /* __DRM_EDID_H__ */ |
diff --git a/include/drm/drm_mem_util.h b/include/drm/drm_mem_util.h new file mode 100644 index 000000000000..6bd325fedc87 --- /dev/null +++ b/include/drm/drm_mem_util.h | |||
| @@ -0,0 +1,65 @@ | |||
| 1 | /* | ||
| 2 | * Copyright © 2008 Intel Corporation | ||
| 3 | * | ||
| 4 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
| 5 | * copy of this software and associated documentation files (the "Software"), | ||
| 6 | * to deal in the Software without restriction, including without limitation | ||
| 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
| 8 | * and/or sell copies of the Software, and to permit persons to whom the | ||
| 9 | * Software is furnished to do so, subject to the following conditions: | ||
| 10 | * | ||
| 11 | * The above copyright notice and this permission notice (including the next | ||
| 12 | * paragraph) shall be included in all copies or substantial portions of the | ||
| 13 | * Software. | ||
| 14 | * | ||
| 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
| 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | ||
| 21 | * IN THE SOFTWARE. | ||
| 22 | * | ||
| 23 | * Authors: | ||
| 24 | * Jesse Barnes <jbarnes@virtuousgeek.org> | ||
| 25 | * | ||
| 26 | */ | ||
| 27 | #ifndef _DRM_MEM_UTIL_H_ | ||
| 28 | #define _DRM_MEM_UTIL_H_ | ||
| 29 | |||
| 30 | #include <linux/vmalloc.h> | ||
| 31 | |||
| 32 | static __inline__ void *drm_calloc_large(size_t nmemb, size_t size) | ||
| 33 | { | ||
| 34 | if (size != 0 && nmemb > ULONG_MAX / size) | ||
| 35 | return NULL; | ||
| 36 | |||
| 37 | if (size * nmemb <= PAGE_SIZE) | ||
| 38 | return kcalloc(nmemb, size, GFP_KERNEL); | ||
| 39 | |||
| 40 | return __vmalloc(size * nmemb, | ||
| 41 | GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO, PAGE_KERNEL); | ||
| 42 | } | ||
| 43 | |||
| 44 | /* Modeled after cairo's malloc_ab, it's like calloc but without the zeroing. */ | ||
| 45 | static __inline__ void *drm_malloc_ab(size_t nmemb, size_t size) | ||
| 46 | { | ||
| 47 | if (size != 0 && nmemb > ULONG_MAX / size) | ||
| 48 | return NULL; | ||
| 49 | |||
| 50 | if (size * nmemb <= PAGE_SIZE) | ||
| 51 | return kmalloc(nmemb * size, GFP_KERNEL); | ||
| 52 | |||
| 53 | return __vmalloc(size * nmemb, | ||
| 54 | GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL); | ||
| 55 | } | ||
| 56 | |||
| 57 | static __inline void drm_free_large(void *ptr) | ||
| 58 | { | ||
| 59 | if (!is_vmalloc_addr(ptr)) | ||
| 60 | return kfree(ptr); | ||
| 61 | |||
| 62 | vfree(ptr); | ||
| 63 | } | ||
| 64 | |||
| 65 | #endif | ||
diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h index e6f3b120f51a..04a6ebc27b96 100644 --- a/include/drm/drm_pciids.h +++ b/include/drm/drm_pciids.h | |||
| @@ -141,6 +141,41 @@ | |||
| 141 | {0x1002, 0x5e4c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV410|RADEON_NEW_MEMMAP}, \ | 141 | {0x1002, 0x5e4c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV410|RADEON_NEW_MEMMAP}, \ |
| 142 | {0x1002, 0x5e4d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV410|RADEON_NEW_MEMMAP}, \ | 142 | {0x1002, 0x5e4d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV410|RADEON_NEW_MEMMAP}, \ |
| 143 | {0x1002, 0x5e4f, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV410|RADEON_NEW_MEMMAP}, \ | 143 | {0x1002, 0x5e4f, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV410|RADEON_NEW_MEMMAP}, \ |
| 144 | {0x1002, 0x6880, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
| 145 | {0x1002, 0x6888, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \ | ||
| 146 | {0x1002, 0x6889, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \ | ||
| 147 | {0x1002, 0x688A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \ | ||
| 148 | {0x1002, 0x6898, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \ | ||
| 149 | {0x1002, 0x6899, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \ | ||
| 150 | {0x1002, 0x689c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_HEMLOCK|RADEON_NEW_MEMMAP}, \ | ||
| 151 | {0x1002, 0x689d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_HEMLOCK|RADEON_NEW_MEMMAP}, \ | ||
| 152 | {0x1002, 0x689e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \ | ||
| 153 | {0x1002, 0x68a0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_JUNIPER|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
| 154 | {0x1002, 0x68a1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_JUNIPER|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
| 155 | {0x1002, 0x68a8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_JUNIPER|RADEON_NEW_MEMMAP}, \ | ||
| 156 | {0x1002, 0x68a9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_JUNIPER|RADEON_NEW_MEMMAP}, \ | ||
| 157 | {0x1002, 0x68b0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_JUNIPER|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
| 158 | {0x1002, 0x68b8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_JUNIPER|RADEON_NEW_MEMMAP}, \ | ||
| 159 | {0x1002, 0x68b9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_JUNIPER|RADEON_NEW_MEMMAP}, \ | ||
| 160 | {0x1002, 0x68be, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_JUNIPER|RADEON_NEW_MEMMAP}, \ | ||
| 161 | {0x1002, 0x68c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
| 162 | {0x1002, 0x68c1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
| 163 | {0x1002, 0x68c8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_NEW_MEMMAP}, \ | ||
| 164 | {0x1002, 0x68c9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_NEW_MEMMAP}, \ | ||
| 165 | {0x1002, 0x68d8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_NEW_MEMMAP}, \ | ||
| 166 | {0x1002, 0x68d9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_NEW_MEMMAP}, \ | ||
| 167 | {0x1002, 0x68da, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_NEW_MEMMAP}, \ | ||
| 168 | {0x1002, 0x68de, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_NEW_MEMMAP}, \ | ||
| 169 | {0x1002, 0x68e0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
| 170 | {0x1002, 0x68e1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
| 171 | {0x1002, 0x68e4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
| 172 | {0x1002, 0x68e5, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
| 173 | {0x1002, 0x68e8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_NEW_MEMMAP}, \ | ||
| 174 | {0x1002, 0x68e9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_NEW_MEMMAP}, \ | ||
| 175 | {0x1002, 0x68f1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_NEW_MEMMAP}, \ | ||
| 176 | {0x1002, 0x68f8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_NEW_MEMMAP}, \ | ||
| 177 | {0x1002, 0x68f9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_NEW_MEMMAP}, \ | ||
| 178 | {0x1002, 0x68fe, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_NEW_MEMMAP}, \ | ||
| 144 | {0x1002, 0x7100, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R520|RADEON_NEW_MEMMAP}, \ | 179 | {0x1002, 0x7100, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R520|RADEON_NEW_MEMMAP}, \ |
| 145 | {0x1002, 0x7101, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R520|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 180 | {0x1002, 0x7101, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R520|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
| 146 | {0x1002, 0x7102, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R520|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 181 | {0x1002, 0x7102, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R520|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
| @@ -375,6 +410,7 @@ | |||
| 375 | {0x1002, 0x9712, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 410 | {0x1002, 0x9712, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
| 376 | {0x1002, 0x9713, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 411 | {0x1002, 0x9713, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
| 377 | {0x1002, 0x9714, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 412 | {0x1002, 0x9714, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
| 413 | {0x1002, 0x9715, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
| 378 | {0, 0, 0} | 414 | {0, 0, 0} |
| 379 | 415 | ||
| 380 | #define r128_PCI_IDS \ | 416 | #define r128_PCI_IDS \ |
| @@ -558,4 +594,5 @@ | |||
| 558 | {0x8086, 0x35e8, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ | 594 | {0x8086, 0x35e8, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ |
| 559 | {0x8086, 0x0042, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ | 595 | {0x8086, 0x0042, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ |
| 560 | {0x8086, 0x0046, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ | 596 | {0x8086, 0x0046, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ |
| 597 | {0x8086, 0x0102, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ | ||
| 561 | {0, 0, 0} | 598 | {0, 0, 0} |
diff --git a/include/drm/nouveau_drm.h b/include/drm/nouveau_drm.h index f745948b61e4..a6a9f4af5ebd 100644 --- a/include/drm/nouveau_drm.h +++ b/include/drm/nouveau_drm.h | |||
| @@ -25,13 +25,14 @@ | |||
| 25 | #ifndef __NOUVEAU_DRM_H__ | 25 | #ifndef __NOUVEAU_DRM_H__ |
| 26 | #define __NOUVEAU_DRM_H__ | 26 | #define __NOUVEAU_DRM_H__ |
| 27 | 27 | ||
| 28 | #define NOUVEAU_DRM_HEADER_PATCHLEVEL 15 | 28 | #define NOUVEAU_DRM_HEADER_PATCHLEVEL 16 |
| 29 | 29 | ||
| 30 | struct drm_nouveau_channel_alloc { | 30 | struct drm_nouveau_channel_alloc { |
| 31 | uint32_t fb_ctxdma_handle; | 31 | uint32_t fb_ctxdma_handle; |
| 32 | uint32_t tt_ctxdma_handle; | 32 | uint32_t tt_ctxdma_handle; |
| 33 | 33 | ||
| 34 | int channel; | 34 | int channel; |
| 35 | uint32_t pushbuf_domains; | ||
| 35 | 36 | ||
| 36 | /* Notifier memory */ | 37 | /* Notifier memory */ |
| 37 | uint32_t notifier_handle; | 38 | uint32_t notifier_handle; |
| @@ -109,68 +110,58 @@ struct drm_nouveau_gem_new { | |||
| 109 | uint32_t align; | 110 | uint32_t align; |
| 110 | }; | 111 | }; |
| 111 | 112 | ||
| 113 | #define NOUVEAU_GEM_MAX_BUFFERS 1024 | ||
| 114 | struct drm_nouveau_gem_pushbuf_bo_presumed { | ||
| 115 | uint32_t valid; | ||
| 116 | uint32_t domain; | ||
| 117 | uint64_t offset; | ||
| 118 | }; | ||
| 119 | |||
| 112 | struct drm_nouveau_gem_pushbuf_bo { | 120 | struct drm_nouveau_gem_pushbuf_bo { |
| 113 | uint64_t user_priv; | 121 | uint64_t user_priv; |
| 114 | uint32_t handle; | 122 | uint32_t handle; |
| 115 | uint32_t read_domains; | 123 | uint32_t read_domains; |
| 116 | uint32_t write_domains; | 124 | uint32_t write_domains; |
| 117 | uint32_t valid_domains; | 125 | uint32_t valid_domains; |
| 118 | uint32_t presumed_ok; | 126 | struct drm_nouveau_gem_pushbuf_bo_presumed presumed; |
| 119 | uint32_t presumed_domain; | ||
| 120 | uint64_t presumed_offset; | ||
| 121 | }; | 127 | }; |
| 122 | 128 | ||
| 123 | #define NOUVEAU_GEM_RELOC_LOW (1 << 0) | 129 | #define NOUVEAU_GEM_RELOC_LOW (1 << 0) |
| 124 | #define NOUVEAU_GEM_RELOC_HIGH (1 << 1) | 130 | #define NOUVEAU_GEM_RELOC_HIGH (1 << 1) |
| 125 | #define NOUVEAU_GEM_RELOC_OR (1 << 2) | 131 | #define NOUVEAU_GEM_RELOC_OR (1 << 2) |
| 132 | #define NOUVEAU_GEM_MAX_RELOCS 1024 | ||
| 126 | struct drm_nouveau_gem_pushbuf_reloc { | 133 | struct drm_nouveau_gem_pushbuf_reloc { |
| 134 | uint32_t reloc_bo_index; | ||
| 135 | uint32_t reloc_bo_offset; | ||
| 127 | uint32_t bo_index; | 136 | uint32_t bo_index; |
| 128 | uint32_t reloc_index; | ||
| 129 | uint32_t flags; | 137 | uint32_t flags; |
| 130 | uint32_t data; | 138 | uint32_t data; |
| 131 | uint32_t vor; | 139 | uint32_t vor; |
| 132 | uint32_t tor; | 140 | uint32_t tor; |
| 133 | }; | 141 | }; |
| 134 | 142 | ||
| 135 | #define NOUVEAU_GEM_MAX_BUFFERS 1024 | 143 | #define NOUVEAU_GEM_MAX_PUSH 512 |
| 136 | #define NOUVEAU_GEM_MAX_RELOCS 1024 | 144 | struct drm_nouveau_gem_pushbuf_push { |
| 145 | uint32_t bo_index; | ||
| 146 | uint32_t pad; | ||
| 147 | uint64_t offset; | ||
| 148 | uint64_t length; | ||
| 149 | }; | ||
| 137 | 150 | ||
| 138 | struct drm_nouveau_gem_pushbuf { | 151 | struct drm_nouveau_gem_pushbuf { |
| 139 | uint32_t channel; | 152 | uint32_t channel; |
| 140 | uint32_t nr_dwords; | ||
| 141 | uint32_t nr_buffers; | 153 | uint32_t nr_buffers; |
| 142 | uint32_t nr_relocs; | ||
| 143 | uint64_t dwords; | ||
| 144 | uint64_t buffers; | 154 | uint64_t buffers; |
| 145 | uint64_t relocs; | ||
| 146 | }; | ||
| 147 | |||
| 148 | struct drm_nouveau_gem_pushbuf_call { | ||
| 149 | uint32_t channel; | ||
| 150 | uint32_t handle; | ||
| 151 | uint32_t offset; | ||
| 152 | uint32_t nr_buffers; | ||
| 153 | uint32_t nr_relocs; | 155 | uint32_t nr_relocs; |
| 154 | uint32_t nr_dwords; | 156 | uint32_t nr_push; |
| 155 | uint64_t buffers; | ||
| 156 | uint64_t relocs; | 157 | uint64_t relocs; |
| 158 | uint64_t push; | ||
| 157 | uint32_t suffix0; | 159 | uint32_t suffix0; |
| 158 | uint32_t suffix1; | 160 | uint32_t suffix1; |
| 159 | /* below only accessed for CALL2 */ | ||
| 160 | uint64_t vram_available; | 161 | uint64_t vram_available; |
| 161 | uint64_t gart_available; | 162 | uint64_t gart_available; |
| 162 | }; | 163 | }; |
| 163 | 164 | ||
| 164 | struct drm_nouveau_gem_pin { | ||
| 165 | uint32_t handle; | ||
| 166 | uint32_t domain; | ||
| 167 | uint64_t offset; | ||
| 168 | }; | ||
| 169 | |||
| 170 | struct drm_nouveau_gem_unpin { | ||
| 171 | uint32_t handle; | ||
| 172 | }; | ||
| 173 | |||
| 174 | #define NOUVEAU_GEM_CPU_PREP_NOWAIT 0x00000001 | 165 | #define NOUVEAU_GEM_CPU_PREP_NOWAIT 0x00000001 |
| 175 | #define NOUVEAU_GEM_CPU_PREP_NOBLOCK 0x00000002 | 166 | #define NOUVEAU_GEM_CPU_PREP_NOBLOCK 0x00000002 |
| 176 | #define NOUVEAU_GEM_CPU_PREP_WRITE 0x00000004 | 167 | #define NOUVEAU_GEM_CPU_PREP_WRITE 0x00000004 |
| @@ -183,14 +174,6 @@ struct drm_nouveau_gem_cpu_fini { | |||
| 183 | uint32_t handle; | 174 | uint32_t handle; |
| 184 | }; | 175 | }; |
| 185 | 176 | ||
| 186 | struct drm_nouveau_gem_tile { | ||
| 187 | uint32_t handle; | ||
| 188 | uint32_t offset; | ||
| 189 | uint32_t size; | ||
| 190 | uint32_t tile_mode; | ||
| 191 | uint32_t tile_flags; | ||
| 192 | }; | ||
| 193 | |||
| 194 | enum nouveau_bus_type { | 177 | enum nouveau_bus_type { |
| 195 | NV_AGP = 0, | 178 | NV_AGP = 0, |
| 196 | NV_PCI = 1, | 179 | NV_PCI = 1, |
| @@ -200,22 +183,17 @@ enum nouveau_bus_type { | |||
| 200 | struct drm_nouveau_sarea { | 183 | struct drm_nouveau_sarea { |
| 201 | }; | 184 | }; |
| 202 | 185 | ||
| 203 | #define DRM_NOUVEAU_CARD_INIT 0x00 | 186 | #define DRM_NOUVEAU_GETPARAM 0x00 |
| 204 | #define DRM_NOUVEAU_GETPARAM 0x01 | 187 | #define DRM_NOUVEAU_SETPARAM 0x01 |
| 205 | #define DRM_NOUVEAU_SETPARAM 0x02 | 188 | #define DRM_NOUVEAU_CHANNEL_ALLOC 0x02 |
| 206 | #define DRM_NOUVEAU_CHANNEL_ALLOC 0x03 | 189 | #define DRM_NOUVEAU_CHANNEL_FREE 0x03 |
| 207 | #define DRM_NOUVEAU_CHANNEL_FREE 0x04 | 190 | #define DRM_NOUVEAU_GROBJ_ALLOC 0x04 |
| 208 | #define DRM_NOUVEAU_GROBJ_ALLOC 0x05 | 191 | #define DRM_NOUVEAU_NOTIFIEROBJ_ALLOC 0x05 |
| 209 | #define DRM_NOUVEAU_NOTIFIEROBJ_ALLOC 0x06 | 192 | #define DRM_NOUVEAU_GPUOBJ_FREE 0x06 |
| 210 | #define DRM_NOUVEAU_GPUOBJ_FREE 0x07 | ||
| 211 | #define DRM_NOUVEAU_GEM_NEW 0x40 | 193 | #define DRM_NOUVEAU_GEM_NEW 0x40 |
| 212 | #define DRM_NOUVEAU_GEM_PUSHBUF 0x41 | 194 | #define DRM_NOUVEAU_GEM_PUSHBUF 0x41 |
| 213 | #define DRM_NOUVEAU_GEM_PUSHBUF_CALL 0x42 | 195 | #define DRM_NOUVEAU_GEM_CPU_PREP 0x42 |
| 214 | #define DRM_NOUVEAU_GEM_PIN 0x43 /* !KMS only */ | 196 | #define DRM_NOUVEAU_GEM_CPU_FINI 0x43 |
| 215 | #define DRM_NOUVEAU_GEM_UNPIN 0x44 /* !KMS only */ | 197 | #define DRM_NOUVEAU_GEM_INFO 0x44 |
| 216 | #define DRM_NOUVEAU_GEM_CPU_PREP 0x45 | ||
| 217 | #define DRM_NOUVEAU_GEM_CPU_FINI 0x46 | ||
| 218 | #define DRM_NOUVEAU_GEM_INFO 0x47 | ||
| 219 | #define DRM_NOUVEAU_GEM_PUSHBUF_CALL2 0x48 | ||
| 220 | 198 | ||
| 221 | #endif /* __NOUVEAU_DRM_H__ */ | 199 | #endif /* __NOUVEAU_DRM_H__ */ |
diff --git a/include/drm/radeon_drm.h b/include/drm/radeon_drm.h index 39537f3cf98a..81e614bf2dc3 100644 --- a/include/drm/radeon_drm.h +++ b/include/drm/radeon_drm.h | |||
| @@ -808,6 +808,7 @@ struct drm_radeon_gem_create { | |||
| 808 | #define RADEON_TILING_SWAP_32BIT 0x8 | 808 | #define RADEON_TILING_SWAP_32BIT 0x8 |
| 809 | #define RADEON_TILING_SURFACE 0x10 /* this object requires a surface | 809 | #define RADEON_TILING_SURFACE 0x10 /* this object requires a surface |
| 810 | * when mapped - i.e. front buffer */ | 810 | * when mapped - i.e. front buffer */ |
| 811 | #define RADEON_TILING_MICRO_SQUARE 0x20 | ||
| 811 | 812 | ||
| 812 | struct drm_radeon_gem_set_tiling { | 813 | struct drm_radeon_gem_set_tiling { |
| 813 | uint32_t handle; | 814 | uint32_t handle; |
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h index 4c4e0f8375b3..e929c27ede22 100644 --- a/include/drm/ttm/ttm_bo_driver.h +++ b/include/drm/ttm/ttm_bo_driver.h | |||
| @@ -115,7 +115,6 @@ struct ttm_backend { | |||
| 115 | struct ttm_backend_func *func; | 115 | struct ttm_backend_func *func; |
| 116 | }; | 116 | }; |
| 117 | 117 | ||
| 118 | #define TTM_PAGE_FLAG_VMALLOC (1 << 0) | ||
| 119 | #define TTM_PAGE_FLAG_USER (1 << 1) | 118 | #define TTM_PAGE_FLAG_USER (1 << 1) |
| 120 | #define TTM_PAGE_FLAG_USER_DIRTY (1 << 2) | 119 | #define TTM_PAGE_FLAG_USER_DIRTY (1 << 2) |
| 121 | #define TTM_PAGE_FLAG_WRITE (1 << 3) | 120 | #define TTM_PAGE_FLAG_WRITE (1 << 3) |
| @@ -908,7 +907,7 @@ extern int ttm_bo_move_accel_cleanup(struct ttm_buffer_object *bo, | |||
| 908 | * Utility function that returns the pgprot_t that should be used for | 907 | * Utility function that returns the pgprot_t that should be used for |
| 909 | * setting up a PTE with the caching model indicated by @c_state. | 908 | * setting up a PTE with the caching model indicated by @c_state. |
| 910 | */ | 909 | */ |
| 911 | extern pgprot_t ttm_io_prot(enum ttm_caching_state c_state, pgprot_t tmp); | 910 | extern pgprot_t ttm_io_prot(uint32_t caching_flags, pgprot_t tmp); |
| 912 | 911 | ||
| 913 | #if (defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) && defined(MODULE))) | 912 | #if (defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) && defined(MODULE))) |
| 914 | #define TTM_HAS_AGP | 913 | #define TTM_HAS_AGP |
diff --git a/include/linux/acct.h b/include/linux/acct.h index 882dc7248766..3e4737fa6cce 100644 --- a/include/linux/acct.h +++ b/include/linux/acct.h | |||
| @@ -121,16 +121,15 @@ struct vfsmount; | |||
| 121 | struct super_block; | 121 | struct super_block; |
| 122 | struct pacct_struct; | 122 | struct pacct_struct; |
| 123 | struct pid_namespace; | 123 | struct pid_namespace; |
| 124 | extern int acct_parm[]; /* for sysctl */ | ||
| 124 | extern void acct_auto_close_mnt(struct vfsmount *m); | 125 | extern void acct_auto_close_mnt(struct vfsmount *m); |
| 125 | extern void acct_auto_close(struct super_block *sb); | 126 | extern void acct_auto_close(struct super_block *sb); |
| 126 | extern void acct_init_pacct(struct pacct_struct *pacct); | ||
| 127 | extern void acct_collect(long exitcode, int group_dead); | 127 | extern void acct_collect(long exitcode, int group_dead); |
| 128 | extern void acct_process(void); | 128 | extern void acct_process(void); |
| 129 | extern void acct_exit_ns(struct pid_namespace *); | 129 | extern void acct_exit_ns(struct pid_namespace *); |
| 130 | #else | 130 | #else |
| 131 | #define acct_auto_close_mnt(x) do { } while (0) | 131 | #define acct_auto_close_mnt(x) do { } while (0) |
| 132 | #define acct_auto_close(x) do { } while (0) | 132 | #define acct_auto_close(x) do { } while (0) |
| 133 | #define acct_init_pacct(x) do { } while (0) | ||
| 134 | #define acct_collect(x,y) do { } while (0) | 133 | #define acct_collect(x,y) do { } while (0) |
| 135 | #define acct_process() do { } while (0) | 134 | #define acct_process() do { } while (0) |
| 136 | #define acct_exit_ns(ns) do { } while (0) | 135 | #define acct_exit_ns(ns) do { } while (0) |
diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h index 6816be6c3f77..8b1038607831 100644 --- a/include/linux/amba/bus.h +++ b/include/linux/amba/bus.h | |||
| @@ -14,6 +14,9 @@ | |||
| 14 | #ifndef ASMARM_AMBA_H | 14 | #ifndef ASMARM_AMBA_H |
| 15 | #define ASMARM_AMBA_H | 15 | #define ASMARM_AMBA_H |
| 16 | 16 | ||
| 17 | #include <linux/device.h> | ||
| 18 | #include <linux/resource.h> | ||
| 19 | |||
| 17 | #define AMBA_NR_IRQS 2 | 20 | #define AMBA_NR_IRQS 2 |
| 18 | 21 | ||
| 19 | struct amba_device { | 22 | struct amba_device { |
diff --git a/include/linux/amba/clcd.h b/include/linux/amba/clcd.h index 29c0448265cf..ca16c3801a1e 100644 --- a/include/linux/amba/clcd.h +++ b/include/linux/amba/clcd.h | |||
| @@ -21,22 +21,21 @@ | |||
| 21 | #define CLCD_UBAS 0x00000010 | 21 | #define CLCD_UBAS 0x00000010 |
| 22 | #define CLCD_LBAS 0x00000014 | 22 | #define CLCD_LBAS 0x00000014 |
| 23 | 23 | ||
| 24 | #if !defined(CONFIG_ARCH_VERSATILE) && !defined(CONFIG_ARCH_REALVIEW) | 24 | #define CLCD_PL110_IENB 0x00000018 |
| 25 | #define CLCD_IENB 0x00000018 | 25 | #define CLCD_PL110_CNTL 0x0000001c |
| 26 | #define CLCD_CNTL 0x0000001c | 26 | #define CLCD_PL110_STAT 0x00000020 |
| 27 | #else | 27 | #define CLCD_PL110_INTR 0x00000024 |
| 28 | /* | 28 | #define CLCD_PL110_UCUR 0x00000028 |
| 29 | * Someone rearranged these two registers on the Versatile | 29 | #define CLCD_PL110_LCUR 0x0000002C |
| 30 | * platform... | 30 | |
| 31 | */ | 31 | #define CLCD_PL111_CNTL 0x00000018 |
| 32 | #define CLCD_IENB 0x0000001c | 32 | #define CLCD_PL111_IENB 0x0000001c |
| 33 | #define CLCD_CNTL 0x00000018 | 33 | #define CLCD_PL111_RIS 0x00000020 |
| 34 | #endif | 34 | #define CLCD_PL111_MIS 0x00000024 |
| 35 | 35 | #define CLCD_PL111_ICR 0x00000028 | |
| 36 | #define CLCD_STAT 0x00000020 | 36 | #define CLCD_PL111_UCUR 0x0000002c |
| 37 | #define CLCD_INTR 0x00000024 | 37 | #define CLCD_PL111_LCUR 0x00000030 |
| 38 | #define CLCD_UCUR 0x00000028 | 38 | |
| 39 | #define CLCD_LCUR 0x0000002C | ||
| 40 | #define CLCD_PALL 0x00000200 | 39 | #define CLCD_PALL 0x00000200 |
| 41 | #define CLCD_PALETTE 0x00000200 | 40 | #define CLCD_PALETTE 0x00000200 |
| 42 | 41 | ||
| @@ -147,6 +146,8 @@ struct clcd_fb { | |||
| 147 | struct clcd_board *board; | 146 | struct clcd_board *board; |
| 148 | void *board_data; | 147 | void *board_data; |
| 149 | void __iomem *regs; | 148 | void __iomem *regs; |
| 149 | u16 off_ienb; | ||
| 150 | u16 off_cntl; | ||
| 150 | u32 clcd_cntl; | 151 | u32 clcd_cntl; |
| 151 | u32 cmap[16]; | 152 | u32 cmap[16]; |
| 152 | }; | 153 | }; |
diff --git a/include/linux/amba/pl061.h b/include/linux/amba/pl061.h index b4fbd9862606..5ddd9ad4b19c 100644 --- a/include/linux/amba/pl061.h +++ b/include/linux/amba/pl061.h | |||
| @@ -1,3 +1,5 @@ | |||
| 1 | #include <linux/types.h> | ||
| 2 | |||
| 1 | /* platform data for the PL061 GPIO driver */ | 3 | /* platform data for the PL061 GPIO driver */ |
| 2 | 4 | ||
| 3 | struct pl061_platform_data { | 5 | struct pl061_platform_data { |
diff --git a/include/linux/audit.h b/include/linux/audit.h index 3c7a358241a7..f391d45c8aea 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
| @@ -424,7 +424,7 @@ extern void audit_syscall_exit(int failed, long return_code); | |||
| 424 | extern void __audit_getname(const char *name); | 424 | extern void __audit_getname(const char *name); |
| 425 | extern void audit_putname(const char *name); | 425 | extern void audit_putname(const char *name); |
| 426 | extern void __audit_inode(const char *name, const struct dentry *dentry); | 426 | extern void __audit_inode(const char *name, const struct dentry *dentry); |
| 427 | extern void __audit_inode_child(const char *dname, const struct dentry *dentry, | 427 | extern void __audit_inode_child(const struct dentry *dentry, |
| 428 | const struct inode *parent); | 428 | const struct inode *parent); |
| 429 | extern void __audit_ptrace(struct task_struct *t); | 429 | extern void __audit_ptrace(struct task_struct *t); |
| 430 | 430 | ||
| @@ -442,11 +442,10 @@ static inline void audit_inode(const char *name, const struct dentry *dentry) { | |||
| 442 | if (unlikely(!audit_dummy_context())) | 442 | if (unlikely(!audit_dummy_context())) |
| 443 | __audit_inode(name, dentry); | 443 | __audit_inode(name, dentry); |
| 444 | } | 444 | } |
| 445 | static inline void audit_inode_child(const char *dname, | 445 | static inline void audit_inode_child(const struct dentry *dentry, |
| 446 | const struct dentry *dentry, | ||
| 447 | const struct inode *parent) { | 446 | const struct inode *parent) { |
| 448 | if (unlikely(!audit_dummy_context())) | 447 | if (unlikely(!audit_dummy_context())) |
| 449 | __audit_inode_child(dname, dentry, parent); | 448 | __audit_inode_child(dentry, parent); |
| 450 | } | 449 | } |
| 451 | void audit_core_dumps(long signr); | 450 | void audit_core_dumps(long signr); |
| 452 | 451 | ||
| @@ -544,9 +543,9 @@ extern int audit_signals; | |||
| 544 | #define audit_getname(n) do { ; } while (0) | 543 | #define audit_getname(n) do { ; } while (0) |
| 545 | #define audit_putname(n) do { ; } while (0) | 544 | #define audit_putname(n) do { ; } while (0) |
| 546 | #define __audit_inode(n,d) do { ; } while (0) | 545 | #define __audit_inode(n,d) do { ; } while (0) |
| 547 | #define __audit_inode_child(d,i,p) do { ; } while (0) | 546 | #define __audit_inode_child(i,p) do { ; } while (0) |
| 548 | #define audit_inode(n,d) do { ; } while (0) | 547 | #define audit_inode(n,d) do { ; } while (0) |
| 549 | #define audit_inode_child(d,i,p) do { ; } while (0) | 548 | #define audit_inode_child(i,p) do { ; } while (0) |
| 550 | #define audit_core_dumps(i) do { ; } while (0) | 549 | #define audit_core_dumps(i) do { ; } while (0) |
| 551 | #define auditsc_get_stamp(c,t,s) (0) | 550 | #define auditsc_get_stamp(c,t,s) (0) |
| 552 | #define audit_get_loginuid(t) (-1) | 551 | #define audit_get_loginuid(t) (-1) |
diff --git a/include/linux/backlight.h b/include/linux/backlight.h index 8c4f884db6b4..4a3d52e545e1 100644 --- a/include/linux/backlight.h +++ b/include/linux/backlight.h | |||
| @@ -36,18 +36,18 @@ struct backlight_device; | |||
| 36 | struct fb_info; | 36 | struct fb_info; |
| 37 | 37 | ||
| 38 | struct backlight_ops { | 38 | struct backlight_ops { |
| 39 | const unsigned int options; | 39 | unsigned int options; |
| 40 | 40 | ||
| 41 | #define BL_CORE_SUSPENDRESUME (1 << 0) | 41 | #define BL_CORE_SUSPENDRESUME (1 << 0) |
| 42 | 42 | ||
| 43 | /* Notify the backlight driver some property has changed */ | 43 | /* Notify the backlight driver some property has changed */ |
| 44 | int (* const update_status)(struct backlight_device *); | 44 | int (*update_status)(struct backlight_device *); |
| 45 | /* Return the current backlight brightness (accounting for power, | 45 | /* Return the current backlight brightness (accounting for power, |
| 46 | fb_blank etc.) */ | 46 | fb_blank etc.) */ |
| 47 | int (* const get_brightness)(struct backlight_device *); | 47 | int (*get_brightness)(struct backlight_device *); |
| 48 | /* Check if given framebuffer device is the one bound to this backlight; | 48 | /* Check if given framebuffer device is the one bound to this backlight; |
| 49 | return 0 if not, !=0 if it is. If NULL, backlight always matches the fb. */ | 49 | return 0 if not, !=0 if it is. If NULL, backlight always matches the fb. */ |
| 50 | int (* const check_fb)(struct fb_info *); | 50 | int (*check_fb)(struct backlight_device *, struct fb_info *); |
| 51 | }; | 51 | }; |
| 52 | 52 | ||
| 53 | /* This structure defines all the properties of a backlight */ | 53 | /* This structure defines all the properties of a backlight */ |
| @@ -103,7 +103,8 @@ static inline void backlight_update_status(struct backlight_device *bd) | |||
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | extern struct backlight_device *backlight_device_register(const char *name, | 105 | extern struct backlight_device *backlight_device_register(const char *name, |
| 106 | struct device *dev, void *devdata, const struct backlight_ops *ops); | 106 | struct device *dev, void *devdata, const struct backlight_ops *ops, |
| 107 | const struct backlight_properties *props); | ||
| 107 | extern void backlight_device_unregister(struct backlight_device *bd); | 108 | extern void backlight_device_unregister(struct backlight_device *bd); |
| 108 | extern void backlight_force_update(struct backlight_device *bd, | 109 | extern void backlight_force_update(struct backlight_device *bd, |
| 109 | enum backlight_update_reason reason); | 110 | enum backlight_update_reason reason); |
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index 89c6249fc561..c809e286d213 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h | |||
| @@ -74,6 +74,7 @@ struct coredump_params { | |||
| 74 | struct pt_regs *regs; | 74 | struct pt_regs *regs; |
| 75 | struct file *file; | 75 | struct file *file; |
| 76 | unsigned long limit; | 76 | unsigned long limit; |
| 77 | unsigned long mm_flags; | ||
| 77 | }; | 78 | }; |
| 78 | 79 | ||
| 79 | /* | 80 | /* |
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index 25b8b2f33ae9..b79389879238 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h | |||
| @@ -16,11 +16,13 @@ | |||
| 16 | */ | 16 | */ |
| 17 | #include <asm/bitops.h> | 17 | #include <asm/bitops.h> |
| 18 | 18 | ||
| 19 | #define for_each_bit(bit, addr, size) \ | 19 | #define for_each_set_bit(bit, addr, size) \ |
| 20 | for ((bit) = find_first_bit((addr), (size)); \ | 20 | for ((bit) = find_first_bit((addr), (size)); \ |
| 21 | (bit) < (size); \ | 21 | (bit) < (size); \ |
| 22 | (bit) = find_next_bit((addr), (size), (bit) + 1)) | 22 | (bit) = find_next_bit((addr), (size), (bit) + 1)) |
| 23 | 23 | ||
| 24 | /* Temporary */ | ||
| 25 | #define for_each_bit(bit, addr, size) for_each_set_bit(bit, addr, size) | ||
| 24 | 26 | ||
| 25 | static __inline__ int get_bitmask_order(unsigned int count) | 27 | static __inline__ int get_bitmask_order(unsigned int count) |
| 26 | { | 28 | { |
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h index 3b73b9992b26..416bf62d6d46 100644 --- a/include/linux/blktrace_api.h +++ b/include/linux/blktrace_api.h | |||
| @@ -150,8 +150,8 @@ struct blk_user_trace_setup { | |||
| 150 | struct blk_trace { | 150 | struct blk_trace { |
| 151 | int trace_state; | 151 | int trace_state; |
| 152 | struct rchan *rchan; | 152 | struct rchan *rchan; |
| 153 | unsigned long *sequence; | 153 | unsigned long __percpu *sequence; |
| 154 | unsigned char *msg_data; | 154 | unsigned char __percpu *msg_data; |
| 155 | u16 act_mask; | 155 | u16 act_mask; |
| 156 | u64 start_lba; | 156 | u64 start_lba; |
| 157 | u64 end_lba; | 157 | u64 end_lba; |
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index b10ec49ee2dd..266ab9291232 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h | |||
| @@ -23,6 +23,7 @@ extern unsigned long max_pfn; | |||
| 23 | extern unsigned long saved_max_pfn; | 23 | extern unsigned long saved_max_pfn; |
| 24 | #endif | 24 | #endif |
| 25 | 25 | ||
| 26 | #ifndef CONFIG_NO_BOOTMEM | ||
| 26 | /* | 27 | /* |
| 27 | * node_bootmem_map is a map pointer - the bits represent all physical | 28 | * node_bootmem_map is a map pointer - the bits represent all physical |
| 28 | * memory pages (including holes) on the node. | 29 | * memory pages (including holes) on the node. |
| @@ -37,6 +38,7 @@ typedef struct bootmem_data { | |||
| 37 | } bootmem_data_t; | 38 | } bootmem_data_t; |
| 38 | 39 | ||
| 39 | extern bootmem_data_t bootmem_node_data[]; | 40 | extern bootmem_data_t bootmem_node_data[]; |
| 41 | #endif | ||
| 40 | 42 | ||
| 41 | extern unsigned long bootmem_bootmap_pages(unsigned long); | 43 | extern unsigned long bootmem_bootmap_pages(unsigned long); |
| 42 | 44 | ||
| @@ -46,6 +48,7 @@ extern unsigned long init_bootmem_node(pg_data_t *pgdat, | |||
| 46 | unsigned long endpfn); | 48 | unsigned long endpfn); |
| 47 | extern unsigned long init_bootmem(unsigned long addr, unsigned long memend); | 49 | extern unsigned long init_bootmem(unsigned long addr, unsigned long memend); |
| 48 | 50 | ||
| 51 | unsigned long free_all_memory_core_early(int nodeid); | ||
| 49 | extern unsigned long free_all_bootmem_node(pg_data_t *pgdat); | 52 | extern unsigned long free_all_bootmem_node(pg_data_t *pgdat); |
| 50 | extern unsigned long free_all_bootmem(void); | 53 | extern unsigned long free_all_bootmem(void); |
| 51 | 54 | ||
| @@ -84,6 +87,10 @@ extern void *__alloc_bootmem_node(pg_data_t *pgdat, | |||
| 84 | unsigned long size, | 87 | unsigned long size, |
| 85 | unsigned long align, | 88 | unsigned long align, |
| 86 | unsigned long goal); | 89 | unsigned long goal); |
| 90 | void *__alloc_bootmem_node_high(pg_data_t *pgdat, | ||
| 91 | unsigned long size, | ||
| 92 | unsigned long align, | ||
| 93 | unsigned long goal); | ||
| 87 | extern void *__alloc_bootmem_node_nopanic(pg_data_t *pgdat, | 94 | extern void *__alloc_bootmem_node_nopanic(pg_data_t *pgdat, |
| 88 | unsigned long size, | 95 | unsigned long size, |
| 89 | unsigned long align, | 96 | unsigned long align, |
diff --git a/include/linux/btree-128.h b/include/linux/btree-128.h new file mode 100644 index 000000000000..0b3414c4c928 --- /dev/null +++ b/include/linux/btree-128.h | |||
| @@ -0,0 +1,109 @@ | |||
| 1 | extern struct btree_geo btree_geo128; | ||
| 2 | |||
| 3 | struct btree_head128 { struct btree_head h; }; | ||
| 4 | |||
| 5 | static inline void btree_init_mempool128(struct btree_head128 *head, | ||
| 6 | mempool_t *mempool) | ||
| 7 | { | ||
| 8 | btree_init_mempool(&head->h, mempool); | ||
| 9 | } | ||
| 10 | |||
| 11 | static inline int btree_init128(struct btree_head128 *head) | ||
| 12 | { | ||
| 13 | return btree_init(&head->h); | ||
| 14 | } | ||
| 15 | |||
| 16 | static inline void btree_destroy128(struct btree_head128 *head) | ||
| 17 | { | ||
| 18 | btree_destroy(&head->h); | ||
| 19 | } | ||
| 20 | |||
| 21 | static inline void *btree_lookup128(struct btree_head128 *head, u64 k1, u64 k2) | ||
| 22 | { | ||
| 23 | u64 key[2] = {k1, k2}; | ||
| 24 | return btree_lookup(&head->h, &btree_geo128, (unsigned long *)&key); | ||
| 25 | } | ||
| 26 | |||
| 27 | static inline void *btree_get_prev128(struct btree_head128 *head, | ||
| 28 | u64 *k1, u64 *k2) | ||
| 29 | { | ||
| 30 | u64 key[2] = {*k1, *k2}; | ||
| 31 | void *val; | ||
| 32 | |||
| 33 | val = btree_get_prev(&head->h, &btree_geo128, | ||
| 34 | (unsigned long *)&key); | ||
| 35 | *k1 = key[0]; | ||
| 36 | *k2 = key[1]; | ||
| 37 | return val; | ||
| 38 | } | ||
| 39 | |||
| 40 | static inline int btree_insert128(struct btree_head128 *head, u64 k1, u64 k2, | ||
| 41 | void *val, gfp_t gfp) | ||
| 42 | { | ||
| 43 | u64 key[2] = {k1, k2}; | ||
| 44 | return btree_insert(&head->h, &btree_geo128, | ||
| 45 | (unsigned long *)&key, val, gfp); | ||
| 46 | } | ||
| 47 | |||
| 48 | static inline int btree_update128(struct btree_head128 *head, u64 k1, u64 k2, | ||
| 49 | void *val) | ||
| 50 | { | ||
| 51 | u64 key[2] = {k1, k2}; | ||
| 52 | return btree_update(&head->h, &btree_geo128, | ||
| 53 | (unsigned long *)&key, val); | ||
| 54 | } | ||
| 55 | |||
| 56 | static inline void *btree_remove128(struct btree_head128 *head, u64 k1, u64 k2) | ||
| 57 | { | ||
| 58 | u64 key[2] = {k1, k2}; | ||
| 59 | return btree_remove(&head->h, &btree_geo128, (unsigned long *)&key); | ||
| 60 | } | ||
| 61 | |||
| 62 | static inline void *btree_last128(struct btree_head128 *head, u64 *k1, u64 *k2) | ||
| 63 | { | ||
| 64 | u64 key[2]; | ||
| 65 | void *val; | ||
| 66 | |||
| 67 | val = btree_last(&head->h, &btree_geo128, (unsigned long *)&key[0]); | ||
| 68 | if (val) { | ||
| 69 | *k1 = key[0]; | ||
| 70 | *k2 = key[1]; | ||
| 71 | } | ||
| 72 | |||
| 73 | return val; | ||
| 74 | } | ||
| 75 | |||
| 76 | static inline int btree_merge128(struct btree_head128 *target, | ||
| 77 | struct btree_head128 *victim, | ||
| 78 | gfp_t gfp) | ||
| 79 | { | ||
| 80 | return btree_merge(&target->h, &victim->h, &btree_geo128, gfp); | ||
| 81 | } | ||
| 82 | |||
| 83 | void visitor128(void *elem, unsigned long opaque, unsigned long *__key, | ||
| 84 | size_t index, void *__func); | ||
| 85 | |||
| 86 | typedef void (*visitor128_t)(void *elem, unsigned long opaque, | ||
| 87 | u64 key1, u64 key2, size_t index); | ||
| 88 | |||
| 89 | static inline size_t btree_visitor128(struct btree_head128 *head, | ||
| 90 | unsigned long opaque, | ||
| 91 | visitor128_t func2) | ||
| 92 | { | ||
| 93 | return btree_visitor(&head->h, &btree_geo128, opaque, | ||
| 94 | visitor128, func2); | ||
| 95 | } | ||
| 96 | |||
| 97 | static inline size_t btree_grim_visitor128(struct btree_head128 *head, | ||
| 98 | unsigned long opaque, | ||
| 99 | visitor128_t func2) | ||
| 100 | { | ||
| 101 | return btree_grim_visitor(&head->h, &btree_geo128, opaque, | ||
| 102 | visitor128, func2); | ||
| 103 | } | ||
| 104 | |||
| 105 | #define btree_for_each_safe128(head, k1, k2, val) \ | ||
| 106 | for (val = btree_last128(head, &k1, &k2); \ | ||
| 107 | val; \ | ||
| 108 | val = btree_get_prev128(head, &k1, &k2)) | ||
| 109 | |||
diff --git a/include/linux/btree-type.h b/include/linux/btree-type.h new file mode 100644 index 000000000000..9a1147ef8563 --- /dev/null +++ b/include/linux/btree-type.h | |||
| @@ -0,0 +1,147 @@ | |||
| 1 | #define __BTREE_TP(pfx, type, sfx) pfx ## type ## sfx | ||
| 2 | #define _BTREE_TP(pfx, type, sfx) __BTREE_TP(pfx, type, sfx) | ||
| 3 | #define BTREE_TP(pfx) _BTREE_TP(pfx, BTREE_TYPE_SUFFIX,) | ||
| 4 | #define BTREE_FN(name) BTREE_TP(btree_ ## name) | ||
| 5 | #define BTREE_TYPE_HEAD BTREE_TP(struct btree_head) | ||
| 6 | #define VISITOR_FN BTREE_TP(visitor) | ||
| 7 | #define VISITOR_FN_T _BTREE_TP(visitor, BTREE_TYPE_SUFFIX, _t) | ||
| 8 | |||
| 9 | BTREE_TYPE_HEAD { | ||
| 10 | struct btree_head h; | ||
| 11 | }; | ||
| 12 | |||
| 13 | static inline void BTREE_FN(init_mempool)(BTREE_TYPE_HEAD *head, | ||
| 14 | mempool_t *mempool) | ||
| 15 | { | ||
| 16 | btree_init_mempool(&head->h, mempool); | ||
| 17 | } | ||
| 18 | |||
| 19 | static inline int BTREE_FN(init)(BTREE_TYPE_HEAD *head) | ||
| 20 | { | ||
| 21 | return btree_init(&head->h); | ||
| 22 | } | ||
| 23 | |||
| 24 | static inline void BTREE_FN(destroy)(BTREE_TYPE_HEAD *head) | ||
| 25 | { | ||
| 26 | btree_destroy(&head->h); | ||
| 27 | } | ||
| 28 | |||
| 29 | static inline int BTREE_FN(merge)(BTREE_TYPE_HEAD *target, | ||
| 30 | BTREE_TYPE_HEAD *victim, | ||
| 31 | gfp_t gfp) | ||
| 32 | { | ||
| 33 | return btree_merge(&target->h, &victim->h, BTREE_TYPE_GEO, gfp); | ||
| 34 | } | ||
| 35 | |||
| 36 | #if (BITS_PER_LONG > BTREE_TYPE_BITS) | ||
| 37 | static inline void *BTREE_FN(lookup)(BTREE_TYPE_HEAD *head, BTREE_KEYTYPE key) | ||
| 38 | { | ||
| 39 | unsigned long _key = key; | ||
| 40 | return btree_lookup(&head->h, BTREE_TYPE_GEO, &_key); | ||
| 41 | } | ||
| 42 | |||
| 43 | static inline int BTREE_FN(insert)(BTREE_TYPE_HEAD *head, BTREE_KEYTYPE key, | ||
| 44 | void *val, gfp_t gfp) | ||
| 45 | { | ||
| 46 | unsigned long _key = key; | ||
| 47 | return btree_insert(&head->h, BTREE_TYPE_GEO, &_key, val, gfp); | ||
| 48 | } | ||
| 49 | |||
| 50 | static inline int BTREE_FN(update)(BTREE_TYPE_HEAD *head, BTREE_KEYTYPE key, | ||
| 51 | void *val) | ||
| 52 | { | ||
| 53 | unsigned long _key = key; | ||
| 54 | return btree_update(&head->h, BTREE_TYPE_GEO, &_key, val); | ||
| 55 | } | ||
| 56 | |||
| 57 | static inline void *BTREE_FN(remove)(BTREE_TYPE_HEAD *head, BTREE_KEYTYPE key) | ||
| 58 | { | ||
| 59 | unsigned long _key = key; | ||
| 60 | return btree_remove(&head->h, BTREE_TYPE_GEO, &_key); | ||
| 61 | } | ||
| 62 | |||
| 63 | static inline void *BTREE_FN(last)(BTREE_TYPE_HEAD *head, BTREE_KEYTYPE *key) | ||
| 64 | { | ||
| 65 | unsigned long _key; | ||
| 66 | void *val = btree_last(&head->h, BTREE_TYPE_GEO, &_key); | ||
| 67 | if (val) | ||
| 68 | *key = _key; | ||
| 69 | return val; | ||
| 70 | } | ||
| 71 | |||
| 72 | static inline void *BTREE_FN(get_prev)(BTREE_TYPE_HEAD *head, BTREE_KEYTYPE *key) | ||
| 73 | { | ||
| 74 | unsigned long _key = *key; | ||
| 75 | void *val = btree_get_prev(&head->h, BTREE_TYPE_GEO, &_key); | ||
| 76 | if (val) | ||
| 77 | *key = _key; | ||
| 78 | return val; | ||
| 79 | } | ||
| 80 | #else | ||
| 81 | static inline void *BTREE_FN(lookup)(BTREE_TYPE_HEAD *head, BTREE_KEYTYPE key) | ||
| 82 | { | ||
| 83 | return btree_lookup(&head->h, BTREE_TYPE_GEO, (unsigned long *)&key); | ||
| 84 | } | ||
| 85 | |||
| 86 | static inline int BTREE_FN(insert)(BTREE_TYPE_HEAD *head, BTREE_KEYTYPE key, | ||
| 87 | void *val, gfp_t gfp) | ||
| 88 | { | ||
| 89 | return btree_insert(&head->h, BTREE_TYPE_GEO, (unsigned long *)&key, | ||
| 90 | val, gfp); | ||
| 91 | } | ||
| 92 | |||
| 93 | static inline int BTREE_FN(update)(BTREE_TYPE_HEAD *head, BTREE_KEYTYPE key, | ||
| 94 | void *val) | ||
| 95 | { | ||
| 96 | return btree_update(&head->h, BTREE_TYPE_GEO, (unsigned long *)&key, val); | ||
| 97 | } | ||
| 98 | |||
| 99 | static inline void *BTREE_FN(remove)(BTREE_TYPE_HEAD *head, BTREE_KEYTYPE key) | ||
| 100 | { | ||
| 101 | return btree_remove(&head->h, BTREE_TYPE_GEO, (unsigned long *)&key); | ||
| 102 | } | ||
| 103 | |||
| 104 | static inline void *BTREE_FN(last)(BTREE_TYPE_HEAD *head, BTREE_KEYTYPE *key) | ||
| 105 | { | ||
| 106 | return btree_last(&head->h, BTREE_TYPE_GEO, (unsigned long *)key); | ||
| 107 | } | ||
| 108 | |||
| 109 | static inline void *BTREE_FN(get_prev)(BTREE_TYPE_HEAD *head, BTREE_KEYTYPE *key) | ||
| 110 | { | ||
| 111 | return btree_get_prev(&head->h, BTREE_TYPE_GEO, (unsigned long *)key); | ||
| 112 | } | ||
| 113 | #endif | ||
| 114 | |||
| 115 | void VISITOR_FN(void *elem, unsigned long opaque, unsigned long *key, | ||
| 116 | size_t index, void *__func); | ||
| 117 | |||
| 118 | typedef void (*VISITOR_FN_T)(void *elem, unsigned long opaque, | ||
| 119 | BTREE_KEYTYPE key, size_t index); | ||
| 120 | |||
| 121 | static inline size_t BTREE_FN(visitor)(BTREE_TYPE_HEAD *head, | ||
| 122 | unsigned long opaque, | ||
| 123 | VISITOR_FN_T func2) | ||
| 124 | { | ||
| 125 | return btree_visitor(&head->h, BTREE_TYPE_GEO, opaque, | ||
| 126 | visitorl, func2); | ||
| 127 | } | ||
| 128 | |||
| 129 | static inline size_t BTREE_FN(grim_visitor)(BTREE_TYPE_HEAD *head, | ||
| 130 | unsigned long opaque, | ||
| 131 | VISITOR_FN_T func2) | ||
| 132 | { | ||
| 133 | return btree_grim_visitor(&head->h, BTREE_TYPE_GEO, opaque, | ||
| 134 | visitorl, func2); | ||
| 135 | } | ||
| 136 | |||
| 137 | #undef VISITOR_FN | ||
| 138 | #undef VISITOR_FN_T | ||
| 139 | #undef __BTREE_TP | ||
| 140 | #undef _BTREE_TP | ||
| 141 | #undef BTREE_TP | ||
| 142 | #undef BTREE_FN | ||
| 143 | #undef BTREE_TYPE_HEAD | ||
| 144 | #undef BTREE_TYPE_SUFFIX | ||
| 145 | #undef BTREE_TYPE_GEO | ||
| 146 | #undef BTREE_KEYTYPE | ||
| 147 | #undef BTREE_TYPE_BITS | ||
diff --git a/include/linux/btree.h b/include/linux/btree.h new file mode 100644 index 000000000000..65b5bb058324 --- /dev/null +++ b/include/linux/btree.h | |||
| @@ -0,0 +1,243 @@ | |||
| 1 | #ifndef BTREE_H | ||
| 2 | #define BTREE_H | ||
| 3 | |||
| 4 | #include <linux/kernel.h> | ||
| 5 | #include <linux/mempool.h> | ||
| 6 | |||
| 7 | /** | ||
| 8 | * DOC: B+Tree basics | ||
| 9 | * | ||
| 10 | * A B+Tree is a data structure for looking up arbitrary (currently allowing | ||
| 11 | * unsigned long, u32, u64 and 2 * u64) keys into pointers. The data structure | ||
| 12 | * is described at http://en.wikipedia.org/wiki/B-tree, we currently do not | ||
| 13 | * use binary search to find the key on lookups. | ||
| 14 | * | ||
| 15 | * Each B+Tree consists of a head, that contains bookkeeping information and | ||
| 16 | * a variable number (starting with zero) nodes. Each node contains the keys | ||
| 17 | * and pointers to sub-nodes, or, for leaf nodes, the keys and values for the | ||
| 18 | * tree entries. | ||
| 19 | * | ||
| 20 | * Each node in this implementation has the following layout: | ||
| 21 | * [key1, key2, ..., keyN] [val1, val2, ..., valN] | ||
| 22 | * | ||
| 23 | * Each key here is an array of unsigned longs, geo->no_longs in total. The | ||
| 24 | * number of keys and values (N) is geo->no_pairs. | ||
| 25 | */ | ||
| 26 | |||
| 27 | /** | ||
| 28 | * struct btree_head - btree head | ||
| 29 | * | ||
| 30 | * @node: the first node in the tree | ||
| 31 | * @mempool: mempool used for node allocations | ||
| 32 | * @height: current of the tree | ||
| 33 | */ | ||
| 34 | struct btree_head { | ||
| 35 | unsigned long *node; | ||
| 36 | mempool_t *mempool; | ||
| 37 | int height; | ||
| 38 | }; | ||
| 39 | |||
| 40 | /* btree geometry */ | ||
| 41 | struct btree_geo; | ||
| 42 | |||
| 43 | /** | ||
| 44 | * btree_alloc - allocate function for the mempool | ||
| 45 | * @gfp_mask: gfp mask for the allocation | ||
| 46 | * @pool_data: unused | ||
| 47 | */ | ||
| 48 | void *btree_alloc(gfp_t gfp_mask, void *pool_data); | ||
| 49 | |||
| 50 | /** | ||
| 51 | * btree_free - free function for the mempool | ||
| 52 | * @element: the element to free | ||
| 53 | * @pool_data: unused | ||
| 54 | */ | ||
| 55 | void btree_free(void *element, void *pool_data); | ||
| 56 | |||
| 57 | /** | ||
| 58 | * btree_init_mempool - initialise a btree with given mempool | ||
| 59 | * | ||
| 60 | * @head: the btree head to initialise | ||
| 61 | * @mempool: the mempool to use | ||
| 62 | * | ||
| 63 | * When this function is used, there is no need to destroy | ||
| 64 | * the mempool. | ||
| 65 | */ | ||
| 66 | void btree_init_mempool(struct btree_head *head, mempool_t *mempool); | ||
| 67 | |||
| 68 | /** | ||
| 69 | * btree_init - initialise a btree | ||
| 70 | * | ||
| 71 | * @head: the btree head to initialise | ||
| 72 | * | ||
| 73 | * This function allocates the memory pool that the | ||
| 74 | * btree needs. Returns zero or a negative error code | ||
| 75 | * (-%ENOMEM) when memory allocation fails. | ||
| 76 | * | ||
| 77 | */ | ||
| 78 | int __must_check btree_init(struct btree_head *head); | ||
| 79 | |||
| 80 | /** | ||
| 81 | * btree_destroy - destroy mempool | ||
| 82 | * | ||
| 83 | * @head: the btree head to destroy | ||
| 84 | * | ||
| 85 | * This function destroys the internal memory pool, use only | ||
| 86 | * when using btree_init(), not with btree_init_mempool(). | ||
| 87 | */ | ||
| 88 | void btree_destroy(struct btree_head *head); | ||
| 89 | |||
| 90 | /** | ||
| 91 | * btree_lookup - look up a key in the btree | ||
| 92 | * | ||
| 93 | * @head: the btree to look in | ||
| 94 | * @geo: the btree geometry | ||
| 95 | * @key: the key to look up | ||
| 96 | * | ||
| 97 | * This function returns the value for the given key, or %NULL. | ||
| 98 | */ | ||
| 99 | void *btree_lookup(struct btree_head *head, struct btree_geo *geo, | ||
| 100 | unsigned long *key); | ||
| 101 | |||
| 102 | /** | ||
| 103 | * btree_insert - insert an entry into the btree | ||
| 104 | * | ||
| 105 | * @head: the btree to add to | ||
| 106 | * @geo: the btree geometry | ||
| 107 | * @key: the key to add (must not already be present) | ||
| 108 | * @val: the value to add (must not be %NULL) | ||
| 109 | * @gfp: allocation flags for node allocations | ||
| 110 | * | ||
| 111 | * This function returns 0 if the item could be added, or an | ||
| 112 | * error code if it failed (may fail due to memory pressure). | ||
| 113 | */ | ||
| 114 | int __must_check btree_insert(struct btree_head *head, struct btree_geo *geo, | ||
| 115 | unsigned long *key, void *val, gfp_t gfp); | ||
| 116 | /** | ||
| 117 | * btree_update - update an entry in the btree | ||
| 118 | * | ||
| 119 | * @head: the btree to update | ||
| 120 | * @geo: the btree geometry | ||
| 121 | * @key: the key to update | ||
| 122 | * @val: the value to change it to (must not be %NULL) | ||
| 123 | * | ||
| 124 | * This function returns 0 if the update was successful, or | ||
| 125 | * -%ENOENT if the key could not be found. | ||
| 126 | */ | ||
| 127 | int btree_update(struct btree_head *head, struct btree_geo *geo, | ||
| 128 | unsigned long *key, void *val); | ||
| 129 | /** | ||
| 130 | * btree_remove - remove an entry from the btree | ||
| 131 | * | ||
| 132 | * @head: the btree to update | ||
| 133 | * @geo: the btree geometry | ||
| 134 | * @key: the key to remove | ||
| 135 | * | ||
| 136 | * This function returns the removed entry, or %NULL if the key | ||
| 137 | * could not be found. | ||
| 138 | */ | ||
| 139 | void *btree_remove(struct btree_head *head, struct btree_geo *geo, | ||
| 140 | unsigned long *key); | ||
| 141 | |||
| 142 | /** | ||
| 143 | * btree_merge - merge two btrees | ||
| 144 | * | ||
| 145 | * @target: the tree that gets all the entries | ||
| 146 | * @victim: the tree that gets merged into @target | ||
| 147 | * @geo: the btree geometry | ||
| 148 | * @gfp: allocation flags | ||
| 149 | * | ||
| 150 | * The two trees @target and @victim may not contain the same keys, | ||
| 151 | * that is a bug and triggers a BUG(). This function returns zero | ||
| 152 | * if the trees were merged successfully, and may return a failure | ||
| 153 | * when memory allocation fails, in which case both trees might have | ||
| 154 | * been partially merged, i.e. some entries have been moved from | ||
| 155 | * @victim to @target. | ||
| 156 | */ | ||
| 157 | int btree_merge(struct btree_head *target, struct btree_head *victim, | ||
| 158 | struct btree_geo *geo, gfp_t gfp); | ||
| 159 | |||
| 160 | /** | ||
| 161 | * btree_last - get last entry in btree | ||
| 162 | * | ||
| 163 | * @head: btree head | ||
| 164 | * @geo: btree geometry | ||
| 165 | * @key: last key | ||
| 166 | * | ||
| 167 | * Returns the last entry in the btree, and sets @key to the key | ||
| 168 | * of that entry; returns NULL if the tree is empty, in that case | ||
| 169 | * key is not changed. | ||
| 170 | */ | ||
| 171 | void *btree_last(struct btree_head *head, struct btree_geo *geo, | ||
| 172 | unsigned long *key); | ||
| 173 | |||
| 174 | /** | ||
| 175 | * btree_get_prev - get previous entry | ||
| 176 | * | ||
| 177 | * @head: btree head | ||
| 178 | * @geo: btree geometry | ||
| 179 | * @key: pointer to key | ||
| 180 | * | ||
| 181 | * The function returns the next item right before the value pointed to by | ||
| 182 | * @key, and updates @key with its key, or returns %NULL when there is no | ||
| 183 | * entry with a key smaller than the given key. | ||
| 184 | */ | ||
| 185 | void *btree_get_prev(struct btree_head *head, struct btree_geo *geo, | ||
| 186 | unsigned long *key); | ||
| 187 | |||
| 188 | |||
| 189 | /* internal use, use btree_visitor{l,32,64,128} */ | ||
| 190 | size_t btree_visitor(struct btree_head *head, struct btree_geo *geo, | ||
| 191 | unsigned long opaque, | ||
| 192 | void (*func)(void *elem, unsigned long opaque, | ||
| 193 | unsigned long *key, size_t index, | ||
| 194 | void *func2), | ||
| 195 | void *func2); | ||
| 196 | |||
| 197 | /* internal use, use btree_grim_visitor{l,32,64,128} */ | ||
| 198 | size_t btree_grim_visitor(struct btree_head *head, struct btree_geo *geo, | ||
| 199 | unsigned long opaque, | ||
| 200 | void (*func)(void *elem, unsigned long opaque, | ||
| 201 | unsigned long *key, | ||
| 202 | size_t index, void *func2), | ||
| 203 | void *func2); | ||
| 204 | |||
| 205 | |||
| 206 | #include <linux/btree-128.h> | ||
| 207 | |||
| 208 | extern struct btree_geo btree_geo32; | ||
| 209 | #define BTREE_TYPE_SUFFIX l | ||
| 210 | #define BTREE_TYPE_BITS BITS_PER_LONG | ||
| 211 | #define BTREE_TYPE_GEO &btree_geo32 | ||
| 212 | #define BTREE_KEYTYPE unsigned long | ||
| 213 | #include <linux/btree-type.h> | ||
| 214 | |||
| 215 | #define btree_for_each_safel(head, key, val) \ | ||
| 216 | for (val = btree_lastl(head, &key); \ | ||
| 217 | val; \ | ||
| 218 | val = btree_get_prevl(head, &key)) | ||
| 219 | |||
| 220 | #define BTREE_TYPE_SUFFIX 32 | ||
| 221 | #define BTREE_TYPE_BITS 32 | ||
| 222 | #define BTREE_TYPE_GEO &btree_geo32 | ||
| 223 | #define BTREE_KEYTYPE u32 | ||
| 224 | #include <linux/btree-type.h> | ||
| 225 | |||
| 226 | #define btree_for_each_safe32(head, key, val) \ | ||
| 227 | for (val = btree_last32(head, &key); \ | ||
| 228 | val; \ | ||
| 229 | val = btree_get_prev32(head, &key)) | ||
| 230 | |||
| 231 | extern struct btree_geo btree_geo64; | ||
| 232 | #define BTREE_TYPE_SUFFIX 64 | ||
| 233 | #define BTREE_TYPE_BITS 64 | ||
| 234 | #define BTREE_TYPE_GEO &btree_geo64 | ||
| 235 | #define BTREE_KEYTYPE u64 | ||
| 236 | #include <linux/btree-type.h> | ||
| 237 | |||
| 238 | #define btree_for_each_safe64(head, key, val) \ | ||
| 239 | for (val = btree_last64(head, &key); \ | ||
| 240 | val; \ | ||
| 241 | val = btree_get_prev64(head, &key)) | ||
| 242 | |||
| 243 | #endif | ||
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index c9bbcb2a75ae..b8ad1ea99586 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
| @@ -37,16 +37,24 @@ extern void cgroup_post_fork(struct task_struct *p); | |||
| 37 | extern void cgroup_exit(struct task_struct *p, int run_callbacks); | 37 | extern void cgroup_exit(struct task_struct *p, int run_callbacks); |
| 38 | extern int cgroupstats_build(struct cgroupstats *stats, | 38 | extern int cgroupstats_build(struct cgroupstats *stats, |
| 39 | struct dentry *dentry); | 39 | struct dentry *dentry); |
| 40 | extern int cgroup_load_subsys(struct cgroup_subsys *ss); | ||
| 41 | extern void cgroup_unload_subsys(struct cgroup_subsys *ss); | ||
| 40 | 42 | ||
| 41 | extern const struct file_operations proc_cgroup_operations; | 43 | extern const struct file_operations proc_cgroup_operations; |
| 42 | 44 | ||
| 43 | /* Define the enumeration of all cgroup subsystems */ | 45 | /* Define the enumeration of all builtin cgroup subsystems */ |
| 44 | #define SUBSYS(_x) _x ## _subsys_id, | 46 | #define SUBSYS(_x) _x ## _subsys_id, |
| 45 | enum cgroup_subsys_id { | 47 | enum cgroup_subsys_id { |
| 46 | #include <linux/cgroup_subsys.h> | 48 | #include <linux/cgroup_subsys.h> |
| 47 | CGROUP_SUBSYS_COUNT | 49 | CGROUP_BUILTIN_SUBSYS_COUNT |
| 48 | }; | 50 | }; |
| 49 | #undef SUBSYS | 51 | #undef SUBSYS |
| 52 | /* | ||
| 53 | * This define indicates the maximum number of subsystems that can be loaded | ||
| 54 | * at once. We limit to this many since cgroupfs_root has subsys_bits to keep | ||
| 55 | * track of all of them. | ||
| 56 | */ | ||
| 57 | #define CGROUP_SUBSYS_COUNT (BITS_PER_BYTE*sizeof(unsigned long)) | ||
| 50 | 58 | ||
| 51 | /* Per-subsystem/per-cgroup state maintained by the system. */ | 59 | /* Per-subsystem/per-cgroup state maintained by the system. */ |
| 52 | struct cgroup_subsys_state { | 60 | struct cgroup_subsys_state { |
| @@ -76,6 +84,12 @@ enum { | |||
| 76 | CSS_REMOVED, /* This CSS is dead */ | 84 | CSS_REMOVED, /* This CSS is dead */ |
| 77 | }; | 85 | }; |
| 78 | 86 | ||
| 87 | /* Caller must verify that the css is not for root cgroup */ | ||
| 88 | static inline void __css_get(struct cgroup_subsys_state *css, int count) | ||
| 89 | { | ||
| 90 | atomic_add(count, &css->refcnt); | ||
| 91 | } | ||
| 92 | |||
| 79 | /* | 93 | /* |
| 80 | * Call css_get() to hold a reference on the css; it can be used | 94 | * Call css_get() to hold a reference on the css; it can be used |
| 81 | * for a reference obtained via: | 95 | * for a reference obtained via: |
| @@ -87,7 +101,7 @@ static inline void css_get(struct cgroup_subsys_state *css) | |||
| 87 | { | 101 | { |
| 88 | /* We don't need to reference count the root state */ | 102 | /* We don't need to reference count the root state */ |
| 89 | if (!test_bit(CSS_ROOT, &css->flags)) | 103 | if (!test_bit(CSS_ROOT, &css->flags)) |
| 90 | atomic_inc(&css->refcnt); | 104 | __css_get(css, 1); |
| 91 | } | 105 | } |
| 92 | 106 | ||
| 93 | static inline bool css_is_removed(struct cgroup_subsys_state *css) | 107 | static inline bool css_is_removed(struct cgroup_subsys_state *css) |
| @@ -118,11 +132,11 @@ static inline bool css_tryget(struct cgroup_subsys_state *css) | |||
| 118 | * css_get() or css_tryget() | 132 | * css_get() or css_tryget() |
| 119 | */ | 133 | */ |
| 120 | 134 | ||
| 121 | extern void __css_put(struct cgroup_subsys_state *css); | 135 | extern void __css_put(struct cgroup_subsys_state *css, int count); |
| 122 | static inline void css_put(struct cgroup_subsys_state *css) | 136 | static inline void css_put(struct cgroup_subsys_state *css) |
| 123 | { | 137 | { |
| 124 | if (!test_bit(CSS_ROOT, &css->flags)) | 138 | if (!test_bit(CSS_ROOT, &css->flags)) |
| 125 | __css_put(css); | 139 | __css_put(css, 1); |
| 126 | } | 140 | } |
| 127 | 141 | ||
| 128 | /* bits in struct cgroup flags field */ | 142 | /* bits in struct cgroup flags field */ |
| @@ -221,6 +235,10 @@ struct cgroup { | |||
| 221 | 235 | ||
| 222 | /* For RCU-protected deletion */ | 236 | /* For RCU-protected deletion */ |
| 223 | struct rcu_head rcu_head; | 237 | struct rcu_head rcu_head; |
| 238 | |||
| 239 | /* List of events which userspace want to recieve */ | ||
| 240 | struct list_head event_list; | ||
| 241 | spinlock_t event_list_lock; | ||
| 224 | }; | 242 | }; |
| 225 | 243 | ||
| 226 | /* | 244 | /* |
| @@ -258,7 +276,8 @@ struct css_set { | |||
| 258 | /* | 276 | /* |
| 259 | * Set of subsystem states, one for each subsystem. This array | 277 | * Set of subsystem states, one for each subsystem. This array |
| 260 | * is immutable after creation apart from the init_css_set | 278 | * is immutable after creation apart from the init_css_set |
| 261 | * during subsystem registration (at boot time). | 279 | * during subsystem registration (at boot time) and modular subsystem |
| 280 | * loading/unloading. | ||
| 262 | */ | 281 | */ |
| 263 | struct cgroup_subsys_state *subsys[CGROUP_SUBSYS_COUNT]; | 282 | struct cgroup_subsys_state *subsys[CGROUP_SUBSYS_COUNT]; |
| 264 | 283 | ||
| @@ -363,6 +382,23 @@ struct cftype { | |||
| 363 | int (*trigger)(struct cgroup *cgrp, unsigned int event); | 382 | int (*trigger)(struct cgroup *cgrp, unsigned int event); |
| 364 | 383 | ||
| 365 | int (*release)(struct inode *inode, struct file *file); | 384 | int (*release)(struct inode *inode, struct file *file); |
| 385 | |||
| 386 | /* | ||
| 387 | * register_event() callback will be used to add new userspace | ||
| 388 | * waiter for changes related to the cftype. Implement it if | ||
| 389 | * you want to provide this functionality. Use eventfd_signal() | ||
| 390 | * on eventfd to send notification to userspace. | ||
| 391 | */ | ||
| 392 | int (*register_event)(struct cgroup *cgrp, struct cftype *cft, | ||
| 393 | struct eventfd_ctx *eventfd, const char *args); | ||
| 394 | /* | ||
| 395 | * unregister_event() callback will be called when userspace | ||
| 396 | * closes the eventfd or on cgroup removing. | ||
| 397 | * This callback must be implemented, if you want provide | ||
| 398 | * notification functionality. | ||
| 399 | */ | ||
| 400 | int (*unregister_event)(struct cgroup *cgrp, struct cftype *cft, | ||
| 401 | struct eventfd_ctx *eventfd); | ||
| 366 | }; | 402 | }; |
| 367 | 403 | ||
| 368 | struct cgroup_scanner { | 404 | struct cgroup_scanner { |
| @@ -428,6 +464,8 @@ struct cgroup_subsys { | |||
| 428 | void (*destroy)(struct cgroup_subsys *ss, struct cgroup *cgrp); | 464 | void (*destroy)(struct cgroup_subsys *ss, struct cgroup *cgrp); |
| 429 | int (*can_attach)(struct cgroup_subsys *ss, struct cgroup *cgrp, | 465 | int (*can_attach)(struct cgroup_subsys *ss, struct cgroup *cgrp, |
| 430 | struct task_struct *tsk, bool threadgroup); | 466 | struct task_struct *tsk, bool threadgroup); |
| 467 | void (*cancel_attach)(struct cgroup_subsys *ss, struct cgroup *cgrp, | ||
| 468 | struct task_struct *tsk, bool threadgroup); | ||
| 431 | void (*attach)(struct cgroup_subsys *ss, struct cgroup *cgrp, | 469 | void (*attach)(struct cgroup_subsys *ss, struct cgroup *cgrp, |
| 432 | struct cgroup *old_cgrp, struct task_struct *tsk, | 470 | struct cgroup *old_cgrp, struct task_struct *tsk, |
| 433 | bool threadgroup); | 471 | bool threadgroup); |
| @@ -472,6 +510,9 @@ struct cgroup_subsys { | |||
| 472 | /* used when use_id == true */ | 510 | /* used when use_id == true */ |
| 473 | struct idr idr; | 511 | struct idr idr; |
| 474 | spinlock_t id_lock; | 512 | spinlock_t id_lock; |
| 513 | |||
| 514 | /* should be defined only by modular subsystems */ | ||
| 515 | struct module *module; | ||
| 475 | }; | 516 | }; |
| 476 | 517 | ||
| 477 | #define SUBSYS(_x) extern struct cgroup_subsys _x ## _subsys; | 518 | #define SUBSYS(_x) extern struct cgroup_subsys _x ## _subsys; |
diff --git a/include/linux/circ_buf.h b/include/linux/circ_buf.h index a2ed0591fb19..90f2471dc6f2 100644 --- a/include/linux/circ_buf.h +++ b/include/linux/circ_buf.h | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | /* | ||
| 2 | * See Documentation/circular-buffers.txt for more information. | ||
| 3 | */ | ||
| 4 | |||
| 1 | #ifndef _LINUX_CIRC_BUF_H | 5 | #ifndef _LINUX_CIRC_BUF_H |
| 2 | #define _LINUX_CIRC_BUF_H 1 | 6 | #define _LINUX_CIRC_BUF_H 1 |
| 3 | 7 | ||
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h index 0cf725bdd2a1..fc53492b6ad7 100644 --- a/include/linux/clockchips.h +++ b/include/linux/clockchips.h | |||
| @@ -73,6 +73,7 @@ enum clock_event_nofitiers { | |||
| 73 | * @list: list head for the management code | 73 | * @list: list head for the management code |
| 74 | * @mode: operating mode assigned by the management code | 74 | * @mode: operating mode assigned by the management code |
| 75 | * @next_event: local storage for the next event in oneshot mode | 75 | * @next_event: local storage for the next event in oneshot mode |
| 76 | * @retries: number of forced programming retries | ||
| 76 | */ | 77 | */ |
| 77 | struct clock_event_device { | 78 | struct clock_event_device { |
| 78 | const char *name; | 79 | const char *name; |
| @@ -93,6 +94,7 @@ struct clock_event_device { | |||
| 93 | struct list_head list; | 94 | struct list_head list; |
| 94 | enum clock_event_mode mode; | 95 | enum clock_event_mode mode; |
| 95 | ktime_t next_event; | 96 | ktime_t next_event; |
| 97 | unsigned long retries; | ||
| 96 | }; | 98 | }; |
| 97 | 99 | ||
| 98 | /* | 100 | /* |
diff --git a/include/linux/compat.h b/include/linux/compat.h index ef68119a4fd2..717c691ecd8e 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | typedef __compat_uid32_t compat_uid_t; | 23 | typedef __compat_uid32_t compat_uid_t; |
| 24 | typedef __compat_gid32_t compat_gid_t; | 24 | typedef __compat_gid32_t compat_gid_t; |
| 25 | 25 | ||
| 26 | struct compat_sel_arg_struct; | ||
| 26 | struct rusage; | 27 | struct rusage; |
| 27 | 28 | ||
| 28 | struct compat_itimerspec { | 29 | struct compat_itimerspec { |
| @@ -249,6 +250,8 @@ asmlinkage long compat_sys_select(int n, compat_ulong_t __user *inp, | |||
| 249 | compat_ulong_t __user *outp, compat_ulong_t __user *exp, | 250 | compat_ulong_t __user *outp, compat_ulong_t __user *exp, |
| 250 | struct compat_timeval __user *tvp); | 251 | struct compat_timeval __user *tvp); |
| 251 | 252 | ||
| 253 | asmlinkage long compat_sys_old_select(struct compat_sel_arg_struct __user *arg); | ||
| 254 | |||
| 252 | asmlinkage long compat_sys_wait4(compat_pid_t pid, | 255 | asmlinkage long compat_sys_wait4(compat_pid_t pid, |
| 253 | compat_uint_t __user *stat_addr, int options, | 256 | compat_uint_t __user *stat_addr, int options, |
| 254 | struct compat_rusage __user *ru); | 257 | struct compat_rusage __user *ru); |
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 188fcae10a99..a5a472b10746 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | 5 | ||
| 6 | #ifdef __CHECKER__ | 6 | #ifdef __CHECKER__ |
| 7 | # define __user __attribute__((noderef, address_space(1))) | 7 | # define __user __attribute__((noderef, address_space(1))) |
| 8 | # define __kernel /* default address space */ | 8 | # define __kernel __attribute__((address_space(0))) |
| 9 | # define __safe __attribute__((safe)) | 9 | # define __safe __attribute__((safe)) |
| 10 | # define __force __attribute__((force)) | 10 | # define __force __attribute__((force)) |
| 11 | # define __nocast __attribute__((nocast)) | 11 | # define __nocast __attribute__((nocast)) |
diff --git a/include/linux/coredump.h b/include/linux/coredump.h new file mode 100644 index 000000000000..8ba66a9d9022 --- /dev/null +++ b/include/linux/coredump.h | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | #ifndef _LINUX_COREDUMP_H | ||
| 2 | #define _LINUX_COREDUMP_H | ||
| 3 | |||
| 4 | #include <linux/types.h> | ||
| 5 | #include <linux/mm.h> | ||
| 6 | #include <linux/fs.h> | ||
| 7 | |||
| 8 | /* | ||
| 9 | * These are the only things you should do on a core-file: use only these | ||
| 10 | * functions to write out all the necessary info. | ||
| 11 | */ | ||
| 12 | static inline int dump_write(struct file *file, const void *addr, int nr) | ||
| 13 | { | ||
| 14 | return file->f_op->write(file, addr, nr, &file->f_pos) == nr; | ||
| 15 | } | ||
| 16 | |||
| 17 | static inline int dump_seek(struct file *file, loff_t off) | ||
| 18 | { | ||
| 19 | int ret = 1; | ||
| 20 | |||
| 21 | if (file->f_op->llseek && file->f_op->llseek != no_llseek) { | ||
| 22 | if (file->f_op->llseek(file, off, SEEK_CUR) < 0) | ||
| 23 | return 0; | ||
| 24 | } else { | ||
| 25 | char *buf = (char *)get_zeroed_page(GFP_KERNEL); | ||
| 26 | |||
| 27 | if (!buf) | ||
| 28 | return 0; | ||
| 29 | while (off > 0) { | ||
| 30 | unsigned long n = off; | ||
| 31 | |||
| 32 | if (n > PAGE_SIZE) | ||
| 33 | n = PAGE_SIZE; | ||
| 34 | if (!dump_write(file, buf, n)) { | ||
| 35 | ret = 0; | ||
| 36 | break; | ||
| 37 | } | ||
| 38 | off -= n; | ||
| 39 | } | ||
| 40 | free_page((unsigned long)buf); | ||
| 41 | } | ||
| 42 | return ret; | ||
| 43 | } | ||
| 44 | |||
| 45 | #endif /* _LINUX_COREDUMP_H */ | ||
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index dbcee7647d9a..bae6fe24d1f9 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
| @@ -90,10 +90,10 @@ extern const struct cpumask *const cpu_active_mask; | |||
| 90 | #define cpu_present(cpu) cpumask_test_cpu((cpu), cpu_present_mask) | 90 | #define cpu_present(cpu) cpumask_test_cpu((cpu), cpu_present_mask) |
| 91 | #define cpu_active(cpu) cpumask_test_cpu((cpu), cpu_active_mask) | 91 | #define cpu_active(cpu) cpumask_test_cpu((cpu), cpu_active_mask) |
| 92 | #else | 92 | #else |
| 93 | #define num_online_cpus() 1 | 93 | #define num_online_cpus() 1U |
| 94 | #define num_possible_cpus() 1 | 94 | #define num_possible_cpus() 1U |
| 95 | #define num_present_cpus() 1 | 95 | #define num_present_cpus() 1U |
| 96 | #define num_active_cpus() 1 | 96 | #define num_active_cpus() 1U |
| 97 | #define cpu_online(cpu) ((cpu) == 0) | 97 | #define cpu_online(cpu) ((cpu) == 0) |
| 98 | #define cpu_possible(cpu) ((cpu) == 0) | 98 | #define cpu_possible(cpu) ((cpu) == 0) |
| 99 | #define cpu_present(cpu) ((cpu) == 0) | 99 | #define cpu_present(cpu) ((cpu) == 0) |
diff --git a/include/linux/cred.h b/include/linux/cred.h index 4db09f89b637..52507c3e1387 100644 --- a/include/linux/cred.h +++ b/include/linux/cred.h | |||
| @@ -280,7 +280,7 @@ static inline void put_cred(const struct cred *_cred) | |||
| 280 | * task or by holding tasklist_lock to prevent it from being unlinked. | 280 | * task or by holding tasklist_lock to prevent it from being unlinked. |
| 281 | */ | 281 | */ |
| 282 | #define __task_cred(task) \ | 282 | #define __task_cred(task) \ |
| 283 | ((const struct cred *)(rcu_dereference_check((task)->real_cred, rcu_read_lock_held() || lockdep_is_held(&tasklist_lock)))) | 283 | ((const struct cred *)(rcu_dereference_check((task)->real_cred, rcu_read_lock_held() || lockdep_tasklist_lock_is_held()))) |
| 284 | 284 | ||
| 285 | /** | 285 | /** |
| 286 | * get_task_cred - Get another task's objective credentials | 286 | * get_task_cred - Get another task's objective credentials |
diff --git a/include/linux/decompress/mm.h b/include/linux/decompress/mm.h index 5032b9a31ae7..ad5ec1d0475e 100644 --- a/include/linux/decompress/mm.h +++ b/include/linux/decompress/mm.h | |||
| @@ -14,11 +14,21 @@ | |||
| 14 | 14 | ||
| 15 | /* Code active when included from pre-boot environment: */ | 15 | /* Code active when included from pre-boot environment: */ |
| 16 | 16 | ||
| 17 | /* | ||
| 18 | * Some architectures want to ensure there is no local data in their | ||
| 19 | * pre-boot environment, so that data can arbitarily relocated (via | ||
| 20 | * GOT references). This is achieved by defining STATIC_RW_DATA to | ||
| 21 | * be null. | ||
| 22 | */ | ||
| 23 | #ifndef STATIC_RW_DATA | ||
| 24 | #define STATIC_RW_DATA static | ||
| 25 | #endif | ||
| 26 | |||
| 17 | /* A trivial malloc implementation, adapted from | 27 | /* A trivial malloc implementation, adapted from |
| 18 | * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994 | 28 | * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994 |
| 19 | */ | 29 | */ |
| 20 | static unsigned long malloc_ptr; | 30 | STATIC_RW_DATA unsigned long malloc_ptr; |
| 21 | static int malloc_count; | 31 | STATIC_RW_DATA int malloc_count; |
| 22 | 32 | ||
| 23 | static void *malloc(int size) | 33 | static void *malloc(int size) |
| 24 | { | 34 | { |
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index d4c9c0b88adc..1381cd97b4ed 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h | |||
| @@ -118,10 +118,9 @@ struct dm_dev { | |||
| 118 | /* | 118 | /* |
| 119 | * Constructors should call these functions to ensure destination devices | 119 | * Constructors should call these functions to ensure destination devices |
| 120 | * are opened/closed correctly. | 120 | * are opened/closed correctly. |
| 121 | * FIXME: too many arguments. | ||
| 122 | */ | 121 | */ |
| 123 | int dm_get_device(struct dm_target *ti, const char *path, sector_t start, | 122 | int dm_get_device(struct dm_target *ti, const char *path, fmode_t mode, |
| 124 | sector_t len, fmode_t mode, struct dm_dev **result); | 123 | struct dm_dev **result); |
| 125 | void dm_put_device(struct dm_target *ti, struct dm_dev *d); | 124 | void dm_put_device(struct dm_target *ti, struct dm_dev *d); |
| 126 | 125 | ||
| 127 | /* | 126 | /* |
diff --git a/include/linux/device.h b/include/linux/device.h index b30527db3ac0..182192892d45 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
| @@ -106,7 +106,7 @@ extern int bus_unregister_notifier(struct bus_type *bus, | |||
| 106 | 106 | ||
| 107 | /* All 4 notifers below get called with the target struct device * | 107 | /* All 4 notifers below get called with the target struct device * |
| 108 | * as an argument. Note that those functions are likely to be called | 108 | * as an argument. Note that those functions are likely to be called |
| 109 | * with the device semaphore held in the core, so be careful. | 109 | * with the device lock held in the core, so be careful. |
| 110 | */ | 110 | */ |
| 111 | #define BUS_NOTIFY_ADD_DEVICE 0x00000001 /* device added */ | 111 | #define BUS_NOTIFY_ADD_DEVICE 0x00000001 /* device added */ |
| 112 | #define BUS_NOTIFY_DEL_DEVICE 0x00000002 /* device removed */ | 112 | #define BUS_NOTIFY_DEL_DEVICE 0x00000002 /* device removed */ |
| @@ -251,8 +251,10 @@ extern struct device *class_find_device(struct class *class, | |||
| 251 | 251 | ||
| 252 | struct class_attribute { | 252 | struct class_attribute { |
| 253 | struct attribute attr; | 253 | struct attribute attr; |
| 254 | ssize_t (*show)(struct class *class, char *buf); | 254 | ssize_t (*show)(struct class *class, struct class_attribute *attr, |
| 255 | ssize_t (*store)(struct class *class, const char *buf, size_t count); | 255 | char *buf); |
| 256 | ssize_t (*store)(struct class *class, struct class_attribute *attr, | ||
| 257 | const char *buf, size_t count); | ||
| 256 | }; | 258 | }; |
| 257 | 259 | ||
| 258 | #define CLASS_ATTR(_name, _mode, _show, _store) \ | 260 | #define CLASS_ATTR(_name, _mode, _show, _store) \ |
| @@ -263,6 +265,23 @@ extern int __must_check class_create_file(struct class *class, | |||
| 263 | extern void class_remove_file(struct class *class, | 265 | extern void class_remove_file(struct class *class, |
| 264 | const struct class_attribute *attr); | 266 | const struct class_attribute *attr); |
| 265 | 267 | ||
| 268 | /* Simple class attribute that is just a static string */ | ||
| 269 | |||
| 270 | struct class_attribute_string { | ||
| 271 | struct class_attribute attr; | ||
| 272 | char *str; | ||
| 273 | }; | ||
| 274 | |||
| 275 | /* Currently read-only only */ | ||
| 276 | #define _CLASS_ATTR_STRING(_name, _mode, _str) \ | ||
| 277 | { __ATTR(_name, _mode, show_class_attr_string, NULL), _str } | ||
| 278 | #define CLASS_ATTR_STRING(_name, _mode, _str) \ | ||
| 279 | struct class_attribute_string class_attr_##_name = \ | ||
| 280 | _CLASS_ATTR_STRING(_name, _mode, _str) | ||
| 281 | |||
| 282 | extern ssize_t show_class_attr_string(struct class *class, struct class_attribute *attr, | ||
| 283 | char *buf); | ||
| 284 | |||
| 266 | struct class_interface { | 285 | struct class_interface { |
| 267 | struct list_head node; | 286 | struct list_head node; |
| 268 | struct class *class; | 287 | struct class *class; |
| @@ -489,6 +508,21 @@ static inline bool device_async_suspend_enabled(struct device *dev) | |||
| 489 | return !!dev->power.async_suspend; | 508 | return !!dev->power.async_suspend; |
| 490 | } | 509 | } |
| 491 | 510 | ||
| 511 | static inline void device_lock(struct device *dev) | ||
| 512 | { | ||
| 513 | down(&dev->sem); | ||
| 514 | } | ||
| 515 | |||
| 516 | static inline int device_trylock(struct device *dev) | ||
| 517 | { | ||
| 518 | return down_trylock(&dev->sem); | ||
| 519 | } | ||
| 520 | |||
| 521 | static inline void device_unlock(struct device *dev) | ||
| 522 | { | ||
| 523 | up(&dev->sem); | ||
| 524 | } | ||
| 525 | |||
| 492 | void driver_init(void); | 526 | void driver_init(void); |
| 493 | 527 | ||
| 494 | /* | 528 | /* |
diff --git a/include/linux/dm-io.h b/include/linux/dm-io.h index b6bf17ee2f61..5c9186b93fff 100644 --- a/include/linux/dm-io.h +++ b/include/linux/dm-io.h | |||
| @@ -37,14 +37,14 @@ enum dm_io_mem_type { | |||
| 37 | struct dm_io_memory { | 37 | struct dm_io_memory { |
| 38 | enum dm_io_mem_type type; | 38 | enum dm_io_mem_type type; |
| 39 | 39 | ||
| 40 | unsigned offset; | ||
| 41 | |||
| 40 | union { | 42 | union { |
| 41 | struct page_list *pl; | 43 | struct page_list *pl; |
| 42 | struct bio_vec *bvec; | 44 | struct bio_vec *bvec; |
| 43 | void *vma; | 45 | void *vma; |
| 44 | void *addr; | 46 | void *addr; |
| 45 | } ptr; | 47 | } ptr; |
| 46 | |||
| 47 | unsigned offset; | ||
| 48 | }; | 48 | }; |
| 49 | 49 | ||
| 50 | struct dm_io_notify { | 50 | struct dm_io_notify { |
diff --git a/include/linux/dm-ioctl.h b/include/linux/dm-ioctl.h index aa95508d2f95..2c445e113790 100644 --- a/include/linux/dm-ioctl.h +++ b/include/linux/dm-ioctl.h | |||
| @@ -266,9 +266,9 @@ enum { | |||
| 266 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) | 266 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) |
| 267 | 267 | ||
| 268 | #define DM_VERSION_MAJOR 4 | 268 | #define DM_VERSION_MAJOR 4 |
| 269 | #define DM_VERSION_MINOR 16 | 269 | #define DM_VERSION_MINOR 17 |
| 270 | #define DM_VERSION_PATCHLEVEL 0 | 270 | #define DM_VERSION_PATCHLEVEL 0 |
| 271 | #define DM_VERSION_EXTRA "-ioctl (2009-11-05)" | 271 | #define DM_VERSION_EXTRA "-ioctl (2010-03-05)" |
| 272 | 272 | ||
| 273 | /* Status bits */ | 273 | /* Status bits */ |
| 274 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ | 274 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ |
| @@ -316,4 +316,9 @@ enum { | |||
| 316 | */ | 316 | */ |
| 317 | #define DM_QUERY_INACTIVE_TABLE_FLAG (1 << 12) /* In */ | 317 | #define DM_QUERY_INACTIVE_TABLE_FLAG (1 << 12) /* In */ |
| 318 | 318 | ||
| 319 | /* | ||
| 320 | * If set, a uevent was generated for which the caller may need to wait. | ||
| 321 | */ | ||
| 322 | #define DM_UEVENT_GENERATED_FLAG (1 << 13) /* Out */ | ||
| 323 | |||
| 319 | #endif /* _LINUX_DM_IOCTL_H */ | 324 | #endif /* _LINUX_DM_IOCTL_H */ |
diff --git a/include/linux/dm9000.h b/include/linux/dm9000.h index c30879cf93bc..96e87693d933 100644 --- a/include/linux/dm9000.h +++ b/include/linux/dm9000.h | |||
| @@ -23,7 +23,7 @@ | |||
| 23 | #define DM9000_PLATF_NO_EEPROM (0x0010) | 23 | #define DM9000_PLATF_NO_EEPROM (0x0010) |
| 24 | #define DM9000_PLATF_SIMPLE_PHY (0x0020) /* Use NSR to find LinkStatus */ | 24 | #define DM9000_PLATF_SIMPLE_PHY (0x0020) /* Use NSR to find LinkStatus */ |
| 25 | 25 | ||
| 26 | /* platfrom data for platfrom device structure's platfrom_data field */ | 26 | /* platform data for platform device structure's platform_data field */ |
| 27 | 27 | ||
| 28 | struct dm9000_plat_data { | 28 | struct dm9000_plat_data { |
| 29 | unsigned int flags; | 29 | unsigned int flags; |
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 91b761846061..ca32ed78b057 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h | |||
| @@ -127,6 +127,14 @@ static inline u64 dma_get_mask(struct device *dev) | |||
| 127 | return DMA_BIT_MASK(32); | 127 | return DMA_BIT_MASK(32); |
| 128 | } | 128 | } |
| 129 | 129 | ||
| 130 | static inline int dma_set_coherent_mask(struct device *dev, u64 mask) | ||
| 131 | { | ||
| 132 | if (!dma_supported(dev, mask)) | ||
| 133 | return -EIO; | ||
| 134 | dev->coherent_dma_mask = mask; | ||
| 135 | return 0; | ||
| 136 | } | ||
| 137 | |||
| 130 | extern u64 dma_get_required_mask(struct device *dev); | 138 | extern u64 dma_get_required_mask(struct device *dev); |
| 131 | 139 | ||
| 132 | static inline unsigned int dma_get_max_seg_size(struct device *dev) | 140 | static inline unsigned int dma_get_max_seg_size(struct device *dev) |
| @@ -232,4 +240,20 @@ struct dma_attrs; | |||
| 232 | 240 | ||
| 233 | #endif /* CONFIG_HAVE_DMA_ATTRS */ | 241 | #endif /* CONFIG_HAVE_DMA_ATTRS */ |
| 234 | 242 | ||
| 243 | #ifdef CONFIG_NEED_DMA_MAP_STATE | ||
| 244 | #define DEFINE_DMA_UNMAP_ADDR(ADDR_NAME) dma_addr_t ADDR_NAME | ||
| 245 | #define DEFINE_DMA_UNMAP_LEN(LEN_NAME) __u32 LEN_NAME | ||
| 246 | #define dma_unmap_addr(PTR, ADDR_NAME) ((PTR)->ADDR_NAME) | ||
| 247 | #define dma_unmap_addr_set(PTR, ADDR_NAME, VAL) (((PTR)->ADDR_NAME) = (VAL)) | ||
| 248 | #define dma_unmap_len(PTR, LEN_NAME) ((PTR)->LEN_NAME) | ||
| 249 | #define dma_unmap_len_set(PTR, LEN_NAME, VAL) (((PTR)->LEN_NAME) = (VAL)) | ||
| 250 | #else | ||
| 251 | #define DEFINE_DMA_UNMAP_ADDR(ADDR_NAME) | ||
| 252 | #define DEFINE_DMA_UNMAP_LEN(LEN_NAME) | ||
| 253 | #define dma_unmap_addr(PTR, ADDR_NAME) (0) | ||
| 254 | #define dma_unmap_addr_set(PTR, ADDR_NAME, VAL) do { } while (0) | ||
| 255 | #define dma_unmap_len(PTR, LEN_NAME) (0) | ||
| 256 | #define dma_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) | ||
| 257 | #endif | ||
| 258 | |||
| 235 | #endif | 259 | #endif |
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 78784982b33e..20ea12c86fd0 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
| @@ -31,6 +31,8 @@ | |||
| 31 | * if dma_cookie_t is >0 it's a DMA request cookie, <0 it's an error code | 31 | * if dma_cookie_t is >0 it's a DMA request cookie, <0 it's an error code |
| 32 | */ | 32 | */ |
| 33 | typedef s32 dma_cookie_t; | 33 | typedef s32 dma_cookie_t; |
| 34 | #define DMA_MIN_COOKIE 1 | ||
| 35 | #define DMA_MAX_COOKIE INT_MAX | ||
| 34 | 36 | ||
| 35 | #define dma_submit_error(cookie) ((cookie) < 0 ? 1 : 0) | 37 | #define dma_submit_error(cookie) ((cookie) < 0 ? 1 : 0) |
| 36 | 38 | ||
| @@ -162,7 +164,7 @@ struct dma_chan { | |||
| 162 | struct dma_chan_dev *dev; | 164 | struct dma_chan_dev *dev; |
| 163 | 165 | ||
| 164 | struct list_head device_node; | 166 | struct list_head device_node; |
| 165 | struct dma_chan_percpu *local; | 167 | struct dma_chan_percpu __percpu *local; |
| 166 | int client_count; | 168 | int client_count; |
| 167 | int table_count; | 169 | int table_count; |
| 168 | void *private; | 170 | void *private; |
diff --git a/include/linux/early_res.h b/include/linux/early_res.h new file mode 100644 index 000000000000..29c09f57a13c --- /dev/null +++ b/include/linux/early_res.h | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | #ifndef _LINUX_EARLY_RES_H | ||
| 2 | #define _LINUX_EARLY_RES_H | ||
| 3 | #ifdef __KERNEL__ | ||
| 4 | |||
| 5 | extern void reserve_early(u64 start, u64 end, char *name); | ||
| 6 | extern void reserve_early_overlap_ok(u64 start, u64 end, char *name); | ||
| 7 | extern void free_early(u64 start, u64 end); | ||
| 8 | void free_early_partial(u64 start, u64 end); | ||
| 9 | extern void early_res_to_bootmem(u64 start, u64 end); | ||
| 10 | |||
| 11 | void reserve_early_without_check(u64 start, u64 end, char *name); | ||
| 12 | u64 find_early_area(u64 ei_start, u64 ei_last, u64 start, u64 end, | ||
| 13 | u64 size, u64 align); | ||
| 14 | u64 find_early_area_size(u64 ei_start, u64 ei_last, u64 start, | ||
| 15 | u64 *sizep, u64 align); | ||
| 16 | u64 find_fw_memmap_area(u64 start, u64 end, u64 size, u64 align); | ||
| 17 | u64 get_max_mapped(void); | ||
| 18 | #include <linux/range.h> | ||
| 19 | int get_free_all_memory_range(struct range **rangep, int nodeid); | ||
| 20 | |||
| 21 | #endif /* __KERNEL__ */ | ||
| 22 | |||
| 23 | #endif /* _LINUX_EARLY_RES_H */ | ||
diff --git a/include/linux/elf.h b/include/linux/elf.h index ad990c5f63f6..597858418051 100644 --- a/include/linux/elf.h +++ b/include/linux/elf.h | |||
| @@ -50,6 +50,28 @@ typedef __s64 Elf64_Sxword; | |||
| 50 | 50 | ||
| 51 | #define PT_GNU_STACK (PT_LOOS + 0x474e551) | 51 | #define PT_GNU_STACK (PT_LOOS + 0x474e551) |
| 52 | 52 | ||
| 53 | /* | ||
| 54 | * Extended Numbering | ||
| 55 | * | ||
| 56 | * If the real number of program header table entries is larger than | ||
| 57 | * or equal to PN_XNUM(0xffff), it is set to sh_info field of the | ||
| 58 | * section header at index 0, and PN_XNUM is set to e_phnum | ||
| 59 | * field. Otherwise, the section header at index 0 is zero | ||
| 60 | * initialized, if it exists. | ||
| 61 | * | ||
| 62 | * Specifications are available in: | ||
| 63 | * | ||
| 64 | * - Sun microsystems: Linker and Libraries. | ||
| 65 | * Part No: 817-1984-17, September 2008. | ||
| 66 | * URL: http://docs.sun.com/app/docs/doc/817-1984 | ||
| 67 | * | ||
| 68 | * - System V ABI AMD64 Architecture Processor Supplement | ||
| 69 | * Draft Version 0.99., | ||
| 70 | * May 11, 2009. | ||
| 71 | * URL: http://www.x86-64.org/ | ||
| 72 | */ | ||
| 73 | #define PN_XNUM 0xffff | ||
| 74 | |||
| 53 | /* These constants define the different elf file types */ | 75 | /* These constants define the different elf file types */ |
| 54 | #define ET_NONE 0 | 76 | #define ET_NONE 0 |
| 55 | #define ET_REL 1 | 77 | #define ET_REL 1 |
| @@ -286,7 +308,7 @@ typedef struct elf64_phdr { | |||
| 286 | #define SHN_COMMON 0xfff2 | 308 | #define SHN_COMMON 0xfff2 |
| 287 | #define SHN_HIRESERVE 0xffff | 309 | #define SHN_HIRESERVE 0xffff |
| 288 | 310 | ||
| 289 | typedef struct { | 311 | typedef struct elf32_shdr { |
| 290 | Elf32_Word sh_name; | 312 | Elf32_Word sh_name; |
| 291 | Elf32_Word sh_type; | 313 | Elf32_Word sh_type; |
| 292 | Elf32_Word sh_flags; | 314 | Elf32_Word sh_flags; |
| @@ -394,16 +416,20 @@ typedef struct elf64_note { | |||
| 394 | extern Elf32_Dyn _DYNAMIC []; | 416 | extern Elf32_Dyn _DYNAMIC []; |
| 395 | #define elfhdr elf32_hdr | 417 | #define elfhdr elf32_hdr |
| 396 | #define elf_phdr elf32_phdr | 418 | #define elf_phdr elf32_phdr |
| 419 | #define elf_shdr elf32_shdr | ||
| 397 | #define elf_note elf32_note | 420 | #define elf_note elf32_note |
| 398 | #define elf_addr_t Elf32_Off | 421 | #define elf_addr_t Elf32_Off |
| 422 | #define Elf_Half Elf32_Half | ||
| 399 | 423 | ||
| 400 | #else | 424 | #else |
| 401 | 425 | ||
| 402 | extern Elf64_Dyn _DYNAMIC []; | 426 | extern Elf64_Dyn _DYNAMIC []; |
| 403 | #define elfhdr elf64_hdr | 427 | #define elfhdr elf64_hdr |
| 404 | #define elf_phdr elf64_phdr | 428 | #define elf_phdr elf64_phdr |
| 429 | #define elf_shdr elf64_shdr | ||
| 405 | #define elf_note elf64_note | 430 | #define elf_note elf64_note |
| 406 | #define elf_addr_t Elf64_Off | 431 | #define elf_addr_t Elf64_Off |
| 432 | #define Elf_Half Elf64_Half | ||
| 407 | 433 | ||
| 408 | #endif | 434 | #endif |
| 409 | 435 | ||
diff --git a/include/linux/elfcore.h b/include/linux/elfcore.h index 00d6a68d0421..e687bc3ba4da 100644 --- a/include/linux/elfcore.h +++ b/include/linux/elfcore.h | |||
| @@ -8,6 +8,8 @@ | |||
| 8 | #include <linux/user.h> | 8 | #include <linux/user.h> |
| 9 | #endif | 9 | #endif |
| 10 | #include <linux/ptrace.h> | 10 | #include <linux/ptrace.h> |
| 11 | #include <linux/elf.h> | ||
| 12 | #include <linux/fs.h> | ||
| 11 | 13 | ||
| 12 | struct elf_siginfo | 14 | struct elf_siginfo |
| 13 | { | 15 | { |
| @@ -150,5 +152,20 @@ static inline int elf_core_copy_task_xfpregs(struct task_struct *t, elf_fpxregse | |||
| 150 | 152 | ||
| 151 | #endif /* __KERNEL__ */ | 153 | #endif /* __KERNEL__ */ |
| 152 | 154 | ||
| 155 | /* | ||
| 156 | * These functions parameterize elf_core_dump in fs/binfmt_elf.c to write out | ||
| 157 | * extra segments containing the gate DSO contents. Dumping its | ||
| 158 | * contents makes post-mortem fully interpretable later without matching up | ||
| 159 | * the same kernel and hardware config to see what PC values meant. | ||
| 160 | * Dumping its extra ELF program headers includes all the other information | ||
| 161 | * a debugger needs to easily find how the gate DSO was being used. | ||
| 162 | */ | ||
| 163 | extern Elf_Half elf_core_extra_phdrs(void); | ||
| 164 | extern int | ||
| 165 | elf_core_write_extra_phdrs(struct file *file, loff_t offset, size_t *size, | ||
| 166 | unsigned long limit); | ||
| 167 | extern int | ||
| 168 | elf_core_write_extra_data(struct file *file, size_t *size, unsigned long limit); | ||
| 169 | extern size_t elf_core_extra_data_size(void); | ||
| 153 | 170 | ||
| 154 | #endif /* _LINUX_ELFCORE_H */ | 171 | #endif /* _LINUX_ELFCORE_H */ |
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index cca1c3de140d..b33f316bb92e 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
| @@ -61,6 +61,13 @@ struct ethtool_drvinfo { | |||
| 61 | /* For PCI devices, use pci_name(pci_dev). */ | 61 | /* For PCI devices, use pci_name(pci_dev). */ |
| 62 | char reserved1[32]; | 62 | char reserved1[32]; |
| 63 | char reserved2[12]; | 63 | char reserved2[12]; |
| 64 | /* | ||
| 65 | * Some struct members below are filled in | ||
| 66 | * using ops->get_sset_count(). Obtaining | ||
| 67 | * this info from ethtool_drvinfo is now | ||
| 68 | * deprecated; Use ETHTOOL_GSSET_INFO | ||
| 69 | * instead. | ||
| 70 | */ | ||
| 64 | __u32 n_priv_flags; /* number of flags valid in ETHTOOL_GPFLAGS */ | 71 | __u32 n_priv_flags; /* number of flags valid in ETHTOOL_GPFLAGS */ |
| 65 | __u32 n_stats; /* number of u64's from ETHTOOL_GSTATS */ | 72 | __u32 n_stats; /* number of u64's from ETHTOOL_GSTATS */ |
| 66 | __u32 testinfo_len; | 73 | __u32 testinfo_len; |
| @@ -253,6 +260,17 @@ struct ethtool_gstrings { | |||
| 253 | __u8 data[0]; | 260 | __u8 data[0]; |
| 254 | }; | 261 | }; |
| 255 | 262 | ||
| 263 | struct ethtool_sset_info { | ||
| 264 | __u32 cmd; /* ETHTOOL_GSSET_INFO */ | ||
| 265 | __u32 reserved; | ||
| 266 | __u64 sset_mask; /* input: each bit selects an sset to query */ | ||
| 267 | /* output: each bit a returned sset */ | ||
| 268 | __u32 data[0]; /* ETH_SS_xxx count, in order, based on bits | ||
| 269 | in sset_mask. One bit implies one | ||
| 270 | __u32, two bits implies two | ||
| 271 | __u32's, etc. */ | ||
| 272 | }; | ||
| 273 | |||
| 256 | enum ethtool_test_flags { | 274 | enum ethtool_test_flags { |
| 257 | ETH_TEST_FL_OFFLINE = (1 << 0), /* online / offline */ | 275 | ETH_TEST_FL_OFFLINE = (1 << 0), /* online / offline */ |
| 258 | ETH_TEST_FL_FAILED = (1 << 1), /* test passed / failed */ | 276 | ETH_TEST_FL_FAILED = (1 << 1), /* test passed / failed */ |
| @@ -606,9 +624,9 @@ struct ethtool_ops { | |||
| 606 | #define ETHTOOL_SRXCLSRLINS 0x00000032 /* Insert RX classification rule */ | 624 | #define ETHTOOL_SRXCLSRLINS 0x00000032 /* Insert RX classification rule */ |
| 607 | #define ETHTOOL_FLASHDEV 0x00000033 /* Flash firmware to device */ | 625 | #define ETHTOOL_FLASHDEV 0x00000033 /* Flash firmware to device */ |
| 608 | #define ETHTOOL_RESET 0x00000034 /* Reset hardware */ | 626 | #define ETHTOOL_RESET 0x00000034 /* Reset hardware */ |
| 609 | 627 | #define ETHTOOL_SRXNTUPLE 0x00000035 /* Add an n-tuple filter to device */ | |
| 610 | #define ETHTOOL_SRXNTUPLE 0x00000035 /* Add an n-tuple filter to device */ | 628 | #define ETHTOOL_GRXNTUPLE 0x00000036 /* Get n-tuple filters from device */ |
| 611 | #define ETHTOOL_GRXNTUPLE 0x00000036 /* Get n-tuple filters from device */ | 629 | #define ETHTOOL_GSSET_INFO 0x00000037 /* Get string set info */ |
| 612 | 630 | ||
| 613 | /* compatibility with older code */ | 631 | /* compatibility with older code */ |
| 614 | #define SPARC_ETH_GSET ETHTOOL_GSET | 632 | #define SPARC_ETH_GSET ETHTOOL_GSET |
diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h index dc12f416a49f..a9cd507f8cd2 100644 --- a/include/linux/exportfs.h +++ b/include/linux/exportfs.h | |||
| @@ -96,6 +96,7 @@ struct fid { | |||
| 96 | * @fh_to_parent: find the implied object's parent and get a dentry for it | 96 | * @fh_to_parent: find the implied object's parent and get a dentry for it |
| 97 | * @get_name: find the name for a given inode in a given directory | 97 | * @get_name: find the name for a given inode in a given directory |
| 98 | * @get_parent: find the parent of a given directory | 98 | * @get_parent: find the parent of a given directory |
| 99 | * @commit_metadata: commit metadata changes to stable storage | ||
| 99 | * | 100 | * |
| 100 | * See Documentation/filesystems/nfs/Exporting for details on how to use | 101 | * See Documentation/filesystems/nfs/Exporting for details on how to use |
| 101 | * this interface correctly. | 102 | * this interface correctly. |
| @@ -137,6 +138,9 @@ struct fid { | |||
| 137 | * is also a directory. In the event that it cannot be found, or storage | 138 | * is also a directory. In the event that it cannot be found, or storage |
| 138 | * space cannot be allocated, a %ERR_PTR should be returned. | 139 | * space cannot be allocated, a %ERR_PTR should be returned. |
| 139 | * | 140 | * |
| 141 | * commit_metadata: | ||
| 142 | * @commit_metadata should commit metadata changes to stable storage. | ||
| 143 | * | ||
| 140 | * Locking rules: | 144 | * Locking rules: |
| 141 | * get_parent is called with child->d_inode->i_mutex down | 145 | * get_parent is called with child->d_inode->i_mutex down |
| 142 | * get_name is not (which is possibly inconsistent) | 146 | * get_name is not (which is possibly inconsistent) |
| @@ -152,6 +156,7 @@ struct export_operations { | |||
| 152 | int (*get_name)(struct dentry *parent, char *name, | 156 | int (*get_name)(struct dentry *parent, char *name, |
| 153 | struct dentry *child); | 157 | struct dentry *child); |
| 154 | struct dentry * (*get_parent)(struct dentry *child); | 158 | struct dentry * (*get_parent)(struct dentry *child); |
| 159 | int (*commit_metadata)(struct inode *inode); | ||
| 155 | }; | 160 | }; |
| 156 | 161 | ||
| 157 | extern int exportfs_encode_fh(struct dentry *dentry, struct fid *fid, | 162 | extern int exportfs_encode_fh(struct dentry *dentry, struct fid *fid, |
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index 6b049030fbe6..5f494b465097 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
| @@ -202,14 +202,6 @@ static inline __u32 ext3_mask_flags(umode_t mode, __u32 flags) | |||
| 202 | return flags & EXT3_OTHER_FLMASK; | 202 | return flags & EXT3_OTHER_FLMASK; |
| 203 | } | 203 | } |
| 204 | 204 | ||
| 205 | /* | ||
| 206 | * Inode dynamic state flags | ||
| 207 | */ | ||
| 208 | #define EXT3_STATE_JDATA 0x00000001 /* journaled data exists */ | ||
| 209 | #define EXT3_STATE_NEW 0x00000002 /* inode is newly created */ | ||
| 210 | #define EXT3_STATE_XATTR 0x00000004 /* has in-inode xattrs */ | ||
| 211 | #define EXT3_STATE_FLUSH_ON_CLOSE 0x00000008 | ||
| 212 | |||
| 213 | /* Used to pass group descriptor data when online resize is done */ | 205 | /* Used to pass group descriptor data when online resize is done */ |
| 214 | struct ext3_new_group_input { | 206 | struct ext3_new_group_input { |
| 215 | __u32 group; /* Group number for this data */ | 207 | __u32 group; /* Group number for this data */ |
| @@ -560,6 +552,31 @@ static inline int ext3_valid_inum(struct super_block *sb, unsigned long ino) | |||
| 560 | (ino >= EXT3_FIRST_INO(sb) && | 552 | (ino >= EXT3_FIRST_INO(sb) && |
| 561 | ino <= le32_to_cpu(EXT3_SB(sb)->s_es->s_inodes_count)); | 553 | ino <= le32_to_cpu(EXT3_SB(sb)->s_es->s_inodes_count)); |
| 562 | } | 554 | } |
| 555 | |||
| 556 | /* | ||
| 557 | * Inode dynamic state flags | ||
| 558 | */ | ||
| 559 | enum { | ||
| 560 | EXT3_STATE_JDATA, /* journaled data exists */ | ||
| 561 | EXT3_STATE_NEW, /* inode is newly created */ | ||
| 562 | EXT3_STATE_XATTR, /* has in-inode xattrs */ | ||
| 563 | EXT3_STATE_FLUSH_ON_CLOSE, /* flush dirty pages on close */ | ||
| 564 | }; | ||
| 565 | |||
| 566 | static inline int ext3_test_inode_state(struct inode *inode, int bit) | ||
| 567 | { | ||
| 568 | return test_bit(bit, &EXT3_I(inode)->i_state_flags); | ||
| 569 | } | ||
| 570 | |||
| 571 | static inline void ext3_set_inode_state(struct inode *inode, int bit) | ||
| 572 | { | ||
| 573 | set_bit(bit, &EXT3_I(inode)->i_state_flags); | ||
| 574 | } | ||
| 575 | |||
| 576 | static inline void ext3_clear_inode_state(struct inode *inode, int bit) | ||
| 577 | { | ||
| 578 | clear_bit(bit, &EXT3_I(inode)->i_state_flags); | ||
| 579 | } | ||
| 563 | #else | 580 | #else |
| 564 | /* Assume that user mode programs are passing in an ext3fs superblock, not | 581 | /* Assume that user mode programs are passing in an ext3fs superblock, not |
| 565 | * a kernel struct super_block. This will allow us to call the feature-test | 582 | * a kernel struct super_block. This will allow us to call the feature-test |
| @@ -877,7 +894,7 @@ int ext3_get_blocks_handle(handle_t *handle, struct inode *inode, | |||
| 877 | int create); | 894 | int create); |
| 878 | 895 | ||
| 879 | extern struct inode *ext3_iget(struct super_block *, unsigned long); | 896 | extern struct inode *ext3_iget(struct super_block *, unsigned long); |
| 880 | extern int ext3_write_inode (struct inode *, int); | 897 | extern int ext3_write_inode (struct inode *, struct writeback_control *); |
| 881 | extern int ext3_setattr (struct dentry *, struct iattr *); | 898 | extern int ext3_setattr (struct dentry *, struct iattr *); |
| 882 | extern void ext3_delete_inode (struct inode *); | 899 | extern void ext3_delete_inode (struct inode *); |
| 883 | extern int ext3_sync_inode (handle_t *, struct inode *); | 900 | extern int ext3_sync_inode (handle_t *, struct inode *); |
diff --git a/include/linux/ext3_fs_i.h b/include/linux/ext3_fs_i.h index 93e7428156ba..f42c098aed8d 100644 --- a/include/linux/ext3_fs_i.h +++ b/include/linux/ext3_fs_i.h | |||
| @@ -87,7 +87,7 @@ struct ext3_inode_info { | |||
| 87 | * near to their parent directory's inode. | 87 | * near to their parent directory's inode. |
| 88 | */ | 88 | */ |
| 89 | __u32 i_block_group; | 89 | __u32 i_block_group; |
| 90 | __u32 i_state; /* Dynamic state flags for ext3 */ | 90 | unsigned long i_state_flags; /* Dynamic state flags for ext3 */ |
| 91 | 91 | ||
| 92 | /* block reservation info */ | 92 | /* block reservation info */ |
| 93 | struct ext3_block_alloc_info *i_block_alloc_info; | 93 | struct ext3_block_alloc_info *i_block_alloc_info; |
diff --git a/include/linux/fault-inject.h b/include/linux/fault-inject.h index 06ca9b21dad2..7b64ad40e4ce 100644 --- a/include/linux/fault-inject.h +++ b/include/linux/fault-inject.h | |||
| @@ -82,9 +82,10 @@ static inline void cleanup_fault_attr_dentries(struct fault_attr *attr) | |||
| 82 | #endif /* CONFIG_FAULT_INJECTION */ | 82 | #endif /* CONFIG_FAULT_INJECTION */ |
| 83 | 83 | ||
| 84 | #ifdef CONFIG_FAILSLAB | 84 | #ifdef CONFIG_FAILSLAB |
| 85 | extern bool should_failslab(size_t size, gfp_t gfpflags); | 85 | extern bool should_failslab(size_t size, gfp_t gfpflags, unsigned long flags); |
| 86 | #else | 86 | #else |
| 87 | static inline bool should_failslab(size_t size, gfp_t gfpflags) | 87 | static inline bool should_failslab(size_t size, gfp_t gfpflags, |
| 88 | unsigned long flags) | ||
| 88 | { | 89 | { |
| 89 | return false; | 90 | return false; |
| 90 | } | 91 | } |
diff --git a/include/linux/fb.h b/include/linux/fb.h index 369767bd873e..c10163b4c40e 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
| @@ -543,6 +543,8 @@ struct fb_cursor_user { | |||
| 543 | #define FB_EVENT_GET_REQ 0x0D | 543 | #define FB_EVENT_GET_REQ 0x0D |
| 544 | /* Unbind from the console if possible */ | 544 | /* Unbind from the console if possible */ |
| 545 | #define FB_EVENT_FB_UNBIND 0x0E | 545 | #define FB_EVENT_FB_UNBIND 0x0E |
| 546 | /* CONSOLE-SPECIFIC: remap all consoles to new fb - for vga switcheroo */ | ||
| 547 | #define FB_EVENT_REMAP_ALL_CONSOLE 0x0F | ||
| 546 | 548 | ||
| 547 | struct fb_event { | 549 | struct fb_event { |
| 548 | struct fb_info *info; | 550 | struct fb_info *info; |
diff --git a/include/linux/firewire-cdev.h b/include/linux/firewire-cdev.h index 520ecf86cbb3..40b11013408e 100644 --- a/include/linux/firewire-cdev.h +++ b/include/linux/firewire-cdev.h | |||
| @@ -248,13 +248,20 @@ union fw_cdev_event { | |||
| 248 | #define FW_CDEV_IOC_SEND_BROADCAST_REQUEST _IOW('#', 0x12, struct fw_cdev_send_request) | 248 | #define FW_CDEV_IOC_SEND_BROADCAST_REQUEST _IOW('#', 0x12, struct fw_cdev_send_request) |
| 249 | #define FW_CDEV_IOC_SEND_STREAM_PACKET _IOW('#', 0x13, struct fw_cdev_send_stream_packet) | 249 | #define FW_CDEV_IOC_SEND_STREAM_PACKET _IOW('#', 0x13, struct fw_cdev_send_stream_packet) |
| 250 | 250 | ||
| 251 | /* available since kernel version 2.6.34 */ | ||
| 252 | #define FW_CDEV_IOC_GET_CYCLE_TIMER2 _IOWR('#', 0x14, struct fw_cdev_get_cycle_timer2) | ||
| 253 | |||
| 251 | /* | 254 | /* |
| 252 | * FW_CDEV_VERSION History | 255 | * FW_CDEV_VERSION History |
| 253 | * 1 (2.6.22) - initial version | 256 | * 1 (2.6.22) - initial version |
| 254 | * 2 (2.6.30) - changed &fw_cdev_event_iso_interrupt.header if | 257 | * 2 (2.6.30) - changed &fw_cdev_event_iso_interrupt.header if |
| 255 | * &fw_cdev_create_iso_context.header_size is 8 or more | 258 | * &fw_cdev_create_iso_context.header_size is 8 or more |
| 259 | * (2.6.32) - added time stamp to xmit &fw_cdev_event_iso_interrupt | ||
| 260 | * (2.6.33) - IR has always packet-per-buffer semantics now, not one of | ||
| 261 | * dual-buffer or packet-per-buffer depending on hardware | ||
| 262 | * 3 (2.6.34) - made &fw_cdev_get_cycle_timer reliable | ||
| 256 | */ | 263 | */ |
| 257 | #define FW_CDEV_VERSION 2 | 264 | #define FW_CDEV_VERSION 3 |
| 258 | 265 | ||
| 259 | /** | 266 | /** |
| 260 | * struct fw_cdev_get_info - General purpose information ioctl | 267 | * struct fw_cdev_get_info - General purpose information ioctl |
| @@ -544,14 +551,18 @@ struct fw_cdev_stop_iso { | |||
| 544 | /** | 551 | /** |
| 545 | * struct fw_cdev_get_cycle_timer - read cycle timer register | 552 | * struct fw_cdev_get_cycle_timer - read cycle timer register |
| 546 | * @local_time: system time, in microseconds since the Epoch | 553 | * @local_time: system time, in microseconds since the Epoch |
| 547 | * @cycle_timer: isochronous cycle timer, as per OHCI 1.1 clause 5.13 | 554 | * @cycle_timer: Cycle Time register contents |
| 548 | * | 555 | * |
| 549 | * The %FW_CDEV_IOC_GET_CYCLE_TIMER ioctl reads the isochronous cycle timer | 556 | * The %FW_CDEV_IOC_GET_CYCLE_TIMER ioctl reads the isochronous cycle timer |
| 550 | * and also the system clock. This allows to express the receive time of an | 557 | * and also the system clock (%CLOCK_REALTIME). This allows to express the |
| 551 | * isochronous packet as a system time with microsecond accuracy. | 558 | * receive time of an isochronous packet as a system time. |
| 552 | * | 559 | * |
| 553 | * @cycle_timer consists of 7 bits cycleSeconds, 13 bits cycleCount, and | 560 | * @cycle_timer consists of 7 bits cycleSeconds, 13 bits cycleCount, and |
| 554 | * 12 bits cycleOffset, in host byte order. | 561 | * 12 bits cycleOffset, in host byte order. Cf. the Cycle Time register |
| 562 | * per IEEE 1394 or Isochronous Cycle Timer register per OHCI-1394. | ||
| 563 | * | ||
| 564 | * In version 1 and 2 of the ABI, this ioctl returned unreliable (non- | ||
| 565 | * monotonic) @cycle_timer values on certain controllers. | ||
| 555 | */ | 566 | */ |
| 556 | struct fw_cdev_get_cycle_timer { | 567 | struct fw_cdev_get_cycle_timer { |
| 557 | __u64 local_time; | 568 | __u64 local_time; |
| @@ -559,6 +570,25 @@ struct fw_cdev_get_cycle_timer { | |||
| 559 | }; | 570 | }; |
| 560 | 571 | ||
| 561 | /** | 572 | /** |
| 573 | * struct fw_cdev_get_cycle_timer2 - read cycle timer register | ||
| 574 | * @tv_sec: system time, seconds | ||
| 575 | * @tv_nsec: system time, sub-seconds part in nanoseconds | ||
| 576 | * @clk_id: input parameter, clock from which to get the system time | ||
| 577 | * @cycle_timer: Cycle Time register contents | ||
| 578 | * | ||
| 579 | * The %FW_CDEV_IOC_GET_CYCLE_TIMER2 works like | ||
| 580 | * %FW_CDEV_IOC_GET_CYCLE_TIMER but lets you choose a clock like with POSIX' | ||
| 581 | * clock_gettime function. Supported @clk_id values are POSIX' %CLOCK_REALTIME | ||
| 582 | * and %CLOCK_MONOTONIC and Linux' %CLOCK_MONOTONIC_RAW. | ||
| 583 | */ | ||
| 584 | struct fw_cdev_get_cycle_timer2 { | ||
| 585 | __s64 tv_sec; | ||
| 586 | __s32 tv_nsec; | ||
| 587 | __s32 clk_id; | ||
| 588 | __u32 cycle_timer; | ||
| 589 | }; | ||
| 590 | |||
| 591 | /** | ||
| 562 | * struct fw_cdev_allocate_iso_resource - (De)allocate a channel or bandwidth | 592 | * struct fw_cdev_allocate_iso_resource - (De)allocate a channel or bandwidth |
| 563 | * @closure: Passed back to userspace in correponding iso resource events | 593 | * @closure: Passed back to userspace in correponding iso resource events |
| 564 | * @channels: Isochronous channels of which one is to be (de)allocated | 594 | * @channels: Isochronous channels of which one is to be (de)allocated |
diff --git a/include/linux/firewire.h b/include/linux/firewire.h index a0e67150a729..4bd94bf5e739 100644 --- a/include/linux/firewire.h +++ b/include/linux/firewire.h | |||
| @@ -65,12 +65,13 @@ | |||
| 65 | #define CSR_DIRECTORY_ID 0x20 | 65 | #define CSR_DIRECTORY_ID 0x20 |
| 66 | 66 | ||
| 67 | struct fw_csr_iterator { | 67 | struct fw_csr_iterator { |
| 68 | u32 *p; | 68 | const u32 *p; |
| 69 | u32 *end; | 69 | const u32 *end; |
| 70 | }; | 70 | }; |
| 71 | 71 | ||
| 72 | void fw_csr_iterator_init(struct fw_csr_iterator *ci, u32 *p); | 72 | void fw_csr_iterator_init(struct fw_csr_iterator *ci, const u32 *p); |
| 73 | int fw_csr_iterator_next(struct fw_csr_iterator *ci, int *key, int *value); | 73 | int fw_csr_iterator_next(struct fw_csr_iterator *ci, int *key, int *value); |
| 74 | int fw_csr_string(const u32 *directory, int key, char *buf, size_t size); | ||
| 74 | 75 | ||
| 75 | extern struct bus_type fw_bus_type; | 76 | extern struct bus_type fw_bus_type; |
| 76 | 77 | ||
| @@ -162,7 +163,7 @@ struct fw_device { | |||
| 162 | struct mutex client_list_mutex; | 163 | struct mutex client_list_mutex; |
| 163 | struct list_head client_list; | 164 | struct list_head client_list; |
| 164 | 165 | ||
| 165 | u32 *config_rom; | 166 | const u32 *config_rom; |
| 166 | size_t config_rom_length; | 167 | size_t config_rom_length; |
| 167 | int config_rom_retries; | 168 | int config_rom_retries; |
| 168 | unsigned is_local:1; | 169 | unsigned is_local:1; |
| @@ -204,7 +205,7 @@ int fw_device_enable_phys_dma(struct fw_device *device); | |||
| 204 | */ | 205 | */ |
| 205 | struct fw_unit { | 206 | struct fw_unit { |
| 206 | struct device device; | 207 | struct device device; |
| 207 | u32 *directory; | 208 | const u32 *directory; |
| 208 | struct fw_attribute_group attribute_group; | 209 | struct fw_attribute_group attribute_group; |
| 209 | }; | 210 | }; |
| 210 | 211 | ||
diff --git a/include/linux/firmware-map.h b/include/linux/firmware-map.h index 875451f1373a..c6dcc1dfe781 100644 --- a/include/linux/firmware-map.h +++ b/include/linux/firmware-map.h | |||
| @@ -24,17 +24,17 @@ | |||
| 24 | */ | 24 | */ |
| 25 | #ifdef CONFIG_FIRMWARE_MEMMAP | 25 | #ifdef CONFIG_FIRMWARE_MEMMAP |
| 26 | 26 | ||
| 27 | int firmware_map_add(u64 start, u64 end, const char *type); | ||
| 28 | int firmware_map_add_early(u64 start, u64 end, const char *type); | 27 | int firmware_map_add_early(u64 start, u64 end, const char *type); |
| 28 | int firmware_map_add_hotplug(u64 start, u64 end, const char *type); | ||
| 29 | 29 | ||
| 30 | #else /* CONFIG_FIRMWARE_MEMMAP */ | 30 | #else /* CONFIG_FIRMWARE_MEMMAP */ |
| 31 | 31 | ||
| 32 | static inline int firmware_map_add(u64 start, u64 end, const char *type) | 32 | static inline int firmware_map_add_early(u64 start, u64 end, const char *type) |
| 33 | { | 33 | { |
| 34 | return 0; | 34 | return 0; |
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | static inline int firmware_map_add_early(u64 start, u64 end, const char *type) | 37 | static inline int firmware_map_add_hotplug(u64 start, u64 end, const char *type) |
| 38 | { | 38 | { |
| 39 | return 0; | 39 | return 0; |
| 40 | } | 40 | } |
diff --git a/include/linux/freezer.h b/include/linux/freezer.h index 5a361f85cfec..da7e52b099f3 100644 --- a/include/linux/freezer.h +++ b/include/linux/freezer.h | |||
| @@ -64,9 +64,12 @@ extern bool freeze_task(struct task_struct *p, bool sig_only); | |||
| 64 | extern void cancel_freezing(struct task_struct *p); | 64 | extern void cancel_freezing(struct task_struct *p); |
| 65 | 65 | ||
| 66 | #ifdef CONFIG_CGROUP_FREEZER | 66 | #ifdef CONFIG_CGROUP_FREEZER |
| 67 | extern int cgroup_frozen(struct task_struct *task); | 67 | extern int cgroup_freezing_or_frozen(struct task_struct *task); |
| 68 | #else /* !CONFIG_CGROUP_FREEZER */ | 68 | #else /* !CONFIG_CGROUP_FREEZER */ |
| 69 | static inline int cgroup_frozen(struct task_struct *task) { return 0; } | 69 | static inline int cgroup_freezing_or_frozen(struct task_struct *task) |
| 70 | { | ||
| 71 | return 0; | ||
| 72 | } | ||
| 70 | #endif /* !CONFIG_CGROUP_FREEZER */ | 73 | #endif /* !CONFIG_CGROUP_FREEZER */ |
| 71 | 74 | ||
| 72 | /* | 75 | /* |
diff --git a/include/linux/fs.h b/include/linux/fs.h index ebb1cd5bc241..10b8dedcd18b 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -60,24 +60,24 @@ struct inodes_stat_t { | |||
| 60 | */ | 60 | */ |
| 61 | 61 | ||
| 62 | /* file is open for reading */ | 62 | /* file is open for reading */ |
| 63 | #define FMODE_READ ((__force fmode_t)1) | 63 | #define FMODE_READ ((__force fmode_t)0x1) |
| 64 | /* file is open for writing */ | 64 | /* file is open for writing */ |
| 65 | #define FMODE_WRITE ((__force fmode_t)2) | 65 | #define FMODE_WRITE ((__force fmode_t)0x2) |
| 66 | /* file is seekable */ | 66 | /* file is seekable */ |
| 67 | #define FMODE_LSEEK ((__force fmode_t)4) | 67 | #define FMODE_LSEEK ((__force fmode_t)0x4) |
| 68 | /* file can be accessed using pread */ | 68 | /* file can be accessed using pread */ |
| 69 | #define FMODE_PREAD ((__force fmode_t)8) | 69 | #define FMODE_PREAD ((__force fmode_t)0x8) |
| 70 | /* file can be accessed using pwrite */ | 70 | /* file can be accessed using pwrite */ |
| 71 | #define FMODE_PWRITE ((__force fmode_t)16) | 71 | #define FMODE_PWRITE ((__force fmode_t)0x10) |
| 72 | /* File is opened for execution with sys_execve / sys_uselib */ | 72 | /* File is opened for execution with sys_execve / sys_uselib */ |
| 73 | #define FMODE_EXEC ((__force fmode_t)32) | 73 | #define FMODE_EXEC ((__force fmode_t)0x20) |
| 74 | /* File is opened with O_NDELAY (only set for block devices) */ | 74 | /* File is opened with O_NDELAY (only set for block devices) */ |
| 75 | #define FMODE_NDELAY ((__force fmode_t)64) | 75 | #define FMODE_NDELAY ((__force fmode_t)0x40) |
| 76 | /* File is opened with O_EXCL (only set for block devices) */ | 76 | /* File is opened with O_EXCL (only set for block devices) */ |
| 77 | #define FMODE_EXCL ((__force fmode_t)128) | 77 | #define FMODE_EXCL ((__force fmode_t)0x80) |
| 78 | /* File is opened using open(.., 3, ..) and is writeable only for ioctls | 78 | /* File is opened using open(.., 3, ..) and is writeable only for ioctls |
| 79 | (specialy hack for floppy.c) */ | 79 | (specialy hack for floppy.c) */ |
| 80 | #define FMODE_WRITE_IOCTL ((__force fmode_t)256) | 80 | #define FMODE_WRITE_IOCTL ((__force fmode_t)0x100) |
| 81 | 81 | ||
| 82 | /* | 82 | /* |
| 83 | * Don't update ctime and mtime. | 83 | * Don't update ctime and mtime. |
| @@ -85,7 +85,10 @@ struct inodes_stat_t { | |||
| 85 | * Currently a special hack for the XFS open_by_handle ioctl, but we'll | 85 | * Currently a special hack for the XFS open_by_handle ioctl, but we'll |
| 86 | * hopefully graduate it to a proper O_CMTIME flag supported by open(2) soon. | 86 | * hopefully graduate it to a proper O_CMTIME flag supported by open(2) soon. |
| 87 | */ | 87 | */ |
| 88 | #define FMODE_NOCMTIME ((__force fmode_t)2048) | 88 | #define FMODE_NOCMTIME ((__force fmode_t)0x800) |
| 89 | |||
| 90 | /* Expect random access pattern */ | ||
| 91 | #define FMODE_RANDOM ((__force fmode_t)0x1000) | ||
| 89 | 92 | ||
| 90 | /* | 93 | /* |
| 91 | * The below are the various read and write types that we support. Some of | 94 | * The below are the various read and write types that we support. Some of |
| @@ -1305,6 +1308,8 @@ extern int send_sigurg(struct fown_struct *fown); | |||
| 1305 | #define MNT_FORCE 0x00000001 /* Attempt to forcibily umount */ | 1308 | #define MNT_FORCE 0x00000001 /* Attempt to forcibily umount */ |
| 1306 | #define MNT_DETACH 0x00000002 /* Just detach from the tree */ | 1309 | #define MNT_DETACH 0x00000002 /* Just detach from the tree */ |
| 1307 | #define MNT_EXPIRE 0x00000004 /* Mark for expiry */ | 1310 | #define MNT_EXPIRE 0x00000004 /* Mark for expiry */ |
| 1311 | #define UMOUNT_NOFOLLOW 0x00000008 /* Don't follow symlink on umount */ | ||
| 1312 | #define UMOUNT_UNUSED 0x80000000 /* Flag guaranteed to be unused */ | ||
| 1308 | 1313 | ||
| 1309 | extern struct list_head super_blocks; | 1314 | extern struct list_head super_blocks; |
| 1310 | extern spinlock_t sb_lock; | 1315 | extern spinlock_t sb_lock; |
| @@ -1314,9 +1319,9 @@ extern spinlock_t sb_lock; | |||
| 1314 | struct super_block { | 1319 | struct super_block { |
| 1315 | struct list_head s_list; /* Keep this first */ | 1320 | struct list_head s_list; /* Keep this first */ |
| 1316 | dev_t s_dev; /* search index; _not_ kdev_t */ | 1321 | dev_t s_dev; /* search index; _not_ kdev_t */ |
| 1317 | unsigned long s_blocksize; | ||
| 1318 | unsigned char s_blocksize_bits; | ||
| 1319 | unsigned char s_dirt; | 1322 | unsigned char s_dirt; |
| 1323 | unsigned char s_blocksize_bits; | ||
| 1324 | unsigned long s_blocksize; | ||
| 1320 | loff_t s_maxbytes; /* Max file size */ | 1325 | loff_t s_maxbytes; /* Max file size */ |
| 1321 | struct file_system_type *s_type; | 1326 | struct file_system_type *s_type; |
| 1322 | const struct super_operations *s_op; | 1327 | const struct super_operations *s_op; |
| @@ -1357,16 +1362,16 @@ struct super_block { | |||
| 1357 | void *s_fs_info; /* Filesystem private info */ | 1362 | void *s_fs_info; /* Filesystem private info */ |
| 1358 | fmode_t s_mode; | 1363 | fmode_t s_mode; |
| 1359 | 1364 | ||
| 1365 | /* Granularity of c/m/atime in ns. | ||
| 1366 | Cannot be worse than a second */ | ||
| 1367 | u32 s_time_gran; | ||
| 1368 | |||
| 1360 | /* | 1369 | /* |
| 1361 | * The next field is for VFS *only*. No filesystems have any business | 1370 | * The next field is for VFS *only*. No filesystems have any business |
| 1362 | * even looking at it. You had been warned. | 1371 | * even looking at it. You had been warned. |
| 1363 | */ | 1372 | */ |
| 1364 | struct mutex s_vfs_rename_mutex; /* Kludge */ | 1373 | struct mutex s_vfs_rename_mutex; /* Kludge */ |
| 1365 | 1374 | ||
| 1366 | /* Granularity of c/m/atime in ns. | ||
| 1367 | Cannot be worse than a second */ | ||
| 1368 | u32 s_time_gran; | ||
| 1369 | |||
| 1370 | /* | 1375 | /* |
| 1371 | * Filesystem subtype. If non-empty the filesystem type field | 1376 | * Filesystem subtype. If non-empty the filesystem type field |
| 1372 | * in /proc/mounts will be "type.subtype" | 1377 | * in /proc/mounts will be "type.subtype" |
| @@ -1555,7 +1560,7 @@ struct super_operations { | |||
| 1555 | void (*destroy_inode)(struct inode *); | 1560 | void (*destroy_inode)(struct inode *); |
| 1556 | 1561 | ||
| 1557 | void (*dirty_inode) (struct inode *); | 1562 | void (*dirty_inode) (struct inode *); |
| 1558 | int (*write_inode) (struct inode *, int); | 1563 | int (*write_inode) (struct inode *, struct writeback_control *wbc); |
| 1559 | void (*drop_inode) (struct inode *); | 1564 | void (*drop_inode) (struct inode *); |
| 1560 | void (*delete_inode) (struct inode *); | 1565 | void (*delete_inode) (struct inode *); |
| 1561 | void (*put_super) (struct super_block *); | 1566 | void (*put_super) (struct super_block *); |
| @@ -1794,7 +1799,8 @@ extern int may_umount(struct vfsmount *); | |||
| 1794 | extern long do_mount(char *, char *, char *, unsigned long, void *); | 1799 | extern long do_mount(char *, char *, char *, unsigned long, void *); |
| 1795 | extern struct vfsmount *collect_mounts(struct path *); | 1800 | extern struct vfsmount *collect_mounts(struct path *); |
| 1796 | extern void drop_collected_mounts(struct vfsmount *); | 1801 | extern void drop_collected_mounts(struct vfsmount *); |
| 1797 | 1802 | extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *, | |
| 1803 | struct vfsmount *); | ||
| 1798 | extern int vfs_statfs(struct dentry *, struct kstatfs *); | 1804 | extern int vfs_statfs(struct dentry *, struct kstatfs *); |
| 1799 | 1805 | ||
| 1800 | extern int current_umask(void); | 1806 | extern int current_umask(void); |
| @@ -2058,12 +2064,6 @@ extern int invalidate_inodes(struct super_block *); | |||
| 2058 | unsigned long invalidate_mapping_pages(struct address_space *mapping, | 2064 | unsigned long invalidate_mapping_pages(struct address_space *mapping, |
| 2059 | pgoff_t start, pgoff_t end); | 2065 | pgoff_t start, pgoff_t end); |
| 2060 | 2066 | ||
| 2061 | static inline unsigned long __deprecated | ||
| 2062 | invalidate_inode_pages(struct address_space *mapping) | ||
| 2063 | { | ||
| 2064 | return invalidate_mapping_pages(mapping, 0, ~0UL); | ||
| 2065 | } | ||
| 2066 | |||
| 2067 | static inline void invalidate_remote_inode(struct inode *inode) | 2067 | static inline void invalidate_remote_inode(struct inode *inode) |
| 2068 | { | 2068 | { |
| 2069 | if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || | 2069 | if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || |
| @@ -2132,6 +2132,7 @@ extern struct file * open_exec(const char *); | |||
| 2132 | 2132 | ||
| 2133 | /* fs/dcache.c -- generic fs support functions */ | 2133 | /* fs/dcache.c -- generic fs support functions */ |
| 2134 | extern int is_subdir(struct dentry *, struct dentry *); | 2134 | extern int is_subdir(struct dentry *, struct dentry *); |
| 2135 | extern int path_is_under(struct path *, struct path *); | ||
| 2135 | extern ino_t find_inode_number(struct dentry *, struct qstr *); | 2136 | extern ino_t find_inode_number(struct dentry *, struct qstr *); |
| 2136 | 2137 | ||
| 2137 | #include <linux/err.h> | 2138 | #include <linux/err.h> |
| @@ -2340,8 +2341,6 @@ extern int simple_rename(struct inode *, struct dentry *, struct inode *, struct | |||
| 2340 | extern int simple_sync_file(struct file *, struct dentry *, int); | 2341 | extern int simple_sync_file(struct file *, struct dentry *, int); |
| 2341 | extern int simple_empty(struct dentry *); | 2342 | extern int simple_empty(struct dentry *); |
| 2342 | extern int simple_readpage(struct file *file, struct page *page); | 2343 | extern int simple_readpage(struct file *file, struct page *page); |
| 2343 | extern int simple_prepare_write(struct file *file, struct page *page, | ||
| 2344 | unsigned offset, unsigned to); | ||
| 2345 | extern int simple_write_begin(struct file *file, struct address_space *mapping, | 2344 | extern int simple_write_begin(struct file *file, struct address_space *mapping, |
| 2346 | loff_t pos, unsigned len, unsigned flags, | 2345 | loff_t pos, unsigned len, unsigned flags, |
| 2347 | struct page **pagep, void **fsdata); | 2346 | struct page **pagep, void **fsdata); |
diff --git a/include/linux/fscache-cache.h b/include/linux/fscache-cache.h index 7be0c6fbe880..c57db27ac861 100644 --- a/include/linux/fscache-cache.h +++ b/include/linux/fscache-cache.h | |||
| @@ -105,7 +105,7 @@ struct fscache_operation { | |||
| 105 | /* operation releaser */ | 105 | /* operation releaser */ |
| 106 | fscache_operation_release_t release; | 106 | fscache_operation_release_t release; |
| 107 | 107 | ||
| 108 | #ifdef CONFIG_SLOW_WORK_PROC | 108 | #ifdef CONFIG_SLOW_WORK_DEBUG |
| 109 | const char *name; /* operation name */ | 109 | const char *name; /* operation name */ |
| 110 | const char *state; /* operation state */ | 110 | const char *state; /* operation state */ |
| 111 | #define fscache_set_op_name(OP, N) do { (OP)->name = (N); } while(0) | 111 | #define fscache_set_op_name(OP, N) do { (OP)->name = (N); } while(0) |
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index 936f9aa8bb97..df8fd9a3b214 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h | |||
| @@ -65,7 +65,7 @@ static inline void fsnotify_link_count(struct inode *inode) | |||
| 65 | * fsnotify_move - file old_name at old_dir was moved to new_name at new_dir | 65 | * fsnotify_move - file old_name at old_dir was moved to new_name at new_dir |
| 66 | */ | 66 | */ |
| 67 | static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, | 67 | static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, |
| 68 | const char *old_name, const char *new_name, | 68 | const char *old_name, |
| 69 | int isdir, struct inode *target, struct dentry *moved) | 69 | int isdir, struct inode *target, struct dentry *moved) |
| 70 | { | 70 | { |
| 71 | struct inode *source = moved->d_inode; | 71 | struct inode *source = moved->d_inode; |
| @@ -73,6 +73,7 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, | |||
| 73 | u32 fs_cookie = fsnotify_get_cookie(); | 73 | u32 fs_cookie = fsnotify_get_cookie(); |
| 74 | __u32 old_dir_mask = (FS_EVENT_ON_CHILD | FS_MOVED_FROM); | 74 | __u32 old_dir_mask = (FS_EVENT_ON_CHILD | FS_MOVED_FROM); |
| 75 | __u32 new_dir_mask = (FS_EVENT_ON_CHILD | FS_MOVED_TO); | 75 | __u32 new_dir_mask = (FS_EVENT_ON_CHILD | FS_MOVED_TO); |
| 76 | const char *new_name = moved->d_name.name; | ||
| 76 | 77 | ||
| 77 | if (old_dir == new_dir) | 78 | if (old_dir == new_dir) |
| 78 | old_dir_mask |= FS_DN_RENAME; | 79 | old_dir_mask |= FS_DN_RENAME; |
| @@ -103,7 +104,7 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, | |||
| 103 | inotify_inode_queue_event(source, IN_MOVE_SELF, 0, NULL, NULL); | 104 | inotify_inode_queue_event(source, IN_MOVE_SELF, 0, NULL, NULL); |
| 104 | fsnotify(source, FS_MOVE_SELF, moved->d_inode, FSNOTIFY_EVENT_INODE, NULL, 0); | 105 | fsnotify(source, FS_MOVE_SELF, moved->d_inode, FSNOTIFY_EVENT_INODE, NULL, 0); |
| 105 | } | 106 | } |
| 106 | audit_inode_child(new_name, moved, new_dir); | 107 | audit_inode_child(moved, new_dir); |
| 107 | } | 108 | } |
| 108 | 109 | ||
| 109 | /* | 110 | /* |
| @@ -146,7 +147,7 @@ static inline void fsnotify_create(struct inode *inode, struct dentry *dentry) | |||
| 146 | { | 147 | { |
| 147 | inotify_inode_queue_event(inode, IN_CREATE, 0, dentry->d_name.name, | 148 | inotify_inode_queue_event(inode, IN_CREATE, 0, dentry->d_name.name, |
| 148 | dentry->d_inode); | 149 | dentry->d_inode); |
| 149 | audit_inode_child(dentry->d_name.name, dentry, inode); | 150 | audit_inode_child(dentry, inode); |
| 150 | 151 | ||
| 151 | fsnotify(inode, FS_CREATE, dentry->d_inode, FSNOTIFY_EVENT_INODE, dentry->d_name.name, 0); | 152 | fsnotify(inode, FS_CREATE, dentry->d_inode, FSNOTIFY_EVENT_INODE, dentry->d_name.name, 0); |
| 152 | } | 153 | } |
| @@ -161,7 +162,7 @@ static inline void fsnotify_link(struct inode *dir, struct inode *inode, struct | |||
| 161 | inotify_inode_queue_event(dir, IN_CREATE, 0, new_dentry->d_name.name, | 162 | inotify_inode_queue_event(dir, IN_CREATE, 0, new_dentry->d_name.name, |
| 162 | inode); | 163 | inode); |
| 163 | fsnotify_link_count(inode); | 164 | fsnotify_link_count(inode); |
| 164 | audit_inode_child(new_dentry->d_name.name, new_dentry, dir); | 165 | audit_inode_child(new_dentry, dir); |
| 165 | 166 | ||
| 166 | fsnotify(dir, FS_CREATE, inode, FSNOTIFY_EVENT_INODE, new_dentry->d_name.name, 0); | 167 | fsnotify(dir, FS_CREATE, inode, FSNOTIFY_EVENT_INODE, new_dentry->d_name.name, 0); |
| 167 | } | 168 | } |
| @@ -175,7 +176,7 @@ static inline void fsnotify_mkdir(struct inode *inode, struct dentry *dentry) | |||
| 175 | struct inode *d_inode = dentry->d_inode; | 176 | struct inode *d_inode = dentry->d_inode; |
| 176 | 177 | ||
| 177 | inotify_inode_queue_event(inode, mask, 0, dentry->d_name.name, d_inode); | 178 | inotify_inode_queue_event(inode, mask, 0, dentry->d_name.name, d_inode); |
| 178 | audit_inode_child(dentry->d_name.name, dentry, inode); | 179 | audit_inode_child(dentry, inode); |
| 179 | 180 | ||
| 180 | fsnotify(inode, mask, d_inode, FSNOTIFY_EVENT_INODE, dentry->d_name.name, 0); | 181 | fsnotify(inode, mask, d_inode, FSNOTIFY_EVENT_INODE, dentry->d_name.name, 0); |
| 181 | } | 182 | } |
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 6b7c444ab8f6..c0f4b364c711 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
| @@ -131,12 +131,12 @@ struct ftrace_event_call { | |||
| 131 | void *mod; | 131 | void *mod; |
| 132 | void *data; | 132 | void *data; |
| 133 | 133 | ||
| 134 | int profile_count; | 134 | int perf_refcount; |
| 135 | int (*profile_enable)(struct ftrace_event_call *); | 135 | int (*perf_event_enable)(struct ftrace_event_call *); |
| 136 | void (*profile_disable)(struct ftrace_event_call *); | 136 | void (*perf_event_disable)(struct ftrace_event_call *); |
| 137 | }; | 137 | }; |
| 138 | 138 | ||
| 139 | #define FTRACE_MAX_PROFILE_SIZE 2048 | 139 | #define PERF_MAX_TRACE_SIZE 2048 |
| 140 | 140 | ||
| 141 | #define MAX_FILTER_PRED 32 | 141 | #define MAX_FILTER_PRED 32 |
| 142 | #define MAX_FILTER_STR_VAL 256 /* Should handle KSYM_SYMBOL_LEN */ | 142 | #define MAX_FILTER_STR_VAL 256 /* Should handle KSYM_SYMBOL_LEN */ |
| @@ -187,22 +187,25 @@ do { \ | |||
| 187 | 187 | ||
| 188 | #ifdef CONFIG_PERF_EVENTS | 188 | #ifdef CONFIG_PERF_EVENTS |
| 189 | struct perf_event; | 189 | struct perf_event; |
| 190 | extern int ftrace_profile_enable(int event_id); | 190 | |
| 191 | extern void ftrace_profile_disable(int event_id); | 191 | DECLARE_PER_CPU(struct pt_regs, perf_trace_regs); |
| 192 | |||
| 193 | extern int perf_trace_enable(int event_id); | ||
| 194 | extern void perf_trace_disable(int event_id); | ||
| 192 | extern int ftrace_profile_set_filter(struct perf_event *event, int event_id, | 195 | extern int ftrace_profile_set_filter(struct perf_event *event, int event_id, |
| 193 | char *filter_str); | 196 | char *filter_str); |
| 194 | extern void ftrace_profile_free_filter(struct perf_event *event); | 197 | extern void ftrace_profile_free_filter(struct perf_event *event); |
| 195 | extern void * | 198 | extern void * |
| 196 | ftrace_perf_buf_prepare(int size, unsigned short type, int *rctxp, | 199 | perf_trace_buf_prepare(int size, unsigned short type, int *rctxp, |
| 197 | unsigned long *irq_flags); | 200 | unsigned long *irq_flags); |
| 198 | 201 | ||
| 199 | static inline void | 202 | static inline void |
| 200 | ftrace_perf_buf_submit(void *raw_data, int size, int rctx, u64 addr, | 203 | perf_trace_buf_submit(void *raw_data, int size, int rctx, u64 addr, |
| 201 | u64 count, unsigned long irq_flags) | 204 | u64 count, unsigned long irq_flags, struct pt_regs *regs) |
| 202 | { | 205 | { |
| 203 | struct trace_entry *entry = raw_data; | 206 | struct trace_entry *entry = raw_data; |
| 204 | 207 | ||
| 205 | perf_tp_event(entry->type, addr, count, raw_data, size); | 208 | perf_tp_event(entry->type, addr, count, raw_data, size, regs); |
| 206 | perf_swevent_put_recursion_context(rctx); | 209 | perf_swevent_put_recursion_context(rctx); |
| 207 | local_irq_restore(irq_flags); | 210 | local_irq_restore(irq_flags); |
| 208 | } | 211 | } |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 9717081c75ad..56b50514ab25 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
| @@ -101,7 +101,7 @@ struct hd_struct { | |||
| 101 | unsigned long stamp; | 101 | unsigned long stamp; |
| 102 | int in_flight[2]; | 102 | int in_flight[2]; |
| 103 | #ifdef CONFIG_SMP | 103 | #ifdef CONFIG_SMP |
| 104 | struct disk_stats *dkstats; | 104 | struct disk_stats __percpu *dkstats; |
| 105 | #else | 105 | #else |
| 106 | struct disk_stats dkstats; | 106 | struct disk_stats dkstats; |
| 107 | #endif | 107 | #endif |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 557bdad320b6..4c6d41333f98 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
| @@ -30,7 +30,8 @@ struct vm_area_struct; | |||
| 30 | * _might_ fail. This depends upon the particular VM implementation. | 30 | * _might_ fail. This depends upon the particular VM implementation. |
| 31 | * | 31 | * |
| 32 | * __GFP_NOFAIL: The VM implementation _must_ retry infinitely: the caller | 32 | * __GFP_NOFAIL: The VM implementation _must_ retry infinitely: the caller |
| 33 | * cannot handle allocation failures. | 33 | * cannot handle allocation failures. This modifier is deprecated and no new |
| 34 | * users should be added. | ||
| 34 | * | 35 | * |
| 35 | * __GFP_NORETRY: The VM implementation must not retry indefinitely. | 36 | * __GFP_NORETRY: The VM implementation must not retry indefinitely. |
| 36 | * | 37 | * |
| @@ -83,6 +84,7 @@ struct vm_area_struct; | |||
| 83 | #define GFP_HIGHUSER_MOVABLE (__GFP_WAIT | __GFP_IO | __GFP_FS | \ | 84 | #define GFP_HIGHUSER_MOVABLE (__GFP_WAIT | __GFP_IO | __GFP_FS | \ |
| 84 | __GFP_HARDWALL | __GFP_HIGHMEM | \ | 85 | __GFP_HARDWALL | __GFP_HIGHMEM | \ |
| 85 | __GFP_MOVABLE) | 86 | __GFP_MOVABLE) |
| 87 | #define GFP_IOFS (__GFP_IO | __GFP_FS) | ||
| 86 | 88 | ||
| 87 | #ifdef CONFIG_NUMA | 89 | #ifdef CONFIG_NUMA |
| 88 | #define GFP_THISNODE (__GFP_THISNODE | __GFP_NOWARN | __GFP_NORETRY) | 90 | #define GFP_THISNODE (__GFP_THISNODE | __GFP_NOWARN | __GFP_NORETRY) |
| @@ -325,7 +327,7 @@ void free_pages_exact(void *virt, size_t size); | |||
| 325 | 327 | ||
| 326 | extern void __free_pages(struct page *page, unsigned int order); | 328 | extern void __free_pages(struct page *page, unsigned int order); |
| 327 | extern void free_pages(unsigned long addr, unsigned int order); | 329 | extern void free_pages(unsigned long addr, unsigned int order); |
| 328 | extern void free_hot_page(struct page *page); | 330 | extern void free_hot_cold_page(struct page *page, int cold); |
| 329 | 331 | ||
| 330 | #define __free_page(page) __free_pages((page), 0) | 332 | #define __free_page(page) __free_pages((page), 0) |
| 331 | #define free_page(addr) free_pages((addr),0) | 333 | #define free_page(addr) free_pages((addr),0) |
| @@ -337,9 +339,7 @@ void drain_local_pages(void *dummy); | |||
| 337 | 339 | ||
| 338 | extern gfp_t gfp_allowed_mask; | 340 | extern gfp_t gfp_allowed_mask; |
| 339 | 341 | ||
| 340 | static inline void set_gfp_allowed_mask(gfp_t mask) | 342 | extern void set_gfp_allowed_mask(gfp_t mask); |
| 341 | { | 343 | extern gfp_t clear_gfp_allowed_mask(gfp_t mask); |
| 342 | gfp_allowed_mask = mask; | ||
| 343 | } | ||
| 344 | 344 | ||
| 345 | #endif /* __LINUX_GFP_H */ | 345 | #endif /* __LINUX_GFP_H */ |
diff --git a/include/linux/gfs2_ondisk.h b/include/linux/gfs2_ondisk.h index 81f90a59cda6..4f4462974c14 100644 --- a/include/linux/gfs2_ondisk.h +++ b/include/linux/gfs2_ondisk.h | |||
| @@ -180,33 +180,6 @@ struct gfs2_rgrp { | |||
| 180 | }; | 180 | }; |
| 181 | 181 | ||
| 182 | /* | 182 | /* |
| 183 | * quota linked list: user quotas and group quotas form two separate | ||
| 184 | * singly linked lists. ll_next stores uids or gids of next quotas in the | ||
| 185 | * linked list. | ||
| 186 | |||
| 187 | Given the uid/gid, how to calculate the quota file offsets for the corresponding | ||
| 188 | gfs2_quota structures on disk: | ||
| 189 | |||
| 190 | for user quotas, given uid, | ||
| 191 | offset = uid * sizeof(struct gfs2_quota); | ||
| 192 | |||
| 193 | for group quotas, given gid, | ||
| 194 | offset = (gid * sizeof(struct gfs2_quota)) + sizeof(struct gfs2_quota); | ||
| 195 | |||
| 196 | |||
| 197 | uid:0 gid:0 uid:12 gid:12 uid:17 gid:17 uid:5142 gid:5142 | ||
| 198 | +-------+-------+ +-------+-------+ +-------+- - - -+ +- - - -+-------+ | ||
| 199 | | valid | valid | :: | valid | valid | :: | valid | inval | :: | inval | valid | | ||
| 200 | +-------+-------+ +-------+-------+ +-------+- - - -+ +- - - -+-------+ | ||
| 201 | next:12 next:12 next:17 next:5142 next:NULL next:NULL | ||
| 202 | | | | | |<-- user quota list | | ||
| 203 | \______|___________/ \______|___________/ group quota list -->| | ||
| 204 | | | | | ||
| 205 | \__________________/ \_______________________________________/ | ||
| 206 | |||
| 207 | */ | ||
| 208 | |||
| 209 | /* | ||
| 210 | * quota structure | 183 | * quota structure |
| 211 | */ | 184 | */ |
| 212 | 185 | ||
| @@ -214,8 +187,7 @@ struct gfs2_quota { | |||
| 214 | __be64 qu_limit; | 187 | __be64 qu_limit; |
| 215 | __be64 qu_warn; | 188 | __be64 qu_warn; |
| 216 | __be64 qu_value; | 189 | __be64 qu_value; |
| 217 | __be32 qu_ll_next; /* location of next quota in list */ | 190 | __u8 qu_reserved[64]; |
| 218 | __u8 qu_reserved[60]; | ||
| 219 | }; | 191 | }; |
| 220 | 192 | ||
| 221 | /* | 193 | /* |
diff --git a/include/linux/hil.h b/include/linux/hil.h index 13352d7d0caf..523785a9de70 100644 --- a/include/linux/hil.h +++ b/include/linux/hil.h | |||
| @@ -168,14 +168,14 @@ enum hil_command { | |||
| 168 | HIL_CMD_PR6 = 0x45, /* Prompt6 */ | 168 | HIL_CMD_PR6 = 0x45, /* Prompt6 */ |
| 169 | HIL_CMD_PR7 = 0x46, /* Prompt7 */ | 169 | HIL_CMD_PR7 = 0x46, /* Prompt7 */ |
| 170 | HIL_CMD_PRM = 0x47, /* Prompt (General Purpose) */ | 170 | HIL_CMD_PRM = 0x47, /* Prompt (General Purpose) */ |
| 171 | HIL_CMD_AK1 = 0x48, /* Acknowlege1 */ | 171 | HIL_CMD_AK1 = 0x48, /* Acknowledge1 */ |
| 172 | HIL_CMD_AK2 = 0x49, /* Acknowlege2 */ | 172 | HIL_CMD_AK2 = 0x49, /* Acknowledge2 */ |
| 173 | HIL_CMD_AK3 = 0x4a, /* Acknowlege3 */ | 173 | HIL_CMD_AK3 = 0x4a, /* Acknowledge3 */ |
| 174 | HIL_CMD_AK4 = 0x4b, /* Acknowlege4 */ | 174 | HIL_CMD_AK4 = 0x4b, /* Acknowledge4 */ |
| 175 | HIL_CMD_AK5 = 0x4c, /* Acknowlege5 */ | 175 | HIL_CMD_AK5 = 0x4c, /* Acknowledge5 */ |
| 176 | HIL_CMD_AK6 = 0x4d, /* Acknowlege6 */ | 176 | HIL_CMD_AK6 = 0x4d, /* Acknowledge6 */ |
| 177 | HIL_CMD_AK7 = 0x4e, /* Acknowlege7 */ | 177 | HIL_CMD_AK7 = 0x4e, /* Acknowledge7 */ |
| 178 | HIL_CMD_ACK = 0x4f, /* Acknowlege (General Purpose) */ | 178 | HIL_CMD_ACK = 0x4f, /* Acknowledge (General Purpose) */ |
| 179 | 179 | ||
| 180 | /* 0x50 to 0x78 reserved for future use */ | 180 | /* 0x50 to 0x78 reserved for future use */ |
| 181 | /* 0x80 to 0xEF device-specific commands */ | 181 | /* 0x80 to 0xEF device-specific commands */ |
diff --git a/include/linux/htcpld.h b/include/linux/htcpld.h new file mode 100644 index 000000000000..ab3f6cb4dddc --- /dev/null +++ b/include/linux/htcpld.h | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | #ifndef __LINUX_HTCPLD_H | ||
| 2 | #define __LINUX_HTCPLD_H | ||
| 3 | |||
| 4 | struct htcpld_chip_platform_data { | ||
| 5 | unsigned int addr; | ||
| 6 | unsigned int reset; | ||
| 7 | unsigned int num_gpios; | ||
| 8 | unsigned int gpio_out_base; | ||
| 9 | unsigned int gpio_in_base; | ||
| 10 | unsigned int irq_base; | ||
| 11 | unsigned int num_irqs; | ||
| 12 | }; | ||
| 13 | |||
| 14 | struct htcpld_core_platform_data { | ||
| 15 | unsigned int int_reset_gpio_hi; | ||
| 16 | unsigned int int_reset_gpio_lo; | ||
| 17 | unsigned int i2c_adapter_id; | ||
| 18 | |||
| 19 | struct htcpld_chip_platform_data *chip; | ||
| 20 | unsigned int num_chip; | ||
| 21 | }; | ||
| 22 | |||
| 23 | #endif /* __LINUX_HTCPLD_H */ | ||
| 24 | |||
diff --git a/include/linux/hw_breakpoint.h b/include/linux/hw_breakpoint.h index 5977b724f7c6..c70d27af03f9 100644 --- a/include/linux/hw_breakpoint.h +++ b/include/linux/hw_breakpoint.h | |||
| @@ -66,14 +66,14 @@ register_wide_hw_breakpoint_cpu(struct perf_event_attr *attr, | |||
| 66 | perf_overflow_handler_t triggered, | 66 | perf_overflow_handler_t triggered, |
| 67 | int cpu); | 67 | int cpu); |
| 68 | 68 | ||
| 69 | extern struct perf_event ** | 69 | extern struct perf_event * __percpu * |
| 70 | register_wide_hw_breakpoint(struct perf_event_attr *attr, | 70 | register_wide_hw_breakpoint(struct perf_event_attr *attr, |
| 71 | perf_overflow_handler_t triggered); | 71 | perf_overflow_handler_t triggered); |
| 72 | 72 | ||
| 73 | extern int register_perf_hw_breakpoint(struct perf_event *bp); | 73 | extern int register_perf_hw_breakpoint(struct perf_event *bp); |
| 74 | extern int __register_perf_hw_breakpoint(struct perf_event *bp); | 74 | extern int __register_perf_hw_breakpoint(struct perf_event *bp); |
| 75 | extern void unregister_hw_breakpoint(struct perf_event *bp); | 75 | extern void unregister_hw_breakpoint(struct perf_event *bp); |
| 76 | extern void unregister_wide_hw_breakpoint(struct perf_event **cpu_events); | 76 | extern void unregister_wide_hw_breakpoint(struct perf_event * __percpu *cpu_events); |
| 77 | 77 | ||
| 78 | extern int dbg_reserve_bp_slot(struct perf_event *bp); | 78 | extern int dbg_reserve_bp_slot(struct perf_event *bp); |
| 79 | extern int dbg_release_bp_slot(struct perf_event *bp); | 79 | extern int dbg_release_bp_slot(struct perf_event *bp); |
| @@ -100,7 +100,7 @@ static inline struct perf_event * | |||
| 100 | register_wide_hw_breakpoint_cpu(struct perf_event_attr *attr, | 100 | register_wide_hw_breakpoint_cpu(struct perf_event_attr *attr, |
| 101 | perf_overflow_handler_t triggered, | 101 | perf_overflow_handler_t triggered, |
| 102 | int cpu) { return NULL; } | 102 | int cpu) { return NULL; } |
| 103 | static inline struct perf_event ** | 103 | static inline struct perf_event * __percpu * |
| 104 | register_wide_hw_breakpoint(struct perf_event_attr *attr, | 104 | register_wide_hw_breakpoint(struct perf_event_attr *attr, |
| 105 | perf_overflow_handler_t triggered) { return NULL; } | 105 | perf_overflow_handler_t triggered) { return NULL; } |
| 106 | static inline int | 106 | static inline int |
| @@ -109,7 +109,7 @@ static inline int | |||
| 109 | __register_perf_hw_breakpoint(struct perf_event *bp) { return -ENOSYS; } | 109 | __register_perf_hw_breakpoint(struct perf_event *bp) { return -ENOSYS; } |
| 110 | static inline void unregister_hw_breakpoint(struct perf_event *bp) { } | 110 | static inline void unregister_hw_breakpoint(struct perf_event *bp) { } |
| 111 | static inline void | 111 | static inline void |
| 112 | unregister_wide_hw_breakpoint(struct perf_event **cpu_events) { } | 112 | unregister_wide_hw_breakpoint(struct perf_event * __percpu *cpu_events) { } |
| 113 | static inline int | 113 | static inline int |
| 114 | reserve_bp_slot(struct perf_event *bp) {return -ENOSYS; } | 114 | reserve_bp_slot(struct perf_event *bp) {return -ENOSYS; } |
| 115 | static inline void release_bp_slot(struct perf_event *bp) { } | 115 | static inline void release_bp_slot(struct perf_event *bp) { } |
diff --git a/include/linux/i2c-algo-bit.h b/include/linux/i2c-algo-bit.h index 111334f5b922..4f98148c11c3 100644 --- a/include/linux/i2c-algo-bit.h +++ b/include/linux/i2c-algo-bit.h | |||
| @@ -36,6 +36,8 @@ struct i2c_algo_bit_data { | |||
| 36 | void (*setscl) (void *data, int state); | 36 | void (*setscl) (void *data, int state); |
| 37 | int (*getsda) (void *data); | 37 | int (*getsda) (void *data); |
| 38 | int (*getscl) (void *data); | 38 | int (*getscl) (void *data); |
| 39 | int (*pre_xfer) (struct i2c_adapter *); | ||
| 40 | void (*post_xfer) (struct i2c_adapter *); | ||
| 39 | 41 | ||
| 40 | /* local settings */ | 42 | /* local settings */ |
| 41 | int udelay; /* half clock cycle time in us, | 43 | int udelay; /* half clock cycle time in us, |
diff --git a/include/linux/i2c-smbus.h b/include/linux/i2c-smbus.h new file mode 100644 index 000000000000..63f57a8c8b31 --- /dev/null +++ b/include/linux/i2c-smbus.h | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | /* | ||
| 2 | * i2c-smbus.h - SMBus extensions to the I2C protocol | ||
| 3 | * | ||
| 4 | * Copyright (C) 2010 Jean Delvare <khali@linux-fr.org> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 19 | */ | ||
| 20 | |||
| 21 | #ifndef _LINUX_I2C_SMBUS_H | ||
| 22 | #define _LINUX_I2C_SMBUS_H | ||
| 23 | |||
| 24 | #include <linux/i2c.h> | ||
| 25 | |||
| 26 | |||
| 27 | /** | ||
| 28 | * i2c_smbus_alert_setup - platform data for the smbus_alert i2c client | ||
| 29 | * @alert_edge_triggered: whether the alert interrupt is edge (1) or level (0) | ||
| 30 | * triggered | ||
| 31 | * @irq: IRQ number, if the smbus_alert driver should take care of interrupt | ||
| 32 | * handling | ||
| 33 | * | ||
| 34 | * If irq is not specified, the smbus_alert driver doesn't take care of | ||
| 35 | * interrupt handling. In that case it is up to the I2C bus driver to either | ||
| 36 | * handle the interrupts or to poll for alerts. | ||
| 37 | * | ||
| 38 | * If irq is specified then it it crucial that alert_edge_triggered is | ||
| 39 | * properly set. | ||
| 40 | */ | ||
| 41 | struct i2c_smbus_alert_setup { | ||
| 42 | unsigned int alert_edge_triggered:1; | ||
| 43 | int irq; | ||
| 44 | }; | ||
| 45 | |||
| 46 | struct i2c_client *i2c_setup_smbus_alert(struct i2c_adapter *adapter, | ||
| 47 | struct i2c_smbus_alert_setup *setup); | ||
| 48 | int i2c_handle_smbus_alert(struct i2c_client *ara); | ||
| 49 | |||
| 50 | #endif /* _LINUX_I2C_SMBUS_H */ | ||
diff --git a/include/linux/i2c-xiic.h b/include/linux/i2c-xiic.h new file mode 100644 index 000000000000..4f9f2256a97e --- /dev/null +++ b/include/linux/i2c-xiic.h | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | /* | ||
| 2 | * i2c-xiic.h | ||
| 3 | * Copyright (c) 2009 Intel Corporation | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License version 2 as | ||
| 7 | * published by the Free Software Foundation. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program; if not, write to the Free Software | ||
| 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 17 | */ | ||
| 18 | |||
| 19 | /* Supports: | ||
| 20 | * Xilinx IIC | ||
| 21 | */ | ||
| 22 | |||
| 23 | #ifndef _LINUX_I2C_XIIC_H | ||
| 24 | #define _LINUX_I2C_XIIC_H | ||
| 25 | |||
| 26 | /** | ||
| 27 | * struct xiic_i2c_platform_data - Platform data of the Xilinx I2C driver | ||
| 28 | * @num_devices: Number of devices that shall be added when the driver | ||
| 29 | * is probed. | ||
| 30 | * @devices: The actuall devices to add. | ||
| 31 | * | ||
| 32 | * This purpose of this platform data struct is to be able to provide a number | ||
| 33 | * of devices that should be added to the I2C bus. The reason is that sometimes | ||
| 34 | * the I2C board info is not enough, a new PCI board can for instance be | ||
| 35 | * plugged into a standard PC, and the bus number might be unknown at | ||
| 36 | * early init time. | ||
| 37 | */ | ||
| 38 | struct xiic_i2c_platform_data { | ||
| 39 | u8 num_devices; | ||
| 40 | struct i2c_board_info const *devices; | ||
| 41 | }; | ||
| 42 | |||
| 43 | #endif /* _LINUX_I2C_XIIC_H */ | ||
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 02fc617782ef..0a5da639b327 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
| @@ -53,6 +53,7 @@ struct i2c_board_info; | |||
| 53 | * on a bus (or read from them). Apart from two basic transfer functions to | 53 | * on a bus (or read from them). Apart from two basic transfer functions to |
| 54 | * transmit one message at a time, a more complex version can be used to | 54 | * transmit one message at a time, a more complex version can be used to |
| 55 | * transmit an arbitrary number of messages without interruption. | 55 | * transmit an arbitrary number of messages without interruption. |
| 56 | * @count must be be less than 64k since msg.len is u16. | ||
| 56 | */ | 57 | */ |
| 57 | extern int i2c_master_send(struct i2c_client *client, const char *buf, | 58 | extern int i2c_master_send(struct i2c_client *client, const char *buf, |
| 58 | int count); | 59 | int count); |
| @@ -152,6 +153,13 @@ struct i2c_driver { | |||
| 152 | int (*suspend)(struct i2c_client *, pm_message_t mesg); | 153 | int (*suspend)(struct i2c_client *, pm_message_t mesg); |
| 153 | int (*resume)(struct i2c_client *); | 154 | int (*resume)(struct i2c_client *); |
| 154 | 155 | ||
| 156 | /* Alert callback, for example for the SMBus alert protocol. | ||
| 157 | * The format and meaning of the data value depends on the protocol. | ||
| 158 | * For the SMBus alert protocol, there is a single bit of data passed | ||
| 159 | * as the alert response's low bit ("event flag"). | ||
| 160 | */ | ||
| 161 | void (*alert)(struct i2c_client *, unsigned int data); | ||
| 162 | |||
| 155 | /* a ioctl like command that can be used to perform specific functions | 163 | /* a ioctl like command that can be used to perform specific functions |
| 156 | * with the device. | 164 | * with the device. |
| 157 | */ | 165 | */ |
diff --git a/include/linux/i2c/pca953x.h b/include/linux/i2c/pca953x.h index 81736d6a8db7..d5c5a60c8a0b 100644 --- a/include/linux/i2c/pca953x.h +++ b/include/linux/i2c/pca953x.h | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | #ifndef _LINUX_PCA953X_H | ||
| 2 | #define _LINUX_PCA953X_H | ||
| 3 | |||
| 4 | #include <linux/types.h> | ||
| 5 | #include <linux/i2c.h> | ||
| 6 | |||
| 1 | /* platform data for the PCA9539 16-bit I/O expander driver */ | 7 | /* platform data for the PCA9539 16-bit I/O expander driver */ |
| 2 | 8 | ||
| 3 | struct pca953x_platform_data { | 9 | struct pca953x_platform_data { |
| @@ -7,6 +13,9 @@ struct pca953x_platform_data { | |||
| 7 | /* initial polarity inversion setting */ | 13 | /* initial polarity inversion setting */ |
| 8 | uint16_t invert; | 14 | uint16_t invert; |
| 9 | 15 | ||
| 16 | /* interrupt base */ | ||
| 17 | int irq_base; | ||
| 18 | |||
| 10 | void *context; /* param to setup/teardown */ | 19 | void *context; /* param to setup/teardown */ |
| 11 | 20 | ||
| 12 | int (*setup)(struct i2c_client *client, | 21 | int (*setup)(struct i2c_client *client, |
| @@ -17,3 +26,5 @@ struct pca953x_platform_data { | |||
| 17 | void *context); | 26 | void *context); |
| 18 | char **names; | 27 | char **names; |
| 19 | }; | 28 | }; |
| 29 | |||
| 30 | #endif /* _LINUX_PCA953X_H */ | ||
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h index 7897f3096560..fb6784e86d5f 100644 --- a/include/linux/i2c/twl.h +++ b/include/linux/i2c/twl.h | |||
| @@ -80,6 +80,11 @@ | |||
| 80 | #define TWL_MODULE_PM_MASTER TWL4030_MODULE_PM_MASTER | 80 | #define TWL_MODULE_PM_MASTER TWL4030_MODULE_PM_MASTER |
| 81 | #define TWL_MODULE_PM_RECEIVER TWL4030_MODULE_PM_RECEIVER | 81 | #define TWL_MODULE_PM_RECEIVER TWL4030_MODULE_PM_RECEIVER |
| 82 | #define TWL_MODULE_RTC TWL4030_MODULE_RTC | 82 | #define TWL_MODULE_RTC TWL4030_MODULE_RTC |
| 83 | #define TWL_MODULE_PWM TWL4030_MODULE_PWM0 | ||
| 84 | |||
| 85 | #define TWL6030_MODULE_ID0 0x0D | ||
| 86 | #define TWL6030_MODULE_ID1 0x0E | ||
| 87 | #define TWL6030_MODULE_ID2 0x0F | ||
| 83 | 88 | ||
| 84 | #define GPIO_INTR_OFFSET 0 | 89 | #define GPIO_INTR_OFFSET 0 |
| 85 | #define KEYPAD_INTR_OFFSET 1 | 90 | #define KEYPAD_INTR_OFFSET 1 |
| @@ -239,6 +244,21 @@ int twl6030_interrupt_mask(u8 bit_mask, u8 offset); | |||
| 239 | 244 | ||
| 240 | /*----------------------------------------------------------------------*/ | 245 | /*----------------------------------------------------------------------*/ |
| 241 | 246 | ||
| 247 | /*Interface Bit Register (INTBR) offsets | ||
| 248 | *(Use TWL_4030_MODULE_INTBR) | ||
| 249 | */ | ||
| 250 | |||
| 251 | #define REG_GPPUPDCTR1 0x0F | ||
| 252 | |||
| 253 | /*I2C1 and I2C4(SR) SDA/SCL pull-up control bits */ | ||
| 254 | |||
| 255 | #define I2C_SCL_CTRL_PU BIT(0) | ||
| 256 | #define I2C_SDA_CTRL_PU BIT(2) | ||
| 257 | #define SR_I2C_SCL_CTRL_PU BIT(4) | ||
| 258 | #define SR_I2C_SDA_CTRL_PU BIT(6) | ||
| 259 | |||
| 260 | /*----------------------------------------------------------------------*/ | ||
| 261 | |||
| 242 | /* | 262 | /* |
| 243 | * Keypad register offsets (use TWL4030_MODULE_KEYPAD) | 263 | * Keypad register offsets (use TWL4030_MODULE_KEYPAD) |
| 244 | * ... SIH/interrupt only | 264 | * ... SIH/interrupt only |
| @@ -530,6 +550,7 @@ struct twl4030_power_data { | |||
| 530 | }; | 550 | }; |
| 531 | 551 | ||
| 532 | extern void twl4030_power_init(struct twl4030_power_data *triton2_scripts); | 552 | extern void twl4030_power_init(struct twl4030_power_data *triton2_scripts); |
| 553 | extern int twl4030_remove_script(u8 flags); | ||
| 533 | 554 | ||
| 534 | struct twl4030_codec_audio_data { | 555 | struct twl4030_codec_audio_data { |
| 535 | unsigned int audio_mclk; | 556 | unsigned int audio_mclk; |
| @@ -605,12 +626,7 @@ int twl4030_sih_setup(int module); | |||
| 605 | #define TWL4030_VAUX3_DEV_GRP 0x1F | 626 | #define TWL4030_VAUX3_DEV_GRP 0x1F |
| 606 | #define TWL4030_VAUX3_DEDICATED 0x22 | 627 | #define TWL4030_VAUX3_DEDICATED 0x22 |
| 607 | 628 | ||
| 608 | #if defined(CONFIG_TWL4030_BCI_BATTERY) || \ | 629 | static inline int twl4030charger_usb_en(int enable) { return 0; } |
| 609 | defined(CONFIG_TWL4030_BCI_BATTERY_MODULE) | ||
| 610 | extern int twl4030charger_usb_en(int enable); | ||
| 611 | #else | ||
| 612 | static inline int twl4030charger_usb_en(int enable) { return 0; } | ||
| 613 | #endif | ||
| 614 | 630 | ||
| 615 | /*----------------------------------------------------------------------*/ | 631 | /*----------------------------------------------------------------------*/ |
| 616 | 632 | ||
diff --git a/include/linux/ide.h b/include/linux/ide.h index 0ec612959042..97e6ab435184 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
| @@ -515,6 +515,8 @@ struct ide_drive_s { | |||
| 515 | u8 init_speed; /* transfer rate set at boot */ | 515 | u8 init_speed; /* transfer rate set at boot */ |
| 516 | u8 current_speed; /* current transfer rate set */ | 516 | u8 current_speed; /* current transfer rate set */ |
| 517 | u8 desired_speed; /* desired transfer rate set */ | 517 | u8 desired_speed; /* desired transfer rate set */ |
| 518 | u8 pio_mode; /* for ->set_pio_mode _only_ */ | ||
| 519 | u8 dma_mode; /* for ->dma_pio_mode _only_ */ | ||
| 518 | u8 dn; /* now wide spread use */ | 520 | u8 dn; /* now wide spread use */ |
| 519 | u8 acoustic; /* acoustic management */ | 521 | u8 acoustic; /* acoustic management */ |
| 520 | u8 media; /* disk, cdrom, tape, floppy, ... */ | 522 | u8 media; /* disk, cdrom, tape, floppy, ... */ |
| @@ -622,8 +624,8 @@ extern const struct ide_tp_ops default_tp_ops; | |||
| 622 | */ | 624 | */ |
| 623 | struct ide_port_ops { | 625 | struct ide_port_ops { |
| 624 | void (*init_dev)(ide_drive_t *); | 626 | void (*init_dev)(ide_drive_t *); |
| 625 | void (*set_pio_mode)(ide_drive_t *, const u8); | 627 | void (*set_pio_mode)(struct hwif_s *, ide_drive_t *); |
| 626 | void (*set_dma_mode)(ide_drive_t *, const u8); | 628 | void (*set_dma_mode)(struct hwif_s *, ide_drive_t *); |
| 627 | int (*reset_poll)(ide_drive_t *); | 629 | int (*reset_poll)(ide_drive_t *); |
| 628 | void (*pre_reset)(ide_drive_t *); | 630 | void (*pre_reset)(ide_drive_t *); |
| 629 | void (*resetproc)(ide_drive_t *); | 631 | void (*resetproc)(ide_drive_t *); |
| @@ -1494,7 +1496,6 @@ int ide_timing_compute(ide_drive_t *, u8, struct ide_timing *, int, int); | |||
| 1494 | #ifdef CONFIG_IDE_XFER_MODE | 1496 | #ifdef CONFIG_IDE_XFER_MODE |
| 1495 | int ide_scan_pio_blacklist(char *); | 1497 | int ide_scan_pio_blacklist(char *); |
| 1496 | const char *ide_xfer_verbose(u8); | 1498 | const char *ide_xfer_verbose(u8); |
| 1497 | u8 ide_get_best_pio_mode(ide_drive_t *, u8, u8); | ||
| 1498 | int ide_pio_need_iordy(ide_drive_t *, const u8); | 1499 | int ide_pio_need_iordy(ide_drive_t *, const u8); |
| 1499 | int ide_set_pio_mode(ide_drive_t *, u8); | 1500 | int ide_set_pio_mode(ide_drive_t *, u8); |
| 1500 | int ide_set_dma_mode(ide_drive_t *, u8); | 1501 | int ide_set_dma_mode(ide_drive_t *, u8); |
diff --git a/include/linux/if_tunnel.h b/include/linux/if_tunnel.h index 1822d635be6b..16b92d008bed 100644 --- a/include/linux/if_tunnel.h +++ b/include/linux/if_tunnel.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #define _IF_TUNNEL_H_ | 2 | #define _IF_TUNNEL_H_ |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
| 5 | #include <asm/byteorder.h> | ||
| 5 | 6 | ||
| 6 | #ifdef __KERNEL__ | 7 | #ifdef __KERNEL__ |
| 7 | #include <linux/ip.h> | 8 | #include <linux/ip.h> |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index abec69b63d7e..b1ed1cd8e2a8 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
| @@ -32,14 +32,6 @@ extern struct fs_struct init_fs; | |||
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | extern struct nsproxy init_nsproxy; | 34 | extern struct nsproxy init_nsproxy; |
| 35 | #define INIT_NSPROXY(nsproxy) { \ | ||
| 36 | .pid_ns = &init_pid_ns, \ | ||
| 37 | .count = ATOMIC_INIT(1), \ | ||
| 38 | .uts_ns = &init_uts_ns, \ | ||
| 39 | .mnt_ns = NULL, \ | ||
| 40 | INIT_NET_NS(net_ns) \ | ||
| 41 | INIT_IPC_NS(ipc_ns) \ | ||
| 42 | } | ||
| 43 | 35 | ||
| 44 | #define INIT_SIGHAND(sighand) { \ | 36 | #define INIT_SIGHAND(sighand) { \ |
| 45 | .count = ATOMIC_INIT(1), \ | 37 | .count = ATOMIC_INIT(1), \ |
diff --git a/include/linux/input.h b/include/linux/input.h index dc24effb6d0e..7ed2251b33f1 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
| @@ -58,10 +58,10 @@ struct input_absinfo { | |||
| 58 | 58 | ||
| 59 | #define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */ | 59 | #define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */ |
| 60 | #define EVIOCGID _IOR('E', 0x02, struct input_id) /* get device ID */ | 60 | #define EVIOCGID _IOR('E', 0x02, struct input_id) /* get device ID */ |
| 61 | #define EVIOCGREP _IOR('E', 0x03, int[2]) /* get repeat settings */ | 61 | #define EVIOCGREP _IOR('E', 0x03, unsigned int[2]) /* get repeat settings */ |
| 62 | #define EVIOCSREP _IOW('E', 0x03, int[2]) /* set repeat settings */ | 62 | #define EVIOCSREP _IOW('E', 0x03, unsigned int[2]) /* set repeat settings */ |
| 63 | #define EVIOCGKEYCODE _IOR('E', 0x04, int[2]) /* get keycode */ | 63 | #define EVIOCGKEYCODE _IOR('E', 0x04, unsigned int[2]) /* get keycode */ |
| 64 | #define EVIOCSKEYCODE _IOW('E', 0x04, int[2]) /* set keycode */ | 64 | #define EVIOCSKEYCODE _IOW('E', 0x04, unsigned int[2]) /* set keycode */ |
| 65 | 65 | ||
| 66 | #define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len) /* get device name */ | 66 | #define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len) /* get device name */ |
| 67 | #define EVIOCGPHYS(len) _IOC(_IOC_READ, 'E', 0x07, len) /* get physical location */ | 67 | #define EVIOCGPHYS(len) _IOC(_IOC_READ, 'E', 0x07, len) /* get physical location */ |
| @@ -1142,8 +1142,10 @@ struct input_dev { | |||
| 1142 | unsigned int keycodemax; | 1142 | unsigned int keycodemax; |
| 1143 | unsigned int keycodesize; | 1143 | unsigned int keycodesize; |
| 1144 | void *keycode; | 1144 | void *keycode; |
| 1145 | int (*setkeycode)(struct input_dev *dev, int scancode, int keycode); | 1145 | int (*setkeycode)(struct input_dev *dev, |
| 1146 | int (*getkeycode)(struct input_dev *dev, int scancode, int *keycode); | 1146 | unsigned int scancode, unsigned int keycode); |
| 1147 | int (*getkeycode)(struct input_dev *dev, | ||
| 1148 | unsigned int scancode, unsigned int *keycode); | ||
| 1147 | 1149 | ||
| 1148 | struct ff_device *ff; | 1150 | struct ff_device *ff; |
| 1149 | 1151 | ||
| @@ -1415,8 +1417,10 @@ static inline void input_set_abs_params(struct input_dev *dev, int axis, int min | |||
| 1415 | dev->absbit[BIT_WORD(axis)] |= BIT_MASK(axis); | 1417 | dev->absbit[BIT_WORD(axis)] |= BIT_MASK(axis); |
| 1416 | } | 1418 | } |
| 1417 | 1419 | ||
| 1418 | int input_get_keycode(struct input_dev *dev, int scancode, int *keycode); | 1420 | int input_get_keycode(struct input_dev *dev, |
| 1419 | int input_set_keycode(struct input_dev *dev, int scancode, int keycode); | 1421 | unsigned int scancode, unsigned int *keycode); |
| 1422 | int input_set_keycode(struct input_dev *dev, | ||
| 1423 | unsigned int scancode, unsigned int keycode); | ||
| 1420 | 1424 | ||
| 1421 | extern struct class input_class; | 1425 | extern struct class input_class; |
| 1422 | 1426 | ||
diff --git a/include/linux/iocontext.h b/include/linux/iocontext.h index 1195a806fe0c..a0bb301afac0 100644 --- a/include/linux/iocontext.h +++ b/include/linux/iocontext.h | |||
| @@ -42,7 +42,7 @@ struct io_context { | |||
| 42 | unsigned short ioprio; | 42 | unsigned short ioprio; |
| 43 | unsigned short ioprio_changed; | 43 | unsigned short ioprio_changed; |
| 44 | 44 | ||
| 45 | #ifdef CONFIG_BLK_CGROUP | 45 | #if defined(CONFIG_BLK_CGROUP) || defined(CONFIG_BLK_CGROUP_MODULE) |
| 46 | unsigned short cgroup_changed; | 46 | unsigned short cgroup_changed; |
| 47 | #endif | 47 | #endif |
| 48 | 48 | ||
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index dda98410d588..26fad187d661 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
| @@ -34,22 +34,24 @@ struct resource_list { | |||
| 34 | */ | 34 | */ |
| 35 | #define IORESOURCE_BITS 0x000000ff /* Bus-specific bits */ | 35 | #define IORESOURCE_BITS 0x000000ff /* Bus-specific bits */ |
| 36 | 36 | ||
| 37 | #define IORESOURCE_TYPE_BITS 0x00000f00 /* Resource type */ | 37 | #define IORESOURCE_TYPE_BITS 0x00001f00 /* Resource type */ |
| 38 | #define IORESOURCE_IO 0x00000100 | 38 | #define IORESOURCE_IO 0x00000100 |
| 39 | #define IORESOURCE_MEM 0x00000200 | 39 | #define IORESOURCE_MEM 0x00000200 |
| 40 | #define IORESOURCE_IRQ 0x00000400 | 40 | #define IORESOURCE_IRQ 0x00000400 |
| 41 | #define IORESOURCE_DMA 0x00000800 | 41 | #define IORESOURCE_DMA 0x00000800 |
| 42 | #define IORESOURCE_BUS 0x00001000 | ||
| 42 | 43 | ||
| 43 | #define IORESOURCE_PREFETCH 0x00001000 /* No side effects */ | 44 | #define IORESOURCE_PREFETCH 0x00002000 /* No side effects */ |
| 44 | #define IORESOURCE_READONLY 0x00002000 | 45 | #define IORESOURCE_READONLY 0x00004000 |
| 45 | #define IORESOURCE_CACHEABLE 0x00004000 | 46 | #define IORESOURCE_CACHEABLE 0x00008000 |
| 46 | #define IORESOURCE_RANGELENGTH 0x00008000 | 47 | #define IORESOURCE_RANGELENGTH 0x00010000 |
| 47 | #define IORESOURCE_SHADOWABLE 0x00010000 | 48 | #define IORESOURCE_SHADOWABLE 0x00020000 |
| 48 | 49 | ||
| 49 | #define IORESOURCE_SIZEALIGN 0x00020000 /* size indicates alignment */ | 50 | #define IORESOURCE_SIZEALIGN 0x00040000 /* size indicates alignment */ |
| 50 | #define IORESOURCE_STARTALIGN 0x00040000 /* start field is alignment */ | 51 | #define IORESOURCE_STARTALIGN 0x00080000 /* start field is alignment */ |
| 51 | 52 | ||
| 52 | #define IORESOURCE_MEM_64 0x00100000 | 53 | #define IORESOURCE_MEM_64 0x00100000 |
| 54 | #define IORESOURCE_WINDOW 0x00200000 /* forwarded by bridge */ | ||
| 53 | 55 | ||
| 54 | #define IORESOURCE_EXCLUSIVE 0x08000000 /* Userland may not map this resource */ | 56 | #define IORESOURCE_EXCLUSIVE 0x08000000 /* Userland may not map this resource */ |
| 55 | #define IORESOURCE_DISABLED 0x10000000 | 57 | #define IORESOURCE_DISABLED 0x10000000 |
| @@ -110,12 +112,14 @@ struct resource_list { | |||
| 110 | extern struct resource ioport_resource; | 112 | extern struct resource ioport_resource; |
| 111 | extern struct resource iomem_resource; | 113 | extern struct resource iomem_resource; |
| 112 | 114 | ||
| 115 | extern struct resource *request_resource_conflict(struct resource *root, struct resource *new); | ||
| 113 | extern int request_resource(struct resource *root, struct resource *new); | 116 | extern int request_resource(struct resource *root, struct resource *new); |
| 114 | extern int release_resource(struct resource *new); | 117 | extern int release_resource(struct resource *new); |
| 115 | void release_child_resources(struct resource *new); | 118 | void release_child_resources(struct resource *new); |
| 116 | extern void reserve_region_with_split(struct resource *root, | 119 | extern void reserve_region_with_split(struct resource *root, |
| 117 | resource_size_t start, resource_size_t end, | 120 | resource_size_t start, resource_size_t end, |
| 118 | const char *name); | 121 | const char *name); |
| 122 | extern struct resource *insert_resource_conflict(struct resource *parent, struct resource *new); | ||
| 119 | extern int insert_resource(struct resource *parent, struct resource *new); | 123 | extern int insert_resource(struct resource *parent, struct resource *new); |
| 120 | extern void insert_resource_expand_to_fit(struct resource *root, struct resource *new); | 124 | extern void insert_resource_expand_to_fit(struct resource *root, struct resource *new); |
| 121 | extern int allocate_resource(struct resource *root, struct resource *new, | 125 | extern int allocate_resource(struct resource *root, struct resource *new, |
diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h index 07baa38bce37..51952989ad42 100644 --- a/include/linux/ipc_namespace.h +++ b/include/linux/ipc_namespace.h | |||
| @@ -62,11 +62,6 @@ extern struct ipc_namespace init_ipc_ns; | |||
| 62 | extern atomic_t nr_ipc_ns; | 62 | extern atomic_t nr_ipc_ns; |
| 63 | 63 | ||
| 64 | extern spinlock_t mq_lock; | 64 | extern spinlock_t mq_lock; |
| 65 | #if defined(CONFIG_POSIX_MQUEUE) || defined(CONFIG_SYSVIPC) | ||
| 66 | #define INIT_IPC_NS(ns) .ns = &init_ipc_ns, | ||
| 67 | #else | ||
| 68 | #define INIT_IPC_NS(ns) | ||
| 69 | #endif | ||
| 70 | 65 | ||
| 71 | #ifdef CONFIG_SYSVIPC | 66 | #ifdef CONFIG_SYSVIPC |
| 72 | extern int register_ipcns_notifier(struct ipc_namespace *); | 67 | extern int register_ipcns_notifier(struct ipc_namespace *); |
diff --git a/include/linux/ipmi_smi.h b/include/linux/ipmi_smi.h index f7c9c75a2775..4b48318ac542 100644 --- a/include/linux/ipmi_smi.h +++ b/include/linux/ipmi_smi.h | |||
| @@ -39,7 +39,6 @@ | |||
| 39 | #include <linux/module.h> | 39 | #include <linux/module.h> |
| 40 | #include <linux/device.h> | 40 | #include <linux/device.h> |
| 41 | #include <linux/platform_device.h> | 41 | #include <linux/platform_device.h> |
| 42 | #include <linux/ipmi_smi.h> | ||
| 43 | 42 | ||
| 44 | /* This files describes the interface for IPMI system management interface | 43 | /* This files describes the interface for IPMI system management interface |
| 45 | drivers to bind into the IPMI message handler. */ | 44 | drivers to bind into the IPMI message handler. */ |
diff --git a/include/linux/irq.h b/include/linux/irq.h index d13492df57a1..707ab122e2e6 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
| @@ -400,7 +400,9 @@ static inline int irq_has_action(unsigned int irq) | |||
| 400 | 400 | ||
| 401 | /* Dynamic irq helper functions */ | 401 | /* Dynamic irq helper functions */ |
| 402 | extern void dynamic_irq_init(unsigned int irq); | 402 | extern void dynamic_irq_init(unsigned int irq); |
| 403 | void dynamic_irq_init_keep_chip_data(unsigned int irq); | ||
| 403 | extern void dynamic_irq_cleanup(unsigned int irq); | 404 | extern void dynamic_irq_cleanup(unsigned int irq); |
| 405 | void dynamic_irq_cleanup_keep_chip_data(unsigned int irq); | ||
| 404 | 406 | ||
| 405 | /* Set/get chip/data for an IRQ: */ | 407 | /* Set/get chip/data for an IRQ: */ |
| 406 | extern int set_irq_chip(unsigned int irq, struct irq_chip *chip); | 408 | extern int set_irq_chip(unsigned int irq, struct irq_chip *chip); |
diff --git a/include/linux/jbd.h b/include/linux/jbd.h index 331530cd3cc6..f3aa59cb675d 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h | |||
| @@ -246,19 +246,8 @@ typedef struct journal_superblock_s | |||
| 246 | 246 | ||
| 247 | #define J_ASSERT(assert) BUG_ON(!(assert)) | 247 | #define J_ASSERT(assert) BUG_ON(!(assert)) |
| 248 | 248 | ||
| 249 | #if defined(CONFIG_BUFFER_DEBUG) | ||
| 250 | void buffer_assertion_failure(struct buffer_head *bh); | ||
| 251 | #define J_ASSERT_BH(bh, expr) \ | ||
| 252 | do { \ | ||
| 253 | if (!(expr)) \ | ||
| 254 | buffer_assertion_failure(bh); \ | ||
| 255 | J_ASSERT(expr); \ | ||
| 256 | } while (0) | ||
| 257 | #define J_ASSERT_JH(jh, expr) J_ASSERT_BH(jh2bh(jh), expr) | ||
| 258 | #else | ||
| 259 | #define J_ASSERT_BH(bh, expr) J_ASSERT(expr) | 249 | #define J_ASSERT_BH(bh, expr) J_ASSERT(expr) |
| 260 | #define J_ASSERT_JH(jh, expr) J_ASSERT(expr) | 250 | #define J_ASSERT_JH(jh, expr) J_ASSERT(expr) |
| 261 | #endif | ||
| 262 | 251 | ||
| 263 | #if defined(JBD_PARANOID_IOFAIL) | 252 | #if defined(JBD_PARANOID_IOFAIL) |
| 264 | #define J_EXPECT(expr, why...) J_ASSERT(expr) | 253 | #define J_EXPECT(expr, why...) J_ASSERT(expr) |
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 638ce4554c76..1ec876358180 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
| @@ -69,15 +69,8 @@ extern u8 jbd2_journal_enable_debug; | |||
| 69 | #define jbd_debug(f, a...) /**/ | 69 | #define jbd_debug(f, a...) /**/ |
| 70 | #endif | 70 | #endif |
| 71 | 71 | ||
| 72 | static inline void *jbd2_alloc(size_t size, gfp_t flags) | 72 | extern void *jbd2_alloc(size_t size, gfp_t flags); |
| 73 | { | 73 | extern void jbd2_free(void *ptr, size_t size); |
| 74 | return (void *)__get_free_pages(flags, get_order(size)); | ||
| 75 | } | ||
| 76 | |||
| 77 | static inline void jbd2_free(void *ptr, size_t size) | ||
| 78 | { | ||
| 79 | free_pages((unsigned long)ptr, get_order(size)); | ||
| 80 | }; | ||
| 81 | 74 | ||
| 82 | #define JBD2_MIN_JOURNAL_BLOCKS 1024 | 75 | #define JBD2_MIN_JOURNAL_BLOCKS 1024 |
| 83 | 76 | ||
| @@ -284,19 +277,8 @@ typedef struct journal_superblock_s | |||
| 284 | 277 | ||
| 285 | #define J_ASSERT(assert) BUG_ON(!(assert)) | 278 | #define J_ASSERT(assert) BUG_ON(!(assert)) |
| 286 | 279 | ||
| 287 | #if defined(CONFIG_BUFFER_DEBUG) | ||
| 288 | void buffer_assertion_failure(struct buffer_head *bh); | ||
| 289 | #define J_ASSERT_BH(bh, expr) \ | ||
| 290 | do { \ | ||
| 291 | if (!(expr)) \ | ||
| 292 | buffer_assertion_failure(bh); \ | ||
| 293 | J_ASSERT(expr); \ | ||
| 294 | } while (0) | ||
| 295 | #define J_ASSERT_JH(jh, expr) J_ASSERT_BH(jh2bh(jh), expr) | ||
| 296 | #else | ||
| 297 | #define J_ASSERT_BH(bh, expr) J_ASSERT(expr) | 280 | #define J_ASSERT_BH(bh, expr) J_ASSERT(expr) |
| 298 | #define J_ASSERT_JH(jh, expr) J_ASSERT(expr) | 281 | #define J_ASSERT_JH(jh, expr) J_ASSERT(expr) |
| 299 | #endif | ||
| 300 | 282 | ||
| 301 | #if defined(JBD2_PARANOID_IOFAIL) | 283 | #if defined(JBD2_PARANOID_IOFAIL) |
| 302 | #define J_EXPECT(expr, why...) J_ASSERT(expr) | 284 | #define J_EXPECT(expr, why...) J_ASSERT(expr) |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 1221d2331a6d..7f0707463360 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -44,6 +44,16 @@ extern const char linux_proc_banner[]; | |||
| 44 | 44 | ||
| 45 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | 45 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) |
| 46 | 46 | ||
| 47 | /* | ||
| 48 | * This looks more complex than it should be. But we need to | ||
| 49 | * get the type for the ~ right in round_down (it needs to be | ||
| 50 | * as wide as the result!), and we want to evaluate the macro | ||
| 51 | * arguments just once each. | ||
| 52 | */ | ||
| 53 | #define __round_mask(x, y) ((__typeof__(x))((y)-1)) | ||
| 54 | #define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1) | ||
| 55 | #define round_down(x, y) ((x) & ~__round_mask(x, y)) | ||
| 56 | |||
| 47 | #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) | 57 | #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) |
| 48 | #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) | 58 | #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) |
| 49 | #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) | 59 | #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) |
diff --git a/include/linux/kexec.h b/include/linux/kexec.h index c356b6914ffd..03e8e8dbc577 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h | |||
| @@ -199,7 +199,7 @@ extern struct kimage *kexec_crash_image; | |||
| 199 | */ | 199 | */ |
| 200 | extern struct resource crashk_res; | 200 | extern struct resource crashk_res; |
| 201 | typedef u32 note_buf_t[KEXEC_NOTE_BYTES/4]; | 201 | typedef u32 note_buf_t[KEXEC_NOTE_BYTES/4]; |
| 202 | extern note_buf_t *crash_notes; | 202 | extern note_buf_t __percpu *crash_notes; |
| 203 | extern u32 vmcoreinfo_note[VMCOREINFO_NOTE_SIZE/4]; | 203 | extern u32 vmcoreinfo_note[VMCOREINFO_NOTE_SIZE/4]; |
| 204 | extern size_t vmcoreinfo_size; | 204 | extern size_t vmcoreinfo_size; |
| 205 | extern size_t vmcoreinfo_max_size; | 205 | extern size_t vmcoreinfo_max_size; |
diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h index bc0fc795bd35..ece0b1c33816 100644 --- a/include/linux/kfifo.h +++ b/include/linux/kfifo.h | |||
| @@ -102,8 +102,6 @@ union { \ | |||
| 102 | unsigned char name##kfifo_buffer[size]; \ | 102 | unsigned char name##kfifo_buffer[size]; \ |
| 103 | struct kfifo name = __kfifo_initializer(size, name##kfifo_buffer) | 103 | struct kfifo name = __kfifo_initializer(size, name##kfifo_buffer) |
| 104 | 104 | ||
| 105 | #undef __kfifo_initializer | ||
| 106 | |||
| 107 | extern void kfifo_init(struct kfifo *fifo, void *buffer, | 105 | extern void kfifo_init(struct kfifo *fifo, void *buffer, |
| 108 | unsigned int size); | 106 | unsigned int size); |
| 109 | extern __must_check int kfifo_alloc(struct kfifo *fifo, unsigned int size, | 107 | extern __must_check int kfifo_alloc(struct kfifo *fifo, unsigned int size, |
diff --git a/include/linux/kmod.h b/include/linux/kmod.h index 384ca8bbf1ac..facb27fe7de0 100644 --- a/include/linux/kmod.h +++ b/include/linux/kmod.h | |||
| @@ -27,6 +27,7 @@ | |||
| 27 | #define KMOD_PATH_LEN 256 | 27 | #define KMOD_PATH_LEN 256 |
| 28 | 28 | ||
| 29 | #ifdef CONFIG_MODULES | 29 | #ifdef CONFIG_MODULES |
| 30 | extern char modprobe_path[]; /* for sysctl */ | ||
| 30 | /* modprobe exit status on success, -ve on error. Return value | 31 | /* modprobe exit status on success, -ve on error. Return value |
| 31 | * usually useless though. */ | 32 | * usually useless though. */ |
| 32 | extern int __request_module(bool wait, const char *name, ...) \ | 33 | extern int __request_module(bool wait, const char *name, ...) \ |
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 58ae8e00fcdd..3950d3c2850d 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
| @@ -106,7 +106,7 @@ extern char *kobject_get_path(struct kobject *kobj, gfp_t flag); | |||
| 106 | 106 | ||
| 107 | struct kobj_type { | 107 | struct kobj_type { |
| 108 | void (*release)(struct kobject *kobj); | 108 | void (*release)(struct kobject *kobj); |
| 109 | struct sysfs_ops *sysfs_ops; | 109 | const struct sysfs_ops *sysfs_ops; |
| 110 | struct attribute **default_attrs; | 110 | struct attribute **default_attrs; |
| 111 | }; | 111 | }; |
| 112 | 112 | ||
| @@ -118,9 +118,9 @@ struct kobj_uevent_env { | |||
| 118 | }; | 118 | }; |
| 119 | 119 | ||
| 120 | struct kset_uevent_ops { | 120 | struct kset_uevent_ops { |
| 121 | int (*filter)(struct kset *kset, struct kobject *kobj); | 121 | int (* const filter)(struct kset *kset, struct kobject *kobj); |
| 122 | const char *(*name)(struct kset *kset, struct kobject *kobj); | 122 | const char *(* const name)(struct kset *kset, struct kobject *kobj); |
| 123 | int (*uevent)(struct kset *kset, struct kobject *kobj, | 123 | int (* const uevent)(struct kset *kset, struct kobject *kobj, |
| 124 | struct kobj_uevent_env *env); | 124 | struct kobj_uevent_env *env); |
| 125 | }; | 125 | }; |
| 126 | 126 | ||
| @@ -132,7 +132,7 @@ struct kobj_attribute { | |||
| 132 | const char *buf, size_t count); | 132 | const char *buf, size_t count); |
| 133 | }; | 133 | }; |
| 134 | 134 | ||
| 135 | extern struct sysfs_ops kobj_sysfs_ops; | 135 | extern const struct sysfs_ops kobj_sysfs_ops; |
| 136 | 136 | ||
| 137 | /** | 137 | /** |
| 138 | * struct kset - a set of kobjects of a specific type, belonging to a specific subsystem. | 138 | * struct kset - a set of kobjects of a specific type, belonging to a specific subsystem. |
| @@ -155,14 +155,14 @@ struct kset { | |||
| 155 | struct list_head list; | 155 | struct list_head list; |
| 156 | spinlock_t list_lock; | 156 | spinlock_t list_lock; |
| 157 | struct kobject kobj; | 157 | struct kobject kobj; |
| 158 | struct kset_uevent_ops *uevent_ops; | 158 | const struct kset_uevent_ops *uevent_ops; |
| 159 | }; | 159 | }; |
| 160 | 160 | ||
| 161 | extern void kset_init(struct kset *kset); | 161 | extern void kset_init(struct kset *kset); |
| 162 | extern int __must_check kset_register(struct kset *kset); | 162 | extern int __must_check kset_register(struct kset *kset); |
| 163 | extern void kset_unregister(struct kset *kset); | 163 | extern void kset_unregister(struct kset *kset); |
| 164 | extern struct kset * __must_check kset_create_and_add(const char *name, | 164 | extern struct kset * __must_check kset_create_and_add(const char *name, |
| 165 | struct kset_uevent_ops *u, | 165 | const struct kset_uevent_ops *u, |
| 166 | struct kobject *parent_kobj); | 166 | struct kobject *parent_kobj); |
| 167 | 167 | ||
| 168 | static inline struct kset *to_kset(struct kobject *kobj) | 168 | static inline struct kset *to_kset(struct kobject *kobj) |
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index 1b672f74a32f..e7d1b2e0070d 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
| @@ -122,6 +122,11 @@ struct kprobe { | |||
| 122 | /* Kprobe status flags */ | 122 | /* Kprobe status flags */ |
| 123 | #define KPROBE_FLAG_GONE 1 /* breakpoint has already gone */ | 123 | #define KPROBE_FLAG_GONE 1 /* breakpoint has already gone */ |
| 124 | #define KPROBE_FLAG_DISABLED 2 /* probe is temporarily disabled */ | 124 | #define KPROBE_FLAG_DISABLED 2 /* probe is temporarily disabled */ |
| 125 | #define KPROBE_FLAG_OPTIMIZED 4 /* | ||
| 126 | * probe is really optimized. | ||
| 127 | * NOTE: | ||
| 128 | * this flag is only for optimized_kprobe. | ||
| 129 | */ | ||
| 125 | 130 | ||
| 126 | /* Has this kprobe gone ? */ | 131 | /* Has this kprobe gone ? */ |
| 127 | static inline int kprobe_gone(struct kprobe *p) | 132 | static inline int kprobe_gone(struct kprobe *p) |
| @@ -134,6 +139,12 @@ static inline int kprobe_disabled(struct kprobe *p) | |||
| 134 | { | 139 | { |
| 135 | return p->flags & (KPROBE_FLAG_DISABLED | KPROBE_FLAG_GONE); | 140 | return p->flags & (KPROBE_FLAG_DISABLED | KPROBE_FLAG_GONE); |
| 136 | } | 141 | } |
| 142 | |||
| 143 | /* Is this kprobe really running optimized path ? */ | ||
| 144 | static inline int kprobe_optimized(struct kprobe *p) | ||
| 145 | { | ||
| 146 | return p->flags & KPROBE_FLAG_OPTIMIZED; | ||
| 147 | } | ||
| 137 | /* | 148 | /* |
| 138 | * Special probe type that uses setjmp-longjmp type tricks to resume | 149 | * Special probe type that uses setjmp-longjmp type tricks to resume |
| 139 | * execution at a specified entry with a matching prototype corresponding | 150 | * execution at a specified entry with a matching prototype corresponding |
| @@ -249,6 +260,39 @@ extern kprobe_opcode_t *get_insn_slot(void); | |||
| 249 | extern void free_insn_slot(kprobe_opcode_t *slot, int dirty); | 260 | extern void free_insn_slot(kprobe_opcode_t *slot, int dirty); |
| 250 | extern void kprobes_inc_nmissed_count(struct kprobe *p); | 261 | extern void kprobes_inc_nmissed_count(struct kprobe *p); |
| 251 | 262 | ||
| 263 | #ifdef CONFIG_OPTPROBES | ||
| 264 | /* | ||
| 265 | * Internal structure for direct jump optimized probe | ||
| 266 | */ | ||
| 267 | struct optimized_kprobe { | ||
| 268 | struct kprobe kp; | ||
| 269 | struct list_head list; /* list for optimizing queue */ | ||
| 270 | struct arch_optimized_insn optinsn; | ||
| 271 | }; | ||
| 272 | |||
| 273 | /* Architecture dependent functions for direct jump optimization */ | ||
| 274 | extern int arch_prepared_optinsn(struct arch_optimized_insn *optinsn); | ||
| 275 | extern int arch_check_optimized_kprobe(struct optimized_kprobe *op); | ||
| 276 | extern int arch_prepare_optimized_kprobe(struct optimized_kprobe *op); | ||
| 277 | extern void arch_remove_optimized_kprobe(struct optimized_kprobe *op); | ||
| 278 | extern int arch_optimize_kprobe(struct optimized_kprobe *op); | ||
| 279 | extern void arch_unoptimize_kprobe(struct optimized_kprobe *op); | ||
| 280 | extern kprobe_opcode_t *get_optinsn_slot(void); | ||
| 281 | extern void free_optinsn_slot(kprobe_opcode_t *slot, int dirty); | ||
| 282 | extern int arch_within_optimized_kprobe(struct optimized_kprobe *op, | ||
| 283 | unsigned long addr); | ||
| 284 | |||
| 285 | extern void opt_pre_handler(struct kprobe *p, struct pt_regs *regs); | ||
| 286 | |||
| 287 | #ifdef CONFIG_SYSCTL | ||
| 288 | extern int sysctl_kprobes_optimization; | ||
| 289 | extern int proc_kprobes_optimization_handler(struct ctl_table *table, | ||
| 290 | int write, void __user *buffer, | ||
| 291 | size_t *length, loff_t *ppos); | ||
| 292 | #endif | ||
| 293 | |||
| 294 | #endif /* CONFIG_OPTPROBES */ | ||
| 295 | |||
| 252 | /* Get the kprobe at this addr (if any) - called with preemption disabled */ | 296 | /* Get the kprobe at this addr (if any) - called with preemption disabled */ |
| 253 | struct kprobe *get_kprobe(void *addr); | 297 | struct kprobe *get_kprobe(void *addr); |
| 254 | void kretprobe_hash_lock(struct task_struct *tsk, | 298 | void kretprobe_hash_lock(struct task_struct *tsk, |
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index a24de0b1858e..60df9c84ecae 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
| @@ -103,7 +103,7 @@ struct kvm_userspace_memory_region { | |||
| 103 | 103 | ||
| 104 | /* for kvm_memory_region::flags */ | 104 | /* for kvm_memory_region::flags */ |
| 105 | #define KVM_MEM_LOG_DIRTY_PAGES 1UL | 105 | #define KVM_MEM_LOG_DIRTY_PAGES 1UL |
| 106 | 106 | #define KVM_MEMSLOT_INVALID (1UL << 1) | |
| 107 | 107 | ||
| 108 | /* for KVM_IRQ_LINE */ | 108 | /* for KVM_IRQ_LINE */ |
| 109 | struct kvm_irq_level { | 109 | struct kvm_irq_level { |
| @@ -497,6 +497,11 @@ struct kvm_ioeventfd { | |||
| 497 | #endif | 497 | #endif |
| 498 | #define KVM_CAP_S390_PSW 42 | 498 | #define KVM_CAP_S390_PSW 42 |
| 499 | #define KVM_CAP_PPC_SEGSTATE 43 | 499 | #define KVM_CAP_PPC_SEGSTATE 43 |
| 500 | #define KVM_CAP_HYPERV 44 | ||
| 501 | #define KVM_CAP_HYPERV_VAPIC 45 | ||
| 502 | #define KVM_CAP_HYPERV_SPIN 46 | ||
| 503 | #define KVM_CAP_PCI_SEGMENT 47 | ||
| 504 | #define KVM_CAP_X86_ROBUST_SINGLESTEP 51 | ||
| 500 | 505 | ||
| 501 | #ifdef KVM_CAP_IRQ_ROUTING | 506 | #ifdef KVM_CAP_IRQ_ROUTING |
| 502 | 507 | ||
| @@ -691,8 +696,9 @@ struct kvm_assigned_pci_dev { | |||
| 691 | __u32 busnr; | 696 | __u32 busnr; |
| 692 | __u32 devfn; | 697 | __u32 devfn; |
| 693 | __u32 flags; | 698 | __u32 flags; |
| 699 | __u32 segnr; | ||
| 694 | union { | 700 | union { |
| 695 | __u32 reserved[12]; | 701 | __u32 reserved[11]; |
| 696 | }; | 702 | }; |
| 697 | }; | 703 | }; |
| 698 | 704 | ||
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index bd5a616d9373..a3fd0f91d943 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
| @@ -38,6 +38,7 @@ | |||
| 38 | #define KVM_REQ_MMU_SYNC 7 | 38 | #define KVM_REQ_MMU_SYNC 7 |
| 39 | #define KVM_REQ_KVMCLOCK_UPDATE 8 | 39 | #define KVM_REQ_KVMCLOCK_UPDATE 8 |
| 40 | #define KVM_REQ_KICK 9 | 40 | #define KVM_REQ_KICK 9 |
| 41 | #define KVM_REQ_DEACTIVATE_FPU 10 | ||
| 41 | 42 | ||
| 42 | #define KVM_USERSPACE_IRQ_SOURCE_ID 0 | 43 | #define KVM_USERSPACE_IRQ_SOURCE_ID 0 |
| 43 | 44 | ||
| @@ -57,20 +58,20 @@ struct kvm_io_bus { | |||
| 57 | struct kvm_io_device *devs[NR_IOBUS_DEVS]; | 58 | struct kvm_io_device *devs[NR_IOBUS_DEVS]; |
| 58 | }; | 59 | }; |
| 59 | 60 | ||
| 60 | void kvm_io_bus_init(struct kvm_io_bus *bus); | 61 | enum kvm_bus { |
| 61 | void kvm_io_bus_destroy(struct kvm_io_bus *bus); | 62 | KVM_MMIO_BUS, |
| 62 | int kvm_io_bus_write(struct kvm_io_bus *bus, gpa_t addr, int len, | 63 | KVM_PIO_BUS, |
| 63 | const void *val); | 64 | KVM_NR_BUSES |
| 64 | int kvm_io_bus_read(struct kvm_io_bus *bus, gpa_t addr, int len, | 65 | }; |
| 66 | |||
| 67 | int kvm_io_bus_write(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr, | ||
| 68 | int len, const void *val); | ||
| 69 | int kvm_io_bus_read(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr, int len, | ||
| 65 | void *val); | 70 | void *val); |
| 66 | int __kvm_io_bus_register_dev(struct kvm_io_bus *bus, | 71 | int kvm_io_bus_register_dev(struct kvm *kvm, enum kvm_bus bus_idx, |
| 67 | struct kvm_io_device *dev); | ||
| 68 | int kvm_io_bus_register_dev(struct kvm *kvm, struct kvm_io_bus *bus, | ||
| 69 | struct kvm_io_device *dev); | 72 | struct kvm_io_device *dev); |
| 70 | void __kvm_io_bus_unregister_dev(struct kvm_io_bus *bus, | 73 | int kvm_io_bus_unregister_dev(struct kvm *kvm, enum kvm_bus bus_idx, |
| 71 | struct kvm_io_device *dev); | 74 | struct kvm_io_device *dev); |
| 72 | void kvm_io_bus_unregister_dev(struct kvm *kvm, struct kvm_io_bus *bus, | ||
| 73 | struct kvm_io_device *dev); | ||
| 74 | 75 | ||
| 75 | struct kvm_vcpu { | 76 | struct kvm_vcpu { |
| 76 | struct kvm *kvm; | 77 | struct kvm *kvm; |
| @@ -83,6 +84,8 @@ struct kvm_vcpu { | |||
| 83 | struct kvm_run *run; | 84 | struct kvm_run *run; |
| 84 | unsigned long requests; | 85 | unsigned long requests; |
| 85 | unsigned long guest_debug; | 86 | unsigned long guest_debug; |
| 87 | int srcu_idx; | ||
| 88 | |||
| 86 | int fpu_active; | 89 | int fpu_active; |
| 87 | int guest_fpu_loaded; | 90 | int guest_fpu_loaded; |
| 88 | wait_queue_head_t wq; | 91 | wait_queue_head_t wq; |
| @@ -150,14 +153,19 @@ struct kvm_irq_routing_table {}; | |||
| 150 | 153 | ||
| 151 | #endif | 154 | #endif |
| 152 | 155 | ||
| 153 | struct kvm { | 156 | struct kvm_memslots { |
| 154 | spinlock_t mmu_lock; | ||
| 155 | spinlock_t requests_lock; | ||
| 156 | struct rw_semaphore slots_lock; | ||
| 157 | struct mm_struct *mm; /* userspace tied to this vm */ | ||
| 158 | int nmemslots; | 157 | int nmemslots; |
| 159 | struct kvm_memory_slot memslots[KVM_MEMORY_SLOTS + | 158 | struct kvm_memory_slot memslots[KVM_MEMORY_SLOTS + |
| 160 | KVM_PRIVATE_MEM_SLOTS]; | 159 | KVM_PRIVATE_MEM_SLOTS]; |
| 160 | }; | ||
| 161 | |||
| 162 | struct kvm { | ||
| 163 | spinlock_t mmu_lock; | ||
| 164 | raw_spinlock_t requests_lock; | ||
| 165 | struct mutex slots_lock; | ||
| 166 | struct mm_struct *mm; /* userspace tied to this vm */ | ||
| 167 | struct kvm_memslots *memslots; | ||
| 168 | struct srcu_struct srcu; | ||
| 161 | #ifdef CONFIG_KVM_APIC_ARCHITECTURE | 169 | #ifdef CONFIG_KVM_APIC_ARCHITECTURE |
| 162 | u32 bsp_vcpu_id; | 170 | u32 bsp_vcpu_id; |
| 163 | struct kvm_vcpu *bsp_vcpu; | 171 | struct kvm_vcpu *bsp_vcpu; |
| @@ -166,8 +174,7 @@ struct kvm { | |||
| 166 | atomic_t online_vcpus; | 174 | atomic_t online_vcpus; |
| 167 | struct list_head vm_list; | 175 | struct list_head vm_list; |
| 168 | struct mutex lock; | 176 | struct mutex lock; |
| 169 | struct kvm_io_bus mmio_bus; | 177 | struct kvm_io_bus *buses[KVM_NR_BUSES]; |
| 170 | struct kvm_io_bus pio_bus; | ||
| 171 | #ifdef CONFIG_HAVE_KVM_EVENTFD | 178 | #ifdef CONFIG_HAVE_KVM_EVENTFD |
| 172 | struct { | 179 | struct { |
| 173 | spinlock_t lock; | 180 | spinlock_t lock; |
| @@ -249,13 +256,20 @@ int kvm_set_memory_region(struct kvm *kvm, | |||
| 249 | int __kvm_set_memory_region(struct kvm *kvm, | 256 | int __kvm_set_memory_region(struct kvm *kvm, |
| 250 | struct kvm_userspace_memory_region *mem, | 257 | struct kvm_userspace_memory_region *mem, |
| 251 | int user_alloc); | 258 | int user_alloc); |
| 252 | int kvm_arch_set_memory_region(struct kvm *kvm, | 259 | int kvm_arch_prepare_memory_region(struct kvm *kvm, |
| 260 | struct kvm_memory_slot *memslot, | ||
| 261 | struct kvm_memory_slot old, | ||
| 262 | struct kvm_userspace_memory_region *mem, | ||
| 263 | int user_alloc); | ||
| 264 | void kvm_arch_commit_memory_region(struct kvm *kvm, | ||
| 253 | struct kvm_userspace_memory_region *mem, | 265 | struct kvm_userspace_memory_region *mem, |
| 254 | struct kvm_memory_slot old, | 266 | struct kvm_memory_slot old, |
| 255 | int user_alloc); | 267 | int user_alloc); |
| 256 | void kvm_disable_largepages(void); | 268 | void kvm_disable_largepages(void); |
| 257 | void kvm_arch_flush_shadow(struct kvm *kvm); | 269 | void kvm_arch_flush_shadow(struct kvm *kvm); |
| 258 | gfn_t unalias_gfn(struct kvm *kvm, gfn_t gfn); | 270 | gfn_t unalias_gfn(struct kvm *kvm, gfn_t gfn); |
| 271 | gfn_t unalias_gfn_instantiation(struct kvm *kvm, gfn_t gfn); | ||
| 272 | |||
| 259 | struct page *gfn_to_page(struct kvm *kvm, gfn_t gfn); | 273 | struct page *gfn_to_page(struct kvm *kvm, gfn_t gfn); |
| 260 | unsigned long gfn_to_hva(struct kvm *kvm, gfn_t gfn); | 274 | unsigned long gfn_to_hva(struct kvm *kvm, gfn_t gfn); |
| 261 | void kvm_release_page_clean(struct page *page); | 275 | void kvm_release_page_clean(struct page *page); |
| @@ -264,6 +278,9 @@ void kvm_set_page_dirty(struct page *page); | |||
| 264 | void kvm_set_page_accessed(struct page *page); | 278 | void kvm_set_page_accessed(struct page *page); |
| 265 | 279 | ||
| 266 | pfn_t gfn_to_pfn(struct kvm *kvm, gfn_t gfn); | 280 | pfn_t gfn_to_pfn(struct kvm *kvm, gfn_t gfn); |
| 281 | pfn_t gfn_to_pfn_memslot(struct kvm *kvm, | ||
| 282 | struct kvm_memory_slot *slot, gfn_t gfn); | ||
| 283 | int memslot_id(struct kvm *kvm, gfn_t gfn); | ||
| 267 | void kvm_release_pfn_dirty(pfn_t); | 284 | void kvm_release_pfn_dirty(pfn_t); |
| 268 | void kvm_release_pfn_clean(pfn_t pfn); | 285 | void kvm_release_pfn_clean(pfn_t pfn); |
| 269 | void kvm_set_pfn_dirty(pfn_t pfn); | 286 | void kvm_set_pfn_dirty(pfn_t pfn); |
| @@ -283,6 +300,7 @@ int kvm_clear_guest_page(struct kvm *kvm, gfn_t gfn, int offset, int len); | |||
| 283 | int kvm_clear_guest(struct kvm *kvm, gpa_t gpa, unsigned long len); | 300 | int kvm_clear_guest(struct kvm *kvm, gpa_t gpa, unsigned long len); |
| 284 | struct kvm_memory_slot *gfn_to_memslot(struct kvm *kvm, gfn_t gfn); | 301 | struct kvm_memory_slot *gfn_to_memslot(struct kvm *kvm, gfn_t gfn); |
| 285 | int kvm_is_visible_gfn(struct kvm *kvm, gfn_t gfn); | 302 | int kvm_is_visible_gfn(struct kvm *kvm, gfn_t gfn); |
| 303 | unsigned long kvm_host_page_size(struct kvm *kvm, gfn_t gfn); | ||
| 286 | void mark_page_dirty(struct kvm *kvm, gfn_t gfn); | 304 | void mark_page_dirty(struct kvm *kvm, gfn_t gfn); |
| 287 | 305 | ||
| 288 | void kvm_vcpu_block(struct kvm_vcpu *vcpu); | 306 | void kvm_vcpu_block(struct kvm_vcpu *vcpu); |
| @@ -383,6 +401,7 @@ struct kvm_assigned_dev_kernel { | |||
| 383 | struct work_struct interrupt_work; | 401 | struct work_struct interrupt_work; |
| 384 | struct list_head list; | 402 | struct list_head list; |
| 385 | int assigned_dev_id; | 403 | int assigned_dev_id; |
| 404 | int host_segnr; | ||
| 386 | int host_busnr; | 405 | int host_busnr; |
| 387 | int host_devfn; | 406 | int host_devfn; |
| 388 | unsigned int entries_nr; | 407 | unsigned int entries_nr; |
| @@ -429,8 +448,7 @@ void kvm_free_irq_source_id(struct kvm *kvm, int irq_source_id); | |||
| 429 | #define KVM_IOMMU_CACHE_COHERENCY 0x1 | 448 | #define KVM_IOMMU_CACHE_COHERENCY 0x1 |
| 430 | 449 | ||
| 431 | #ifdef CONFIG_IOMMU_API | 450 | #ifdef CONFIG_IOMMU_API |
| 432 | int kvm_iommu_map_pages(struct kvm *kvm, gfn_t base_gfn, | 451 | int kvm_iommu_map_pages(struct kvm *kvm, struct kvm_memory_slot *slot); |
| 433 | unsigned long npages); | ||
| 434 | int kvm_iommu_map_guest(struct kvm *kvm); | 452 | int kvm_iommu_map_guest(struct kvm *kvm); |
| 435 | int kvm_iommu_unmap_guest(struct kvm *kvm); | 453 | int kvm_iommu_unmap_guest(struct kvm *kvm); |
| 436 | int kvm_assign_device(struct kvm *kvm, | 454 | int kvm_assign_device(struct kvm *kvm, |
| @@ -480,11 +498,6 @@ static inline void kvm_guest_exit(void) | |||
| 480 | current->flags &= ~PF_VCPU; | 498 | current->flags &= ~PF_VCPU; |
| 481 | } | 499 | } |
| 482 | 500 | ||
| 483 | static inline int memslot_id(struct kvm *kvm, struct kvm_memory_slot *slot) | ||
| 484 | { | ||
| 485 | return slot - kvm->memslots; | ||
| 486 | } | ||
| 487 | |||
| 488 | static inline gpa_t gfn_to_gpa(gfn_t gfn) | 501 | static inline gpa_t gfn_to_gpa(gfn_t gfn) |
| 489 | { | 502 | { |
| 490 | return (gpa_t)gfn << PAGE_SHIFT; | 503 | return (gpa_t)gfn << PAGE_SHIFT; |
| @@ -532,6 +545,10 @@ static inline int mmu_notifier_retry(struct kvm_vcpu *vcpu, unsigned long mmu_se | |||
| 532 | } | 545 | } |
| 533 | #endif | 546 | #endif |
| 534 | 547 | ||
| 548 | #ifndef KVM_ARCH_HAS_UNALIAS_INSTANTIATION | ||
| 549 | #define unalias_gfn_instantiation unalias_gfn | ||
| 550 | #endif | ||
| 551 | |||
| 535 | #ifdef CONFIG_HAVE_KVM_IRQCHIP | 552 | #ifdef CONFIG_HAVE_KVM_IRQCHIP |
| 536 | 553 | ||
| 537 | #define KVM_MAX_IRQ_ROUTES 1024 | 554 | #define KVM_MAX_IRQ_ROUTES 1024 |
diff --git a/include/linux/list.h b/include/linux/list.h index 5d9c6558e8ab..8392884a2977 100644 --- a/include/linux/list.h +++ b/include/linux/list.h | |||
| @@ -498,7 +498,7 @@ static inline void list_splice_tail_init(struct list_head *list, | |||
| 498 | pos = n, n = list_entry(n->member.next, typeof(*n), member)) | 498 | pos = n, n = list_entry(n->member.next, typeof(*n), member)) |
| 499 | 499 | ||
| 500 | /** | 500 | /** |
| 501 | * list_for_each_entry_safe_continue | 501 | * list_for_each_entry_safe_continue - continue list iteration safe against removal |
| 502 | * @pos: the type * to use as a loop cursor. | 502 | * @pos: the type * to use as a loop cursor. |
| 503 | * @n: another type * to use as temporary storage | 503 | * @n: another type * to use as temporary storage |
| 504 | * @head: the head for your list. | 504 | * @head: the head for your list. |
| @@ -514,7 +514,7 @@ static inline void list_splice_tail_init(struct list_head *list, | |||
| 514 | pos = n, n = list_entry(n->member.next, typeof(*n), member)) | 514 | pos = n, n = list_entry(n->member.next, typeof(*n), member)) |
| 515 | 515 | ||
| 516 | /** | 516 | /** |
| 517 | * list_for_each_entry_safe_from | 517 | * list_for_each_entry_safe_from - iterate over list from current point safe against removal |
| 518 | * @pos: the type * to use as a loop cursor. | 518 | * @pos: the type * to use as a loop cursor. |
| 519 | * @n: another type * to use as temporary storage | 519 | * @n: another type * to use as temporary storage |
| 520 | * @head: the head for your list. | 520 | * @head: the head for your list. |
| @@ -529,7 +529,7 @@ static inline void list_splice_tail_init(struct list_head *list, | |||
| 529 | pos = n, n = list_entry(n->member.next, typeof(*n), member)) | 529 | pos = n, n = list_entry(n->member.next, typeof(*n), member)) |
| 530 | 530 | ||
| 531 | /** | 531 | /** |
| 532 | * list_for_each_entry_safe_reverse | 532 | * list_for_each_entry_safe_reverse - iterate backwards over list safe against removal |
| 533 | * @pos: the type * to use as a loop cursor. | 533 | * @pos: the type * to use as a loop cursor. |
| 534 | * @n: another type * to use as temporary storage | 534 | * @n: another type * to use as temporary storage |
| 535 | * @head: the head for your list. | 535 | * @head: the head for your list. |
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index 10206a87da19..a03977a96d7e 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
| @@ -12,6 +12,10 @@ | |||
| 12 | struct task_struct; | 12 | struct task_struct; |
| 13 | struct lockdep_map; | 13 | struct lockdep_map; |
| 14 | 14 | ||
| 15 | /* for sysctl */ | ||
| 16 | extern int prove_locking; | ||
| 17 | extern int lock_stat; | ||
| 18 | |||
| 15 | #ifdef CONFIG_LOCKDEP | 19 | #ifdef CONFIG_LOCKDEP |
| 16 | 20 | ||
| 17 | #include <linux/linkage.h> | 21 | #include <linux/linkage.h> |
diff --git a/include/linux/lru_cache.h b/include/linux/lru_cache.h index 3a2b2d9b0472..de48d167568b 100644 --- a/include/linux/lru_cache.h +++ b/include/linux/lru_cache.h | |||
| @@ -64,7 +64,7 @@ For crash recovery after replication node failure, | |||
| 64 | usually the condition is softened to regions that _may_ have been target of | 64 | usually the condition is softened to regions that _may_ have been target of |
| 65 | in-flight WRITE IO, e.g. by only lazily clearing the on-disk write-intent | 65 | in-flight WRITE IO, e.g. by only lazily clearing the on-disk write-intent |
| 66 | bitmap, trading frequency of meta data transactions against amount of | 66 | bitmap, trading frequency of meta data transactions against amount of |
| 67 | (possibly unneccessary) resync traffic. | 67 | (possibly unnecessary) resync traffic. |
| 68 | 68 | ||
| 69 | If we set a hard limit on the area that may be "hot" at any given time, we | 69 | If we set a hard limit on the area that may be "hot" at any given time, we |
| 70 | limit the amount of resync traffic needed for crash recovery. | 70 | limit the amount of resync traffic needed for crash recovery. |
diff --git a/include/linux/magic.h b/include/linux/magic.h index 76285e01b39e..eb9800f05782 100644 --- a/include/linux/magic.h +++ b/include/linux/magic.h | |||
| @@ -52,7 +52,6 @@ | |||
| 52 | #define CGROUP_SUPER_MAGIC 0x27e0eb | 52 | #define CGROUP_SUPER_MAGIC 0x27e0eb |
| 53 | 53 | ||
| 54 | #define FUTEXFS_SUPER_MAGIC 0xBAD1DEA | 54 | #define FUTEXFS_SUPER_MAGIC 0xBAD1DEA |
| 55 | #define INOTIFYFS_SUPER_MAGIC 0x2BAD1DEA | ||
| 56 | 55 | ||
| 57 | #define STACK_END_MAGIC 0x57AC6E9D | 56 | #define STACK_END_MAGIC 0x57AC6E9D |
| 58 | 57 | ||
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 1f9b119f4ace..44301c6affa8 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
| @@ -124,7 +124,6 @@ static inline bool mem_cgroup_disabled(void) | |||
| 124 | return false; | 124 | return false; |
| 125 | } | 125 | } |
| 126 | 126 | ||
| 127 | extern bool mem_cgroup_oom_called(struct task_struct *task); | ||
| 128 | void mem_cgroup_update_file_mapped(struct page *page, int val); | 127 | void mem_cgroup_update_file_mapped(struct page *page, int val); |
| 129 | unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order, | 128 | unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order, |
| 130 | gfp_t gfp_mask, int nid, | 129 | gfp_t gfp_mask, int nid, |
| @@ -258,11 +257,6 @@ static inline bool mem_cgroup_disabled(void) | |||
| 258 | return true; | 257 | return true; |
| 259 | } | 258 | } |
| 260 | 259 | ||
| 261 | static inline bool mem_cgroup_oom_called(struct task_struct *task) | ||
| 262 | { | ||
| 263 | return false; | ||
| 264 | } | ||
| 265 | |||
| 266 | static inline int | 260 | static inline int |
| 267 | mem_cgroup_inactive_anon_is_low(struct mem_cgroup *memcg) | 261 | mem_cgroup_inactive_anon_is_low(struct mem_cgroup *memcg) |
| 268 | { | 262 | { |
diff --git a/include/linux/memory.h b/include/linux/memory.h index 1adfe779eb99..85582e1bcee9 100644 --- a/include/linux/memory.h +++ b/include/linux/memory.h | |||
| @@ -36,6 +36,8 @@ struct memory_block { | |||
| 36 | struct sys_device sysdev; | 36 | struct sys_device sysdev; |
| 37 | }; | 37 | }; |
| 38 | 38 | ||
| 39 | int arch_get_memory_phys_device(unsigned long start_pfn); | ||
| 40 | |||
| 39 | /* These states are exposed to userspace as text strings in sysfs */ | 41 | /* These states are exposed to userspace as text strings in sysfs */ |
| 40 | #define MEM_ONLINE (1<<0) /* exposed to userspace */ | 42 | #define MEM_ONLINE (1<<0) /* exposed to userspace */ |
| 41 | #define MEM_GOING_OFFLINE (1<<1) /* exposed to userspace */ | 43 | #define MEM_GOING_OFFLINE (1<<1) /* exposed to userspace */ |
diff --git a/include/linux/mfd/88pm8607.h b/include/linux/mfd/88pm8607.h deleted file mode 100644 index f41b428d2cec..000000000000 --- a/include/linux/mfd/88pm8607.h +++ /dev/null | |||
| @@ -1,217 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Marvell 88PM8607 Interface | ||
| 3 | * | ||
| 4 | * Copyright (C) 2009 Marvell International Ltd. | ||
| 5 | * Haojian Zhuang <haojian.zhuang@marvell.com> | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License version 2 as | ||
| 9 | * published by the Free Software Foundation. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef __LINUX_MFD_88PM8607_H | ||
| 13 | #define __LINUX_MFD_88PM8607_H | ||
| 14 | |||
| 15 | enum { | ||
| 16 | PM8607_ID_BUCK1 = 0, | ||
| 17 | PM8607_ID_BUCK2, | ||
| 18 | PM8607_ID_BUCK3, | ||
| 19 | |||
| 20 | PM8607_ID_LDO1, | ||
| 21 | PM8607_ID_LDO2, | ||
| 22 | PM8607_ID_LDO3, | ||
| 23 | PM8607_ID_LDO4, | ||
| 24 | PM8607_ID_LDO5, | ||
| 25 | PM8607_ID_LDO6, | ||
| 26 | PM8607_ID_LDO7, | ||
| 27 | PM8607_ID_LDO8, | ||
| 28 | PM8607_ID_LDO9, | ||
| 29 | PM8607_ID_LDO10, | ||
| 30 | PM8607_ID_LDO12, | ||
| 31 | PM8607_ID_LDO14, | ||
| 32 | |||
| 33 | PM8607_ID_RG_MAX, | ||
| 34 | }; | ||
| 35 | |||
| 36 | #define CHIP_ID (0x40) | ||
| 37 | #define CHIP_ID_MASK (0xF8) | ||
| 38 | |||
| 39 | /* Interrupt Registers */ | ||
| 40 | #define PM8607_STATUS_1 (0x01) | ||
| 41 | #define PM8607_STATUS_2 (0x02) | ||
| 42 | #define PM8607_INT_STATUS1 (0x03) | ||
| 43 | #define PM8607_INT_STATUS2 (0x04) | ||
| 44 | #define PM8607_INT_STATUS3 (0x05) | ||
| 45 | #define PM8607_INT_MASK_1 (0x06) | ||
| 46 | #define PM8607_INT_MASK_2 (0x07) | ||
| 47 | #define PM8607_INT_MASK_3 (0x08) | ||
| 48 | |||
| 49 | /* Regulator Control Registers */ | ||
| 50 | #define PM8607_LDO1 (0x10) | ||
| 51 | #define PM8607_LDO2 (0x11) | ||
| 52 | #define PM8607_LDO3 (0x12) | ||
| 53 | #define PM8607_LDO4 (0x13) | ||
| 54 | #define PM8607_LDO5 (0x14) | ||
| 55 | #define PM8607_LDO6 (0x15) | ||
| 56 | #define PM8607_LDO7 (0x16) | ||
| 57 | #define PM8607_LDO8 (0x17) | ||
| 58 | #define PM8607_LDO9 (0x18) | ||
| 59 | #define PM8607_LDO10 (0x19) | ||
| 60 | #define PM8607_LDO12 (0x1A) | ||
| 61 | #define PM8607_LDO14 (0x1B) | ||
| 62 | #define PM8607_SLEEP_MODE1 (0x1C) | ||
| 63 | #define PM8607_SLEEP_MODE2 (0x1D) | ||
| 64 | #define PM8607_SLEEP_MODE3 (0x1E) | ||
| 65 | #define PM8607_SLEEP_MODE4 (0x1F) | ||
| 66 | #define PM8607_GO (0x20) | ||
| 67 | #define PM8607_SLEEP_BUCK1 (0x21) | ||
| 68 | #define PM8607_SLEEP_BUCK2 (0x22) | ||
| 69 | #define PM8607_SLEEP_BUCK3 (0x23) | ||
| 70 | #define PM8607_BUCK1 (0x24) | ||
| 71 | #define PM8607_BUCK2 (0x25) | ||
| 72 | #define PM8607_BUCK3 (0x26) | ||
| 73 | #define PM8607_BUCK_CONTROLS (0x27) | ||
| 74 | #define PM8607_SUPPLIES_EN11 (0x2B) | ||
| 75 | #define PM8607_SUPPLIES_EN12 (0x2C) | ||
| 76 | #define PM8607_GROUP1 (0x2D) | ||
| 77 | #define PM8607_GROUP2 (0x2E) | ||
| 78 | #define PM8607_GROUP3 (0x2F) | ||
| 79 | #define PM8607_GROUP4 (0x30) | ||
| 80 | #define PM8607_GROUP5 (0x31) | ||
| 81 | #define PM8607_GROUP6 (0x32) | ||
| 82 | #define PM8607_SUPPLIES_EN21 (0x33) | ||
| 83 | #define PM8607_SUPPLIES_EN22 (0x34) | ||
| 84 | |||
| 85 | /* RTC Control Registers */ | ||
| 86 | #define PM8607_RTC1 (0xA0) | ||
| 87 | #define PM8607_RTC_COUNTER1 (0xA1) | ||
| 88 | #define PM8607_RTC_COUNTER2 (0xA2) | ||
| 89 | #define PM8607_RTC_COUNTER3 (0xA3) | ||
| 90 | #define PM8607_RTC_COUNTER4 (0xA4) | ||
| 91 | #define PM8607_RTC_EXPIRE1 (0xA5) | ||
| 92 | #define PM8607_RTC_EXPIRE2 (0xA6) | ||
| 93 | #define PM8607_RTC_EXPIRE3 (0xA7) | ||
| 94 | #define PM8607_RTC_EXPIRE4 (0xA8) | ||
| 95 | #define PM8607_RTC_TRIM1 (0xA9) | ||
| 96 | #define PM8607_RTC_TRIM2 (0xAA) | ||
| 97 | #define PM8607_RTC_TRIM3 (0xAB) | ||
| 98 | #define PM8607_RTC_TRIM4 (0xAC) | ||
| 99 | #define PM8607_RTC_MISC1 (0xAD) | ||
| 100 | #define PM8607_RTC_MISC2 (0xAE) | ||
| 101 | #define PM8607_RTC_MISC3 (0xAF) | ||
| 102 | |||
| 103 | /* Misc Registers */ | ||
| 104 | #define PM8607_CHIP_ID (0x00) | ||
| 105 | #define PM8607_LDO1 (0x10) | ||
| 106 | #define PM8607_DVC3 (0x26) | ||
| 107 | #define PM8607_MISC1 (0x40) | ||
| 108 | |||
| 109 | /* bit definitions for PM8607 events */ | ||
| 110 | #define PM8607_EVENT_ONKEY (1 << 0) | ||
| 111 | #define PM8607_EVENT_EXTON (1 << 1) | ||
| 112 | #define PM8607_EVENT_CHG (1 << 2) | ||
| 113 | #define PM8607_EVENT_BAT (1 << 3) | ||
| 114 | #define PM8607_EVENT_RTC (1 << 4) | ||
| 115 | #define PM8607_EVENT_CC (1 << 5) | ||
| 116 | #define PM8607_EVENT_VBAT (1 << 8) | ||
| 117 | #define PM8607_EVENT_VCHG (1 << 9) | ||
| 118 | #define PM8607_EVENT_VSYS (1 << 10) | ||
| 119 | #define PM8607_EVENT_TINT (1 << 11) | ||
| 120 | #define PM8607_EVENT_GPADC0 (1 << 12) | ||
| 121 | #define PM8607_EVENT_GPADC1 (1 << 13) | ||
| 122 | #define PM8607_EVENT_GPADC2 (1 << 14) | ||
| 123 | #define PM8607_EVENT_GPADC3 (1 << 15) | ||
| 124 | #define PM8607_EVENT_AUDIO_SHORT (1 << 16) | ||
| 125 | #define PM8607_EVENT_PEN (1 << 17) | ||
| 126 | #define PM8607_EVENT_HEADSET (1 << 18) | ||
| 127 | #define PM8607_EVENT_HOOK (1 << 19) | ||
| 128 | #define PM8607_EVENT_MICIN (1 << 20) | ||
| 129 | #define PM8607_EVENT_CHG_TIMEOUT (1 << 21) | ||
| 130 | #define PM8607_EVENT_CHG_DONE (1 << 22) | ||
| 131 | #define PM8607_EVENT_CHG_FAULT (1 << 23) | ||
| 132 | |||
| 133 | /* bit definitions of Status Query Interface */ | ||
| 134 | #define PM8607_STATUS_CC (1 << 3) | ||
| 135 | #define PM8607_STATUS_PEN (1 << 4) | ||
| 136 | #define PM8607_STATUS_HEADSET (1 << 5) | ||
| 137 | #define PM8607_STATUS_HOOK (1 << 6) | ||
| 138 | #define PM8607_STATUS_MICIN (1 << 7) | ||
| 139 | #define PM8607_STATUS_ONKEY (1 << 8) | ||
| 140 | #define PM8607_STATUS_EXTON (1 << 9) | ||
| 141 | #define PM8607_STATUS_CHG (1 << 10) | ||
| 142 | #define PM8607_STATUS_BAT (1 << 11) | ||
| 143 | #define PM8607_STATUS_VBUS (1 << 12) | ||
| 144 | #define PM8607_STATUS_OV (1 << 13) | ||
| 145 | |||
| 146 | /* bit definitions of BUCK3 */ | ||
| 147 | #define PM8607_BUCK3_DOUBLE (1 << 6) | ||
| 148 | |||
| 149 | /* bit definitions of Misc1 */ | ||
| 150 | #define PM8607_MISC1_PI2C (1 << 0) | ||
| 151 | |||
| 152 | /* Interrupt Number in 88PM8607 */ | ||
| 153 | enum { | ||
| 154 | PM8607_IRQ_ONKEY = 0, | ||
| 155 | PM8607_IRQ_EXTON, | ||
| 156 | PM8607_IRQ_CHG, | ||
| 157 | PM8607_IRQ_BAT, | ||
| 158 | PM8607_IRQ_RTC, | ||
| 159 | PM8607_IRQ_VBAT = 8, | ||
| 160 | PM8607_IRQ_VCHG, | ||
| 161 | PM8607_IRQ_VSYS, | ||
| 162 | PM8607_IRQ_TINT, | ||
| 163 | PM8607_IRQ_GPADC0, | ||
| 164 | PM8607_IRQ_GPADC1, | ||
| 165 | PM8607_IRQ_GPADC2, | ||
| 166 | PM8607_IRQ_GPADC3, | ||
| 167 | PM8607_IRQ_AUDIO_SHORT = 16, | ||
| 168 | PM8607_IRQ_PEN, | ||
| 169 | PM8607_IRQ_HEADSET, | ||
| 170 | PM8607_IRQ_HOOK, | ||
| 171 | PM8607_IRQ_MICIN, | ||
| 172 | PM8607_IRQ_CHG_FAIL, | ||
| 173 | PM8607_IRQ_CHG_DONE, | ||
| 174 | PM8607_IRQ_CHG_FAULT, | ||
| 175 | }; | ||
| 176 | |||
| 177 | enum { | ||
| 178 | PM8607_CHIP_A0 = 0x40, | ||
| 179 | PM8607_CHIP_A1 = 0x41, | ||
| 180 | PM8607_CHIP_B0 = 0x48, | ||
| 181 | }; | ||
| 182 | |||
| 183 | |||
| 184 | struct pm8607_chip { | ||
| 185 | struct device *dev; | ||
| 186 | struct mutex io_lock; | ||
| 187 | struct i2c_client *client; | ||
| 188 | |||
| 189 | int (*read)(struct pm8607_chip *chip, int reg, int bytes, void *dest); | ||
| 190 | int (*write)(struct pm8607_chip *chip, int reg, int bytes, void *src); | ||
| 191 | |||
| 192 | int buck3_double; /* DVC ramp slope double */ | ||
| 193 | unsigned char chip_id; | ||
| 194 | |||
| 195 | }; | ||
| 196 | |||
| 197 | #define PM8607_MAX_REGULATOR 15 /* 3 Bucks, 12 LDOs */ | ||
| 198 | |||
| 199 | enum { | ||
| 200 | GI2C_PORT = 0, | ||
| 201 | PI2C_PORT, | ||
| 202 | }; | ||
| 203 | |||
| 204 | struct pm8607_platform_data { | ||
| 205 | int i2c_port; /* Controlled by GI2C or PI2C */ | ||
| 206 | struct regulator_init_data *regulator[PM8607_MAX_REGULATOR]; | ||
| 207 | }; | ||
| 208 | |||
| 209 | extern int pm8607_reg_read(struct pm8607_chip *, int); | ||
| 210 | extern int pm8607_reg_write(struct pm8607_chip *, int, unsigned char); | ||
| 211 | extern int pm8607_bulk_read(struct pm8607_chip *, int, int, | ||
| 212 | unsigned char *); | ||
| 213 | extern int pm8607_bulk_write(struct pm8607_chip *, int, int, | ||
| 214 | unsigned char *); | ||
| 215 | extern int pm8607_set_bits(struct pm8607_chip *, int, unsigned char, | ||
| 216 | unsigned char); | ||
| 217 | #endif /* __LINUX_MFD_88PM8607_H */ | ||
diff --git a/include/linux/mfd/88pm860x.h b/include/linux/mfd/88pm860x.h new file mode 100644 index 000000000000..73f92c5feea2 --- /dev/null +++ b/include/linux/mfd/88pm860x.h | |||
| @@ -0,0 +1,375 @@ | |||
| 1 | /* | ||
| 2 | * Marvell 88PM860x Interface | ||
| 3 | * | ||
| 4 | * Copyright (C) 2009 Marvell International Ltd. | ||
| 5 | * Haojian Zhuang <haojian.zhuang@marvell.com> | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License version 2 as | ||
| 9 | * published by the Free Software Foundation. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef __LINUX_MFD_88PM860X_H | ||
| 13 | #define __LINUX_MFD_88PM860X_H | ||
| 14 | |||
| 15 | #include <linux/interrupt.h> | ||
| 16 | |||
| 17 | #define MFD_NAME_SIZE (40) | ||
| 18 | |||
| 19 | enum { | ||
| 20 | CHIP_INVALID = 0, | ||
| 21 | CHIP_PM8606, | ||
| 22 | CHIP_PM8607, | ||
| 23 | CHIP_MAX, | ||
| 24 | }; | ||
| 25 | |||
| 26 | enum { | ||
| 27 | PM8606_ID_INVALID, | ||
| 28 | PM8606_ID_BACKLIGHT, | ||
| 29 | PM8606_ID_LED, | ||
| 30 | PM8606_ID_VIBRATOR, | ||
| 31 | PM8606_ID_TOUCH, | ||
| 32 | PM8606_ID_SOUND, | ||
| 33 | PM8606_ID_CHARGER, | ||
| 34 | PM8606_ID_MAX, | ||
| 35 | }; | ||
| 36 | |||
| 37 | enum { | ||
| 38 | PM8606_BACKLIGHT1 = 0, | ||
| 39 | PM8606_BACKLIGHT2, | ||
| 40 | PM8606_BACKLIGHT3, | ||
| 41 | }; | ||
| 42 | |||
| 43 | enum { | ||
| 44 | PM8606_LED1_RED = 0, | ||
| 45 | PM8606_LED1_GREEN, | ||
| 46 | PM8606_LED1_BLUE, | ||
| 47 | PM8606_LED2_RED, | ||
| 48 | PM8606_LED2_GREEN, | ||
| 49 | PM8606_LED2_BLUE, | ||
| 50 | PM8607_LED_VIBRATOR, | ||
| 51 | }; | ||
| 52 | |||
| 53 | |||
| 54 | /* 8606 Registers */ | ||
| 55 | #define PM8606_DCM_BOOST (0x00) | ||
| 56 | #define PM8606_PWM (0x01) | ||
| 57 | |||
| 58 | /* Backlight Registers */ | ||
| 59 | #define PM8606_WLED1A (0x02) | ||
| 60 | #define PM8606_WLED1B (0x03) | ||
| 61 | #define PM8606_WLED2A (0x04) | ||
| 62 | #define PM8606_WLED2B (0x05) | ||
| 63 | #define PM8606_WLED3A (0x06) | ||
| 64 | #define PM8606_WLED3B (0x07) | ||
| 65 | |||
| 66 | /* LED Registers */ | ||
| 67 | #define PM8606_RGB2A (0x08) | ||
| 68 | #define PM8606_RGB2B (0x09) | ||
| 69 | #define PM8606_RGB2C (0x0A) | ||
| 70 | #define PM8606_RGB2D (0x0B) | ||
| 71 | #define PM8606_RGB1A (0x0C) | ||
| 72 | #define PM8606_RGB1B (0x0D) | ||
| 73 | #define PM8606_RGB1C (0x0E) | ||
| 74 | #define PM8606_RGB1D (0x0F) | ||
| 75 | |||
| 76 | #define PM8606_PREREGULATORA (0x10) | ||
| 77 | #define PM8606_PREREGULATORB (0x11) | ||
| 78 | #define PM8606_VIBRATORA (0x12) | ||
| 79 | #define PM8606_VIBRATORB (0x13) | ||
| 80 | #define PM8606_VCHG (0x14) | ||
| 81 | #define PM8606_VSYS (0x15) | ||
| 82 | #define PM8606_MISC (0x16) | ||
| 83 | #define PM8606_CHIP_ID (0x17) | ||
| 84 | #define PM8606_STATUS (0x18) | ||
| 85 | #define PM8606_FLAGS (0x19) | ||
| 86 | #define PM8606_PROTECTA (0x1A) | ||
| 87 | #define PM8606_PROTECTB (0x1B) | ||
| 88 | #define PM8606_PROTECTC (0x1C) | ||
| 89 | |||
| 90 | /* Bit definitions of PM8606 registers */ | ||
| 91 | #define PM8606_DCM_500MA (0x0) /* current limit */ | ||
| 92 | #define PM8606_DCM_750MA (0x1) | ||
| 93 | #define PM8606_DCM_1000MA (0x2) | ||
| 94 | #define PM8606_DCM_1250MA (0x3) | ||
| 95 | #define PM8606_DCM_250MV (0x0 << 2) | ||
| 96 | #define PM8606_DCM_300MV (0x1 << 2) | ||
| 97 | #define PM8606_DCM_350MV (0x2 << 2) | ||
| 98 | #define PM8606_DCM_400MV (0x3 << 2) | ||
| 99 | |||
| 100 | #define PM8606_PWM_31200HZ (0x0) | ||
| 101 | #define PM8606_PWM_15600HZ (0x1) | ||
| 102 | #define PM8606_PWM_7800HZ (0x2) | ||
| 103 | #define PM8606_PWM_3900HZ (0x3) | ||
| 104 | #define PM8606_PWM_1950HZ (0x4) | ||
| 105 | #define PM8606_PWM_976HZ (0x5) | ||
| 106 | #define PM8606_PWM_488HZ (0x6) | ||
| 107 | #define PM8606_PWM_244HZ (0x7) | ||
| 108 | #define PM8606_PWM_FREQ_MASK (0x7) | ||
| 109 | |||
| 110 | #define PM8606_WLED_ON (1 << 0) | ||
| 111 | #define PM8606_WLED_CURRENT(x) ((x & 0x1F) << 1) | ||
| 112 | |||
| 113 | #define PM8606_LED_CURRENT(x) (((x >> 2) & 0x07) << 5) | ||
| 114 | |||
| 115 | #define PM8606_VSYS_EN (1 << 1) | ||
| 116 | |||
| 117 | #define PM8606_MISC_OSC_EN (1 << 4) | ||
| 118 | |||
| 119 | enum { | ||
| 120 | PM8607_ID_BUCK1 = 0, | ||
| 121 | PM8607_ID_BUCK2, | ||
| 122 | PM8607_ID_BUCK3, | ||
| 123 | |||
| 124 | PM8607_ID_LDO1, | ||
| 125 | PM8607_ID_LDO2, | ||
| 126 | PM8607_ID_LDO3, | ||
| 127 | PM8607_ID_LDO4, | ||
| 128 | PM8607_ID_LDO5, | ||
| 129 | PM8607_ID_LDO6, | ||
| 130 | PM8607_ID_LDO7, | ||
| 131 | PM8607_ID_LDO8, | ||
| 132 | PM8607_ID_LDO9, | ||
| 133 | PM8607_ID_LDO10, | ||
| 134 | PM8607_ID_LDO12, | ||
| 135 | PM8607_ID_LDO14, | ||
| 136 | |||
| 137 | PM8607_ID_RG_MAX, | ||
| 138 | }; | ||
| 139 | |||
| 140 | #define PM8607_VERSION (0x40) /* 8607 chip ID */ | ||
| 141 | #define PM8607_VERSION_MASK (0xF0) /* 8607 chip ID mask */ | ||
| 142 | |||
| 143 | /* Interrupt Registers */ | ||
| 144 | #define PM8607_STATUS_1 (0x01) | ||
| 145 | #define PM8607_STATUS_2 (0x02) | ||
| 146 | #define PM8607_INT_STATUS1 (0x03) | ||
| 147 | #define PM8607_INT_STATUS2 (0x04) | ||
| 148 | #define PM8607_INT_STATUS3 (0x05) | ||
| 149 | #define PM8607_INT_MASK_1 (0x06) | ||
| 150 | #define PM8607_INT_MASK_2 (0x07) | ||
| 151 | #define PM8607_INT_MASK_3 (0x08) | ||
| 152 | |||
| 153 | /* Regulator Control Registers */ | ||
| 154 | #define PM8607_LDO1 (0x10) | ||
| 155 | #define PM8607_LDO2 (0x11) | ||
| 156 | #define PM8607_LDO3 (0x12) | ||
| 157 | #define PM8607_LDO4 (0x13) | ||
| 158 | #define PM8607_LDO5 (0x14) | ||
| 159 | #define PM8607_LDO6 (0x15) | ||
| 160 | #define PM8607_LDO7 (0x16) | ||
| 161 | #define PM8607_LDO8 (0x17) | ||
| 162 | #define PM8607_LDO9 (0x18) | ||
| 163 | #define PM8607_LDO10 (0x19) | ||
| 164 | #define PM8607_LDO12 (0x1A) | ||
| 165 | #define PM8607_LDO14 (0x1B) | ||
| 166 | #define PM8607_SLEEP_MODE1 (0x1C) | ||
| 167 | #define PM8607_SLEEP_MODE2 (0x1D) | ||
| 168 | #define PM8607_SLEEP_MODE3 (0x1E) | ||
| 169 | #define PM8607_SLEEP_MODE4 (0x1F) | ||
| 170 | #define PM8607_GO (0x20) | ||
| 171 | #define PM8607_SLEEP_BUCK1 (0x21) | ||
| 172 | #define PM8607_SLEEP_BUCK2 (0x22) | ||
| 173 | #define PM8607_SLEEP_BUCK3 (0x23) | ||
| 174 | #define PM8607_BUCK1 (0x24) | ||
| 175 | #define PM8607_BUCK2 (0x25) | ||
| 176 | #define PM8607_BUCK3 (0x26) | ||
| 177 | #define PM8607_BUCK_CONTROLS (0x27) | ||
| 178 | #define PM8607_SUPPLIES_EN11 (0x2B) | ||
| 179 | #define PM8607_SUPPLIES_EN12 (0x2C) | ||
| 180 | #define PM8607_GROUP1 (0x2D) | ||
| 181 | #define PM8607_GROUP2 (0x2E) | ||
| 182 | #define PM8607_GROUP3 (0x2F) | ||
| 183 | #define PM8607_GROUP4 (0x30) | ||
| 184 | #define PM8607_GROUP5 (0x31) | ||
| 185 | #define PM8607_GROUP6 (0x32) | ||
| 186 | #define PM8607_SUPPLIES_EN21 (0x33) | ||
| 187 | #define PM8607_SUPPLIES_EN22 (0x34) | ||
| 188 | |||
| 189 | /* Vibrator Control Registers */ | ||
| 190 | #define PM8607_VIBRATOR_SET (0x28) | ||
| 191 | #define PM8607_VIBRATOR_PWM (0x29) | ||
| 192 | |||
| 193 | /* GPADC Registers */ | ||
| 194 | #define PM8607_GP_BIAS1 (0x4F) | ||
| 195 | #define PM8607_MEAS_EN1 (0x50) | ||
| 196 | #define PM8607_MEAS_EN2 (0x51) | ||
| 197 | #define PM8607_MEAS_EN3 (0x52) | ||
| 198 | #define PM8607_MEAS_OFF_TIME1 (0x53) | ||
| 199 | #define PM8607_MEAS_OFF_TIME2 (0x54) | ||
| 200 | #define PM8607_TSI_PREBIAS (0x55) /* prebias time */ | ||
| 201 | #define PM8607_PD_PREBIAS (0x56) /* prebias time */ | ||
| 202 | #define PM8607_GPADC_MISC1 (0x57) | ||
| 203 | |||
| 204 | /* RTC Control Registers */ | ||
| 205 | #define PM8607_RTC1 (0xA0) | ||
| 206 | #define PM8607_RTC_COUNTER1 (0xA1) | ||
| 207 | #define PM8607_RTC_COUNTER2 (0xA2) | ||
| 208 | #define PM8607_RTC_COUNTER3 (0xA3) | ||
| 209 | #define PM8607_RTC_COUNTER4 (0xA4) | ||
| 210 | #define PM8607_RTC_EXPIRE1 (0xA5) | ||
| 211 | #define PM8607_RTC_EXPIRE2 (0xA6) | ||
| 212 | #define PM8607_RTC_EXPIRE3 (0xA7) | ||
| 213 | #define PM8607_RTC_EXPIRE4 (0xA8) | ||
| 214 | #define PM8607_RTC_TRIM1 (0xA9) | ||
| 215 | #define PM8607_RTC_TRIM2 (0xAA) | ||
| 216 | #define PM8607_RTC_TRIM3 (0xAB) | ||
| 217 | #define PM8607_RTC_TRIM4 (0xAC) | ||
| 218 | #define PM8607_RTC_MISC1 (0xAD) | ||
| 219 | #define PM8607_RTC_MISC2 (0xAE) | ||
| 220 | #define PM8607_RTC_MISC3 (0xAF) | ||
| 221 | |||
| 222 | /* Misc Registers */ | ||
| 223 | #define PM8607_CHIP_ID (0x00) | ||
| 224 | #define PM8607_B0_MISC1 (0x0C) | ||
| 225 | #define PM8607_LDO1 (0x10) | ||
| 226 | #define PM8607_DVC3 (0x26) | ||
| 227 | #define PM8607_A1_MISC1 (0x40) | ||
| 228 | |||
| 229 | /* bit definitions of Status Query Interface */ | ||
| 230 | #define PM8607_STATUS_CC (1 << 3) | ||
| 231 | #define PM8607_STATUS_PEN (1 << 4) | ||
| 232 | #define PM8607_STATUS_HEADSET (1 << 5) | ||
| 233 | #define PM8607_STATUS_HOOK (1 << 6) | ||
| 234 | #define PM8607_STATUS_MICIN (1 << 7) | ||
| 235 | #define PM8607_STATUS_ONKEY (1 << 8) | ||
| 236 | #define PM8607_STATUS_EXTON (1 << 9) | ||
| 237 | #define PM8607_STATUS_CHG (1 << 10) | ||
| 238 | #define PM8607_STATUS_BAT (1 << 11) | ||
| 239 | #define PM8607_STATUS_VBUS (1 << 12) | ||
| 240 | #define PM8607_STATUS_OV (1 << 13) | ||
| 241 | |||
| 242 | /* bit definitions of BUCK3 */ | ||
| 243 | #define PM8607_BUCK3_DOUBLE (1 << 6) | ||
| 244 | |||
| 245 | /* bit definitions of Misc1 */ | ||
| 246 | #define PM8607_A1_MISC1_PI2C (1 << 0) | ||
| 247 | #define PM8607_B0_MISC1_INV_INT (1 << 0) | ||
| 248 | #define PM8607_B0_MISC1_INT_CLEAR (1 << 1) | ||
| 249 | #define PM8607_B0_MISC1_INT_MASK (1 << 2) | ||
| 250 | #define PM8607_B0_MISC1_PI2C (1 << 3) | ||
| 251 | #define PM8607_B0_MISC1_RESET (1 << 6) | ||
| 252 | |||
| 253 | /* bits definitions of GPADC */ | ||
| 254 | #define PM8607_GPADC_EN (1 << 0) | ||
| 255 | #define PM8607_GPADC_PREBIAS_MASK (3 << 1) | ||
| 256 | #define PM8607_GPADC_SLOT_CYCLE_MASK (3 << 3) /* slow mode */ | ||
| 257 | #define PM8607_GPADC_OFF_SCALE_MASK (3 << 5) /* GP sleep mode */ | ||
| 258 | #define PM8607_GPADC_SW_CAL_MASK (1 << 7) | ||
| 259 | |||
| 260 | #define PM8607_PD_PREBIAS_MASK (0x1F << 0) | ||
| 261 | #define PM8607_PD_PRECHG_MASK (7 << 5) | ||
| 262 | |||
| 263 | /* Interrupt Number in 88PM8607 */ | ||
| 264 | enum { | ||
| 265 | PM8607_IRQ_ONKEY, | ||
| 266 | PM8607_IRQ_EXTON, | ||
| 267 | PM8607_IRQ_CHG, | ||
| 268 | PM8607_IRQ_BAT, | ||
| 269 | PM8607_IRQ_RTC, | ||
| 270 | PM8607_IRQ_CC, | ||
| 271 | PM8607_IRQ_VBAT, | ||
| 272 | PM8607_IRQ_VCHG, | ||
| 273 | PM8607_IRQ_VSYS, | ||
| 274 | PM8607_IRQ_TINT, | ||
| 275 | PM8607_IRQ_GPADC0, | ||
| 276 | PM8607_IRQ_GPADC1, | ||
| 277 | PM8607_IRQ_GPADC2, | ||
| 278 | PM8607_IRQ_GPADC3, | ||
| 279 | PM8607_IRQ_AUDIO_SHORT, | ||
| 280 | PM8607_IRQ_PEN, | ||
| 281 | PM8607_IRQ_HEADSET, | ||
| 282 | PM8607_IRQ_HOOK, | ||
| 283 | PM8607_IRQ_MICIN, | ||
| 284 | PM8607_IRQ_CHG_FAIL, | ||
| 285 | PM8607_IRQ_CHG_DONE, | ||
| 286 | PM8607_IRQ_CHG_FAULT, | ||
| 287 | }; | ||
| 288 | |||
| 289 | enum { | ||
| 290 | PM8607_CHIP_A0 = 0x40, | ||
| 291 | PM8607_CHIP_A1 = 0x41, | ||
| 292 | PM8607_CHIP_B0 = 0x48, | ||
| 293 | }; | ||
| 294 | |||
| 295 | struct pm860x_chip { | ||
| 296 | struct device *dev; | ||
| 297 | struct mutex io_lock; | ||
| 298 | struct mutex irq_lock; | ||
| 299 | struct i2c_client *client; | ||
| 300 | struct i2c_client *companion; /* companion chip client */ | ||
| 301 | |||
| 302 | int buck3_double; /* DVC ramp slope double */ | ||
| 303 | unsigned short companion_addr; | ||
| 304 | int id; | ||
| 305 | int irq_mode; | ||
| 306 | int irq_base; | ||
| 307 | int core_irq; | ||
| 308 | unsigned char chip_version; | ||
| 309 | |||
| 310 | }; | ||
| 311 | |||
| 312 | #define PM8607_MAX_REGULATOR 15 /* 3 Bucks, 12 LDOs */ | ||
| 313 | |||
| 314 | enum { | ||
| 315 | GI2C_PORT = 0, | ||
| 316 | PI2C_PORT, | ||
| 317 | }; | ||
| 318 | |||
| 319 | struct pm860x_backlight_pdata { | ||
| 320 | int id; | ||
| 321 | int pwm; | ||
| 322 | int iset; | ||
| 323 | unsigned long flags; | ||
| 324 | }; | ||
| 325 | |||
| 326 | struct pm860x_led_pdata { | ||
| 327 | int id; | ||
| 328 | int iset; | ||
| 329 | unsigned long flags; | ||
| 330 | }; | ||
| 331 | |||
| 332 | struct pm860x_touch_pdata { | ||
| 333 | int gpadc_prebias; | ||
| 334 | int slot_cycle; | ||
| 335 | int off_scale; | ||
| 336 | int sw_cal; | ||
| 337 | int tsi_prebias; /* time, slot */ | ||
| 338 | int pen_prebias; /* time, slot */ | ||
| 339 | int pen_prechg; /* time, slot */ | ||
| 340 | int res_x; /* resistor of Xplate */ | ||
| 341 | unsigned long flags; | ||
| 342 | }; | ||
| 343 | |||
| 344 | struct pm860x_power_pdata { | ||
| 345 | unsigned fast_charge; /* charge current */ | ||
| 346 | }; | ||
| 347 | |||
| 348 | struct pm860x_platform_data { | ||
| 349 | struct pm860x_backlight_pdata *backlight; | ||
| 350 | struct pm860x_led_pdata *led; | ||
| 351 | struct pm860x_touch_pdata *touch; | ||
| 352 | struct pm860x_power_pdata *power; | ||
| 353 | |||
| 354 | unsigned short companion_addr; /* I2C address of companion chip */ | ||
| 355 | int i2c_port; /* Controlled by GI2C or PI2C */ | ||
| 356 | int irq_mode; /* Clear interrupt by read/write(0/1) */ | ||
| 357 | int irq_base; /* IRQ base number of 88pm860x */ | ||
| 358 | struct regulator_init_data *regulator[PM8607_MAX_REGULATOR]; | ||
| 359 | }; | ||
| 360 | |||
| 361 | extern char pm860x_backlight_name[][MFD_NAME_SIZE]; | ||
| 362 | extern char pm860x_led_name[][MFD_NAME_SIZE]; | ||
| 363 | |||
| 364 | extern int pm860x_reg_read(struct i2c_client *, int); | ||
| 365 | extern int pm860x_reg_write(struct i2c_client *, int, unsigned char); | ||
| 366 | extern int pm860x_bulk_read(struct i2c_client *, int, int, unsigned char *); | ||
| 367 | extern int pm860x_bulk_write(struct i2c_client *, int, int, unsigned char *); | ||
| 368 | extern int pm860x_set_bits(struct i2c_client *, int, unsigned char, | ||
| 369 | unsigned char); | ||
| 370 | |||
| 371 | extern int pm860x_device_init(struct pm860x_chip *chip, | ||
| 372 | struct pm860x_platform_data *pdata); | ||
| 373 | extern void pm860x_device_exit(struct pm860x_chip *chip); | ||
| 374 | |||
| 375 | #endif /* __LINUX_MFD_88PM860X_H */ | ||
diff --git a/include/linux/mfd/ab3100.h b/include/linux/mfd/ab3100.h index e9aa4c9d749d..9a881c305a50 100644 --- a/include/linux/mfd/ab3100.h +++ b/include/linux/mfd/ab3100.h | |||
| @@ -6,7 +6,6 @@ | |||
| 6 | */ | 6 | */ |
| 7 | 7 | ||
| 8 | #include <linux/device.h> | 8 | #include <linux/device.h> |
| 9 | #include <linux/workqueue.h> | ||
| 10 | #include <linux/regulator/machine.h> | 9 | #include <linux/regulator/machine.h> |
| 11 | 10 | ||
| 12 | #ifndef MFD_AB3100_H | 11 | #ifndef MFD_AB3100_H |
| @@ -74,7 +73,6 @@ | |||
| 74 | * @testreg_client: secondary client for test registers | 73 | * @testreg_client: secondary client for test registers |
| 75 | * @chip_name: name of this chip variant | 74 | * @chip_name: name of this chip variant |
| 76 | * @chip_id: 8 bit chip ID for this chip variant | 75 | * @chip_id: 8 bit chip ID for this chip variant |
| 77 | * @work: an event handling worker | ||
| 78 | * @event_subscribers: event subscribers are listed here | 76 | * @event_subscribers: event subscribers are listed here |
| 79 | * @startup_events: a copy of the first reading of the event registers | 77 | * @startup_events: a copy of the first reading of the event registers |
| 80 | * @startup_events_read: whether the first events have been read | 78 | * @startup_events_read: whether the first events have been read |
| @@ -90,7 +88,6 @@ struct ab3100 { | |||
| 90 | struct i2c_client *testreg_client; | 88 | struct i2c_client *testreg_client; |
| 91 | char chip_name[32]; | 89 | char chip_name[32]; |
| 92 | u8 chip_id; | 90 | u8 chip_id; |
| 93 | struct work_struct work; | ||
| 94 | struct blocking_notifier_head event_subscribers; | 91 | struct blocking_notifier_head event_subscribers; |
| 95 | u32 startup_events; | 92 | u32 startup_events; |
| 96 | bool startup_events_read; | 93 | bool startup_events_read; |
diff --git a/include/linux/mfd/max8925.h b/include/linux/mfd/max8925.h new file mode 100644 index 000000000000..5259dfe8c585 --- /dev/null +++ b/include/linux/mfd/max8925.h | |||
| @@ -0,0 +1,253 @@ | |||
| 1 | /* | ||
| 2 | * Maxim8925 Interface | ||
| 3 | * | ||
| 4 | * Copyright (C) 2009 Marvell International Ltd. | ||
| 5 | * Haojian Zhuang <haojian.zhuang@marvell.com> | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License version 2 as | ||
| 9 | * published by the Free Software Foundation. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef __LINUX_MFD_MAX8925_H | ||
| 13 | #define __LINUX_MFD_MAX8925_H | ||
| 14 | |||
| 15 | #include <linux/mutex.h> | ||
| 16 | #include <linux/interrupt.h> | ||
| 17 | |||
| 18 | /* Unified sub device IDs for MAX8925 */ | ||
| 19 | enum { | ||
| 20 | MAX8925_ID_SD1, | ||
| 21 | MAX8925_ID_SD2, | ||
| 22 | MAX8925_ID_SD3, | ||
| 23 | MAX8925_ID_LDO1, | ||
| 24 | MAX8925_ID_LDO2, | ||
| 25 | MAX8925_ID_LDO3, | ||
| 26 | MAX8925_ID_LDO4, | ||
| 27 | MAX8925_ID_LDO5, | ||
| 28 | MAX8925_ID_LDO6, | ||
| 29 | MAX8925_ID_LDO7, | ||
| 30 | MAX8925_ID_LDO8, | ||
| 31 | MAX8925_ID_LDO9, | ||
| 32 | MAX8925_ID_LDO10, | ||
| 33 | MAX8925_ID_LDO11, | ||
| 34 | MAX8925_ID_LDO12, | ||
| 35 | MAX8925_ID_LDO13, | ||
| 36 | MAX8925_ID_LDO14, | ||
| 37 | MAX8925_ID_LDO15, | ||
| 38 | MAX8925_ID_LDO16, | ||
| 39 | MAX8925_ID_LDO17, | ||
| 40 | MAX8925_ID_LDO18, | ||
| 41 | MAX8925_ID_LDO19, | ||
| 42 | MAX8925_ID_LDO20, | ||
| 43 | MAX8925_ID_MAX, | ||
| 44 | }; | ||
| 45 | |||
| 46 | enum { | ||
| 47 | /* | ||
| 48 | * Charging current threshold trigger going from fast charge | ||
| 49 | * to TOPOFF charge. From 5% to 20% of fasting charging current. | ||
| 50 | */ | ||
| 51 | MAX8925_TOPOFF_THR_5PER, | ||
| 52 | MAX8925_TOPOFF_THR_10PER, | ||
| 53 | MAX8925_TOPOFF_THR_15PER, | ||
| 54 | MAX8925_TOPOFF_THR_20PER, | ||
| 55 | }; | ||
| 56 | |||
| 57 | enum { | ||
| 58 | /* Fast charging current */ | ||
| 59 | MAX8925_FCHG_85MA, | ||
| 60 | MAX8925_FCHG_300MA, | ||
| 61 | MAX8925_FCHG_460MA, | ||
| 62 | MAX8925_FCHG_600MA, | ||
| 63 | MAX8925_FCHG_700MA, | ||
| 64 | MAX8925_FCHG_800MA, | ||
| 65 | MAX8925_FCHG_900MA, | ||
| 66 | MAX8925_FCHG_1000MA, | ||
| 67 | }; | ||
| 68 | |||
| 69 | /* Charger registers */ | ||
| 70 | #define MAX8925_CHG_IRQ1 (0x7e) | ||
| 71 | #define MAX8925_CHG_IRQ2 (0x7f) | ||
| 72 | #define MAX8925_CHG_IRQ1_MASK (0x80) | ||
| 73 | #define MAX8925_CHG_IRQ2_MASK (0x81) | ||
| 74 | #define MAX8925_CHG_STATUS (0x82) | ||
| 75 | |||
| 76 | /* GPM registers */ | ||
| 77 | #define MAX8925_SYSENSEL (0x00) | ||
| 78 | #define MAX8925_ON_OFF_IRQ1 (0x01) | ||
| 79 | #define MAX8925_ON_OFF_IRQ1_MASK (0x02) | ||
| 80 | #define MAX8925_ON_OFF_STATUS (0x03) | ||
| 81 | #define MAX8925_ON_OFF_IRQ2 (0x0d) | ||
| 82 | #define MAX8925_ON_OFF_IRQ2_MASK (0x0e) | ||
| 83 | #define MAX8925_RESET_CNFG (0x0f) | ||
| 84 | |||
| 85 | /* Touch registers */ | ||
| 86 | #define MAX8925_TSC_IRQ (0x00) | ||
| 87 | #define MAX8925_TSC_IRQ_MASK (0x01) | ||
| 88 | #define MAX8925_TSC_CNFG1 (0x02) | ||
| 89 | #define MAX8925_ADC_SCHED (0x10) | ||
| 90 | #define MAX8925_ADC_RES_END (0x6f) | ||
| 91 | |||
| 92 | #define MAX8925_NREF_OK (1 << 4) | ||
| 93 | |||
| 94 | /* RTC registers */ | ||
| 95 | #define MAX8925_ALARM0_CNTL (0x18) | ||
| 96 | #define MAX8925_ALARM1_CNTL (0x19) | ||
| 97 | #define MAX8925_RTC_IRQ (0x1c) | ||
| 98 | #define MAX8925_RTC_IRQ_MASK (0x1d) | ||
| 99 | #define MAX8925_MPL_CNTL (0x1e) | ||
| 100 | |||
| 101 | /* WLED registers */ | ||
| 102 | #define MAX8925_WLED_MODE_CNTL (0x84) | ||
| 103 | #define MAX8925_WLED_CNTL (0x85) | ||
| 104 | |||
| 105 | /* MAX8925 Registers */ | ||
| 106 | #define MAX8925_SDCTL1 (0x04) | ||
| 107 | #define MAX8925_SDCTL2 (0x07) | ||
| 108 | #define MAX8925_SDCTL3 (0x0A) | ||
| 109 | #define MAX8925_SDV1 (0x06) | ||
| 110 | #define MAX8925_SDV2 (0x09) | ||
| 111 | #define MAX8925_SDV3 (0x0C) | ||
| 112 | #define MAX8925_LDOCTL1 (0x18) | ||
| 113 | #define MAX8925_LDOCTL2 (0x1C) | ||
| 114 | #define MAX8925_LDOCTL3 (0x20) | ||
| 115 | #define MAX8925_LDOCTL4 (0x24) | ||
| 116 | #define MAX8925_LDOCTL5 (0x28) | ||
| 117 | #define MAX8925_LDOCTL6 (0x2C) | ||
| 118 | #define MAX8925_LDOCTL7 (0x30) | ||
| 119 | #define MAX8925_LDOCTL8 (0x34) | ||
| 120 | #define MAX8925_LDOCTL9 (0x38) | ||
| 121 | #define MAX8925_LDOCTL10 (0x3C) | ||
| 122 | #define MAX8925_LDOCTL11 (0x40) | ||
| 123 | #define MAX8925_LDOCTL12 (0x44) | ||
| 124 | #define MAX8925_LDOCTL13 (0x48) | ||
| 125 | #define MAX8925_LDOCTL14 (0x4C) | ||
| 126 | #define MAX8925_LDOCTL15 (0x50) | ||
| 127 | #define MAX8925_LDOCTL16 (0x10) | ||
| 128 | #define MAX8925_LDOCTL17 (0x14) | ||
| 129 | #define MAX8925_LDOCTL18 (0x72) | ||
| 130 | #define MAX8925_LDOCTL19 (0x5C) | ||
| 131 | #define MAX8925_LDOCTL20 (0x9C) | ||
| 132 | #define MAX8925_LDOVOUT1 (0x1A) | ||
| 133 | #define MAX8925_LDOVOUT2 (0x1E) | ||
| 134 | #define MAX8925_LDOVOUT3 (0x22) | ||
| 135 | #define MAX8925_LDOVOUT4 (0x26) | ||
| 136 | #define MAX8925_LDOVOUT5 (0x2A) | ||
| 137 | #define MAX8925_LDOVOUT6 (0x2E) | ||
| 138 | #define MAX8925_LDOVOUT7 (0x32) | ||
| 139 | #define MAX8925_LDOVOUT8 (0x36) | ||
| 140 | #define MAX8925_LDOVOUT9 (0x3A) | ||
| 141 | #define MAX8925_LDOVOUT10 (0x3E) | ||
| 142 | #define MAX8925_LDOVOUT11 (0x42) | ||
| 143 | #define MAX8925_LDOVOUT12 (0x46) | ||
| 144 | #define MAX8925_LDOVOUT13 (0x4A) | ||
| 145 | #define MAX8925_LDOVOUT14 (0x4E) | ||
| 146 | #define MAX8925_LDOVOUT15 (0x52) | ||
| 147 | #define MAX8925_LDOVOUT16 (0x12) | ||
| 148 | #define MAX8925_LDOVOUT17 (0x16) | ||
| 149 | #define MAX8925_LDOVOUT18 (0x74) | ||
| 150 | #define MAX8925_LDOVOUT19 (0x5E) | ||
| 151 | #define MAX8925_LDOVOUT20 (0x9E) | ||
| 152 | |||
| 153 | /* bit definitions */ | ||
| 154 | #define CHG_IRQ1_MASK (0x07) | ||
| 155 | #define CHG_IRQ2_MASK (0xff) | ||
| 156 | #define ON_OFF_IRQ1_MASK (0xff) | ||
| 157 | #define ON_OFF_IRQ2_MASK (0x03) | ||
| 158 | #define TSC_IRQ_MASK (0x03) | ||
| 159 | #define RTC_IRQ_MASK (0x0c) | ||
| 160 | |||
| 161 | #define MAX8925_MAX_REGULATOR (23) | ||
| 162 | |||
| 163 | #define MAX8925_NAME_SIZE (32) | ||
| 164 | |||
| 165 | /* IRQ definitions */ | ||
| 166 | enum { | ||
| 167 | MAX8925_IRQ_VCHG_DC_OVP, | ||
| 168 | MAX8925_IRQ_VCHG_DC_F, | ||
| 169 | MAX8925_IRQ_VCHG_DC_R, | ||
| 170 | MAX8925_IRQ_VCHG_USB_OVP, | ||
| 171 | MAX8925_IRQ_VCHG_USB_F, | ||
| 172 | MAX8925_IRQ_VCHG_USB_R, | ||
| 173 | MAX8925_IRQ_VCHG_THM_OK_R, | ||
| 174 | MAX8925_IRQ_VCHG_THM_OK_F, | ||
| 175 | MAX8925_IRQ_VCHG_SYSLOW_F, | ||
| 176 | MAX8925_IRQ_VCHG_SYSLOW_R, | ||
| 177 | MAX8925_IRQ_VCHG_RST, | ||
| 178 | MAX8925_IRQ_VCHG_DONE, | ||
| 179 | MAX8925_IRQ_VCHG_TOPOFF, | ||
| 180 | MAX8925_IRQ_VCHG_TMR_FAULT, | ||
| 181 | MAX8925_IRQ_GPM_RSTIN, | ||
| 182 | MAX8925_IRQ_GPM_MPL, | ||
| 183 | MAX8925_IRQ_GPM_SW_3SEC, | ||
| 184 | MAX8925_IRQ_GPM_EXTON_F, | ||
| 185 | MAX8925_IRQ_GPM_EXTON_R, | ||
| 186 | MAX8925_IRQ_GPM_SW_1SEC, | ||
| 187 | MAX8925_IRQ_GPM_SW_F, | ||
| 188 | MAX8925_IRQ_GPM_SW_R, | ||
| 189 | MAX8925_IRQ_GPM_SYSCKEN_F, | ||
| 190 | MAX8925_IRQ_GPM_SYSCKEN_R, | ||
| 191 | MAX8925_IRQ_RTC_ALARM1, | ||
| 192 | MAX8925_IRQ_RTC_ALARM0, | ||
| 193 | MAX8925_IRQ_TSC_STICK, | ||
| 194 | MAX8925_IRQ_TSC_NSTICK, | ||
| 195 | MAX8925_NR_IRQS, | ||
| 196 | }; | ||
| 197 | |||
| 198 | struct max8925_chip { | ||
| 199 | struct device *dev; | ||
| 200 | struct i2c_client *i2c; | ||
| 201 | struct i2c_client *adc; | ||
| 202 | struct i2c_client *rtc; | ||
| 203 | struct mutex io_lock; | ||
| 204 | struct mutex irq_lock; | ||
| 205 | |||
| 206 | int irq_base; | ||
| 207 | int core_irq; | ||
| 208 | int tsc_irq; | ||
| 209 | }; | ||
| 210 | |||
| 211 | struct max8925_backlight_pdata { | ||
| 212 | int lxw_scl; /* 0/1 -- 0.8Ohm/0.4Ohm */ | ||
| 213 | int lxw_freq; /* 700KHz ~ 1400KHz */ | ||
| 214 | int dual_string; /* 0/1 -- single/dual string */ | ||
| 215 | }; | ||
| 216 | |||
| 217 | struct max8925_touch_pdata { | ||
| 218 | unsigned int flags; | ||
| 219 | }; | ||
| 220 | |||
| 221 | struct max8925_power_pdata { | ||
| 222 | int (*set_charger)(int); | ||
| 223 | unsigned batt_detect:1; | ||
| 224 | unsigned topoff_threshold:2; | ||
| 225 | unsigned fast_charge:3; /* charge current */ | ||
| 226 | }; | ||
| 227 | |||
| 228 | /* | ||
| 229 | * irq_base: stores IRQ base number of MAX8925 in platform | ||
| 230 | * tsc_irq: stores IRQ number of MAX8925 TSC | ||
| 231 | */ | ||
| 232 | struct max8925_platform_data { | ||
| 233 | struct max8925_backlight_pdata *backlight; | ||
| 234 | struct max8925_touch_pdata *touch; | ||
| 235 | struct max8925_power_pdata *power; | ||
| 236 | struct regulator_init_data *regulator[MAX8925_MAX_REGULATOR]; | ||
| 237 | |||
| 238 | int irq_base; | ||
| 239 | int tsc_irq; | ||
| 240 | }; | ||
| 241 | |||
| 242 | extern int max8925_reg_read(struct i2c_client *, int); | ||
| 243 | extern int max8925_reg_write(struct i2c_client *, int, unsigned char); | ||
| 244 | extern int max8925_bulk_read(struct i2c_client *, int, int, unsigned char *); | ||
| 245 | extern int max8925_bulk_write(struct i2c_client *, int, int, unsigned char *); | ||
| 246 | extern int max8925_set_bits(struct i2c_client *, int, unsigned char, | ||
| 247 | unsigned char); | ||
| 248 | |||
| 249 | extern int max8925_device_init(struct max8925_chip *, | ||
| 250 | struct max8925_platform_data *); | ||
| 251 | extern void max8925_device_exit(struct max8925_chip *); | ||
| 252 | #endif /* __LINUX_MFD_MAX8925_H */ | ||
| 253 | |||
diff --git a/include/linux/mfd/mc13783.h b/include/linux/mfd/mc13783.h index 35680409b8cf..8895d9d8879c 100644 --- a/include/linux/mfd/mc13783.h +++ b/include/linux/mfd/mc13783.h | |||
| @@ -26,10 +26,30 @@ int mc13783_irq_request(struct mc13783 *mc13783, int irq, | |||
| 26 | int mc13783_irq_request_nounmask(struct mc13783 *mc13783, int irq, | 26 | int mc13783_irq_request_nounmask(struct mc13783 *mc13783, int irq, |
| 27 | irq_handler_t handler, const char *name, void *dev); | 27 | irq_handler_t handler, const char *name, void *dev); |
| 28 | int mc13783_irq_free(struct mc13783 *mc13783, int irq, void *dev); | 28 | int mc13783_irq_free(struct mc13783 *mc13783, int irq, void *dev); |
| 29 | int mc13783_ackirq(struct mc13783 *mc13783, int irq); | ||
| 30 | 29 | ||
| 31 | int mc13783_mask(struct mc13783 *mc13783, int irq); | 30 | int mc13783_irq_mask(struct mc13783 *mc13783, int irq); |
| 32 | int mc13783_unmask(struct mc13783 *mc13783, int irq); | 31 | int mc13783_irq_unmask(struct mc13783 *mc13783, int irq); |
| 32 | int mc13783_irq_status(struct mc13783 *mc13783, int irq, | ||
| 33 | int *enabled, int *pending); | ||
| 34 | int mc13783_irq_ack(struct mc13783 *mc13783, int irq); | ||
| 35 | |||
| 36 | static inline int mc13783_mask(struct mc13783 *mc13783, int irq) __deprecated; | ||
| 37 | static inline int mc13783_mask(struct mc13783 *mc13783, int irq) | ||
| 38 | { | ||
| 39 | return mc13783_irq_mask(mc13783, irq); | ||
| 40 | } | ||
| 41 | |||
| 42 | static inline int mc13783_unmask(struct mc13783 *mc13783, int irq) __deprecated; | ||
| 43 | static inline int mc13783_unmask(struct mc13783 *mc13783, int irq) | ||
| 44 | { | ||
| 45 | return mc13783_irq_unmask(mc13783, irq); | ||
| 46 | } | ||
| 47 | |||
| 48 | static inline int mc13783_ackirq(struct mc13783 *mc13783, int irq) __deprecated; | ||
| 49 | static inline int mc13783_ackirq(struct mc13783 *mc13783, int irq) | ||
| 50 | { | ||
| 51 | return mc13783_irq_ack(mc13783, irq); | ||
| 52 | } | ||
| 33 | 53 | ||
| 34 | #define MC13783_ADC0 43 | 54 | #define MC13783_ADC0 43 |
| 35 | #define MC13783_ADC0_ADREFEN (1 << 10) | 55 | #define MC13783_ADC0_ADREFEN (1 << 10) |
| @@ -108,6 +128,8 @@ int mc13783_adc_do_conversion(struct mc13783 *mc13783, unsigned int mode, | |||
| 108 | #define MC13783_REGU_V2 28 | 128 | #define MC13783_REGU_V2 28 |
| 109 | #define MC13783_REGU_V3 29 | 129 | #define MC13783_REGU_V3 29 |
| 110 | #define MC13783_REGU_V4 30 | 130 | #define MC13783_REGU_V4 30 |
| 131 | #define MC13783_REGU_PWGT1SPI 31 | ||
| 132 | #define MC13783_REGU_PWGT2SPI 32 | ||
| 111 | 133 | ||
| 112 | #define MC13783_IRQ_ADCDONE 0 | 134 | #define MC13783_IRQ_ADCDONE 0 |
| 113 | #define MC13783_IRQ_ADCBISDONE 1 | 135 | #define MC13783_IRQ_ADCBISDONE 1 |
diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h index 9cb1834deffa..c3f7dff8effc 100644 --- a/include/linux/mfd/tmio.h +++ b/include/linux/mfd/tmio.h | |||
| @@ -59,7 +59,8 @@ void tmio_core_mmc_clk_div(void __iomem *cnf, int shift, int state); | |||
| 59 | * data for the MMC controller | 59 | * data for the MMC controller |
| 60 | */ | 60 | */ |
| 61 | struct tmio_mmc_data { | 61 | struct tmio_mmc_data { |
| 62 | const unsigned int hclk; | 62 | unsigned int hclk; |
| 63 | unsigned long capabilities; | ||
| 63 | void (*set_pwr)(struct platform_device *host, int state); | 64 | void (*set_pwr)(struct platform_device *host, int state); |
| 64 | void (*set_clk_div)(struct platform_device *host, int state); | 65 | void (*set_clk_div)(struct platform_device *host, int state); |
| 65 | }; | 66 | }; |
diff --git a/include/linux/mfd/ucb1x00.h b/include/linux/mfd/ucb1x00.h index aa9c3789bed4..4321f044d1e4 100644 --- a/include/linux/mfd/ucb1x00.h +++ b/include/linux/mfd/ucb1x00.h | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | #include <linux/mfd/mcp.h> | 13 | #include <linux/mfd/mcp.h> |
| 14 | #include <linux/gpio.h> | 14 | #include <linux/gpio.h> |
| 15 | #include <linux/semaphore.h> | ||
| 15 | 16 | ||
| 16 | #define UCB_IO_DATA 0x00 | 17 | #define UCB_IO_DATA 0x00 |
| 17 | #define UCB_IO_DIR 0x01 | 18 | #define UCB_IO_DIR 0x01 |
diff --git a/include/linux/mfd/wm831x/core.h b/include/linux/mfd/wm831x/core.h index 5184b79c700b..5915f6e3d9ab 100644 --- a/include/linux/mfd/wm831x/core.h +++ b/include/linux/mfd/wm831x/core.h | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #ifndef __MFD_WM831X_CORE_H__ | 15 | #ifndef __MFD_WM831X_CORE_H__ |
| 16 | #define __MFD_WM831X_CORE_H__ | 16 | #define __MFD_WM831X_CORE_H__ |
| 17 | 17 | ||
| 18 | #include <linux/completion.h> | ||
| 18 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
| 19 | 20 | ||
| 20 | /* | 21 | /* |
| @@ -254,9 +255,14 @@ struct wm831x { | |||
| 254 | int irq_masks_cur[WM831X_NUM_IRQ_REGS]; /* Currently active value */ | 255 | int irq_masks_cur[WM831X_NUM_IRQ_REGS]; /* Currently active value */ |
| 255 | int irq_masks_cache[WM831X_NUM_IRQ_REGS]; /* Cached hardware value */ | 256 | int irq_masks_cache[WM831X_NUM_IRQ_REGS]; /* Cached hardware value */ |
| 256 | 257 | ||
| 258 | /* Chip revision based flags */ | ||
| 259 | unsigned has_gpio_ena:1; /* Has GPIO enable bit */ | ||
| 260 | unsigned has_cs_sts:1; /* Has current sink status bit */ | ||
| 261 | |||
| 257 | int num_gpio; | 262 | int num_gpio; |
| 258 | 263 | ||
| 259 | struct mutex auxadc_lock; | 264 | struct mutex auxadc_lock; |
| 265 | struct completion auxadc_done; | ||
| 260 | 266 | ||
| 261 | /* The WM831x has a security key blocking access to certain | 267 | /* The WM831x has a security key blocking access to certain |
| 262 | * registers. The mutex is taken by the accessors for locking | 268 | * registers. The mutex is taken by the accessors for locking |
diff --git a/include/linux/mfd/wm831x/gpio.h b/include/linux/mfd/wm831x/gpio.h index 2835614af0e3..9b163c58865f 100644 --- a/include/linux/mfd/wm831x/gpio.h +++ b/include/linux/mfd/wm831x/gpio.h | |||
| @@ -41,6 +41,10 @@ | |||
| 41 | #define WM831X_GPN_OD_MASK 0x0200 /* GPN_OD */ | 41 | #define WM831X_GPN_OD_MASK 0x0200 /* GPN_OD */ |
| 42 | #define WM831X_GPN_OD_SHIFT 9 /* GPN_OD */ | 42 | #define WM831X_GPN_OD_SHIFT 9 /* GPN_OD */ |
| 43 | #define WM831X_GPN_OD_WIDTH 1 /* GPN_OD */ | 43 | #define WM831X_GPN_OD_WIDTH 1 /* GPN_OD */ |
| 44 | #define WM831X_GPN_ENA 0x0080 /* GPN_ENA */ | ||
| 45 | #define WM831X_GPN_ENA_MASK 0x0080 /* GPN_ENA */ | ||
| 46 | #define WM831X_GPN_ENA_SHIFT 7 /* GPN_ENA */ | ||
| 47 | #define WM831X_GPN_ENA_WIDTH 1 /* GPN_ENA */ | ||
| 44 | #define WM831X_GPN_TRI 0x0080 /* GPN_TRI */ | 48 | #define WM831X_GPN_TRI 0x0080 /* GPN_TRI */ |
| 45 | #define WM831X_GPN_TRI_MASK 0x0080 /* GPN_TRI */ | 49 | #define WM831X_GPN_TRI_MASK 0x0080 /* GPN_TRI */ |
| 46 | #define WM831X_GPN_TRI_SHIFT 7 /* GPN_TRI */ | 50 | #define WM831X_GPN_TRI_SHIFT 7 /* GPN_TRI */ |
diff --git a/include/linux/mfd/wm8350/core.h b/include/linux/mfd/wm8350/core.h index 43868899bf49..98fcc977e82b 100644 --- a/include/linux/mfd/wm8350/core.h +++ b/include/linux/mfd/wm8350/core.h | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
| 17 | #include <linux/mutex.h> | 17 | #include <linux/mutex.h> |
| 18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
| 19 | #include <linux/completion.h> | ||
| 19 | 20 | ||
| 20 | #include <linux/mfd/wm8350/audio.h> | 21 | #include <linux/mfd/wm8350/audio.h> |
| 21 | #include <linux/mfd/wm8350/gpio.h> | 22 | #include <linux/mfd/wm8350/gpio.h> |
| @@ -579,6 +580,8 @@ | |||
| 579 | 580 | ||
| 580 | #define WM8350_NUM_IRQ 63 | 581 | #define WM8350_NUM_IRQ 63 |
| 581 | 582 | ||
| 583 | #define WM8350_NUM_IRQ_REGS 7 | ||
| 584 | |||
| 582 | struct wm8350_reg_access { | 585 | struct wm8350_reg_access { |
| 583 | u16 readable; /* Mask of readable bits */ | 586 | u16 readable; /* Mask of readable bits */ |
| 584 | u16 writable; /* Mask of writable bits */ | 587 | u16 writable; /* Mask of writable bits */ |
| @@ -600,11 +603,6 @@ extern const u16 wm8352_mode3_defaults[]; | |||
| 600 | 603 | ||
| 601 | struct wm8350; | 604 | struct wm8350; |
| 602 | 605 | ||
| 603 | struct wm8350_irq { | ||
| 604 | irq_handler_t handler; | ||
| 605 | void *data; | ||
| 606 | }; | ||
| 607 | |||
| 608 | struct wm8350_hwmon { | 606 | struct wm8350_hwmon { |
| 609 | struct platform_device *pdev; | 607 | struct platform_device *pdev; |
| 610 | struct device *classdev; | 608 | struct device *classdev; |
| @@ -624,11 +622,13 @@ struct wm8350 { | |||
| 624 | u16 *reg_cache; | 622 | u16 *reg_cache; |
| 625 | 623 | ||
| 626 | struct mutex auxadc_mutex; | 624 | struct mutex auxadc_mutex; |
| 625 | struct completion auxadc_done; | ||
| 627 | 626 | ||
| 628 | /* Interrupt handling */ | 627 | /* Interrupt handling */ |
| 629 | struct mutex irq_mutex; /* IRQ table mutex */ | 628 | struct mutex irq_lock; |
| 630 | struct wm8350_irq irq[WM8350_NUM_IRQ]; | ||
| 631 | int chip_irq; | 629 | int chip_irq; |
| 630 | int irq_base; | ||
| 631 | u16 irq_masks[WM8350_NUM_IRQ_REGS]; | ||
| 632 | 632 | ||
| 633 | /* Client devices */ | 633 | /* Client devices */ |
| 634 | struct wm8350_codec codec; | 634 | struct wm8350_codec codec; |
| @@ -647,11 +647,13 @@ struct wm8350 { | |||
| 647 | * used by the platform to configure GPIO functions and similar. | 647 | * used by the platform to configure GPIO functions and similar. |
| 648 | * @irq_high: Set if WM8350 IRQ is active high. | 648 | * @irq_high: Set if WM8350 IRQ is active high. |
| 649 | * @irq_base: Base IRQ for genirq (not currently used). | 649 | * @irq_base: Base IRQ for genirq (not currently used). |
| 650 | * @gpio_base: Base for gpiolib. | ||
| 650 | */ | 651 | */ |
| 651 | struct wm8350_platform_data { | 652 | struct wm8350_platform_data { |
| 652 | int (*init)(struct wm8350 *wm8350); | 653 | int (*init)(struct wm8350 *wm8350); |
| 653 | int irq_high; | 654 | int irq_high; |
| 654 | int irq_base; | 655 | int irq_base; |
| 656 | int gpio_base; | ||
| 655 | }; | 657 | }; |
| 656 | 658 | ||
| 657 | 659 | ||
| @@ -677,12 +679,33 @@ int wm8350_block_write(struct wm8350 *wm8350, int reg, int size, u16 *src); | |||
| 677 | /* | 679 | /* |
| 678 | * WM8350 internal interrupts | 680 | * WM8350 internal interrupts |
| 679 | */ | 681 | */ |
| 680 | int wm8350_register_irq(struct wm8350 *wm8350, int irq, | 682 | static inline int wm8350_register_irq(struct wm8350 *wm8350, int irq, |
| 681 | irq_handler_t handler, unsigned long flags, | 683 | irq_handler_t handler, |
| 682 | const char *name, void *data); | 684 | unsigned long flags, |
| 683 | int wm8350_free_irq(struct wm8350 *wm8350, int irq); | 685 | const char *name, void *data) |
| 684 | int wm8350_mask_irq(struct wm8350 *wm8350, int irq); | 686 | { |
| 685 | int wm8350_unmask_irq(struct wm8350 *wm8350, int irq); | 687 | if (!wm8350->irq_base) |
| 688 | return -ENODEV; | ||
| 689 | |||
| 690 | return request_threaded_irq(irq + wm8350->irq_base, NULL, | ||
| 691 | handler, flags, name, data); | ||
| 692 | } | ||
| 693 | |||
| 694 | static inline void wm8350_free_irq(struct wm8350 *wm8350, int irq, void *data) | ||
| 695 | { | ||
| 696 | free_irq(irq + wm8350->irq_base, data); | ||
| 697 | } | ||
| 698 | |||
| 699 | static inline void wm8350_mask_irq(struct wm8350 *wm8350, int irq) | ||
| 700 | { | ||
| 701 | disable_irq(irq + wm8350->irq_base); | ||
| 702 | } | ||
| 703 | |||
| 704 | static inline void wm8350_unmask_irq(struct wm8350 *wm8350, int irq) | ||
| 705 | { | ||
| 706 | enable_irq(irq + wm8350->irq_base); | ||
| 707 | } | ||
| 708 | |||
| 686 | int wm8350_irq_init(struct wm8350 *wm8350, int irq, | 709 | int wm8350_irq_init(struct wm8350 *wm8350, int irq, |
| 687 | struct wm8350_platform_data *pdata); | 710 | struct wm8350_platform_data *pdata); |
| 688 | int wm8350_irq_exit(struct wm8350 *wm8350); | 711 | int wm8350_irq_exit(struct wm8350 *wm8350); |
diff --git a/include/linux/mfd/wm8350/gpio.h b/include/linux/mfd/wm8350/gpio.h index 71af3d6ebe9d..d657bcd6d955 100644 --- a/include/linux/mfd/wm8350/gpio.h +++ b/include/linux/mfd/wm8350/gpio.h | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | #define WM8350_GPIO_FUNCTION_SELECT_2 0x8D | 29 | #define WM8350_GPIO_FUNCTION_SELECT_2 0x8D |
| 30 | #define WM8350_GPIO_FUNCTION_SELECT_3 0x8E | 30 | #define WM8350_GPIO_FUNCTION_SELECT_3 0x8E |
| 31 | #define WM8350_GPIO_FUNCTION_SELECT_4 0x8F | 31 | #define WM8350_GPIO_FUNCTION_SELECT_4 0x8F |
| 32 | #define WM8350_GPIO_LEVEL 0xE6 | ||
| 32 | 33 | ||
| 33 | /* | 34 | /* |
| 34 | * GPIO Functions | 35 | * GPIO Functions |
diff --git a/include/linux/mfd/wm8350/rtc.h b/include/linux/mfd/wm8350/rtc.h index 24add2bef6c9..ebd72ffc62d1 100644 --- a/include/linux/mfd/wm8350/rtc.h +++ b/include/linux/mfd/wm8350/rtc.h | |||
| @@ -263,6 +263,7 @@ struct wm8350_rtc { | |||
| 263 | struct platform_device *pdev; | 263 | struct platform_device *pdev; |
| 264 | struct rtc_device *rtc; | 264 | struct rtc_device *rtc; |
| 265 | int alarm_enabled; /* used over suspend/resume */ | 265 | int alarm_enabled; /* used over suspend/resume */ |
| 266 | int update_enabled; | ||
| 266 | }; | 267 | }; |
| 267 | 268 | ||
| 268 | #endif | 269 | #endif |
diff --git a/include/linux/mfd/wm8994/core.h b/include/linux/mfd/wm8994/core.h new file mode 100644 index 000000000000..b06ff2846748 --- /dev/null +++ b/include/linux/mfd/wm8994/core.h | |||
| @@ -0,0 +1,54 @@ | |||
| 1 | /* | ||
| 2 | * include/linux/mfd/wm8994/core.h -- Core interface for WM8994 | ||
| 3 | * | ||
| 4 | * Copyright 2009 Wolfson Microelectronics PLC. | ||
| 5 | * | ||
| 6 | * Author: Mark Brown <broonie@opensource.wolfsonmicro.com> | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify it | ||
| 9 | * under the terms of the GNU General Public License as published by the | ||
| 10 | * Free Software Foundation; either version 2 of the License, or (at your | ||
| 11 | * option) any later version. | ||
| 12 | * | ||
| 13 | */ | ||
| 14 | |||
| 15 | #ifndef __MFD_WM8994_CORE_H__ | ||
| 16 | #define __MFD_WM8994_CORE_H__ | ||
| 17 | |||
| 18 | struct regulator_dev; | ||
| 19 | struct regulator_bulk_data; | ||
| 20 | |||
| 21 | #define WM8994_NUM_GPIO_REGS 11 | ||
| 22 | #define WM8994_NUM_LDO_REGS 2 | ||
| 23 | |||
| 24 | struct wm8994 { | ||
| 25 | struct mutex io_lock; | ||
| 26 | |||
| 27 | struct device *dev; | ||
| 28 | int (*read_dev)(struct wm8994 *wm8994, unsigned short reg, | ||
| 29 | int bytes, void *dest); | ||
| 30 | int (*write_dev)(struct wm8994 *wm8994, unsigned short reg, | ||
| 31 | int bytes, void *src); | ||
| 32 | |||
| 33 | void *control_data; | ||
| 34 | |||
| 35 | int gpio_base; | ||
| 36 | |||
| 37 | /* Used over suspend/resume */ | ||
| 38 | u16 ldo_regs[WM8994_NUM_LDO_REGS]; | ||
| 39 | u16 gpio_regs[WM8994_NUM_GPIO_REGS]; | ||
| 40 | |||
| 41 | struct regulator_dev *dbvdd; | ||
| 42 | struct regulator_bulk_data *supplies; | ||
| 43 | }; | ||
| 44 | |||
| 45 | /* Device I/O API */ | ||
| 46 | int wm8994_reg_read(struct wm8994 *wm8994, unsigned short reg); | ||
| 47 | int wm8994_reg_write(struct wm8994 *wm8994, unsigned short reg, | ||
| 48 | unsigned short val); | ||
| 49 | int wm8994_set_bits(struct wm8994 *wm8994, unsigned short reg, | ||
| 50 | unsigned short mask, unsigned short val); | ||
| 51 | int wm8994_bulk_read(struct wm8994 *wm8994, unsigned short reg, | ||
| 52 | int count, u16 *buf); | ||
| 53 | |||
| 54 | #endif | ||
diff --git a/include/linux/mfd/wm8994/gpio.h b/include/linux/mfd/wm8994/gpio.h new file mode 100644 index 000000000000..b4d4c22991e8 --- /dev/null +++ b/include/linux/mfd/wm8994/gpio.h | |||
| @@ -0,0 +1,72 @@ | |||
| 1 | /* | ||
| 2 | * include/linux/mfd/wm8994/gpio.h - GPIO configuration for WM8994 | ||
| 3 | * | ||
| 4 | * Copyright 2009 Wolfson Microelectronics PLC. | ||
| 5 | * | ||
| 6 | * Author: Mark Brown <broonie@opensource.wolfsonmicro.com> | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify it | ||
| 9 | * under the terms of the GNU General Public License as published by the | ||
| 10 | * Free Software Foundation; either version 2 of the License, or (at your | ||
| 11 | * option) any later version. | ||
| 12 | * | ||
| 13 | */ | ||
| 14 | |||
| 15 | #ifndef __MFD_WM8994_GPIO_H__ | ||
| 16 | #define __MFD_WM8994_GPIO_H__ | ||
| 17 | |||
| 18 | #define WM8994_GPIO_MAX 11 | ||
| 19 | |||
| 20 | #define WM8994_GP_FN_PIN_SPECIFIC 0 | ||
| 21 | #define WM8994_GP_FN_GPIO 1 | ||
| 22 | #define WM8994_GP_FN_SDOUT 2 | ||
| 23 | #define WM8994_GP_FN_IRQ 3 | ||
| 24 | #define WM8994_GP_FN_TEMPERATURE 4 | ||
| 25 | #define WM8994_GP_FN_MICBIAS1_DET 5 | ||
| 26 | #define WM8994_GP_FN_MICBIAS1_SHORT 6 | ||
| 27 | #define WM8994_GP_FN_MICBIAS2_DET 7 | ||
| 28 | #define WM8994_GP_FN_MICBIAS2_SHORT 8 | ||
| 29 | #define WM8994_GP_FN_FLL1_LOCK 9 | ||
| 30 | #define WM8994_GP_FN_FLL2_LOCK 10 | ||
| 31 | #define WM8994_GP_FN_SRC1_LOCK 11 | ||
| 32 | #define WM8994_GP_FN_SRC2_LOCK 12 | ||
| 33 | #define WM8994_GP_FN_DRC1_ACT 13 | ||
| 34 | #define WM8994_GP_FN_DRC2_ACT 14 | ||
| 35 | #define WM8994_GP_FN_DRC3_ACT 15 | ||
| 36 | #define WM8994_GP_FN_WSEQ_STATUS 16 | ||
| 37 | #define WM8994_GP_FN_FIFO_ERROR 17 | ||
| 38 | #define WM8994_GP_FN_OPCLK 18 | ||
| 39 | |||
| 40 | #define WM8994_GPN_DIR 0x8000 /* GPN_DIR */ | ||
| 41 | #define WM8994_GPN_DIR_MASK 0x8000 /* GPN_DIR */ | ||
| 42 | #define WM8994_GPN_DIR_SHIFT 15 /* GPN_DIR */ | ||
| 43 | #define WM8994_GPN_DIR_WIDTH 1 /* GPN_DIR */ | ||
| 44 | #define WM8994_GPN_PU 0x4000 /* GPN_PU */ | ||
| 45 | #define WM8994_GPN_PU_MASK 0x4000 /* GPN_PU */ | ||
| 46 | #define WM8994_GPN_PU_SHIFT 14 /* GPN_PU */ | ||
| 47 | #define WM8994_GPN_PU_WIDTH 1 /* GPN_PU */ | ||
| 48 | #define WM8994_GPN_PD 0x2000 /* GPN_PD */ | ||
| 49 | #define WM8994_GPN_PD_MASK 0x2000 /* GPN_PD */ | ||
| 50 | #define WM8994_GPN_PD_SHIFT 13 /* GPN_PD */ | ||
| 51 | #define WM8994_GPN_PD_WIDTH 1 /* GPN_PD */ | ||
| 52 | #define WM8994_GPN_POL 0x0400 /* GPN_POL */ | ||
| 53 | #define WM8994_GPN_POL_MASK 0x0400 /* GPN_POL */ | ||
| 54 | #define WM8994_GPN_POL_SHIFT 10 /* GPN_POL */ | ||
| 55 | #define WM8994_GPN_POL_WIDTH 1 /* GPN_POL */ | ||
| 56 | #define WM8994_GPN_OP_CFG 0x0200 /* GPN_OP_CFG */ | ||
| 57 | #define WM8994_GPN_OP_CFG_MASK 0x0200 /* GPN_OP_CFG */ | ||
| 58 | #define WM8994_GPN_OP_CFG_SHIFT 9 /* GPN_OP_CFG */ | ||
| 59 | #define WM8994_GPN_OP_CFG_WIDTH 1 /* GPN_OP_CFG */ | ||
| 60 | #define WM8994_GPN_DB 0x0100 /* GPN_DB */ | ||
| 61 | #define WM8994_GPN_DB_MASK 0x0100 /* GPN_DB */ | ||
| 62 | #define WM8994_GPN_DB_SHIFT 8 /* GPN_DB */ | ||
| 63 | #define WM8994_GPN_DB_WIDTH 1 /* GPN_DB */ | ||
| 64 | #define WM8994_GPN_LVL 0x0040 /* GPN_LVL */ | ||
| 65 | #define WM8994_GPN_LVL_MASK 0x0040 /* GPN_LVL */ | ||
| 66 | #define WM8994_GPN_LVL_SHIFT 6 /* GPN_LVL */ | ||
| 67 | #define WM8994_GPN_LVL_WIDTH 1 /* GPN_LVL */ | ||
| 68 | #define WM8994_GPN_FN_MASK 0x001F /* GPN_FN - [4:0] */ | ||
| 69 | #define WM8994_GPN_FN_SHIFT 0 /* GPN_FN - [4:0] */ | ||
| 70 | #define WM8994_GPN_FN_WIDTH 5 /* GPN_FN - [4:0] */ | ||
| 71 | |||
| 72 | #endif | ||
diff --git a/include/linux/mfd/wm8994/pdata.h b/include/linux/mfd/wm8994/pdata.h new file mode 100644 index 000000000000..70d6a8687dc5 --- /dev/null +++ b/include/linux/mfd/wm8994/pdata.h | |||
| @@ -0,0 +1,97 @@ | |||
| 1 | /* | ||
| 2 | * include/linux/mfd/wm8994/pdata.h -- Platform data for WM8994 | ||
| 3 | * | ||
| 4 | * Copyright 2009 Wolfson Microelectronics PLC. | ||
| 5 | * | ||
| 6 | * Author: Mark Brown <broonie@opensource.wolfsonmicro.com> | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify it | ||
| 9 | * under the terms of the GNU General Public License as published by the | ||
| 10 | * Free Software Foundation; either version 2 of the License, or (at your | ||
| 11 | * option) any later version. | ||
| 12 | * | ||
| 13 | */ | ||
| 14 | |||
| 15 | #ifndef __MFD_WM8994_PDATA_H__ | ||
| 16 | #define __MFD_WM8994_PDATA_H__ | ||
| 17 | |||
| 18 | #define WM8994_NUM_LDO 2 | ||
| 19 | #define WM8994_NUM_GPIO 11 | ||
| 20 | |||
| 21 | struct wm8994_ldo_pdata { | ||
| 22 | /** GPIOs to enable regulator, 0 or less if not available */ | ||
| 23 | int enable; | ||
| 24 | |||
| 25 | const char *supply; | ||
| 26 | struct regulator_init_data *init_data; | ||
| 27 | }; | ||
| 28 | |||
| 29 | #define WM8994_CONFIGURE_GPIO 0x8000 | ||
| 30 | |||
| 31 | #define WM8994_DRC_REGS 5 | ||
| 32 | #define WM8994_EQ_REGS 19 | ||
| 33 | |||
| 34 | /** | ||
| 35 | * DRC configurations are specified with a label and a set of register | ||
| 36 | * values to write (the enable bits will be ignored). At runtime an | ||
| 37 | * enumerated control will be presented for each DRC block allowing | ||
| 38 | * the user to choose the configration to use. | ||
| 39 | * | ||
| 40 | * Configurations may be generated by hand or by using the DRC control | ||
| 41 | * panel provided by the WISCE - see http://www.wolfsonmicro.com/wisce/ | ||
| 42 | * for details. | ||
| 43 | */ | ||
| 44 | struct wm8994_drc_cfg { | ||
| 45 | const char *name; | ||
| 46 | u16 regs[WM8994_DRC_REGS]; | ||
| 47 | }; | ||
| 48 | |||
| 49 | /** | ||
| 50 | * ReTune Mobile configurations are specified with a label, sample | ||
| 51 | * rate and set of values to write (the enable bits will be ignored). | ||
| 52 | * | ||
| 53 | * Configurations are expected to be generated using the ReTune Mobile | ||
| 54 | * control panel in WISCE - see http://www.wolfsonmicro.com/wisce/ | ||
| 55 | */ | ||
| 56 | struct wm8994_retune_mobile_cfg { | ||
| 57 | const char *name; | ||
| 58 | unsigned int rate; | ||
| 59 | u16 regs[WM8994_EQ_REGS]; | ||
| 60 | }; | ||
| 61 | |||
| 62 | struct wm8994_pdata { | ||
| 63 | int gpio_base; | ||
| 64 | |||
| 65 | /** | ||
| 66 | * Default values for GPIOs if non-zero, WM8994_CONFIGURE_GPIO | ||
| 67 | * can be used for all zero values. | ||
| 68 | */ | ||
| 69 | int gpio_defaults[WM8994_NUM_GPIO]; | ||
| 70 | |||
| 71 | struct wm8994_ldo_pdata ldo[WM8994_NUM_LDO]; | ||
| 72 | |||
| 73 | |||
| 74 | int num_drc_cfgs; | ||
| 75 | struct wm8994_drc_cfg *drc_cfgs; | ||
| 76 | |||
| 77 | int num_retune_mobile_cfgs; | ||
| 78 | struct wm8994_retune_mobile_cfg *retune_mobile_cfgs; | ||
| 79 | |||
| 80 | /* LINEOUT can be differential or single ended */ | ||
| 81 | unsigned int lineout1_diff:1; | ||
| 82 | unsigned int lineout2_diff:1; | ||
| 83 | |||
| 84 | /* Common mode feedback */ | ||
| 85 | unsigned int lineout1fb:1; | ||
| 86 | unsigned int lineout2fb:1; | ||
| 87 | |||
| 88 | /* Microphone biases: 0=0.9*AVDD1 1=0.65*AVVD1 */ | ||
| 89 | unsigned int micbias1_lvl:1; | ||
| 90 | unsigned int micbias2_lvl:1; | ||
| 91 | |||
| 92 | /* Jack detect threashold levels, see datasheet for values */ | ||
| 93 | unsigned int jd_scthr:2; | ||
| 94 | unsigned int jd_thr:2; | ||
| 95 | }; | ||
| 96 | |||
| 97 | #endif | ||
diff --git a/include/linux/mfd/wm8994/registers.h b/include/linux/mfd/wm8994/registers.h new file mode 100644 index 000000000000..967f62f54159 --- /dev/null +++ b/include/linux/mfd/wm8994/registers.h | |||
| @@ -0,0 +1,4292 @@ | |||
| 1 | /* | ||
| 2 | * include/linux/mfd/wm8994/registers.h -- Register definitions for WM8994 | ||
| 3 | * | ||
| 4 | * Copyright 2009 Wolfson Microelectronics PLC. | ||
| 5 | * | ||
| 6 | * Author: Mark Brown <broonie@opensource.wolfsonmicro.com> | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or modify it | ||
| 9 | * under the terms of the GNU General Public License as published by the | ||
| 10 | * Free Software Foundation; either version 2 of the License, or (at your | ||
| 11 | * option) any later version. | ||
| 12 | * | ||
| 13 | */ | ||
| 14 | |||
| 15 | #ifndef __MFD_WM8994_REGISTERS_H__ | ||
| 16 | #define __MFD_WM8994_REGISTERS_H__ | ||
| 17 | |||
| 18 | /* | ||
| 19 | * Register values. | ||
| 20 | */ | ||
| 21 | #define WM8994_SOFTWARE_RESET 0x00 | ||
| 22 | #define WM8994_POWER_MANAGEMENT_1 0x01 | ||
| 23 | #define WM8994_POWER_MANAGEMENT_2 0x02 | ||
| 24 | #define WM8994_POWER_MANAGEMENT_3 0x03 | ||
| 25 | #define WM8994_POWER_MANAGEMENT_4 0x04 | ||
| 26 | #define WM8994_POWER_MANAGEMENT_5 0x05 | ||
| 27 | #define WM8994_POWER_MANAGEMENT_6 0x06 | ||
| 28 | #define WM8994_INPUT_MIXER_1 0x15 | ||
| 29 | #define WM8994_LEFT_LINE_INPUT_1_2_VOLUME 0x18 | ||
| 30 | #define WM8994_LEFT_LINE_INPUT_3_4_VOLUME 0x19 | ||
| 31 | #define WM8994_RIGHT_LINE_INPUT_1_2_VOLUME 0x1A | ||
| 32 | #define WM8994_RIGHT_LINE_INPUT_3_4_VOLUME 0x1B | ||
| 33 | #define WM8994_LEFT_OUTPUT_VOLUME 0x1C | ||
| 34 | #define WM8994_RIGHT_OUTPUT_VOLUME 0x1D | ||
| 35 | #define WM8994_LINE_OUTPUTS_VOLUME 0x1E | ||
| 36 | #define WM8994_HPOUT2_VOLUME 0x1F | ||
| 37 | #define WM8994_LEFT_OPGA_VOLUME 0x20 | ||
| 38 | #define WM8994_RIGHT_OPGA_VOLUME 0x21 | ||
| 39 | #define WM8994_SPKMIXL_ATTENUATION 0x22 | ||
| 40 | #define WM8994_SPKMIXR_ATTENUATION 0x23 | ||
| 41 | #define WM8994_SPKOUT_MIXERS 0x24 | ||
| 42 | #define WM8994_CLASSD 0x25 | ||
| 43 | #define WM8994_SPEAKER_VOLUME_LEFT 0x26 | ||
| 44 | #define WM8994_SPEAKER_VOLUME_RIGHT 0x27 | ||
| 45 | #define WM8994_INPUT_MIXER_2 0x28 | ||
| 46 | #define WM8994_INPUT_MIXER_3 0x29 | ||
| 47 | #define WM8994_INPUT_MIXER_4 0x2A | ||
| 48 | #define WM8994_INPUT_MIXER_5 0x2B | ||
| 49 | #define WM8994_INPUT_MIXER_6 0x2C | ||
| 50 | #define WM8994_OUTPUT_MIXER_1 0x2D | ||
| 51 | #define WM8994_OUTPUT_MIXER_2 0x2E | ||
| 52 | #define WM8994_OUTPUT_MIXER_3 0x2F | ||
| 53 | #define WM8994_OUTPUT_MIXER_4 0x30 | ||
| 54 | #define WM8994_OUTPUT_MIXER_5 0x31 | ||
| 55 | #define WM8994_OUTPUT_MIXER_6 0x32 | ||
| 56 | #define WM8994_HPOUT2_MIXER 0x33 | ||
| 57 | #define WM8994_LINE_MIXER_1 0x34 | ||
| 58 | #define WM8994_LINE_MIXER_2 0x35 | ||
| 59 | #define WM8994_SPEAKER_MIXER 0x36 | ||
| 60 | #define WM8994_ADDITIONAL_CONTROL 0x37 | ||
| 61 | #define WM8994_ANTIPOP_1 0x38 | ||
| 62 | #define WM8994_ANTIPOP_2 0x39 | ||
| 63 | #define WM8994_MICBIAS 0x3A | ||
| 64 | #define WM8994_LDO_1 0x3B | ||
| 65 | #define WM8994_LDO_2 0x3C | ||
| 66 | #define WM8994_CHARGE_PUMP_1 0x4C | ||
| 67 | #define WM8994_CLASS_W_1 0x51 | ||
| 68 | #define WM8994_DC_SERVO_1 0x54 | ||
| 69 | #define WM8994_DC_SERVO_2 0x55 | ||
| 70 | #define WM8994_DC_SERVO_4 0x57 | ||
| 71 | #define WM8994_DC_SERVO_READBACK 0x58 | ||
| 72 | #define WM8994_ANALOGUE_HP_1 0x60 | ||
| 73 | #define WM8994_CHIP_REVISION 0x100 | ||
| 74 | #define WM8994_CONTROL_INTERFACE 0x101 | ||
| 75 | #define WM8994_WRITE_SEQUENCER_CTRL_1 0x110 | ||
| 76 | #define WM8994_WRITE_SEQUENCER_CTRL_2 0x111 | ||
| 77 | #define WM8994_AIF1_CLOCKING_1 0x200 | ||
| 78 | #define WM8994_AIF1_CLOCKING_2 0x201 | ||
| 79 | #define WM8994_AIF2_CLOCKING_1 0x204 | ||
| 80 | #define WM8994_AIF2_CLOCKING_2 0x205 | ||
| 81 | #define WM8994_CLOCKING_1 0x208 | ||
| 82 | #define WM8994_CLOCKING_2 0x209 | ||
| 83 | #define WM8994_AIF1_RATE 0x210 | ||
| 84 | #define WM8994_AIF2_RATE 0x211 | ||
| 85 | #define WM8994_RATE_STATUS 0x212 | ||
| 86 | #define WM8994_FLL1_CONTROL_1 0x220 | ||
| 87 | #define WM8994_FLL1_CONTROL_2 0x221 | ||
| 88 | #define WM8994_FLL1_CONTROL_3 0x222 | ||
| 89 | #define WM8994_FLL1_CONTROL_4 0x223 | ||
| 90 | #define WM8994_FLL1_CONTROL_5 0x224 | ||
| 91 | #define WM8994_FLL2_CONTROL_1 0x240 | ||
| 92 | #define WM8994_FLL2_CONTROL_2 0x241 | ||
| 93 | #define WM8994_FLL2_CONTROL_3 0x242 | ||
| 94 | #define WM8994_FLL2_CONTROL_4 0x243 | ||
| 95 | #define WM8994_FLL2_CONTROL_5 0x244 | ||
| 96 | #define WM8994_AIF1_CONTROL_1 0x300 | ||
| 97 | #define WM8994_AIF1_CONTROL_2 0x301 | ||
| 98 | #define WM8994_AIF1_MASTER_SLAVE 0x302 | ||
| 99 | #define WM8994_AIF1_BCLK 0x303 | ||
| 100 | #define WM8994_AIF1ADC_LRCLK 0x304 | ||
| 101 | #define WM8994_AIF1DAC_LRCLK 0x305 | ||
| 102 | #define WM8994_AIF1DAC_DATA 0x306 | ||
| 103 | #define WM8994_AIF1ADC_DATA 0x307 | ||
| 104 | #define WM8994_AIF2_CONTROL_1 0x310 | ||
| 105 | #define WM8994_AIF2_CONTROL_2 0x311 | ||
| 106 | #define WM8994_AIF2_MASTER_SLAVE 0x312 | ||
| 107 | #define WM8994_AIF2_BCLK 0x313 | ||
| 108 | #define WM8994_AIF2ADC_LRCLK 0x314 | ||
| 109 | #define WM8994_AIF2DAC_LRCLK 0x315 | ||
| 110 | #define WM8994_AIF2DAC_DATA 0x316 | ||
| 111 | #define WM8994_AIF2ADC_DATA 0x317 | ||
| 112 | #define WM8994_AIF1_ADC1_LEFT_VOLUME 0x400 | ||
| 113 | #define WM8994_AIF1_ADC1_RIGHT_VOLUME 0x401 | ||
| 114 | #define WM8994_AIF1_DAC1_LEFT_VOLUME 0x402 | ||
| 115 | #define WM8994_AIF1_DAC1_RIGHT_VOLUME 0x403 | ||
| 116 | #define WM8994_AIF1_ADC2_LEFT_VOLUME 0x404 | ||
| 117 | #define WM8994_AIF1_ADC2_RIGHT_VOLUME 0x405 | ||
| 118 | #define WM8994_AIF1_DAC2_LEFT_VOLUME 0x406 | ||
| 119 | #define WM8994_AIF1_DAC2_RIGHT_VOLUME 0x407 | ||
| 120 | #define WM8994_AIF1_ADC1_FILTERS 0x410 | ||
| 121 | #define WM8994_AIF1_ADC2_FILTERS 0x411 | ||
| 122 | #define WM8994_AIF1_DAC1_FILTERS_1 0x420 | ||
| 123 | #define WM8994_AIF1_DAC1_FILTERS_2 0x421 | ||
| 124 | #define WM8994_AIF1_DAC2_FILTERS_1 0x422 | ||
| 125 | #define WM8994_AIF1_DAC2_FILTERS_2 0x423 | ||
| 126 | #define WM8994_AIF1_DRC1_1 0x440 | ||
| 127 | #define WM8994_AIF1_DRC1_2 0x441 | ||
| 128 | #define WM8994_AIF1_DRC1_3 0x442 | ||
| 129 | #define WM8994_AIF1_DRC1_4 0x443 | ||
| 130 | #define WM8994_AIF1_DRC1_5 0x444 | ||
| 131 | #define WM8994_AIF1_DRC2_1 0x450 | ||
| 132 | #define WM8994_AIF1_DRC2_2 0x451 | ||
| 133 | #define WM8994_AIF1_DRC2_3 0x452 | ||
| 134 | #define WM8994_AIF1_DRC2_4 0x453 | ||
| 135 | #define WM8994_AIF1_DRC2_5 0x454 | ||
| 136 | #define WM8994_AIF1_DAC1_EQ_GAINS_1 0x480 | ||
| 137 | #define WM8994_AIF1_DAC1_EQ_GAINS_2 0x481 | ||
| 138 | #define WM8994_AIF1_DAC1_EQ_BAND_1_A 0x482 | ||
| 139 | #define WM8994_AIF1_DAC1_EQ_BAND_1_B 0x483 | ||
| 140 | #define WM8994_AIF1_DAC1_EQ_BAND_1_PG 0x484 | ||
| 141 | #define WM8994_AIF1_DAC1_EQ_BAND_2_A 0x485 | ||
| 142 | #define WM8994_AIF1_DAC1_EQ_BAND_2_B 0x486 | ||
| 143 | #define WM8994_AIF1_DAC1_EQ_BAND_2_C 0x487 | ||
| 144 | #define WM8994_AIF1_DAC1_EQ_BAND_2_PG 0x488 | ||
| 145 | #define WM8994_AIF1_DAC1_EQ_BAND_3_A 0x489 | ||
| 146 | #define WM8994_AIF1_DAC1_EQ_BAND_3_B 0x48A | ||
| 147 | #define WM8994_AIF1_DAC1_EQ_BAND_3_C 0x48B | ||
| 148 | #define WM8994_AIF1_DAC1_EQ_BAND_3_PG 0x48C | ||
| 149 | #define WM8994_AIF1_DAC1_EQ_BAND_4_A 0x48D | ||
| 150 | #define WM8994_AIF1_DAC1_EQ_BAND_4_B 0x48E | ||
| 151 | #define WM8994_AIF1_DAC1_EQ_BAND_4_C 0x48F | ||
| 152 | #define WM8994_AIF1_DAC1_EQ_BAND_4_PG 0x490 | ||
| 153 | #define WM8994_AIF1_DAC1_EQ_BAND_5_A 0x491 | ||
| 154 | #define WM8994_AIF1_DAC1_EQ_BAND_5_B 0x492 | ||
| 155 | #define WM8994_AIF1_DAC1_EQ_BAND_5_PG 0x493 | ||
| 156 | #define WM8994_AIF1_DAC2_EQ_GAINS_1 0x4A0 | ||
| 157 | #define WM8994_AIF1_DAC2_EQ_GAINS_2 0x4A1 | ||
| 158 | #define WM8994_AIF1_DAC2_EQ_BAND_1_A 0x4A2 | ||
| 159 | #define WM8994_AIF1_DAC2_EQ_BAND_1_B 0x4A3 | ||
| 160 | #define WM8994_AIF1_DAC2_EQ_BAND_1_PG 0x4A4 | ||
| 161 | #define WM8994_AIF1_DAC2_EQ_BAND_2_A 0x4A5 | ||
| 162 | #define WM8994_AIF1_DAC2_EQ_BAND_2_B 0x4A6 | ||
| 163 | #define WM8994_AIF1_DAC2_EQ_BAND_2_C 0x4A7 | ||
| 164 | #define WM8994_AIF1_DAC2_EQ_BAND_2_PG 0x4A8 | ||
| 165 | #define WM8994_AIF1_DAC2_EQ_BAND_3_A 0x4A9 | ||
| 166 | #define WM8994_AIF1_DAC2_EQ_BAND_3_B 0x4AA | ||
| 167 | #define WM8994_AIF1_DAC2_EQ_BAND_3_C 0x4AB | ||
| 168 | #define WM8994_AIF1_DAC2_EQ_BAND_3_PG 0x4AC | ||
| 169 | #define WM8994_AIF1_DAC2_EQ_BAND_4_A 0x4AD | ||
| 170 | #define WM8994_AIF1_DAC2_EQ_BAND_4_B 0x4AE | ||
| 171 | #define WM8994_AIF1_DAC2_EQ_BAND_4_C 0x4AF | ||
| 172 | #define WM8994_AIF1_DAC2_EQ_BAND_4_PG 0x4B0 | ||
| 173 | #define WM8994_AIF1_DAC2_EQ_BAND_5_A 0x4B1 | ||
| 174 | #define WM8994_AIF1_DAC2_EQ_BAND_5_B 0x4B2 | ||
| 175 | #define WM8994_AIF1_DAC2_EQ_BAND_5_PG 0x4B3 | ||
| 176 | #define WM8994_AIF2_ADC_LEFT_VOLUME 0x500 | ||
| 177 | #define WM8994_AIF2_ADC_RIGHT_VOLUME 0x501 | ||
| 178 | #define WM8994_AIF2_DAC_LEFT_VOLUME 0x502 | ||
| 179 | #define WM8994_AIF2_DAC_RIGHT_VOLUME 0x503 | ||
| 180 | #define WM8994_AIF2_ADC_FILTERS 0x510 | ||
| 181 | #define WM8994_AIF2_DAC_FILTERS_1 0x520 | ||
| 182 | #define WM8994_AIF2_DAC_FILTERS_2 0x521 | ||
| 183 | #define WM8994_AIF2_DRC_1 0x540 | ||
| 184 | #define WM8994_AIF2_DRC_2 0x541 | ||
| 185 | #define WM8994_AIF2_DRC_3 0x542 | ||
| 186 | #define WM8994_AIF2_DRC_4 0x543 | ||
| 187 | #define WM8994_AIF2_DRC_5 0x544 | ||
| 188 | #define WM8994_AIF2_EQ_GAINS_1 0x580 | ||
| 189 | #define WM8994_AIF2_EQ_GAINS_2 0x581 | ||
| 190 | #define WM8994_AIF2_EQ_BAND_1_A 0x582 | ||
| 191 | #define WM8994_AIF2_EQ_BAND_1_B 0x583 | ||
| 192 | #define WM8994_AIF2_EQ_BAND_1_PG 0x584 | ||
| 193 | #define WM8994_AIF2_EQ_BAND_2_A 0x585 | ||
| 194 | #define WM8994_AIF2_EQ_BAND_2_B 0x586 | ||
| 195 | #define WM8994_AIF2_EQ_BAND_2_C 0x587 | ||
| 196 | #define WM8994_AIF2_EQ_BAND_2_PG 0x588 | ||
| 197 | #define WM8994_AIF2_EQ_BAND_3_A 0x589 | ||
| 198 | #define WM8994_AIF2_EQ_BAND_3_B 0x58A | ||
| 199 | #define WM8994_AIF2_EQ_BAND_3_C 0x58B | ||
| 200 | #define WM8994_AIF2_EQ_BAND_3_PG 0x58C | ||
| 201 | #define WM8994_AIF2_EQ_BAND_4_A 0x58D | ||
| 202 | #define WM8994_AIF2_EQ_BAND_4_B 0x58E | ||
| 203 | #define WM8994_AIF2_EQ_BAND_4_C 0x58F | ||
| 204 | #define WM8994_AIF2_EQ_BAND_4_PG 0x590 | ||
| 205 | #define WM8994_AIF2_EQ_BAND_5_A 0x591 | ||
| 206 | #define WM8994_AIF2_EQ_BAND_5_B 0x592 | ||
| 207 | #define WM8994_AIF2_EQ_BAND_5_PG 0x593 | ||
| 208 | #define WM8994_DAC1_MIXER_VOLUMES 0x600 | ||
| 209 | #define WM8994_DAC1_LEFT_MIXER_ROUTING 0x601 | ||
| 210 | #define WM8994_DAC1_RIGHT_MIXER_ROUTING 0x602 | ||
| 211 | #define WM8994_DAC2_MIXER_VOLUMES 0x603 | ||
| 212 | #define WM8994_DAC2_LEFT_MIXER_ROUTING 0x604 | ||
| 213 | #define WM8994_DAC2_RIGHT_MIXER_ROUTING 0x605 | ||
| 214 | #define WM8994_AIF1_ADC1_LEFT_MIXER_ROUTING 0x606 | ||
| 215 | #define WM8994_AIF1_ADC1_RIGHT_MIXER_ROUTING 0x607 | ||
| 216 | #define WM8994_AIF1_ADC2_LEFT_MIXER_ROUTING 0x608 | ||
| 217 | #define WM8994_AIF1_ADC2_RIGHT_MIXER_ROUTING 0x609 | ||
| 218 | #define WM8994_DAC1_LEFT_VOLUME 0x610 | ||
| 219 | #define WM8994_DAC1_RIGHT_VOLUME 0x611 | ||
| 220 | #define WM8994_DAC2_LEFT_VOLUME 0x612 | ||
| 221 | #define WM8994_DAC2_RIGHT_VOLUME 0x613 | ||
| 222 | #define WM8994_DAC_SOFTMUTE 0x614 | ||
| 223 | #define WM8994_OVERSAMPLING 0x620 | ||
| 224 | #define WM8994_SIDETONE 0x621 | ||
| 225 | #define WM8994_GPIO_1 0x700 | ||
| 226 | #define WM8994_GPIO_2 0x701 | ||
| 227 | #define WM8994_GPIO_3 0x702 | ||
| 228 | #define WM8994_GPIO_4 0x703 | ||
| 229 | #define WM8994_GPIO_5 0x704 | ||
| 230 | #define WM8994_GPIO_6 0x705 | ||
| 231 | #define WM8994_GPIO_7 0x706 | ||
| 232 | #define WM8994_GPIO_8 0x707 | ||
| 233 | #define WM8994_GPIO_9 0x708 | ||
| 234 | #define WM8994_GPIO_10 0x709 | ||
| 235 | #define WM8994_GPIO_11 0x70A | ||
| 236 | #define WM8994_PULL_CONTROL_1 0x720 | ||
| 237 | #define WM8994_PULL_CONTROL_2 0x721 | ||
| 238 | #define WM8994_INTERRUPT_STATUS_1 0x730 | ||
| 239 | #define WM8994_INTERRUPT_STATUS_2 0x731 | ||
| 240 | #define WM8994_INTERRUPT_RAW_STATUS_2 0x732 | ||
| 241 | #define WM8994_INTERRUPT_STATUS_1_MASK 0x738 | ||
| 242 | #define WM8994_INTERRUPT_STATUS_2_MASK 0x739 | ||
| 243 | #define WM8994_INTERRUPT_CONTROL 0x740 | ||
| 244 | #define WM8994_IRQ_DEBOUNCE 0x748 | ||
| 245 | #define WM8994_WRITE_SEQUENCER_0 0x3000 | ||
| 246 | #define WM8994_WRITE_SEQUENCER_1 0x3001 | ||
| 247 | #define WM8994_WRITE_SEQUENCER_2 0x3002 | ||
| 248 | #define WM8994_WRITE_SEQUENCER_3 0x3003 | ||
| 249 | #define WM8994_WRITE_SEQUENCER_4 0x3004 | ||
| 250 | #define WM8994_WRITE_SEQUENCER_5 0x3005 | ||
| 251 | #define WM8994_WRITE_SEQUENCER_6 0x3006 | ||
| 252 | #define WM8994_WRITE_SEQUENCER_7 0x3007 | ||
| 253 | #define WM8994_WRITE_SEQUENCER_8 0x3008 | ||
| 254 | #define WM8994_WRITE_SEQUENCER_9 0x3009 | ||
| 255 | #define WM8994_WRITE_SEQUENCER_10 0x300A | ||
| 256 | #define WM8994_WRITE_SEQUENCER_11 0x300B | ||
| 257 | #define WM8994_WRITE_SEQUENCER_12 0x300C | ||
| 258 | #define WM8994_WRITE_SEQUENCER_13 0x300D | ||
| 259 | #define WM8994_WRITE_SEQUENCER_14 0x300E | ||
| 260 | #define WM8994_WRITE_SEQUENCER_15 0x300F | ||
| 261 | #define WM8994_WRITE_SEQUENCER_16 0x3010 | ||
| 262 | #define WM8994_WRITE_SEQUENCER_17 0x3011 | ||
| 263 | #define WM8994_WRITE_SEQUENCER_18 0x3012 | ||
| 264 | #define WM8994_WRITE_SEQUENCER_19 0x3013 | ||
| 265 | #define WM8994_WRITE_SEQUENCER_20 0x3014 | ||
| 266 | #define WM8994_WRITE_SEQUENCER_21 0x3015 | ||
| 267 | #define WM8994_WRITE_SEQUENCER_22 0x3016 | ||
| 268 | #define WM8994_WRITE_SEQUENCER_23 0x3017 | ||
| 269 | #define WM8994_WRITE_SEQUENCER_24 0x3018 | ||
| 270 | #define WM8994_WRITE_SEQUENCER_25 0x3019 | ||
| 271 | #define WM8994_WRITE_SEQUENCER_26 0x301A | ||
| 272 | #define WM8994_WRITE_SEQUENCER_27 0x301B | ||
| 273 | #define WM8994_WRITE_SEQUENCER_28 0x301C | ||
| 274 | #define WM8994_WRITE_SEQUENCER_29 0x301D | ||
| 275 | #define WM8994_WRITE_SEQUENCER_30 0x301E | ||
| 276 | #define WM8994_WRITE_SEQUENCER_31 0x301F | ||
| 277 | #define WM8994_WRITE_SEQUENCER_32 0x3020 | ||
| 278 | #define WM8994_WRITE_SEQUENCER_33 0x3021 | ||
| 279 | #define WM8994_WRITE_SEQUENCER_34 0x3022 | ||
| 280 | #define WM8994_WRITE_SEQUENCER_35 0x3023 | ||
| 281 | #define WM8994_WRITE_SEQUENCER_36 0x3024 | ||
| 282 | #define WM8994_WRITE_SEQUENCER_37 0x3025 | ||
| 283 | #define WM8994_WRITE_SEQUENCER_38 0x3026 | ||
| 284 | #define WM8994_WRITE_SEQUENCER_39 0x3027 | ||
| 285 | #define WM8994_WRITE_SEQUENCER_40 0x3028 | ||
| 286 | #define WM8994_WRITE_SEQUENCER_41 0x3029 | ||
| 287 | #define WM8994_WRITE_SEQUENCER_42 0x302A | ||
| 288 | #define WM8994_WRITE_SEQUENCER_43 0x302B | ||
| 289 | #define WM8994_WRITE_SEQUENCER_44 0x302C | ||
| 290 | #define WM8994_WRITE_SEQUENCER_45 0x302D | ||
| 291 | #define WM8994_WRITE_SEQUENCER_46 0x302E | ||
| 292 | #define WM8994_WRITE_SEQUENCER_47 0x302F | ||
| 293 | #define WM8994_WRITE_SEQUENCER_48 0x3030 | ||
| 294 | #define WM8994_WRITE_SEQUENCER_49 0x3031 | ||
| 295 | #define WM8994_WRITE_SEQUENCER_50 0x3032 | ||
| 296 | #define WM8994_WRITE_SEQUENCER_51 0x3033 | ||
| 297 | #define WM8994_WRITE_SEQUENCER_52 0x3034 | ||
| 298 | #define WM8994_WRITE_SEQUENCER_53 0x3035 | ||
| 299 | #define WM8994_WRITE_SEQUENCER_54 0x3036 | ||
| 300 | #define WM8994_WRITE_SEQUENCER_55 0x3037 | ||
| 301 | #define WM8994_WRITE_SEQUENCER_56 0x3038 | ||
| 302 | #define WM8994_WRITE_SEQUENCER_57 0x3039 | ||
| 303 | #define WM8994_WRITE_SEQUENCER_58 0x303A | ||
| 304 | #define WM8994_WRITE_SEQUENCER_59 0x303B | ||
| 305 | #define WM8994_WRITE_SEQUENCER_60 0x303C | ||
| 306 | #define WM8994_WRITE_SEQUENCER_61 0x303D | ||
| 307 | #define WM8994_WRITE_SEQUENCER_62 0x303E | ||
| 308 | #define WM8994_WRITE_SEQUENCER_63 0x303F | ||
| 309 | #define WM8994_WRITE_SEQUENCER_64 0x3040 | ||
| 310 | #define WM8994_WRITE_SEQUENCER_65 0x3041 | ||
| 311 | #define WM8994_WRITE_SEQUENCER_66 0x3042 | ||
| 312 | #define WM8994_WRITE_SEQUENCER_67 0x3043 | ||
| 313 | #define WM8994_WRITE_SEQUENCER_68 0x3044 | ||
| 314 | #define WM8994_WRITE_SEQUENCER_69 0x3045 | ||
| 315 | #define WM8994_WRITE_SEQUENCER_70 0x3046 | ||
| 316 | #define WM8994_WRITE_SEQUENCER_71 0x3047 | ||
| 317 | #define WM8994_WRITE_SEQUENCER_72 0x3048 | ||
| 318 | #define WM8994_WRITE_SEQUENCER_73 0x3049 | ||
| 319 | #define WM8994_WRITE_SEQUENCER_74 0x304A | ||
| 320 | #define WM8994_WRITE_SEQUENCER_75 0x304B | ||
| 321 | #define WM8994_WRITE_SEQUENCER_76 0x304C | ||
| 322 | #define WM8994_WRITE_SEQUENCER_77 0x304D | ||
| 323 | #define WM8994_WRITE_SEQUENCER_78 0x304E | ||
| 324 | #define WM8994_WRITE_SEQUENCER_79 0x304F | ||
| 325 | #define WM8994_WRITE_SEQUENCER_80 0x3050 | ||
| 326 | #define WM8994_WRITE_SEQUENCER_81 0x3051 | ||
| 327 | #define WM8994_WRITE_SEQUENCER_82 0x3052 | ||
| 328 | #define WM8994_WRITE_SEQUENCER_83 0x3053 | ||
| 329 | #define WM8994_WRITE_SEQUENCER_84 0x3054 | ||
| 330 | #define WM8994_WRITE_SEQUENCER_85 0x3055 | ||
| 331 | #define WM8994_WRITE_SEQUENCER_86 0x3056 | ||
| 332 | #define WM8994_WRITE_SEQUENCER_87 0x3057 | ||
| 333 | #define WM8994_WRITE_SEQUENCER_88 0x3058 | ||
| 334 | #define WM8994_WRITE_SEQUENCER_89 0x3059 | ||
| 335 | #define WM8994_WRITE_SEQUENCER_90 0x305A | ||
| 336 | #define WM8994_WRITE_SEQUENCER_91 0x305B | ||
| 337 | #define WM8994_WRITE_SEQUENCER_92 0x305C | ||
| 338 | #define WM8994_WRITE_SEQUENCER_93 0x305D | ||
| 339 | #define WM8994_WRITE_SEQUENCER_94 0x305E | ||
| 340 | #define WM8994_WRITE_SEQUENCER_95 0x305F | ||
| 341 | #define WM8994_WRITE_SEQUENCER_96 0x3060 | ||
| 342 | #define WM8994_WRITE_SEQUENCER_97 0x3061 | ||
| 343 | #define WM8994_WRITE_SEQUENCER_98 0x3062 | ||
| 344 | #define WM8994_WRITE_SEQUENCER_99 0x3063 | ||
| 345 | #define WM8994_WRITE_SEQUENCER_100 0x3064 | ||
| 346 | #define WM8994_WRITE_SEQUENCER_101 0x3065 | ||
| 347 | #define WM8994_WRITE_SEQUENCER_102 0x3066 | ||
| 348 | #define WM8994_WRITE_SEQUENCER_103 0x3067 | ||
| 349 | #define WM8994_WRITE_SEQUENCER_104 0x3068 | ||
| 350 | #define WM8994_WRITE_SEQUENCER_105 0x3069 | ||
| 351 | #define WM8994_WRITE_SEQUENCER_106 0x306A | ||
| 352 | #define WM8994_WRITE_SEQUENCER_107 0x306B | ||
| 353 | #define WM8994_WRITE_SEQUENCER_108 0x306C | ||
| 354 | #define WM8994_WRITE_SEQUENCER_109 0x306D | ||
| 355 | #define WM8994_WRITE_SEQUENCER_110 0x306E | ||
| 356 | #define WM8994_WRITE_SEQUENCER_111 0x306F | ||
| 357 | #define WM8994_WRITE_SEQUENCER_112 0x3070 | ||
| 358 | #define WM8994_WRITE_SEQUENCER_113 0x3071 | ||
| 359 | #define WM8994_WRITE_SEQUENCER_114 0x3072 | ||
| 360 | #define WM8994_WRITE_SEQUENCER_115 0x3073 | ||
| 361 | #define WM8994_WRITE_SEQUENCER_116 0x3074 | ||
| 362 | #define WM8994_WRITE_SEQUENCER_117 0x3075 | ||
| 363 | #define WM8994_WRITE_SEQUENCER_118 0x3076 | ||
| 364 | #define WM8994_WRITE_SEQUENCER_119 0x3077 | ||
| 365 | #define WM8994_WRITE_SEQUENCER_120 0x3078 | ||
| 366 | #define WM8994_WRITE_SEQUENCER_121 0x3079 | ||
| 367 | #define WM8994_WRITE_SEQUENCER_122 0x307A | ||
| 368 | #define WM8994_WRITE_SEQUENCER_123 0x307B | ||
| 369 | #define WM8994_WRITE_SEQUENCER_124 0x307C | ||
| 370 | #define WM8994_WRITE_SEQUENCER_125 0x307D | ||
| 371 | #define WM8994_WRITE_SEQUENCER_126 0x307E | ||
| 372 | #define WM8994_WRITE_SEQUENCER_127 0x307F | ||
| 373 | #define WM8994_WRITE_SEQUENCER_128 0x3080 | ||
| 374 | #define WM8994_WRITE_SEQUENCER_129 0x3081 | ||
| 375 | #define WM8994_WRITE_SEQUENCER_130 0x3082 | ||
| 376 | #define WM8994_WRITE_SEQUENCER_131 0x3083 | ||
| 377 | #define WM8994_WRITE_SEQUENCER_132 0x3084 | ||
| 378 | #define WM8994_WRITE_SEQUENCER_133 0x3085 | ||
| 379 | #define WM8994_WRITE_SEQUENCER_134 0x3086 | ||
| 380 | #define WM8994_WRITE_SEQUENCER_135 0x3087 | ||
| 381 | #define WM8994_WRITE_SEQUENCER_136 0x3088 | ||
| 382 | #define WM8994_WRITE_SEQUENCER_137 0x3089 | ||
| 383 | #define WM8994_WRITE_SEQUENCER_138 0x308A | ||
| 384 | #define WM8994_WRITE_SEQUENCER_139 0x308B | ||
| 385 | #define WM8994_WRITE_SEQUENCER_140 0x308C | ||
| 386 | #define WM8994_WRITE_SEQUENCER_141 0x308D | ||
| 387 | #define WM8994_WRITE_SEQUENCER_142 0x308E | ||
| 388 | #define WM8994_WRITE_SEQUENCER_143 0x308F | ||
| 389 | #define WM8994_WRITE_SEQUENCER_144 0x3090 | ||
| 390 | #define WM8994_WRITE_SEQUENCER_145 0x3091 | ||
| 391 | #define WM8994_WRITE_SEQUENCER_146 0x3092 | ||
| 392 | #define WM8994_WRITE_SEQUENCER_147 0x3093 | ||
| 393 | #define WM8994_WRITE_SEQUENCER_148 0x3094 | ||
| 394 | #define WM8994_WRITE_SEQUENCER_149 0x3095 | ||
| 395 | #define WM8994_WRITE_SEQUENCER_150 0x3096 | ||
| 396 | #define WM8994_WRITE_SEQUENCER_151 0x3097 | ||
| 397 | #define WM8994_WRITE_SEQUENCER_152 0x3098 | ||
| 398 | #define WM8994_WRITE_SEQUENCER_153 0x3099 | ||
| 399 | #define WM8994_WRITE_SEQUENCER_154 0x309A | ||
| 400 | #define WM8994_WRITE_SEQUENCER_155 0x309B | ||
| 401 | #define WM8994_WRITE_SEQUENCER_156 0x309C | ||
| 402 | #define WM8994_WRITE_SEQUENCER_157 0x309D | ||
| 403 | #define WM8994_WRITE_SEQUENCER_158 0x309E | ||
| 404 | #define WM8994_WRITE_SEQUENCER_159 0x309F | ||
| 405 | #define WM8994_WRITE_SEQUENCER_160 0x30A0 | ||
| 406 | #define WM8994_WRITE_SEQUENCER_161 0x30A1 | ||
| 407 | #define WM8994_WRITE_SEQUENCER_162 0x30A2 | ||
| 408 | #define WM8994_WRITE_SEQUENCER_163 0x30A3 | ||
| 409 | #define WM8994_WRITE_SEQUENCER_164 0x30A4 | ||
| 410 | #define WM8994_WRITE_SEQUENCER_165 0x30A5 | ||
| 411 | #define WM8994_WRITE_SEQUENCER_166 0x30A6 | ||
| 412 | #define WM8994_WRITE_SEQUENCER_167 0x30A7 | ||
| 413 | #define WM8994_WRITE_SEQUENCER_168 0x30A8 | ||
| 414 | #define WM8994_WRITE_SEQUENCER_169 0x30A9 | ||
| 415 | #define WM8994_WRITE_SEQUENCER_170 0x30AA | ||
| 416 | #define WM8994_WRITE_SEQUENCER_171 0x30AB | ||
| 417 | #define WM8994_WRITE_SEQUENCER_172 0x30AC | ||
| 418 | #define WM8994_WRITE_SEQUENCER_173 0x30AD | ||
| 419 | #define WM8994_WRITE_SEQUENCER_174 0x30AE | ||
| 420 | #define WM8994_WRITE_SEQUENCER_175 0x30AF | ||
| 421 | #define WM8994_WRITE_SEQUENCER_176 0x30B0 | ||
| 422 | #define WM8994_WRITE_SEQUENCER_177 0x30B1 | ||
| 423 | #define WM8994_WRITE_SEQUENCER_178 0x30B2 | ||
| 424 | #define WM8994_WRITE_SEQUENCER_179 0x30B3 | ||
| 425 | #define WM8994_WRITE_SEQUENCER_180 0x30B4 | ||
| 426 | #define WM8994_WRITE_SEQUENCER_181 0x30B5 | ||
| 427 | #define WM8994_WRITE_SEQUENCER_182 0x30B6 | ||
| 428 | #define WM8994_WRITE_SEQUENCER_183 0x30B7 | ||
| 429 | #define WM8994_WRITE_SEQUENCER_184 0x30B8 | ||
| 430 | #define WM8994_WRITE_SEQUENCER_185 0x30B9 | ||
| 431 | #define WM8994_WRITE_SEQUENCER_186 0x30BA | ||
| 432 | #define WM8994_WRITE_SEQUENCER_187 0x30BB | ||
| 433 | #define WM8994_WRITE_SEQUENCER_188 0x30BC | ||
| 434 | #define WM8994_WRITE_SEQUENCER_189 0x30BD | ||
| 435 | #define WM8994_WRITE_SEQUENCER_190 0x30BE | ||
| 436 | #define WM8994_WRITE_SEQUENCER_191 0x30BF | ||
| 437 | #define WM8994_WRITE_SEQUENCER_192 0x30C0 | ||
| 438 | #define WM8994_WRITE_SEQUENCER_193 0x30C1 | ||
| 439 | #define WM8994_WRITE_SEQUENCER_194 0x30C2 | ||
| 440 | #define WM8994_WRITE_SEQUENCER_195 0x30C3 | ||
| 441 | #define WM8994_WRITE_SEQUENCER_196 0x30C4 | ||
| 442 | #define WM8994_WRITE_SEQUENCER_197 0x30C5 | ||
| 443 | #define WM8994_WRITE_SEQUENCER_198 0x30C6 | ||
| 444 | #define WM8994_WRITE_SEQUENCER_199 0x30C7 | ||
| 445 | #define WM8994_WRITE_SEQUENCER_200 0x30C8 | ||
| 446 | #define WM8994_WRITE_SEQUENCER_201 0x30C9 | ||
| 447 | #define WM8994_WRITE_SEQUENCER_202 0x30CA | ||
| 448 | #define WM8994_WRITE_SEQUENCER_203 0x30CB | ||
| 449 | #define WM8994_WRITE_SEQUENCER_204 0x30CC | ||
| 450 | #define WM8994_WRITE_SEQUENCER_205 0x30CD | ||
| 451 | #define WM8994_WRITE_SEQUENCER_206 0x30CE | ||
| 452 | #define WM8994_WRITE_SEQUENCER_207 0x30CF | ||
| 453 | #define WM8994_WRITE_SEQUENCER_208 0x30D0 | ||
| 454 | #define WM8994_WRITE_SEQUENCER_209 0x30D1 | ||
| 455 | #define WM8994_WRITE_SEQUENCER_210 0x30D2 | ||
| 456 | #define WM8994_WRITE_SEQUENCER_211 0x30D3 | ||
| 457 | #define WM8994_WRITE_SEQUENCER_212 0x30D4 | ||
| 458 | #define WM8994_WRITE_SEQUENCER_213 0x30D5 | ||
| 459 | #define WM8994_WRITE_SEQUENCER_214 0x30D6 | ||
| 460 | #define WM8994_WRITE_SEQUENCER_215 0x30D7 | ||
| 461 | #define WM8994_WRITE_SEQUENCER_216 0x30D8 | ||
| 462 | #define WM8994_WRITE_SEQUENCER_217 0x30D9 | ||
| 463 | #define WM8994_WRITE_SEQUENCER_218 0x30DA | ||
| 464 | #define WM8994_WRITE_SEQUENCER_219 0x30DB | ||
| 465 | #define WM8994_WRITE_SEQUENCER_220 0x30DC | ||
| 466 | #define WM8994_WRITE_SEQUENCER_221 0x30DD | ||
| 467 | #define WM8994_WRITE_SEQUENCER_222 0x30DE | ||
| 468 | #define WM8994_WRITE_SEQUENCER_223 0x30DF | ||
| 469 | #define WM8994_WRITE_SEQUENCER_224 0x30E0 | ||
| 470 | #define WM8994_WRITE_SEQUENCER_225 0x30E1 | ||
| 471 | #define WM8994_WRITE_SEQUENCER_226 0x30E2 | ||
| 472 | #define WM8994_WRITE_SEQUENCER_227 0x30E3 | ||
| 473 | #define WM8994_WRITE_SEQUENCER_228 0x30E4 | ||
| 474 | #define WM8994_WRITE_SEQUENCER_229 0x30E5 | ||
| 475 | #define WM8994_WRITE_SEQUENCER_230 0x30E6 | ||
| 476 | #define WM8994_WRITE_SEQUENCER_231 0x30E7 | ||
| 477 | #define WM8994_WRITE_SEQUENCER_232 0x30E8 | ||
| 478 | #define WM8994_WRITE_SEQUENCER_233 0x30E9 | ||
| 479 | #define WM8994_WRITE_SEQUENCER_234 0x30EA | ||
| 480 | #define WM8994_WRITE_SEQUENCER_235 0x30EB | ||
| 481 | #define WM8994_WRITE_SEQUENCER_236 0x30EC | ||
| 482 | #define WM8994_WRITE_SEQUENCER_237 0x30ED | ||
| 483 | #define WM8994_WRITE_SEQUENCER_238 0x30EE | ||
| 484 | #define WM8994_WRITE_SEQUENCER_239 0x30EF | ||
| 485 | #define WM8994_WRITE_SEQUENCER_240 0x30F0 | ||
| 486 | #define WM8994_WRITE_SEQUENCER_241 0x30F1 | ||
| 487 | #define WM8994_WRITE_SEQUENCER_242 0x30F2 | ||
| 488 | #define WM8994_WRITE_SEQUENCER_243 0x30F3 | ||
| 489 | #define WM8994_WRITE_SEQUENCER_244 0x30F4 | ||
| 490 | #define WM8994_WRITE_SEQUENCER_245 0x30F5 | ||
| 491 | #define WM8994_WRITE_SEQUENCER_246 0x30F6 | ||
| 492 | #define WM8994_WRITE_SEQUENCER_247 0x30F7 | ||
| 493 | #define WM8994_WRITE_SEQUENCER_248 0x30F8 | ||
| 494 | #define WM8994_WRITE_SEQUENCER_249 0x30F9 | ||
| 495 | #define WM8994_WRITE_SEQUENCER_250 0x30FA | ||
| 496 | #define WM8994_WRITE_SEQUENCER_251 0x30FB | ||
| 497 | #define WM8994_WRITE_SEQUENCER_252 0x30FC | ||
| 498 | #define WM8994_WRITE_SEQUENCER_253 0x30FD | ||
| 499 | #define WM8994_WRITE_SEQUENCER_254 0x30FE | ||
| 500 | #define WM8994_WRITE_SEQUENCER_255 0x30FF | ||
| 501 | #define WM8994_WRITE_SEQUENCER_256 0x3100 | ||
| 502 | #define WM8994_WRITE_SEQUENCER_257 0x3101 | ||
| 503 | #define WM8994_WRITE_SEQUENCER_258 0x3102 | ||
| 504 | #define WM8994_WRITE_SEQUENCER_259 0x3103 | ||
| 505 | #define WM8994_WRITE_SEQUENCER_260 0x3104 | ||
| 506 | #define WM8994_WRITE_SEQUENCER_261 0x3105 | ||
| 507 | #define WM8994_WRITE_SEQUENCER_262 0x3106 | ||
| 508 | #define WM8994_WRITE_SEQUENCER_263 0x3107 | ||
| 509 | #define WM8994_WRITE_SEQUENCER_264 0x3108 | ||
| 510 | #define WM8994_WRITE_SEQUENCER_265 0x3109 | ||
| 511 | #define WM8994_WRITE_SEQUENCER_266 0x310A | ||
| 512 | #define WM8994_WRITE_SEQUENCER_267 0x310B | ||
| 513 | #define WM8994_WRITE_SEQUENCER_268 0x310C | ||
| 514 | #define WM8994_WRITE_SEQUENCER_269 0x310D | ||
| 515 | #define WM8994_WRITE_SEQUENCER_270 0x310E | ||
| 516 | #define WM8994_WRITE_SEQUENCER_271 0x310F | ||
| 517 | #define WM8994_WRITE_SEQUENCER_272 0x3110 | ||
| 518 | #define WM8994_WRITE_SEQUENCER_273 0x3111 | ||
| 519 | #define WM8994_WRITE_SEQUENCER_274 0x3112 | ||
| 520 | #define WM8994_WRITE_SEQUENCER_275 0x3113 | ||
| 521 | #define WM8994_WRITE_SEQUENCER_276 0x3114 | ||
| 522 | #define WM8994_WRITE_SEQUENCER_277 0x3115 | ||
| 523 | #define WM8994_WRITE_SEQUENCER_278 0x3116 | ||
| 524 | #define WM8994_WRITE_SEQUENCER_279 0x3117 | ||
| 525 | #define WM8994_WRITE_SEQUENCER_280 0x3118 | ||
| 526 | #define WM8994_WRITE_SEQUENCER_281 0x3119 | ||
| 527 | #define WM8994_WRITE_SEQUENCER_282 0x311A | ||
| 528 | #define WM8994_WRITE_SEQUENCER_283 0x311B | ||
| 529 | #define WM8994_WRITE_SEQUENCER_284 0x311C | ||
| 530 | #define WM8994_WRITE_SEQUENCER_285 0x311D | ||
| 531 | #define WM8994_WRITE_SEQUENCER_286 0x311E | ||
| 532 | #define WM8994_WRITE_SEQUENCER_287 0x311F | ||
| 533 | #define WM8994_WRITE_SEQUENCER_288 0x3120 | ||
| 534 | #define WM8994_WRITE_SEQUENCER_289 0x3121 | ||
| 535 | #define WM8994_WRITE_SEQUENCER_290 0x3122 | ||
| 536 | #define WM8994_WRITE_SEQUENCER_291 0x3123 | ||
| 537 | #define WM8994_WRITE_SEQUENCER_292 0x3124 | ||
| 538 | #define WM8994_WRITE_SEQUENCER_293 0x3125 | ||
| 539 | #define WM8994_WRITE_SEQUENCER_294 0x3126 | ||
| 540 | #define WM8994_WRITE_SEQUENCER_295 0x3127 | ||
| 541 | #define WM8994_WRITE_SEQUENCER_296 0x3128 | ||
| 542 | #define WM8994_WRITE_SEQUENCER_297 0x3129 | ||
| 543 | #define WM8994_WRITE_SEQUENCER_298 0x312A | ||
| 544 | #define WM8994_WRITE_SEQUENCER_299 0x312B | ||
| 545 | #define WM8994_WRITE_SEQUENCER_300 0x312C | ||
| 546 | #define WM8994_WRITE_SEQUENCER_301 0x312D | ||
| 547 | #define WM8994_WRITE_SEQUENCER_302 0x312E | ||
| 548 | #define WM8994_WRITE_SEQUENCER_303 0x312F | ||
| 549 | #define WM8994_WRITE_SEQUENCER_304 0x3130 | ||
| 550 | #define WM8994_WRITE_SEQUENCER_305 0x3131 | ||
| 551 | #define WM8994_WRITE_SEQUENCER_306 0x3132 | ||
| 552 | #define WM8994_WRITE_SEQUENCER_307 0x3133 | ||
| 553 | #define WM8994_WRITE_SEQUENCER_308 0x3134 | ||
| 554 | #define WM8994_WRITE_SEQUENCER_309 0x3135 | ||
| 555 | #define WM8994_WRITE_SEQUENCER_310 0x3136 | ||
| 556 | #define WM8994_WRITE_SEQUENCER_311 0x3137 | ||
| 557 | #define WM8994_WRITE_SEQUENCER_312 0x3138 | ||
| 558 | #define WM8994_WRITE_SEQUENCER_313 0x3139 | ||
| 559 | #define WM8994_WRITE_SEQUENCER_314 0x313A | ||
| 560 | #define WM8994_WRITE_SEQUENCER_315 0x313B | ||
| 561 | #define WM8994_WRITE_SEQUENCER_316 0x313C | ||
| 562 | #define WM8994_WRITE_SEQUENCER_317 0x313D | ||
| 563 | #define WM8994_WRITE_SEQUENCER_318 0x313E | ||
| 564 | #define WM8994_WRITE_SEQUENCER_319 0x313F | ||
| 565 | #define WM8994_WRITE_SEQUENCER_320 0x3140 | ||
| 566 | #define WM8994_WRITE_SEQUENCER_321 0x3141 | ||
| 567 | #define WM8994_WRITE_SEQUENCER_322 0x3142 | ||
| 568 | #define WM8994_WRITE_SEQUENCER_323 0x3143 | ||
| 569 | #define WM8994_WRITE_SEQUENCER_324 0x3144 | ||
| 570 | #define WM8994_WRITE_SEQUENCER_325 0x3145 | ||
| 571 | #define WM8994_WRITE_SEQUENCER_326 0x3146 | ||
| 572 | #define WM8994_WRITE_SEQUENCER_327 0x3147 | ||
| 573 | #define WM8994_WRITE_SEQUENCER_328 0x3148 | ||
| 574 | #define WM8994_WRITE_SEQUENCER_329 0x3149 | ||
| 575 | #define WM8994_WRITE_SEQUENCER_330 0x314A | ||
| 576 | #define WM8994_WRITE_SEQUENCER_331 0x314B | ||
| 577 | #define WM8994_WRITE_SEQUENCER_332 0x314C | ||
| 578 | #define WM8994_WRITE_SEQUENCER_333 0x314D | ||
| 579 | #define WM8994_WRITE_SEQUENCER_334 0x314E | ||
| 580 | #define WM8994_WRITE_SEQUENCER_335 0x314F | ||
| 581 | #define WM8994_WRITE_SEQUENCER_336 0x3150 | ||
| 582 | #define WM8994_WRITE_SEQUENCER_337 0x3151 | ||
| 583 | #define WM8994_WRITE_SEQUENCER_338 0x3152 | ||
| 584 | #define WM8994_WRITE_SEQUENCER_339 0x3153 | ||
| 585 | #define WM8994_WRITE_SEQUENCER_340 0x3154 | ||
| 586 | #define WM8994_WRITE_SEQUENCER_341 0x3155 | ||
| 587 | #define WM8994_WRITE_SEQUENCER_342 0x3156 | ||
| 588 | #define WM8994_WRITE_SEQUENCER_343 0x3157 | ||
| 589 | #define WM8994_WRITE_SEQUENCER_344 0x3158 | ||
| 590 | #define WM8994_WRITE_SEQUENCER_345 0x3159 | ||
| 591 | #define WM8994_WRITE_SEQUENCER_346 0x315A | ||
| 592 | #define WM8994_WRITE_SEQUENCER_347 0x315B | ||
| 593 | #define WM8994_WRITE_SEQUENCER_348 0x315C | ||
| 594 | #define WM8994_WRITE_SEQUENCER_349 0x315D | ||
| 595 | #define WM8994_WRITE_SEQUENCER_350 0x315E | ||
| 596 | #define WM8994_WRITE_SEQUENCER_351 0x315F | ||
| 597 | #define WM8994_WRITE_SEQUENCER_352 0x3160 | ||
| 598 | #define WM8994_WRITE_SEQUENCER_353 0x3161 | ||
| 599 | #define WM8994_WRITE_SEQUENCER_354 0x3162 | ||
| 600 | #define WM8994_WRITE_SEQUENCER_355 0x3163 | ||
| 601 | #define WM8994_WRITE_SEQUENCER_356 0x3164 | ||
| 602 | #define WM8994_WRITE_SEQUENCER_357 0x3165 | ||
| 603 | #define WM8994_WRITE_SEQUENCER_358 0x3166 | ||
| 604 | #define WM8994_WRITE_SEQUENCER_359 0x3167 | ||
| 605 | #define WM8994_WRITE_SEQUENCER_360 0x3168 | ||
| 606 | #define WM8994_WRITE_SEQUENCER_361 0x3169 | ||
| 607 | #define WM8994_WRITE_SEQUENCER_362 0x316A | ||
| 608 | #define WM8994_WRITE_SEQUENCER_363 0x316B | ||
| 609 | #define WM8994_WRITE_SEQUENCER_364 0x316C | ||
| 610 | #define WM8994_WRITE_SEQUENCER_365 0x316D | ||
| 611 | #define WM8994_WRITE_SEQUENCER_366 0x316E | ||
| 612 | #define WM8994_WRITE_SEQUENCER_367 0x316F | ||
| 613 | #define WM8994_WRITE_SEQUENCER_368 0x3170 | ||
| 614 | #define WM8994_WRITE_SEQUENCER_369 0x3171 | ||
| 615 | #define WM8994_WRITE_SEQUENCER_370 0x3172 | ||
| 616 | #define WM8994_WRITE_SEQUENCER_371 0x3173 | ||
| 617 | #define WM8994_WRITE_SEQUENCER_372 0x3174 | ||
| 618 | #define WM8994_WRITE_SEQUENCER_373 0x3175 | ||
| 619 | #define WM8994_WRITE_SEQUENCER_374 0x3176 | ||
| 620 | #define WM8994_WRITE_SEQUENCER_375 0x3177 | ||
| 621 | #define WM8994_WRITE_SEQUENCER_376 0x3178 | ||
| 622 | #define WM8994_WRITE_SEQUENCER_377 0x3179 | ||
| 623 | #define WM8994_WRITE_SEQUENCER_378 0x317A | ||
| 624 | #define WM8994_WRITE_SEQUENCER_379 0x317B | ||
| 625 | #define WM8994_WRITE_SEQUENCER_380 0x317C | ||
| 626 | #define WM8994_WRITE_SEQUENCER_381 0x317D | ||
| 627 | #define WM8994_WRITE_SEQUENCER_382 0x317E | ||
| 628 | #define WM8994_WRITE_SEQUENCER_383 0x317F | ||
| 629 | #define WM8994_WRITE_SEQUENCER_384 0x3180 | ||
| 630 | #define WM8994_WRITE_SEQUENCER_385 0x3181 | ||
| 631 | #define WM8994_WRITE_SEQUENCER_386 0x3182 | ||
| 632 | #define WM8994_WRITE_SEQUENCER_387 0x3183 | ||
| 633 | #define WM8994_WRITE_SEQUENCER_388 0x3184 | ||
| 634 | #define WM8994_WRITE_SEQUENCER_389 0x3185 | ||
| 635 | #define WM8994_WRITE_SEQUENCER_390 0x3186 | ||
| 636 | #define WM8994_WRITE_SEQUENCER_391 0x3187 | ||
| 637 | #define WM8994_WRITE_SEQUENCER_392 0x3188 | ||
| 638 | #define WM8994_WRITE_SEQUENCER_393 0x3189 | ||
| 639 | #define WM8994_WRITE_SEQUENCER_394 0x318A | ||
| 640 | #define WM8994_WRITE_SEQUENCER_395 0x318B | ||
| 641 | #define WM8994_WRITE_SEQUENCER_396 0x318C | ||
| 642 | #define WM8994_WRITE_SEQUENCER_397 0x318D | ||
| 643 | #define WM8994_WRITE_SEQUENCER_398 0x318E | ||
| 644 | #define WM8994_WRITE_SEQUENCER_399 0x318F | ||
| 645 | #define WM8994_WRITE_SEQUENCER_400 0x3190 | ||
| 646 | #define WM8994_WRITE_SEQUENCER_401 0x3191 | ||
| 647 | #define WM8994_WRITE_SEQUENCER_402 0x3192 | ||
| 648 | #define WM8994_WRITE_SEQUENCER_403 0x3193 | ||
| 649 | #define WM8994_WRITE_SEQUENCER_404 0x3194 | ||
| 650 | #define WM8994_WRITE_SEQUENCER_405 0x3195 | ||
| 651 | #define WM8994_WRITE_SEQUENCER_406 0x3196 | ||
| 652 | #define WM8994_WRITE_SEQUENCER_407 0x3197 | ||
| 653 | #define WM8994_WRITE_SEQUENCER_408 0x3198 | ||
| 654 | #define WM8994_WRITE_SEQUENCER_409 0x3199 | ||
| 655 | #define WM8994_WRITE_SEQUENCER_410 0x319A | ||
| 656 | #define WM8994_WRITE_SEQUENCER_411 0x319B | ||
| 657 | #define WM8994_WRITE_SEQUENCER_412 0x319C | ||
| 658 | #define WM8994_WRITE_SEQUENCER_413 0x319D | ||
| 659 | #define WM8994_WRITE_SEQUENCER_414 0x319E | ||
| 660 | #define WM8994_WRITE_SEQUENCER_415 0x319F | ||
| 661 | #define WM8994_WRITE_SEQUENCER_416 0x31A0 | ||
| 662 | #define WM8994_WRITE_SEQUENCER_417 0x31A1 | ||
| 663 | #define WM8994_WRITE_SEQUENCER_418 0x31A2 | ||
| 664 | #define WM8994_WRITE_SEQUENCER_419 0x31A3 | ||
| 665 | #define WM8994_WRITE_SEQUENCER_420 0x31A4 | ||
| 666 | #define WM8994_WRITE_SEQUENCER_421 0x31A5 | ||
| 667 | #define WM8994_WRITE_SEQUENCER_422 0x31A6 | ||
| 668 | #define WM8994_WRITE_SEQUENCER_423 0x31A7 | ||
| 669 | #define WM8994_WRITE_SEQUENCER_424 0x31A8 | ||
| 670 | #define WM8994_WRITE_SEQUENCER_425 0x31A9 | ||
| 671 | #define WM8994_WRITE_SEQUENCER_426 0x31AA | ||
| 672 | #define WM8994_WRITE_SEQUENCER_427 0x31AB | ||
| 673 | #define WM8994_WRITE_SEQUENCER_428 0x31AC | ||
| 674 | #define WM8994_WRITE_SEQUENCER_429 0x31AD | ||
| 675 | #define WM8994_WRITE_SEQUENCER_430 0x31AE | ||
| 676 | #define WM8994_WRITE_SEQUENCER_431 0x31AF | ||
| 677 | #define WM8994_WRITE_SEQUENCER_432 0x31B0 | ||
| 678 | #define WM8994_WRITE_SEQUENCER_433 0x31B1 | ||
| 679 | #define WM8994_WRITE_SEQUENCER_434 0x31B2 | ||
| 680 | #define WM8994_WRITE_SEQUENCER_435 0x31B3 | ||
| 681 | #define WM8994_WRITE_SEQUENCER_436 0x31B4 | ||
| 682 | #define WM8994_WRITE_SEQUENCER_437 0x31B5 | ||
| 683 | #define WM8994_WRITE_SEQUENCER_438 0x31B6 | ||
| 684 | #define WM8994_WRITE_SEQUENCER_439 0x31B7 | ||
| 685 | #define WM8994_WRITE_SEQUENCER_440 0x31B8 | ||
| 686 | #define WM8994_WRITE_SEQUENCER_441 0x31B9 | ||
| 687 | #define WM8994_WRITE_SEQUENCER_442 0x31BA | ||
| 688 | #define WM8994_WRITE_SEQUENCER_443 0x31BB | ||
| 689 | #define WM8994_WRITE_SEQUENCER_444 0x31BC | ||
| 690 | #define WM8994_WRITE_SEQUENCER_445 0x31BD | ||
| 691 | #define WM8994_WRITE_SEQUENCER_446 0x31BE | ||
| 692 | #define WM8994_WRITE_SEQUENCER_447 0x31BF | ||
| 693 | #define WM8994_WRITE_SEQUENCER_448 0x31C0 | ||
| 694 | #define WM8994_WRITE_SEQUENCER_449 0x31C1 | ||
| 695 | #define WM8994_WRITE_SEQUENCER_450 0x31C2 | ||
| 696 | #define WM8994_WRITE_SEQUENCER_451 0x31C3 | ||
| 697 | #define WM8994_WRITE_SEQUENCER_452 0x31C4 | ||
| 698 | #define WM8994_WRITE_SEQUENCER_453 0x31C5 | ||
| 699 | #define WM8994_WRITE_SEQUENCER_454 0x31C6 | ||
| 700 | #define WM8994_WRITE_SEQUENCER_455 0x31C7 | ||
| 701 | #define WM8994_WRITE_SEQUENCER_456 0x31C8 | ||
| 702 | #define WM8994_WRITE_SEQUENCER_457 0x31C9 | ||
| 703 | #define WM8994_WRITE_SEQUENCER_458 0x31CA | ||
| 704 | #define WM8994_WRITE_SEQUENCER_459 0x31CB | ||
| 705 | #define WM8994_WRITE_SEQUENCER_460 0x31CC | ||
| 706 | #define WM8994_WRITE_SEQUENCER_461 0x31CD | ||
| 707 | #define WM8994_WRITE_SEQUENCER_462 0x31CE | ||
| 708 | #define WM8994_WRITE_SEQUENCER_463 0x31CF | ||
| 709 | #define WM8994_WRITE_SEQUENCER_464 0x31D0 | ||
| 710 | #define WM8994_WRITE_SEQUENCER_465 0x31D1 | ||
| 711 | #define WM8994_WRITE_SEQUENCER_466 0x31D2 | ||
| 712 | #define WM8994_WRITE_SEQUENCER_467 0x31D3 | ||
| 713 | #define WM8994_WRITE_SEQUENCER_468 0x31D4 | ||
| 714 | #define WM8994_WRITE_SEQUENCER_469 0x31D5 | ||
| 715 | #define WM8994_WRITE_SEQUENCER_470 0x31D6 | ||
| 716 | #define WM8994_WRITE_SEQUENCER_471 0x31D7 | ||
| 717 | #define WM8994_WRITE_SEQUENCER_472 0x31D8 | ||
| 718 | #define WM8994_WRITE_SEQUENCER_473 0x31D9 | ||
| 719 | #define WM8994_WRITE_SEQUENCER_474 0x31DA | ||
| 720 | #define WM8994_WRITE_SEQUENCER_475 0x31DB | ||
| 721 | #define WM8994_WRITE_SEQUENCER_476 0x31DC | ||
| 722 | #define WM8994_WRITE_SEQUENCER_477 0x31DD | ||
| 723 | #define WM8994_WRITE_SEQUENCER_478 0x31DE | ||
| 724 | #define WM8994_WRITE_SEQUENCER_479 0x31DF | ||
| 725 | #define WM8994_WRITE_SEQUENCER_480 0x31E0 | ||
| 726 | #define WM8994_WRITE_SEQUENCER_481 0x31E1 | ||
| 727 | #define WM8994_WRITE_SEQUENCER_482 0x31E2 | ||
| 728 | #define WM8994_WRITE_SEQUENCER_483 0x31E3 | ||
| 729 | #define WM8994_WRITE_SEQUENCER_484 0x31E4 | ||
| 730 | #define WM8994_WRITE_SEQUENCER_485 0x31E5 | ||
| 731 | #define WM8994_WRITE_SEQUENCER_486 0x31E6 | ||
| 732 | #define WM8994_WRITE_SEQUENCER_487 0x31E7 | ||
| 733 | #define WM8994_WRITE_SEQUENCER_488 0x31E8 | ||
| 734 | #define WM8994_WRITE_SEQUENCER_489 0x31E9 | ||
| 735 | #define WM8994_WRITE_SEQUENCER_490 0x31EA | ||
| 736 | #define WM8994_WRITE_SEQUENCER_491 0x31EB | ||
| 737 | #define WM8994_WRITE_SEQUENCER_492 0x31EC | ||
| 738 | #define WM8994_WRITE_SEQUENCER_493 0x31ED | ||
| 739 | #define WM8994_WRITE_SEQUENCER_494 0x31EE | ||
| 740 | #define WM8994_WRITE_SEQUENCER_495 0x31EF | ||
| 741 | #define WM8994_WRITE_SEQUENCER_496 0x31F0 | ||
| 742 | #define WM8994_WRITE_SEQUENCER_497 0x31F1 | ||
| 743 | #define WM8994_WRITE_SEQUENCER_498 0x31F2 | ||
| 744 | #define WM8994_WRITE_SEQUENCER_499 0x31F3 | ||
| 745 | #define WM8994_WRITE_SEQUENCER_500 0x31F4 | ||
| 746 | #define WM8994_WRITE_SEQUENCER_501 0x31F5 | ||
| 747 | #define WM8994_WRITE_SEQUENCER_502 0x31F6 | ||
| 748 | #define WM8994_WRITE_SEQUENCER_503 0x31F7 | ||
| 749 | #define WM8994_WRITE_SEQUENCER_504 0x31F8 | ||
| 750 | #define WM8994_WRITE_SEQUENCER_505 0x31F9 | ||
| 751 | #define WM8994_WRITE_SEQUENCER_506 0x31FA | ||
| 752 | #define WM8994_WRITE_SEQUENCER_507 0x31FB | ||
| 753 | #define WM8994_WRITE_SEQUENCER_508 0x31FC | ||
| 754 | #define WM8994_WRITE_SEQUENCER_509 0x31FD | ||
| 755 | #define WM8994_WRITE_SEQUENCER_510 0x31FE | ||
| 756 | #define WM8994_WRITE_SEQUENCER_511 0x31FF | ||
| 757 | |||
| 758 | #define WM8994_REGISTER_COUNT 736 | ||
| 759 | #define WM8994_MAX_REGISTER 0x31FF | ||
| 760 | #define WM8994_MAX_CACHED_REGISTER 0x749 | ||
| 761 | |||
| 762 | /* | ||
| 763 | * Field Definitions. | ||
| 764 | */ | ||
| 765 | |||
| 766 | /* | ||
| 767 | * R0 (0x00) - Software Reset | ||
| 768 | */ | ||
| 769 | #define WM8994_SW_RESET_MASK 0xFFFF /* SW_RESET - [15:0] */ | ||
| 770 | #define WM8994_SW_RESET_SHIFT 0 /* SW_RESET - [15:0] */ | ||
| 771 | #define WM8994_SW_RESET_WIDTH 16 /* SW_RESET - [15:0] */ | ||
| 772 | |||
| 773 | /* | ||
| 774 | * R1 (0x01) - Power Management (1) | ||
| 775 | */ | ||
| 776 | #define WM8994_SPKOUTR_ENA 0x2000 /* SPKOUTR_ENA */ | ||
| 777 | #define WM8994_SPKOUTR_ENA_MASK 0x2000 /* SPKOUTR_ENA */ | ||
| 778 | #define WM8994_SPKOUTR_ENA_SHIFT 13 /* SPKOUTR_ENA */ | ||
| 779 | #define WM8994_SPKOUTR_ENA_WIDTH 1 /* SPKOUTR_ENA */ | ||
| 780 | #define WM8994_SPKOUTL_ENA 0x1000 /* SPKOUTL_ENA */ | ||
| 781 | #define WM8994_SPKOUTL_ENA_MASK 0x1000 /* SPKOUTL_ENA */ | ||
| 782 | #define WM8994_SPKOUTL_ENA_SHIFT 12 /* SPKOUTL_ENA */ | ||
| 783 | #define WM8994_SPKOUTL_ENA_WIDTH 1 /* SPKOUTL_ENA */ | ||
| 784 | #define WM8994_HPOUT2_ENA 0x0800 /* HPOUT2_ENA */ | ||
| 785 | #define WM8994_HPOUT2_ENA_MASK 0x0800 /* HPOUT2_ENA */ | ||
| 786 | #define WM8994_HPOUT2_ENA_SHIFT 11 /* HPOUT2_ENA */ | ||
| 787 | #define WM8994_HPOUT2_ENA_WIDTH 1 /* HPOUT2_ENA */ | ||
| 788 | #define WM8994_HPOUT1L_ENA 0x0200 /* HPOUT1L_ENA */ | ||
| 789 | #define WM8994_HPOUT1L_ENA_MASK 0x0200 /* HPOUT1L_ENA */ | ||
| 790 | #define WM8994_HPOUT1L_ENA_SHIFT 9 /* HPOUT1L_ENA */ | ||
| 791 | #define WM8994_HPOUT1L_ENA_WIDTH 1 /* HPOUT1L_ENA */ | ||
| 792 | #define WM8994_HPOUT1R_ENA 0x0100 /* HPOUT1R_ENA */ | ||
| 793 | #define WM8994_HPOUT1R_ENA_MASK 0x0100 /* HPOUT1R_ENA */ | ||
| 794 | #define WM8994_HPOUT1R_ENA_SHIFT 8 /* HPOUT1R_ENA */ | ||
| 795 | #define WM8994_HPOUT1R_ENA_WIDTH 1 /* HPOUT1R_ENA */ | ||
| 796 | #define WM8994_MICB2_ENA 0x0020 /* MICB2_ENA */ | ||
| 797 | #define WM8994_MICB2_ENA_MASK 0x0020 /* MICB2_ENA */ | ||
| 798 | #define WM8994_MICB2_ENA_SHIFT 5 /* MICB2_ENA */ | ||
| 799 | #define WM8994_MICB2_ENA_WIDTH 1 /* MICB2_ENA */ | ||
| 800 | #define WM8994_MICB1_ENA 0x0010 /* MICB1_ENA */ | ||
| 801 | #define WM8994_MICB1_ENA_MASK 0x0010 /* MICB1_ENA */ | ||
| 802 | #define WM8994_MICB1_ENA_SHIFT 4 /* MICB1_ENA */ | ||
| 803 | #define WM8994_MICB1_ENA_WIDTH 1 /* MICB1_ENA */ | ||
| 804 | #define WM8994_VMID_SEL_MASK 0x0006 /* VMID_SEL - [2:1] */ | ||
| 805 | #define WM8994_VMID_SEL_SHIFT 1 /* VMID_SEL - [2:1] */ | ||
| 806 | #define WM8994_VMID_SEL_WIDTH 2 /* VMID_SEL - [2:1] */ | ||
| 807 | #define WM8994_BIAS_ENA 0x0001 /* BIAS_ENA */ | ||
| 808 | #define WM8994_BIAS_ENA_MASK 0x0001 /* BIAS_ENA */ | ||
| 809 | #define WM8994_BIAS_ENA_SHIFT 0 /* BIAS_ENA */ | ||
| 810 | #define WM8994_BIAS_ENA_WIDTH 1 /* BIAS_ENA */ | ||
| 811 | |||
| 812 | /* | ||
| 813 | * R2 (0x02) - Power Management (2) | ||
| 814 | */ | ||
| 815 | #define WM8994_TSHUT_ENA 0x4000 /* TSHUT_ENA */ | ||
| 816 | #define WM8994_TSHUT_ENA_MASK 0x4000 /* TSHUT_ENA */ | ||
| 817 | #define WM8994_TSHUT_ENA_SHIFT 14 /* TSHUT_ENA */ | ||
| 818 | #define WM8994_TSHUT_ENA_WIDTH 1 /* TSHUT_ENA */ | ||
| 819 | #define WM8994_TSHUT_OPDIS 0x2000 /* TSHUT_OPDIS */ | ||
| 820 | #define WM8994_TSHUT_OPDIS_MASK 0x2000 /* TSHUT_OPDIS */ | ||
| 821 | #define WM8994_TSHUT_OPDIS_SHIFT 13 /* TSHUT_OPDIS */ | ||
| 822 | #define WM8994_TSHUT_OPDIS_WIDTH 1 /* TSHUT_OPDIS */ | ||
| 823 | #define WM8994_OPCLK_ENA 0x0800 /* OPCLK_ENA */ | ||
| 824 | #define WM8994_OPCLK_ENA_MASK 0x0800 /* OPCLK_ENA */ | ||
| 825 | #define WM8994_OPCLK_ENA_SHIFT 11 /* OPCLK_ENA */ | ||
| 826 | #define WM8994_OPCLK_ENA_WIDTH 1 /* OPCLK_ENA */ | ||
| 827 | #define WM8994_MIXINL_ENA 0x0200 /* MIXINL_ENA */ | ||
| 828 | #define WM8994_MIXINL_ENA_MASK 0x0200 /* MIXINL_ENA */ | ||
| 829 | #define WM8994_MIXINL_ENA_SHIFT 9 /* MIXINL_ENA */ | ||
| 830 | #define WM8994_MIXINL_ENA_WIDTH 1 /* MIXINL_ENA */ | ||
| 831 | #define WM8994_MIXINR_ENA 0x0100 /* MIXINR_ENA */ | ||
| 832 | #define WM8994_MIXINR_ENA_MASK 0x0100 /* MIXINR_ENA */ | ||
| 833 | #define WM8994_MIXINR_ENA_SHIFT 8 /* MIXINR_ENA */ | ||
| 834 | #define WM8994_MIXINR_ENA_WIDTH 1 /* MIXINR_ENA */ | ||
| 835 | #define WM8994_IN2L_ENA 0x0080 /* IN2L_ENA */ | ||
| 836 | #define WM8994_IN2L_ENA_MASK 0x0080 /* IN2L_ENA */ | ||
| 837 | #define WM8994_IN2L_ENA_SHIFT 7 /* IN2L_ENA */ | ||
| 838 | #define WM8994_IN2L_ENA_WIDTH 1 /* IN2L_ENA */ | ||
| 839 | #define WM8994_IN1L_ENA 0x0040 /* IN1L_ENA */ | ||
| 840 | #define WM8994_IN1L_ENA_MASK 0x0040 /* IN1L_ENA */ | ||
| 841 | #define WM8994_IN1L_ENA_SHIFT 6 /* IN1L_ENA */ | ||
| 842 | #define WM8994_IN1L_ENA_WIDTH 1 /* IN1L_ENA */ | ||
| 843 | #define WM8994_IN2R_ENA 0x0020 /* IN2R_ENA */ | ||
| 844 | #define WM8994_IN2R_ENA_MASK 0x0020 /* IN2R_ENA */ | ||
| 845 | #define WM8994_IN2R_ENA_SHIFT 5 /* IN2R_ENA */ | ||
| 846 | #define WM8994_IN2R_ENA_WIDTH 1 /* IN2R_ENA */ | ||
| 847 | #define WM8994_IN1R_ENA 0x0010 /* IN1R_ENA */ | ||
| 848 | #define WM8994_IN1R_ENA_MASK 0x0010 /* IN1R_ENA */ | ||
| 849 | #define WM8994_IN1R_ENA_SHIFT 4 /* IN1R_ENA */ | ||
| 850 | #define WM8994_IN1R_ENA_WIDTH 1 /* IN1R_ENA */ | ||
| 851 | |||
| 852 | /* | ||
| 853 | * R3 (0x03) - Power Management (3) | ||
| 854 | */ | ||
| 855 | #define WM8994_LINEOUT1N_ENA 0x2000 /* LINEOUT1N_ENA */ | ||
| 856 | #define WM8994_LINEOUT1N_ENA_MASK 0x2000 /* LINEOUT1N_ENA */ | ||
| 857 | #define WM8994_LINEOUT1N_ENA_SHIFT 13 /* LINEOUT1N_ENA */ | ||
| 858 | #define WM8994_LINEOUT1N_ENA_WIDTH 1 /* LINEOUT1N_ENA */ | ||
| 859 | #define WM8994_LINEOUT1P_ENA 0x1000 /* LINEOUT1P_ENA */ | ||
| 860 | #define WM8994_LINEOUT1P_ENA_MASK 0x1000 /* LINEOUT1P_ENA */ | ||
| 861 | #define WM8994_LINEOUT1P_ENA_SHIFT 12 /* LINEOUT1P_ENA */ | ||
| 862 | #define WM8994_LINEOUT1P_ENA_WIDTH 1 /* LINEOUT1P_ENA */ | ||
| 863 | #define WM8994_LINEOUT2N_ENA 0x0800 /* LINEOUT2N_ENA */ | ||
| 864 | #define WM8994_LINEOUT2N_ENA_MASK 0x0800 /* LINEOUT2N_ENA */ | ||
| 865 | #define WM8994_LINEOUT2N_ENA_SHIFT 11 /* LINEOUT2N_ENA */ | ||
| 866 | #define WM8994_LINEOUT2N_ENA_WIDTH 1 /* LINEOUT2N_ENA */ | ||
| 867 | #define WM8994_LINEOUT2P_ENA 0x0400 /* LINEOUT2P_ENA */ | ||
| 868 | #define WM8994_LINEOUT2P_ENA_MASK 0x0400 /* LINEOUT2P_ENA */ | ||
| 869 | #define WM8994_LINEOUT2P_ENA_SHIFT 10 /* LINEOUT2P_ENA */ | ||
| 870 | #define WM8994_LINEOUT2P_ENA_WIDTH 1 /* LINEOUT2P_ENA */ | ||
| 871 | #define WM8994_SPKRVOL_ENA 0x0200 /* SPKRVOL_ENA */ | ||
| 872 | #define WM8994_SPKRVOL_ENA_MASK 0x0200 /* SPKRVOL_ENA */ | ||
| 873 | #define WM8994_SPKRVOL_ENA_SHIFT 9 /* SPKRVOL_ENA */ | ||
| 874 | #define WM8994_SPKRVOL_ENA_WIDTH 1 /* SPKRVOL_ENA */ | ||
| 875 | #define WM8994_SPKLVOL_ENA 0x0100 /* SPKLVOL_ENA */ | ||
| 876 | #define WM8994_SPKLVOL_ENA_MASK 0x0100 /* SPKLVOL_ENA */ | ||
| 877 | #define WM8994_SPKLVOL_ENA_SHIFT 8 /* SPKLVOL_ENA */ | ||
| 878 | #define WM8994_SPKLVOL_ENA_WIDTH 1 /* SPKLVOL_ENA */ | ||
| 879 | #define WM8994_MIXOUTLVOL_ENA 0x0080 /* MIXOUTLVOL_ENA */ | ||
| 880 | #define WM8994_MIXOUTLVOL_ENA_MASK 0x0080 /* MIXOUTLVOL_ENA */ | ||
| 881 | #define WM8994_MIXOUTLVOL_ENA_SHIFT 7 /* MIXOUTLVOL_ENA */ | ||
| 882 | #define WM8994_MIXOUTLVOL_ENA_WIDTH 1 /* MIXOUTLVOL_ENA */ | ||
| 883 | #define WM8994_MIXOUTRVOL_ENA 0x0040 /* MIXOUTRVOL_ENA */ | ||
| 884 | #define WM8994_MIXOUTRVOL_ENA_MASK 0x0040 /* MIXOUTRVOL_ENA */ | ||
| 885 | #define WM8994_MIXOUTRVOL_ENA_SHIFT 6 /* MIXOUTRVOL_ENA */ | ||
| 886 | #define WM8994_MIXOUTRVOL_ENA_WIDTH 1 /* MIXOUTRVOL_ENA */ | ||
| 887 | #define WM8994_MIXOUTL_ENA 0x0020 /* MIXOUTL_ENA */ | ||
| 888 | #define WM8994_MIXOUTL_ENA_MASK 0x0020 /* MIXOUTL_ENA */ | ||
| 889 | #define WM8994_MIXOUTL_ENA_SHIFT 5 /* MIXOUTL_ENA */ | ||
| 890 | #define WM8994_MIXOUTL_ENA_WIDTH 1 /* MIXOUTL_ENA */ | ||
| 891 | #define WM8994_MIXOUTR_ENA 0x0010 /* MIXOUTR_ENA */ | ||
| 892 | #define WM8994_MIXOUTR_ENA_MASK 0x0010 /* MIXOUTR_ENA */ | ||
| 893 | #define WM8994_MIXOUTR_ENA_SHIFT 4 /* MIXOUTR_ENA */ | ||
| 894 | #define WM8994_MIXOUTR_ENA_WIDTH 1 /* MIXOUTR_ENA */ | ||
| 895 | |||
| 896 | /* | ||
| 897 | * R4 (0x04) - Power Management (4) | ||
| 898 | */ | ||
| 899 | #define WM8994_AIF2ADCL_ENA 0x2000 /* AIF2ADCL_ENA */ | ||
| 900 | #define WM8994_AIF2ADCL_ENA_MASK 0x2000 /* AIF2ADCL_ENA */ | ||
| 901 | #define WM8994_AIF2ADCL_ENA_SHIFT 13 /* AIF2ADCL_ENA */ | ||
| 902 | #define WM8994_AIF2ADCL_ENA_WIDTH 1 /* AIF2ADCL_ENA */ | ||
| 903 | #define WM8994_AIF2ADCR_ENA 0x1000 /* AIF2ADCR_ENA */ | ||
| 904 | #define WM8994_AIF2ADCR_ENA_MASK 0x1000 /* AIF2ADCR_ENA */ | ||
| 905 | #define WM8994_AIF2ADCR_ENA_SHIFT 12 /* AIF2ADCR_ENA */ | ||
| 906 | #define WM8994_AIF2ADCR_ENA_WIDTH 1 /* AIF2ADCR_ENA */ | ||
| 907 | #define WM8994_AIF1ADC2L_ENA 0x0800 /* AIF1ADC2L_ENA */ | ||
| 908 | #define WM8994_AIF1ADC2L_ENA_MASK 0x0800 /* AIF1ADC2L_ENA */ | ||
| 909 | #define WM8994_AIF1ADC2L_ENA_SHIFT 11 /* AIF1ADC2L_ENA */ | ||
| 910 | #define WM8994_AIF1ADC2L_ENA_WIDTH 1 /* AIF1ADC2L_ENA */ | ||
| 911 | #define WM8994_AIF1ADC2R_ENA 0x0400 /* AIF1ADC2R_ENA */ | ||
| 912 | #define WM8994_AIF1ADC2R_ENA_MASK 0x0400 /* AIF1ADC2R_ENA */ | ||
| 913 | #define WM8994_AIF1ADC2R_ENA_SHIFT 10 /* AIF1ADC2R_ENA */ | ||
| 914 | #define WM8994_AIF1ADC2R_ENA_WIDTH 1 /* AIF1ADC2R_ENA */ | ||
| 915 | #define WM8994_AIF1ADC1L_ENA 0x0200 /* AIF1ADC1L_ENA */ | ||
| 916 | #define WM8994_AIF1ADC1L_ENA_MASK 0x0200 /* AIF1ADC1L_ENA */ | ||
| 917 | #define WM8994_AIF1ADC1L_ENA_SHIFT 9 /* AIF1ADC1L_ENA */ | ||
| 918 | #define WM8994_AIF1ADC1L_ENA_WIDTH 1 /* AIF1ADC1L_ENA */ | ||
| 919 | #define WM8994_AIF1ADC1R_ENA 0x0100 /* AIF1ADC1R_ENA */ | ||
| 920 | #define WM8994_AIF1ADC1R_ENA_MASK 0x0100 /* AIF1ADC1R_ENA */ | ||
| 921 | #define WM8994_AIF1ADC1R_ENA_SHIFT 8 /* AIF1ADC1R_ENA */ | ||
| 922 | #define WM8994_AIF1ADC1R_ENA_WIDTH 1 /* AIF1ADC1R_ENA */ | ||
| 923 | #define WM8994_DMIC2L_ENA 0x0020 /* DMIC2L_ENA */ | ||
| 924 | #define WM8994_DMIC2L_ENA_MASK 0x0020 /* DMIC2L_ENA */ | ||
| 925 | #define WM8994_DMIC2L_ENA_SHIFT 5 /* DMIC2L_ENA */ | ||
| 926 | #define WM8994_DMIC2L_ENA_WIDTH 1 /* DMIC2L_ENA */ | ||
| 927 | #define WM8994_DMIC2R_ENA 0x0010 /* DMIC2R_ENA */ | ||
| 928 | #define WM8994_DMIC2R_ENA_MASK 0x0010 /* DMIC2R_ENA */ | ||
| 929 | #define WM8994_DMIC2R_ENA_SHIFT 4 /* DMIC2R_ENA */ | ||
| 930 | #define WM8994_DMIC2R_ENA_WIDTH 1 /* DMIC2R_ENA */ | ||
| 931 | #define WM8994_DMIC1L_ENA 0x0008 /* DMIC1L_ENA */ | ||
| 932 | #define WM8994_DMIC1L_ENA_MASK 0x0008 /* DMIC1L_ENA */ | ||
| 933 | #define WM8994_DMIC1L_ENA_SHIFT 3 /* DMIC1L_ENA */ | ||
| 934 | #define WM8994_DMIC1L_ENA_WIDTH 1 /* DMIC1L_ENA */ | ||
| 935 | #define WM8994_DMIC1R_ENA 0x0004 /* DMIC1R_ENA */ | ||
| 936 | #define WM8994_DMIC1R_ENA_MASK 0x0004 /* DMIC1R_ENA */ | ||
| 937 | #define WM8994_DMIC1R_ENA_SHIFT 2 /* DMIC1R_ENA */ | ||
| 938 | #define WM8994_DMIC1R_ENA_WIDTH 1 /* DMIC1R_ENA */ | ||
| 939 | #define WM8994_ADCL_ENA 0x0002 /* ADCL_ENA */ | ||
| 940 | #define WM8994_ADCL_ENA_MASK 0x0002 /* ADCL_ENA */ | ||
| 941 | #define WM8994_ADCL_ENA_SHIFT 1 /* ADCL_ENA */ | ||
| 942 | #define WM8994_ADCL_ENA_WIDTH 1 /* ADCL_ENA */ | ||
| 943 | #define WM8994_ADCR_ENA 0x0001 /* ADCR_ENA */ | ||
| 944 | #define WM8994_ADCR_ENA_MASK 0x0001 /* ADCR_ENA */ | ||
| 945 | #define WM8994_ADCR_ENA_SHIFT 0 /* ADCR_ENA */ | ||
| 946 | #define WM8994_ADCR_ENA_WIDTH 1 /* ADCR_ENA */ | ||
| 947 | |||
| 948 | /* | ||
| 949 | * R5 (0x05) - Power Management (5) | ||
| 950 | */ | ||
| 951 | #define WM8994_AIF2DACL_ENA 0x2000 /* AIF2DACL_ENA */ | ||
| 952 | #define WM8994_AIF2DACL_ENA_MASK 0x2000 /* AIF2DACL_ENA */ | ||
| 953 | #define WM8994_AIF2DACL_ENA_SHIFT 13 /* AIF2DACL_ENA */ | ||
| 954 | #define WM8994_AIF2DACL_ENA_WIDTH 1 /* AIF2DACL_ENA */ | ||
| 955 | #define WM8994_AIF2DACR_ENA 0x1000 /* AIF2DACR_ENA */ | ||
| 956 | #define WM8994_AIF2DACR_ENA_MASK 0x1000 /* AIF2DACR_ENA */ | ||
| 957 | #define WM8994_AIF2DACR_ENA_SHIFT 12 /* AIF2DACR_ENA */ | ||
| 958 | #define WM8994_AIF2DACR_ENA_WIDTH 1 /* AIF2DACR_ENA */ | ||
| 959 | #define WM8994_AIF1DAC2L_ENA 0x0800 /* AIF1DAC2L_ENA */ | ||
| 960 | #define WM8994_AIF1DAC2L_ENA_MASK 0x0800 /* AIF1DAC2L_ENA */ | ||
| 961 | #define WM8994_AIF1DAC2L_ENA_SHIFT 11 /* AIF1DAC2L_ENA */ | ||
| 962 | #define WM8994_AIF1DAC2L_ENA_WIDTH 1 /* AIF1DAC2L_ENA */ | ||
| 963 | #define WM8994_AIF1DAC2R_ENA 0x0400 /* AIF1DAC2R_ENA */ | ||
| 964 | #define WM8994_AIF1DAC2R_ENA_MASK 0x0400 /* AIF1DAC2R_ENA */ | ||
| 965 | #define WM8994_AIF1DAC2R_ENA_SHIFT 10 /* AIF1DAC2R_ENA */ | ||
| 966 | #define WM8994_AIF1DAC2R_ENA_WIDTH 1 /* AIF1DAC2R_ENA */ | ||
| 967 | #define WM8994_AIF1DAC1L_ENA 0x0200 /* AIF1DAC1L_ENA */ | ||
| 968 | #define WM8994_AIF1DAC1L_ENA_MASK 0x0200 /* AIF1DAC1L_ENA */ | ||
| 969 | #define WM8994_AIF1DAC1L_ENA_SHIFT 9 /* AIF1DAC1L_ENA */ | ||
| 970 | #define WM8994_AIF1DAC1L_ENA_WIDTH 1 /* AIF1DAC1L_ENA */ | ||
| 971 | #define WM8994_AIF1DAC1R_ENA 0x0100 /* AIF1DAC1R_ENA */ | ||
| 972 | #define WM8994_AIF1DAC1R_ENA_MASK 0x0100 /* AIF1DAC1R_ENA */ | ||
| 973 | #define WM8994_AIF1DAC1R_ENA_SHIFT 8 /* AIF1DAC1R_ENA */ | ||
| 974 | #define WM8994_AIF1DAC1R_ENA_WIDTH 1 /* AIF1DAC1R_ENA */ | ||
| 975 | #define WM8994_DAC2L_ENA 0x0008 /* DAC2L_ENA */ | ||
| 976 | #define WM8994_DAC2L_ENA_MASK 0x0008 /* DAC2L_ENA */ | ||
| 977 | #define WM8994_DAC2L_ENA_SHIFT 3 /* DAC2L_ENA */ | ||
| 978 | #define WM8994_DAC2L_ENA_WIDTH 1 /* DAC2L_ENA */ | ||
| 979 | #define WM8994_DAC2R_ENA 0x0004 /* DAC2R_ENA */ | ||
| 980 | #define WM8994_DAC2R_ENA_MASK 0x0004 /* DAC2R_ENA */ | ||
| 981 | #define WM8994_DAC2R_ENA_SHIFT 2 /* DAC2R_ENA */ | ||
| 982 | #define WM8994_DAC2R_ENA_WIDTH 1 /* DAC2R_ENA */ | ||
| 983 | #define WM8994_DAC1L_ENA 0x0002 /* DAC1L_ENA */ | ||
| 984 | #define WM8994_DAC1L_ENA_MASK 0x0002 /* DAC1L_ENA */ | ||
| 985 | #define WM8994_DAC1L_ENA_SHIFT 1 /* DAC1L_ENA */ | ||
| 986 | #define WM8994_DAC1L_ENA_WIDTH 1 /* DAC1L_ENA */ | ||
| 987 | #define WM8994_DAC1R_ENA 0x0001 /* DAC1R_ENA */ | ||
| 988 | #define WM8994_DAC1R_ENA_MASK 0x0001 /* DAC1R_ENA */ | ||
| 989 | #define WM8994_DAC1R_ENA_SHIFT 0 /* DAC1R_ENA */ | ||
| 990 | #define WM8994_DAC1R_ENA_WIDTH 1 /* DAC1R_ENA */ | ||
| 991 | |||
| 992 | /* | ||
| 993 | * R6 (0x06) - Power Management (6) | ||
| 994 | */ | ||
| 995 | #define WM8994_AIF3_TRI 0x0020 /* AIF3_TRI */ | ||
| 996 | #define WM8994_AIF3_TRI_MASK 0x0020 /* AIF3_TRI */ | ||
| 997 | #define WM8994_AIF3_TRI_SHIFT 5 /* AIF3_TRI */ | ||
| 998 | #define WM8994_AIF3_TRI_WIDTH 1 /* AIF3_TRI */ | ||
| 999 | #define WM8994_AIF3_ADCDAT_SRC_MASK 0x0018 /* AIF3_ADCDAT_SRC - [4:3] */ | ||
| 1000 | #define WM8994_AIF3_ADCDAT_SRC_SHIFT 3 /* AIF3_ADCDAT_SRC - [4:3] */ | ||
| 1001 | #define WM8994_AIF3_ADCDAT_SRC_WIDTH 2 /* AIF3_ADCDAT_SRC - [4:3] */ | ||
| 1002 | #define WM8994_AIF2_ADCDAT_SRC 0x0004 /* AIF2_ADCDAT_SRC */ | ||
| 1003 | #define WM8994_AIF2_ADCDAT_SRC_MASK 0x0004 /* AIF2_ADCDAT_SRC */ | ||
| 1004 | #define WM8994_AIF2_ADCDAT_SRC_SHIFT 2 /* AIF2_ADCDAT_SRC */ | ||
| 1005 | #define WM8994_AIF2_ADCDAT_SRC_WIDTH 1 /* AIF2_ADCDAT_SRC */ | ||
| 1006 | #define WM8994_AIF2_DACDAT_SRC 0x0002 /* AIF2_DACDAT_SRC */ | ||
| 1007 | #define WM8994_AIF2_DACDAT_SRC_MASK 0x0002 /* AIF2_DACDAT_SRC */ | ||
| 1008 | #define WM8994_AIF2_DACDAT_SRC_SHIFT 1 /* AIF2_DACDAT_SRC */ | ||
| 1009 | #define WM8994_AIF2_DACDAT_SRC_WIDTH 1 /* AIF2_DACDAT_SRC */ | ||
| 1010 | #define WM8994_AIF1_DACDAT_SRC 0x0001 /* AIF1_DACDAT_SRC */ | ||
| 1011 | #define WM8994_AIF1_DACDAT_SRC_MASK 0x0001 /* AIF1_DACDAT_SRC */ | ||
| 1012 | #define WM8994_AIF1_DACDAT_SRC_SHIFT 0 /* AIF1_DACDAT_SRC */ | ||
| 1013 | #define WM8994_AIF1_DACDAT_SRC_WIDTH 1 /* AIF1_DACDAT_SRC */ | ||
| 1014 | |||
| 1015 | /* | ||
| 1016 | * R21 (0x15) - Input Mixer (1) | ||
| 1017 | */ | ||
| 1018 | #define WM8994_IN1RP_MIXINR_BOOST 0x0100 /* IN1RP_MIXINR_BOOST */ | ||
| 1019 | #define WM8994_IN1RP_MIXINR_BOOST_MASK 0x0100 /* IN1RP_MIXINR_BOOST */ | ||
| 1020 | #define WM8994_IN1RP_MIXINR_BOOST_SHIFT 8 /* IN1RP_MIXINR_BOOST */ | ||
| 1021 | #define WM8994_IN1RP_MIXINR_BOOST_WIDTH 1 /* IN1RP_MIXINR_BOOST */ | ||
| 1022 | #define WM8994_IN1LP_MIXINL_BOOST 0x0080 /* IN1LP_MIXINL_BOOST */ | ||
| 1023 | #define WM8994_IN1LP_MIXINL_BOOST_MASK 0x0080 /* IN1LP_MIXINL_BOOST */ | ||
| 1024 | #define WM8994_IN1LP_MIXINL_BOOST_SHIFT 7 /* IN1LP_MIXINL_BOOST */ | ||
| 1025 | #define WM8994_IN1LP_MIXINL_BOOST_WIDTH 1 /* IN1LP_MIXINL_BOOST */ | ||
| 1026 | #define WM8994_INPUTS_CLAMP 0x0040 /* INPUTS_CLAMP */ | ||
| 1027 | #define WM8994_INPUTS_CLAMP_MASK 0x0040 /* INPUTS_CLAMP */ | ||
| 1028 | #define WM8994_INPUTS_CLAMP_SHIFT 6 /* INPUTS_CLAMP */ | ||
| 1029 | #define WM8994_INPUTS_CLAMP_WIDTH 1 /* INPUTS_CLAMP */ | ||
| 1030 | |||
| 1031 | /* | ||
| 1032 | * R24 (0x18) - Left Line Input 1&2 Volume | ||
| 1033 | */ | ||
| 1034 | #define WM8994_IN1_VU 0x0100 /* IN1_VU */ | ||
| 1035 | #define WM8994_IN1_VU_MASK 0x0100 /* IN1_VU */ | ||
| 1036 | #define WM8994_IN1_VU_SHIFT 8 /* IN1_VU */ | ||
| 1037 | #define WM8994_IN1_VU_WIDTH 1 /* IN1_VU */ | ||
| 1038 | #define WM8994_IN1L_MUTE 0x0080 /* IN1L_MUTE */ | ||
| 1039 | #define WM8994_IN1L_MUTE_MASK 0x0080 /* IN1L_MUTE */ | ||
| 1040 | #define WM8994_IN1L_MUTE_SHIFT 7 /* IN1L_MUTE */ | ||
| 1041 | #define WM8994_IN1L_MUTE_WIDTH 1 /* IN1L_MUTE */ | ||
| 1042 | #define WM8994_IN1L_ZC 0x0040 /* IN1L_ZC */ | ||
| 1043 | #define WM8994_IN1L_ZC_MASK 0x0040 /* IN1L_ZC */ | ||
| 1044 | #define WM8994_IN1L_ZC_SHIFT 6 /* IN1L_ZC */ | ||
| 1045 | #define WM8994_IN1L_ZC_WIDTH 1 /* IN1L_ZC */ | ||
| 1046 | #define WM8994_IN1L_VOL_MASK 0x001F /* IN1L_VOL - [4:0] */ | ||
| 1047 | #define WM8994_IN1L_VOL_SHIFT 0 /* IN1L_VOL - [4:0] */ | ||
| 1048 | #define WM8994_IN1L_VOL_WIDTH 5 /* IN1L_VOL - [4:0] */ | ||
| 1049 | |||
| 1050 | /* | ||
| 1051 | * R25 (0x19) - Left Line Input 3&4 Volume | ||
| 1052 | */ | ||
| 1053 | #define WM8994_IN2_VU 0x0100 /* IN2_VU */ | ||
| 1054 | #define WM8994_IN2_VU_MASK 0x0100 /* IN2_VU */ | ||
| 1055 | #define WM8994_IN2_VU_SHIFT 8 /* IN2_VU */ | ||
| 1056 | #define WM8994_IN2_VU_WIDTH 1 /* IN2_VU */ | ||
| 1057 | #define WM8994_IN2L_MUTE 0x0080 /* IN2L_MUTE */ | ||
| 1058 | #define WM8994_IN2L_MUTE_MASK 0x0080 /* IN2L_MUTE */ | ||
| 1059 | #define WM8994_IN2L_MUTE_SHIFT 7 /* IN2L_MUTE */ | ||
| 1060 | #define WM8994_IN2L_MUTE_WIDTH 1 /* IN2L_MUTE */ | ||
| 1061 | #define WM8994_IN2L_ZC 0x0040 /* IN2L_ZC */ | ||
| 1062 | #define WM8994_IN2L_ZC_MASK 0x0040 /* IN2L_ZC */ | ||
| 1063 | #define WM8994_IN2L_ZC_SHIFT 6 /* IN2L_ZC */ | ||
| 1064 | #define WM8994_IN2L_ZC_WIDTH 1 /* IN2L_ZC */ | ||
| 1065 | #define WM8994_IN2L_VOL_MASK 0x001F /* IN2L_VOL - [4:0] */ | ||
| 1066 | #define WM8994_IN2L_VOL_SHIFT 0 /* IN2L_VOL - [4:0] */ | ||
| 1067 | #define WM8994_IN2L_VOL_WIDTH 5 /* IN2L_VOL - [4:0] */ | ||
| 1068 | |||
| 1069 | /* | ||
| 1070 | * R26 (0x1A) - Right Line Input 1&2 Volume | ||
| 1071 | */ | ||
| 1072 | #define WM8994_IN1_VU 0x0100 /* IN1_VU */ | ||
| 1073 | #define WM8994_IN1_VU_MASK 0x0100 /* IN1_VU */ | ||
| 1074 | #define WM8994_IN1_VU_SHIFT 8 /* IN1_VU */ | ||
| 1075 | #define WM8994_IN1_VU_WIDTH 1 /* IN1_VU */ | ||
| 1076 | #define WM8994_IN1R_MUTE 0x0080 /* IN1R_MUTE */ | ||
| 1077 | #define WM8994_IN1R_MUTE_MASK 0x0080 /* IN1R_MUTE */ | ||
| 1078 | #define WM8994_IN1R_MUTE_SHIFT 7 /* IN1R_MUTE */ | ||
| 1079 | #define WM8994_IN1R_MUTE_WIDTH 1 /* IN1R_MUTE */ | ||
| 1080 | #define WM8994_IN1R_ZC 0x0040 /* IN1R_ZC */ | ||
| 1081 | #define WM8994_IN1R_ZC_MASK 0x0040 /* IN1R_ZC */ | ||
| 1082 | #define WM8994_IN1R_ZC_SHIFT 6 /* IN1R_ZC */ | ||
| 1083 | #define WM8994_IN1R_ZC_WIDTH 1 /* IN1R_ZC */ | ||
| 1084 | #define WM8994_IN1R_VOL_MASK 0x001F /* IN1R_VOL - [4:0] */ | ||
| 1085 | #define WM8994_IN1R_VOL_SHIFT 0 /* IN1R_VOL - [4:0] */ | ||
| 1086 | #define WM8994_IN1R_VOL_WIDTH 5 /* IN1R_VOL - [4:0] */ | ||
| 1087 | |||
| 1088 | /* | ||
| 1089 | * R27 (0x1B) - Right Line Input 3&4 Volume | ||
| 1090 | */ | ||
| 1091 | #define WM8994_IN2_VU 0x0100 /* IN2_VU */ | ||
| 1092 | #define WM8994_IN2_VU_MASK 0x0100 /* IN2_VU */ | ||
| 1093 | #define WM8994_IN2_VU_SHIFT 8 /* IN2_VU */ | ||
| 1094 | #define WM8994_IN2_VU_WIDTH 1 /* IN2_VU */ | ||
| 1095 | #define WM8994_IN2R_MUTE 0x0080 /* IN2R_MUTE */ | ||
| 1096 | #define WM8994_IN2R_MUTE_MASK 0x0080 /* IN2R_MUTE */ | ||
| 1097 | #define WM8994_IN2R_MUTE_SHIFT 7 /* IN2R_MUTE */ | ||
| 1098 | #define WM8994_IN2R_MUTE_WIDTH 1 /* IN2R_MUTE */ | ||
| 1099 | #define WM8994_IN2R_ZC 0x0040 /* IN2R_ZC */ | ||
| 1100 | #define WM8994_IN2R_ZC_MASK 0x0040 /* IN2R_ZC */ | ||
| 1101 | #define WM8994_IN2R_ZC_SHIFT 6 /* IN2R_ZC */ | ||
| 1102 | #define WM8994_IN2R_ZC_WIDTH 1 /* IN2R_ZC */ | ||
| 1103 | #define WM8994_IN2R_VOL_MASK 0x001F /* IN2R_VOL - [4:0] */ | ||
| 1104 | #define WM8994_IN2R_VOL_SHIFT 0 /* IN2R_VOL - [4:0] */ | ||
| 1105 | #define WM8994_IN2R_VOL_WIDTH 5 /* IN2R_VOL - [4:0] */ | ||
| 1106 | |||
| 1107 | /* | ||
| 1108 | * R28 (0x1C) - Left Output Volume | ||
| 1109 | */ | ||
| 1110 | #define WM8994_HPOUT1_VU 0x0100 /* HPOUT1_VU */ | ||
| 1111 | #define WM8994_HPOUT1_VU_MASK 0x0100 /* HPOUT1_VU */ | ||
| 1112 | #define WM8994_HPOUT1_VU_SHIFT 8 /* HPOUT1_VU */ | ||
| 1113 | #define WM8994_HPOUT1_VU_WIDTH 1 /* HPOUT1_VU */ | ||
| 1114 | #define WM8994_HPOUT1L_ZC 0x0080 /* HPOUT1L_ZC */ | ||
| 1115 | #define WM8994_HPOUT1L_ZC_MASK 0x0080 /* HPOUT1L_ZC */ | ||
| 1116 | #define WM8994_HPOUT1L_ZC_SHIFT 7 /* HPOUT1L_ZC */ | ||
| 1117 | #define WM8994_HPOUT1L_ZC_WIDTH 1 /* HPOUT1L_ZC */ | ||
| 1118 | #define WM8994_HPOUT1L_MUTE_N 0x0040 /* HPOUT1L_MUTE_N */ | ||
| 1119 | #define WM8994_HPOUT1L_MUTE_N_MASK 0x0040 /* HPOUT1L_MUTE_N */ | ||
| 1120 | #define WM8994_HPOUT1L_MUTE_N_SHIFT 6 /* HPOUT1L_MUTE_N */ | ||
| 1121 | #define WM8994_HPOUT1L_MUTE_N_WIDTH 1 /* HPOUT1L_MUTE_N */ | ||
| 1122 | #define WM8994_HPOUT1L_VOL_MASK 0x003F /* HPOUT1L_VOL - [5:0] */ | ||
| 1123 | #define WM8994_HPOUT1L_VOL_SHIFT 0 /* HPOUT1L_VOL - [5:0] */ | ||
| 1124 | #define WM8994_HPOUT1L_VOL_WIDTH 6 /* HPOUT1L_VOL - [5:0] */ | ||
| 1125 | |||
| 1126 | /* | ||
| 1127 | * R29 (0x1D) - Right Output Volume | ||
| 1128 | */ | ||
| 1129 | #define WM8994_HPOUT1_VU 0x0100 /* HPOUT1_VU */ | ||
| 1130 | #define WM8994_HPOUT1_VU_MASK 0x0100 /* HPOUT1_VU */ | ||
| 1131 | #define WM8994_HPOUT1_VU_SHIFT 8 /* HPOUT1_VU */ | ||
| 1132 | #define WM8994_HPOUT1_VU_WIDTH 1 /* HPOUT1_VU */ | ||
| 1133 | #define WM8994_HPOUT1R_ZC 0x0080 /* HPOUT1R_ZC */ | ||
| 1134 | #define WM8994_HPOUT1R_ZC_MASK 0x0080 /* HPOUT1R_ZC */ | ||
| 1135 | #define WM8994_HPOUT1R_ZC_SHIFT 7 /* HPOUT1R_ZC */ | ||
| 1136 | #define WM8994_HPOUT1R_ZC_WIDTH 1 /* HPOUT1R_ZC */ | ||
| 1137 | #define WM8994_HPOUT1R_MUTE_N 0x0040 /* HPOUT1R_MUTE_N */ | ||
| 1138 | #define WM8994_HPOUT1R_MUTE_N_MASK 0x0040 /* HPOUT1R_MUTE_N */ | ||
| 1139 | #define WM8994_HPOUT1R_MUTE_N_SHIFT 6 /* HPOUT1R_MUTE_N */ | ||
| 1140 | #define WM8994_HPOUT1R_MUTE_N_WIDTH 1 /* HPOUT1R_MUTE_N */ | ||
| 1141 | #define WM8994_HPOUT1R_VOL_MASK 0x003F /* HPOUT1R_VOL - [5:0] */ | ||
| 1142 | #define WM8994_HPOUT1R_VOL_SHIFT 0 /* HPOUT1R_VOL - [5:0] */ | ||
| 1143 | #define WM8994_HPOUT1R_VOL_WIDTH 6 /* HPOUT1R_VOL - [5:0] */ | ||
| 1144 | |||
| 1145 | /* | ||
| 1146 | * R30 (0x1E) - Line Outputs Volume | ||
| 1147 | */ | ||
| 1148 | #define WM8994_LINEOUT1N_MUTE 0x0040 /* LINEOUT1N_MUTE */ | ||
| 1149 | #define WM8994_LINEOUT1N_MUTE_MASK 0x0040 /* LINEOUT1N_MUTE */ | ||
| 1150 | #define WM8994_LINEOUT1N_MUTE_SHIFT 6 /* LINEOUT1N_MUTE */ | ||
| 1151 | #define WM8994_LINEOUT1N_MUTE_WIDTH 1 /* LINEOUT1N_MUTE */ | ||
| 1152 | #define WM8994_LINEOUT1P_MUTE 0x0020 /* LINEOUT1P_MUTE */ | ||
| 1153 | #define WM8994_LINEOUT1P_MUTE_MASK 0x0020 /* LINEOUT1P_MUTE */ | ||
| 1154 | #define WM8994_LINEOUT1P_MUTE_SHIFT 5 /* LINEOUT1P_MUTE */ | ||
| 1155 | #define WM8994_LINEOUT1P_MUTE_WIDTH 1 /* LINEOUT1P_MUTE */ | ||
| 1156 | #define WM8994_LINEOUT1_VOL 0x0010 /* LINEOUT1_VOL */ | ||
| 1157 | #define WM8994_LINEOUT1_VOL_MASK 0x0010 /* LINEOUT1_VOL */ | ||
| 1158 | #define WM8994_LINEOUT1_VOL_SHIFT 4 /* LINEOUT1_VOL */ | ||
| 1159 | #define WM8994_LINEOUT1_VOL_WIDTH 1 /* LINEOUT1_VOL */ | ||
| 1160 | #define WM8994_LINEOUT2N_MUTE 0x0004 /* LINEOUT2N_MUTE */ | ||
| 1161 | #define WM8994_LINEOUT2N_MUTE_MASK 0x0004 /* LINEOUT2N_MUTE */ | ||
| 1162 | #define WM8994_LINEOUT2N_MUTE_SHIFT 2 /* LINEOUT2N_MUTE */ | ||
| 1163 | #define WM8994_LINEOUT2N_MUTE_WIDTH 1 /* LINEOUT2N_MUTE */ | ||
| 1164 | #define WM8994_LINEOUT2P_MUTE 0x0002 /* LINEOUT2P_MUTE */ | ||
| 1165 | #define WM8994_LINEOUT2P_MUTE_MASK 0x0002 /* LINEOUT2P_MUTE */ | ||
| 1166 | #define WM8994_LINEOUT2P_MUTE_SHIFT 1 /* LINEOUT2P_MUTE */ | ||
| 1167 | #define WM8994_LINEOUT2P_MUTE_WIDTH 1 /* LINEOUT2P_MUTE */ | ||
| 1168 | #define WM8994_LINEOUT2_VOL 0x0001 /* LINEOUT2_VOL */ | ||
| 1169 | #define WM8994_LINEOUT2_VOL_MASK 0x0001 /* LINEOUT2_VOL */ | ||
| 1170 | #define WM8994_LINEOUT2_VOL_SHIFT 0 /* LINEOUT2_VOL */ | ||
| 1171 | #define WM8994_LINEOUT2_VOL_WIDTH 1 /* LINEOUT2_VOL */ | ||
| 1172 | |||
| 1173 | /* | ||
| 1174 | * R31 (0x1F) - HPOUT2 Volume | ||
| 1175 | */ | ||
| 1176 | #define WM8994_HPOUT2_MUTE 0x0020 /* HPOUT2_MUTE */ | ||
| 1177 | #define WM8994_HPOUT2_MUTE_MASK 0x0020 /* HPOUT2_MUTE */ | ||
| 1178 | #define WM8994_HPOUT2_MUTE_SHIFT 5 /* HPOUT2_MUTE */ | ||
| 1179 | #define WM8994_HPOUT2_MUTE_WIDTH 1 /* HPOUT2_MUTE */ | ||
| 1180 | #define WM8994_HPOUT2_VOL 0x0010 /* HPOUT2_VOL */ | ||
| 1181 | #define WM8994_HPOUT2_VOL_MASK 0x0010 /* HPOUT2_VOL */ | ||
| 1182 | #define WM8994_HPOUT2_VOL_SHIFT 4 /* HPOUT2_VOL */ | ||
| 1183 | #define WM8994_HPOUT2_VOL_WIDTH 1 /* HPOUT2_VOL */ | ||
| 1184 | |||
| 1185 | /* | ||
| 1186 | * R32 (0x20) - Left OPGA Volume | ||
| 1187 | */ | ||
| 1188 | #define WM8994_MIXOUT_VU 0x0100 /* MIXOUT_VU */ | ||
| 1189 | #define WM8994_MIXOUT_VU_MASK 0x0100 /* MIXOUT_VU */ | ||
| 1190 | #define WM8994_MIXOUT_VU_SHIFT 8 /* MIXOUT_VU */ | ||
| 1191 | #define WM8994_MIXOUT_VU_WIDTH 1 /* MIXOUT_VU */ | ||
| 1192 | #define WM8994_MIXOUTL_ZC 0x0080 /* MIXOUTL_ZC */ | ||
| 1193 | #define WM8994_MIXOUTL_ZC_MASK 0x0080 /* MIXOUTL_ZC */ | ||
| 1194 | #define WM8994_MIXOUTL_ZC_SHIFT 7 /* MIXOUTL_ZC */ | ||
| 1195 | #define WM8994_MIXOUTL_ZC_WIDTH 1 /* MIXOUTL_ZC */ | ||
| 1196 | #define WM8994_MIXOUTL_MUTE_N 0x0040 /* MIXOUTL_MUTE_N */ | ||
| 1197 | #define WM8994_MIXOUTL_MUTE_N_MASK 0x0040 /* MIXOUTL_MUTE_N */ | ||
| 1198 | #define WM8994_MIXOUTL_MUTE_N_SHIFT 6 /* MIXOUTL_MUTE_N */ | ||
| 1199 | #define WM8994_MIXOUTL_MUTE_N_WIDTH 1 /* MIXOUTL_MUTE_N */ | ||
| 1200 | #define WM8994_MIXOUTL_VOL_MASK 0x003F /* MIXOUTL_VOL - [5:0] */ | ||
| 1201 | #define WM8994_MIXOUTL_VOL_SHIFT 0 /* MIXOUTL_VOL - [5:0] */ | ||
| 1202 | #define WM8994_MIXOUTL_VOL_WIDTH 6 /* MIXOUTL_VOL - [5:0] */ | ||
| 1203 | |||
| 1204 | /* | ||
| 1205 | * R33 (0x21) - Right OPGA Volume | ||
| 1206 | */ | ||
| 1207 | #define WM8994_MIXOUT_VU 0x0100 /* MIXOUT_VU */ | ||
| 1208 | #define WM8994_MIXOUT_VU_MASK 0x0100 /* MIXOUT_VU */ | ||
| 1209 | #define WM8994_MIXOUT_VU_SHIFT 8 /* MIXOUT_VU */ | ||
| 1210 | #define WM8994_MIXOUT_VU_WIDTH 1 /* MIXOUT_VU */ | ||
| 1211 | #define WM8994_MIXOUTR_ZC 0x0080 /* MIXOUTR_ZC */ | ||
| 1212 | #define WM8994_MIXOUTR_ZC_MASK 0x0080 /* MIXOUTR_ZC */ | ||
| 1213 | #define WM8994_MIXOUTR_ZC_SHIFT 7 /* MIXOUTR_ZC */ | ||
| 1214 | #define WM8994_MIXOUTR_ZC_WIDTH 1 /* MIXOUTR_ZC */ | ||
| 1215 | #define WM8994_MIXOUTR_MUTE_N 0x0040 /* MIXOUTR_MUTE_N */ | ||
| 1216 | #define WM8994_MIXOUTR_MUTE_N_MASK 0x0040 /* MIXOUTR_MUTE_N */ | ||
| 1217 | #define WM8994_MIXOUTR_MUTE_N_SHIFT 6 /* MIXOUTR_MUTE_N */ | ||
| 1218 | #define WM8994_MIXOUTR_MUTE_N_WIDTH 1 /* MIXOUTR_MUTE_N */ | ||
| 1219 | #define WM8994_MIXOUTR_VOL_MASK 0x003F /* MIXOUTR_VOL - [5:0] */ | ||
| 1220 | #define WM8994_MIXOUTR_VOL_SHIFT 0 /* MIXOUTR_VOL - [5:0] */ | ||
| 1221 | #define WM8994_MIXOUTR_VOL_WIDTH 6 /* MIXOUTR_VOL - [5:0] */ | ||
| 1222 | |||
| 1223 | /* | ||
| 1224 | * R34 (0x22) - SPKMIXL Attenuation | ||
| 1225 | */ | ||
| 1226 | #define WM8994_DAC2L_SPKMIXL_VOL 0x0040 /* DAC2L_SPKMIXL_VOL */ | ||
| 1227 | #define WM8994_DAC2L_SPKMIXL_VOL_MASK 0x0040 /* DAC2L_SPKMIXL_VOL */ | ||
| 1228 | #define WM8994_DAC2L_SPKMIXL_VOL_SHIFT 6 /* DAC2L_SPKMIXL_VOL */ | ||
| 1229 | #define WM8994_DAC2L_SPKMIXL_VOL_WIDTH 1 /* DAC2L_SPKMIXL_VOL */ | ||
| 1230 | #define WM8994_MIXINL_SPKMIXL_VOL 0x0020 /* MIXINL_SPKMIXL_VOL */ | ||
| 1231 | #define WM8994_MIXINL_SPKMIXL_VOL_MASK 0x0020 /* MIXINL_SPKMIXL_VOL */ | ||
| 1232 | #define WM8994_MIXINL_SPKMIXL_VOL_SHIFT 5 /* MIXINL_SPKMIXL_VOL */ | ||
| 1233 | #define WM8994_MIXINL_SPKMIXL_VOL_WIDTH 1 /* MIXINL_SPKMIXL_VOL */ | ||
| 1234 | #define WM8994_IN1LP_SPKMIXL_VOL 0x0010 /* IN1LP_SPKMIXL_VOL */ | ||
| 1235 | #define WM8994_IN1LP_SPKMIXL_VOL_MASK 0x0010 /* IN1LP_SPKMIXL_VOL */ | ||
| 1236 | #define WM8994_IN1LP_SPKMIXL_VOL_SHIFT 4 /* IN1LP_SPKMIXL_VOL */ | ||
| 1237 | #define WM8994_IN1LP_SPKMIXL_VOL_WIDTH 1 /* IN1LP_SPKMIXL_VOL */ | ||
| 1238 | #define WM8994_MIXOUTL_SPKMIXL_VOL 0x0008 /* MIXOUTL_SPKMIXL_VOL */ | ||
| 1239 | #define WM8994_MIXOUTL_SPKMIXL_VOL_MASK 0x0008 /* MIXOUTL_SPKMIXL_VOL */ | ||
| 1240 | #define WM8994_MIXOUTL_SPKMIXL_VOL_SHIFT 3 /* MIXOUTL_SPKMIXL_VOL */ | ||
| 1241 | #define WM8994_MIXOUTL_SPKMIXL_VOL_WIDTH 1 /* MIXOUTL_SPKMIXL_VOL */ | ||
| 1242 | #define WM8994_DAC1L_SPKMIXL_VOL 0x0004 /* DAC1L_SPKMIXL_VOL */ | ||
| 1243 | #define WM8994_DAC1L_SPKMIXL_VOL_MASK 0x0004 /* DAC1L_SPKMIXL_VOL */ | ||
| 1244 | #define WM8994_DAC1L_SPKMIXL_VOL_SHIFT 2 /* DAC1L_SPKMIXL_VOL */ | ||
| 1245 | #define WM8994_DAC1L_SPKMIXL_VOL_WIDTH 1 /* DAC1L_SPKMIXL_VOL */ | ||
| 1246 | #define WM8994_SPKMIXL_VOL_MASK 0x0003 /* SPKMIXL_VOL - [1:0] */ | ||
| 1247 | #define WM8994_SPKMIXL_VOL_SHIFT 0 /* SPKMIXL_VOL - [1:0] */ | ||
| 1248 | #define WM8994_SPKMIXL_VOL_WIDTH 2 /* SPKMIXL_VOL - [1:0] */ | ||
| 1249 | |||
| 1250 | /* | ||
| 1251 | * R35 (0x23) - SPKMIXR Attenuation | ||
| 1252 | */ | ||
| 1253 | #define WM8994_SPKOUT_CLASSAB 0x0100 /* SPKOUT_CLASSAB */ | ||
| 1254 | #define WM8994_SPKOUT_CLASSAB_MASK 0x0100 /* SPKOUT_CLASSAB */ | ||
| 1255 | #define WM8994_SPKOUT_CLASSAB_SHIFT 8 /* SPKOUT_CLASSAB */ | ||
| 1256 | #define WM8994_SPKOUT_CLASSAB_WIDTH 1 /* SPKOUT_CLASSAB */ | ||
| 1257 | #define WM8994_DAC2R_SPKMIXR_VOL 0x0040 /* DAC2R_SPKMIXR_VOL */ | ||
| 1258 | #define WM8994_DAC2R_SPKMIXR_VOL_MASK 0x0040 /* DAC2R_SPKMIXR_VOL */ | ||
| 1259 | #define WM8994_DAC2R_SPKMIXR_VOL_SHIFT 6 /* DAC2R_SPKMIXR_VOL */ | ||
| 1260 | #define WM8994_DAC2R_SPKMIXR_VOL_WIDTH 1 /* DAC2R_SPKMIXR_VOL */ | ||
| 1261 | #define WM8994_MIXINR_SPKMIXR_VOL 0x0020 /* MIXINR_SPKMIXR_VOL */ | ||
| 1262 | #define WM8994_MIXINR_SPKMIXR_VOL_MASK 0x0020 /* MIXINR_SPKMIXR_VOL */ | ||
| 1263 | #define WM8994_MIXINR_SPKMIXR_VOL_SHIFT 5 /* MIXINR_SPKMIXR_VOL */ | ||
| 1264 | #define WM8994_MIXINR_SPKMIXR_VOL_WIDTH 1 /* MIXINR_SPKMIXR_VOL */ | ||
| 1265 | #define WM8994_IN1RP_SPKMIXR_VOL 0x0010 /* IN1RP_SPKMIXR_VOL */ | ||
| 1266 | #define WM8994_IN1RP_SPKMIXR_VOL_MASK 0x0010 /* IN1RP_SPKMIXR_VOL */ | ||
| 1267 | #define WM8994_IN1RP_SPKMIXR_VOL_SHIFT 4 /* IN1RP_SPKMIXR_VOL */ | ||
| 1268 | #define WM8994_IN1RP_SPKMIXR_VOL_WIDTH 1 /* IN1RP_SPKMIXR_VOL */ | ||
| 1269 | #define WM8994_MIXOUTR_SPKMIXR_VOL 0x0008 /* MIXOUTR_SPKMIXR_VOL */ | ||
| 1270 | #define WM8994_MIXOUTR_SPKMIXR_VOL_MASK 0x0008 /* MIXOUTR_SPKMIXR_VOL */ | ||
| 1271 | #define WM8994_MIXOUTR_SPKMIXR_VOL_SHIFT 3 /* MIXOUTR_SPKMIXR_VOL */ | ||
| 1272 | #define WM8994_MIXOUTR_SPKMIXR_VOL_WIDTH 1 /* MIXOUTR_SPKMIXR_VOL */ | ||
| 1273 | #define WM8994_DAC1R_SPKMIXR_VOL 0x0004 /* DAC1R_SPKMIXR_VOL */ | ||
| 1274 | #define WM8994_DAC1R_SPKMIXR_VOL_MASK 0x0004 /* DAC1R_SPKMIXR_VOL */ | ||
| 1275 | #define WM8994_DAC1R_SPKMIXR_VOL_SHIFT 2 /* DAC1R_SPKMIXR_VOL */ | ||
| 1276 | #define WM8994_DAC1R_SPKMIXR_VOL_WIDTH 1 /* DAC1R_SPKMIXR_VOL */ | ||
| 1277 | #define WM8994_SPKMIXR_VOL_MASK 0x0003 /* SPKMIXR_VOL - [1:0] */ | ||
| 1278 | #define WM8994_SPKMIXR_VOL_SHIFT 0 /* SPKMIXR_VOL - [1:0] */ | ||
| 1279 | #define WM8994_SPKMIXR_VOL_WIDTH 2 /* SPKMIXR_VOL - [1:0] */ | ||
| 1280 | |||
| 1281 | /* | ||
| 1282 | * R36 (0x24) - SPKOUT Mixers | ||
| 1283 | */ | ||
| 1284 | #define WM8994_IN2LRP_TO_SPKOUTL 0x0020 /* IN2LRP_TO_SPKOUTL */ | ||
| 1285 | #define WM8994_IN2LRP_TO_SPKOUTL_MASK 0x0020 /* IN2LRP_TO_SPKOUTL */ | ||
| 1286 | #define WM8994_IN2LRP_TO_SPKOUTL_SHIFT 5 /* IN2LRP_TO_SPKOUTL */ | ||
| 1287 | #define WM8994_IN2LRP_TO_SPKOUTL_WIDTH 1 /* IN2LRP_TO_SPKOUTL */ | ||
| 1288 | #define WM8994_SPKMIXL_TO_SPKOUTL 0x0010 /* SPKMIXL_TO_SPKOUTL */ | ||
| 1289 | #define WM8994_SPKMIXL_TO_SPKOUTL_MASK 0x0010 /* SPKMIXL_TO_SPKOUTL */ | ||
| 1290 | #define WM8994_SPKMIXL_TO_SPKOUTL_SHIFT 4 /* SPKMIXL_TO_SPKOUTL */ | ||
| 1291 | #define WM8994_SPKMIXL_TO_SPKOUTL_WIDTH 1 /* SPKMIXL_TO_SPKOUTL */ | ||
| 1292 | #define WM8994_SPKMIXR_TO_SPKOUTL 0x0008 /* SPKMIXR_TO_SPKOUTL */ | ||
| 1293 | #define WM8994_SPKMIXR_TO_SPKOUTL_MASK 0x0008 /* SPKMIXR_TO_SPKOUTL */ | ||
| 1294 | #define WM8994_SPKMIXR_TO_SPKOUTL_SHIFT 3 /* SPKMIXR_TO_SPKOUTL */ | ||
| 1295 | #define WM8994_SPKMIXR_TO_SPKOUTL_WIDTH 1 /* SPKMIXR_TO_SPKOUTL */ | ||
| 1296 | #define WM8994_IN2LRP_TO_SPKOUTR 0x0004 /* IN2LRP_TO_SPKOUTR */ | ||
| 1297 | #define WM8994_IN2LRP_TO_SPKOUTR_MASK 0x0004 /* IN2LRP_TO_SPKOUTR */ | ||
| 1298 | #define WM8994_IN2LRP_TO_SPKOUTR_SHIFT 2 /* IN2LRP_TO_SPKOUTR */ | ||
| 1299 | #define WM8994_IN2LRP_TO_SPKOUTR_WIDTH 1 /* IN2LRP_TO_SPKOUTR */ | ||
| 1300 | #define WM8994_SPKMIXL_TO_SPKOUTR 0x0002 /* SPKMIXL_TO_SPKOUTR */ | ||
| 1301 | #define WM8994_SPKMIXL_TO_SPKOUTR_MASK 0x0002 /* SPKMIXL_TO_SPKOUTR */ | ||
| 1302 | #define WM8994_SPKMIXL_TO_SPKOUTR_SHIFT 1 /* SPKMIXL_TO_SPKOUTR */ | ||
| 1303 | #define WM8994_SPKMIXL_TO_SPKOUTR_WIDTH 1 /* SPKMIXL_TO_SPKOUTR */ | ||
| 1304 | #define WM8994_SPKMIXR_TO_SPKOUTR 0x0001 /* SPKMIXR_TO_SPKOUTR */ | ||
| 1305 | #define WM8994_SPKMIXR_TO_SPKOUTR_MASK 0x0001 /* SPKMIXR_TO_SPKOUTR */ | ||
| 1306 | #define WM8994_SPKMIXR_TO_SPKOUTR_SHIFT 0 /* SPKMIXR_TO_SPKOUTR */ | ||
| 1307 | #define WM8994_SPKMIXR_TO_SPKOUTR_WIDTH 1 /* SPKMIXR_TO_SPKOUTR */ | ||
| 1308 | |||
| 1309 | /* | ||
| 1310 | * R37 (0x25) - ClassD | ||
| 1311 | */ | ||
| 1312 | #define WM8994_SPKOUTL_BOOST_MASK 0x0038 /* SPKOUTL_BOOST - [5:3] */ | ||
| 1313 | #define WM8994_SPKOUTL_BOOST_SHIFT 3 /* SPKOUTL_BOOST - [5:3] */ | ||
| 1314 | #define WM8994_SPKOUTL_BOOST_WIDTH 3 /* SPKOUTL_BOOST - [5:3] */ | ||
| 1315 | #define WM8994_SPKOUTR_BOOST_MASK 0x0007 /* SPKOUTR_BOOST - [2:0] */ | ||
| 1316 | #define WM8994_SPKOUTR_BOOST_SHIFT 0 /* SPKOUTR_BOOST - [2:0] */ | ||
| 1317 | #define WM8994_SPKOUTR_BOOST_WIDTH 3 /* SPKOUTR_BOOST - [2:0] */ | ||
| 1318 | |||
| 1319 | /* | ||
| 1320 | * R38 (0x26) - Speaker Volume Left | ||
| 1321 | */ | ||
| 1322 | #define WM8994_SPKOUT_VU 0x0100 /* SPKOUT_VU */ | ||
| 1323 | #define WM8994_SPKOUT_VU_MASK 0x0100 /* SPKOUT_VU */ | ||
| 1324 | #define WM8994_SPKOUT_VU_SHIFT 8 /* SPKOUT_VU */ | ||
| 1325 | #define WM8994_SPKOUT_VU_WIDTH 1 /* SPKOUT_VU */ | ||
| 1326 | #define WM8994_SPKOUTL_ZC 0x0080 /* SPKOUTL_ZC */ | ||
| 1327 | #define WM8994_SPKOUTL_ZC_MASK 0x0080 /* SPKOUTL_ZC */ | ||
| 1328 | #define WM8994_SPKOUTL_ZC_SHIFT 7 /* SPKOUTL_ZC */ | ||
| 1329 | #define WM8994_SPKOUTL_ZC_WIDTH 1 /* SPKOUTL_ZC */ | ||
| 1330 | #define WM8994_SPKOUTL_MUTE_N 0x0040 /* SPKOUTL_MUTE_N */ | ||
| 1331 | #define WM8994_SPKOUTL_MUTE_N_MASK 0x0040 /* SPKOUTL_MUTE_N */ | ||
| 1332 | #define WM8994_SPKOUTL_MUTE_N_SHIFT 6 /* SPKOUTL_MUTE_N */ | ||
| 1333 | #define WM8994_SPKOUTL_MUTE_N_WIDTH 1 /* SPKOUTL_MUTE_N */ | ||
| 1334 | #define WM8994_SPKOUTL_VOL_MASK 0x003F /* SPKOUTL_VOL - [5:0] */ | ||
| 1335 | #define WM8994_SPKOUTL_VOL_SHIFT 0 /* SPKOUTL_VOL - [5:0] */ | ||
| 1336 | #define WM8994_SPKOUTL_VOL_WIDTH 6 /* SPKOUTL_VOL - [5:0] */ | ||
| 1337 | |||
| 1338 | /* | ||
| 1339 | * R39 (0x27) - Speaker Volume Right | ||
| 1340 | */ | ||
| 1341 | #define WM8994_SPKOUT_VU 0x0100 /* SPKOUT_VU */ | ||
| 1342 | #define WM8994_SPKOUT_VU_MASK 0x0100 /* SPKOUT_VU */ | ||
| 1343 | #define WM8994_SPKOUT_VU_SHIFT 8 /* SPKOUT_VU */ | ||
| 1344 | #define WM8994_SPKOUT_VU_WIDTH 1 /* SPKOUT_VU */ | ||
| 1345 | #define WM8994_SPKOUTR_ZC 0x0080 /* SPKOUTR_ZC */ | ||
| 1346 | #define WM8994_SPKOUTR_ZC_MASK 0x0080 /* SPKOUTR_ZC */ | ||
| 1347 | #define WM8994_SPKOUTR_ZC_SHIFT 7 /* SPKOUTR_ZC */ | ||
| 1348 | #define WM8994_SPKOUTR_ZC_WIDTH 1 /* SPKOUTR_ZC */ | ||
| 1349 | #define WM8994_SPKOUTR_MUTE_N 0x0040 /* SPKOUTR_MUTE_N */ | ||
| 1350 | #define WM8994_SPKOUTR_MUTE_N_MASK 0x0040 /* SPKOUTR_MUTE_N */ | ||
| 1351 | #define WM8994_SPKOUTR_MUTE_N_SHIFT 6 /* SPKOUTR_MUTE_N */ | ||
| 1352 | #define WM8994_SPKOUTR_MUTE_N_WIDTH 1 /* SPKOUTR_MUTE_N */ | ||
| 1353 | #define WM8994_SPKOUTR_VOL_MASK 0x003F /* SPKOUTR_VOL - [5:0] */ | ||
| 1354 | #define WM8994_SPKOUTR_VOL_SHIFT 0 /* SPKOUTR_VOL - [5:0] */ | ||
| 1355 | #define WM8994_SPKOUTR_VOL_WIDTH 6 /* SPKOUTR_VOL - [5:0] */ | ||
| 1356 | |||
| 1357 | /* | ||
| 1358 | * R40 (0x28) - Input Mixer (2) | ||
| 1359 | */ | ||
| 1360 | #define WM8994_IN2LP_TO_IN2L 0x0080 /* IN2LP_TO_IN2L */ | ||
| 1361 | #define WM8994_IN2LP_TO_IN2L_MASK 0x0080 /* IN2LP_TO_IN2L */ | ||
| 1362 | #define WM8994_IN2LP_TO_IN2L_SHIFT 7 /* IN2LP_TO_IN2L */ | ||
| 1363 | #define WM8994_IN2LP_TO_IN2L_WIDTH 1 /* IN2LP_TO_IN2L */ | ||
| 1364 | #define WM8994_IN2LN_TO_IN2L 0x0040 /* IN2LN_TO_IN2L */ | ||
| 1365 | #define WM8994_IN2LN_TO_IN2L_MASK 0x0040 /* IN2LN_TO_IN2L */ | ||
| 1366 | #define WM8994_IN2LN_TO_IN2L_SHIFT 6 /* IN2LN_TO_IN2L */ | ||
| 1367 | #define WM8994_IN2LN_TO_IN2L_WIDTH 1 /* IN2LN_TO_IN2L */ | ||
| 1368 | #define WM8994_IN1LP_TO_IN1L 0x0020 /* IN1LP_TO_IN1L */ | ||
| 1369 | #define WM8994_IN1LP_TO_IN1L_MASK 0x0020 /* IN1LP_TO_IN1L */ | ||
| 1370 | #define WM8994_IN1LP_TO_IN1L_SHIFT 5 /* IN1LP_TO_IN1L */ | ||
| 1371 | #define WM8994_IN1LP_TO_IN1L_WIDTH 1 /* IN1LP_TO_IN1L */ | ||
| 1372 | #define WM8994_IN1LN_TO_IN1L 0x0010 /* IN1LN_TO_IN1L */ | ||
| 1373 | #define WM8994_IN1LN_TO_IN1L_MASK 0x0010 /* IN1LN_TO_IN1L */ | ||
| 1374 | #define WM8994_IN1LN_TO_IN1L_SHIFT 4 /* IN1LN_TO_IN1L */ | ||
| 1375 | #define WM8994_IN1LN_TO_IN1L_WIDTH 1 /* IN1LN_TO_IN1L */ | ||
| 1376 | #define WM8994_IN2RP_TO_IN2R 0x0008 /* IN2RP_TO_IN2R */ | ||
| 1377 | #define WM8994_IN2RP_TO_IN2R_MASK 0x0008 /* IN2RP_TO_IN2R */ | ||
| 1378 | #define WM8994_IN2RP_TO_IN2R_SHIFT 3 /* IN2RP_TO_IN2R */ | ||
| 1379 | #define WM8994_IN2RP_TO_IN2R_WIDTH 1 /* IN2RP_TO_IN2R */ | ||
| 1380 | #define WM8994_IN2RN_TO_IN2R 0x0004 /* IN2RN_TO_IN2R */ | ||
| 1381 | #define WM8994_IN2RN_TO_IN2R_MASK 0x0004 /* IN2RN_TO_IN2R */ | ||
| 1382 | #define WM8994_IN2RN_TO_IN2R_SHIFT 2 /* IN2RN_TO_IN2R */ | ||
| 1383 | #define WM8994_IN2RN_TO_IN2R_WIDTH 1 /* IN2RN_TO_IN2R */ | ||
| 1384 | #define WM8994_IN1RP_TO_IN1R 0x0002 /* IN1RP_TO_IN1R */ | ||
| 1385 | #define WM8994_IN1RP_TO_IN1R_MASK 0x0002 /* IN1RP_TO_IN1R */ | ||
| 1386 | #define WM8994_IN1RP_TO_IN1R_SHIFT 1 /* IN1RP_TO_IN1R */ | ||
| 1387 | #define WM8994_IN1RP_TO_IN1R_WIDTH 1 /* IN1RP_TO_IN1R */ | ||
| 1388 | #define WM8994_IN1RN_TO_IN1R 0x0001 /* IN1RN_TO_IN1R */ | ||
| 1389 | #define WM8994_IN1RN_TO_IN1R_MASK 0x0001 /* IN1RN_TO_IN1R */ | ||
| 1390 | #define WM8994_IN1RN_TO_IN1R_SHIFT 0 /* IN1RN_TO_IN1R */ | ||
| 1391 | #define WM8994_IN1RN_TO_IN1R_WIDTH 1 /* IN1RN_TO_IN1R */ | ||
| 1392 | |||
| 1393 | /* | ||
| 1394 | * R41 (0x29) - Input Mixer (3) | ||
| 1395 | */ | ||
| 1396 | #define WM8994_IN2L_TO_MIXINL 0x0100 /* IN2L_TO_MIXINL */ | ||
| 1397 | #define WM8994_IN2L_TO_MIXINL_MASK 0x0100 /* IN2L_TO_MIXINL */ | ||
| 1398 | #define WM8994_IN2L_TO_MIXINL_SHIFT 8 /* IN2L_TO_MIXINL */ | ||
| 1399 | #define WM8994_IN2L_TO_MIXINL_WIDTH 1 /* IN2L_TO_MIXINL */ | ||
| 1400 | #define WM8994_IN2L_MIXINL_VOL 0x0080 /* IN2L_MIXINL_VOL */ | ||
| 1401 | #define WM8994_IN2L_MIXINL_VOL_MASK 0x0080 /* IN2L_MIXINL_VOL */ | ||
| 1402 | #define WM8994_IN2L_MIXINL_VOL_SHIFT 7 /* IN2L_MIXINL_VOL */ | ||
| 1403 | #define WM8994_IN2L_MIXINL_VOL_WIDTH 1 /* IN2L_MIXINL_VOL */ | ||
| 1404 | #define WM8994_IN1L_TO_MIXINL 0x0020 /* IN1L_TO_MIXINL */ | ||
| 1405 | #define WM8994_IN1L_TO_MIXINL_MASK 0x0020 /* IN1L_TO_MIXINL */ | ||
| 1406 | #define WM8994_IN1L_TO_MIXINL_SHIFT 5 /* IN1L_TO_MIXINL */ | ||
| 1407 | #define WM8994_IN1L_TO_MIXINL_WIDTH 1 /* IN1L_TO_MIXINL */ | ||
| 1408 | #define WM8994_IN1L_MIXINL_VOL 0x0010 /* IN1L_MIXINL_VOL */ | ||
| 1409 | #define WM8994_IN1L_MIXINL_VOL_MASK 0x0010 /* IN1L_MIXINL_VOL */ | ||
| 1410 | #define WM8994_IN1L_MIXINL_VOL_SHIFT 4 /* IN1L_MIXINL_VOL */ | ||
| 1411 | #define WM8994_IN1L_MIXINL_VOL_WIDTH 1 /* IN1L_MIXINL_VOL */ | ||
| 1412 | #define WM8994_MIXOUTL_MIXINL_VOL_MASK 0x0007 /* MIXOUTL_MIXINL_VOL - [2:0] */ | ||
| 1413 | #define WM8994_MIXOUTL_MIXINL_VOL_SHIFT 0 /* MIXOUTL_MIXINL_VOL - [2:0] */ | ||
| 1414 | #define WM8994_MIXOUTL_MIXINL_VOL_WIDTH 3 /* MIXOUTL_MIXINL_VOL - [2:0] */ | ||
| 1415 | |||
| 1416 | /* | ||
| 1417 | * R42 (0x2A) - Input Mixer (4) | ||
| 1418 | */ | ||
| 1419 | #define WM8994_IN2R_TO_MIXINR 0x0100 /* IN2R_TO_MIXINR */ | ||
| 1420 | #define WM8994_IN2R_TO_MIXINR_MASK 0x0100 /* IN2R_TO_MIXINR */ | ||
| 1421 | #define WM8994_IN2R_TO_MIXINR_SHIFT 8 /* IN2R_TO_MIXINR */ | ||
| 1422 | #define WM8994_IN2R_TO_MIXINR_WIDTH 1 /* IN2R_TO_MIXINR */ | ||
| 1423 | #define WM8994_IN2R_MIXINR_VOL 0x0080 /* IN2R_MIXINR_VOL */ | ||
| 1424 | #define WM8994_IN2R_MIXINR_VOL_MASK 0x0080 /* IN2R_MIXINR_VOL */ | ||
| 1425 | #define WM8994_IN2R_MIXINR_VOL_SHIFT 7 /* IN2R_MIXINR_VOL */ | ||
| 1426 | #define WM8994_IN2R_MIXINR_VOL_WIDTH 1 /* IN2R_MIXINR_VOL */ | ||
| 1427 | #define WM8994_IN1R_TO_MIXINR 0x0020 /* IN1R_TO_MIXINR */ | ||
| 1428 | #define WM8994_IN1R_TO_MIXINR_MASK 0x0020 /* IN1R_TO_MIXINR */ | ||
| 1429 | #define WM8994_IN1R_TO_MIXINR_SHIFT 5 /* IN1R_TO_MIXINR */ | ||
| 1430 | #define WM8994_IN1R_TO_MIXINR_WIDTH 1 /* IN1R_TO_MIXINR */ | ||
| 1431 | #define WM8994_IN1R_MIXINR_VOL 0x0010 /* IN1R_MIXINR_VOL */ | ||
| 1432 | #define WM8994_IN1R_MIXINR_VOL_MASK 0x0010 /* IN1R_MIXINR_VOL */ | ||
| 1433 | #define WM8994_IN1R_MIXINR_VOL_SHIFT 4 /* IN1R_MIXINR_VOL */ | ||
| 1434 | #define WM8994_IN1R_MIXINR_VOL_WIDTH 1 /* IN1R_MIXINR_VOL */ | ||
| 1435 | #define WM8994_MIXOUTR_MIXINR_VOL_MASK 0x0007 /* MIXOUTR_MIXINR_VOL - [2:0] */ | ||
| 1436 | #define WM8994_MIXOUTR_MIXINR_VOL_SHIFT 0 /* MIXOUTR_MIXINR_VOL - [2:0] */ | ||
| 1437 | #define WM8994_MIXOUTR_MIXINR_VOL_WIDTH 3 /* MIXOUTR_MIXINR_VOL - [2:0] */ | ||
| 1438 | |||
| 1439 | /* | ||
| 1440 | * R43 (0x2B) - Input Mixer (5) | ||
| 1441 | */ | ||
| 1442 | #define WM8994_IN1LP_MIXINL_VOL_MASK 0x01C0 /* IN1LP_MIXINL_VOL - [8:6] */ | ||
| 1443 | #define WM8994_IN1LP_MIXINL_VOL_SHIFT 6 /* IN1LP_MIXINL_VOL - [8:6] */ | ||
| 1444 | #define WM8994_IN1LP_MIXINL_VOL_WIDTH 3 /* IN1LP_MIXINL_VOL - [8:6] */ | ||
| 1445 | #define WM8994_IN2LRP_MIXINL_VOL_MASK 0x0007 /* IN2LRP_MIXINL_VOL - [2:0] */ | ||
| 1446 | #define WM8994_IN2LRP_MIXINL_VOL_SHIFT 0 /* IN2LRP_MIXINL_VOL - [2:0] */ | ||
| 1447 | #define WM8994_IN2LRP_MIXINL_VOL_WIDTH 3 /* IN2LRP_MIXINL_VOL - [2:0] */ | ||
| 1448 | |||
| 1449 | /* | ||
| 1450 | * R44 (0x2C) - Input Mixer (6) | ||
| 1451 | */ | ||
| 1452 | #define WM8994_IN1RP_MIXINR_VOL_MASK 0x01C0 /* IN1RP_MIXINR_VOL - [8:6] */ | ||
| 1453 | #define WM8994_IN1RP_MIXINR_VOL_SHIFT 6 /* IN1RP_MIXINR_VOL - [8:6] */ | ||
| 1454 | #define WM8994_IN1RP_MIXINR_VOL_WIDTH 3 /* IN1RP_MIXINR_VOL - [8:6] */ | ||
| 1455 | #define WM8994_IN2LRP_MIXINR_VOL_MASK 0x0007 /* IN2LRP_MIXINR_VOL - [2:0] */ | ||
| 1456 | #define WM8994_IN2LRP_MIXINR_VOL_SHIFT 0 /* IN2LRP_MIXINR_VOL - [2:0] */ | ||
| 1457 | #define WM8994_IN2LRP_MIXINR_VOL_WIDTH 3 /* IN2LRP_MIXINR_VOL - [2:0] */ | ||
| 1458 | |||
| 1459 | /* | ||
| 1460 | * R45 (0x2D) - Output Mixer (1) | ||
| 1461 | */ | ||
| 1462 | #define WM8994_DAC1L_TO_HPOUT1L 0x0100 /* DAC1L_TO_HPOUT1L */ | ||
| 1463 | #define WM8994_DAC1L_TO_HPOUT1L_MASK 0x0100 /* DAC1L_TO_HPOUT1L */ | ||
| 1464 | #define WM8994_DAC1L_TO_HPOUT1L_SHIFT 8 /* DAC1L_TO_HPOUT1L */ | ||
| 1465 | #define WM8994_DAC1L_TO_HPOUT1L_WIDTH 1 /* DAC1L_TO_HPOUT1L */ | ||
| 1466 | #define WM8994_MIXINR_TO_MIXOUTL 0x0080 /* MIXINR_TO_MIXOUTL */ | ||
| 1467 | #define WM8994_MIXINR_TO_MIXOUTL_MASK 0x0080 /* MIXINR_TO_MIXOUTL */ | ||
| 1468 | #define WM8994_MIXINR_TO_MIXOUTL_SHIFT 7 /* MIXINR_TO_MIXOUTL */ | ||
| 1469 | #define WM8994_MIXINR_TO_MIXOUTL_WIDTH 1 /* MIXINR_TO_MIXOUTL */ | ||
| 1470 | #define WM8994_MIXINL_TO_MIXOUTL 0x0040 /* MIXINL_TO_MIXOUTL */ | ||
| 1471 | #define WM8994_MIXINL_TO_MIXOUTL_MASK 0x0040 /* MIXINL_TO_MIXOUTL */ | ||
| 1472 | #define WM8994_MIXINL_TO_MIXOUTL_SHIFT 6 /* MIXINL_TO_MIXOUTL */ | ||
| 1473 | #define WM8994_MIXINL_TO_MIXOUTL_WIDTH 1 /* MIXINL_TO_MIXOUTL */ | ||
| 1474 | #define WM8994_IN2RN_TO_MIXOUTL 0x0020 /* IN2RN_TO_MIXOUTL */ | ||
| 1475 | #define WM8994_IN2RN_TO_MIXOUTL_MASK 0x0020 /* IN2RN_TO_MIXOUTL */ | ||
| 1476 | #define WM8994_IN2RN_TO_MIXOUTL_SHIFT 5 /* IN2RN_TO_MIXOUTL */ | ||
| 1477 | #define WM8994_IN2RN_TO_MIXOUTL_WIDTH 1 /* IN2RN_TO_MIXOUTL */ | ||
| 1478 | #define WM8994_IN2LN_TO_MIXOUTL 0x0010 /* IN2LN_TO_MIXOUTL */ | ||
| 1479 | #define WM8994_IN2LN_TO_MIXOUTL_MASK 0x0010 /* IN2LN_TO_MIXOUTL */ | ||
| 1480 | #define WM8994_IN2LN_TO_MIXOUTL_SHIFT 4 /* IN2LN_TO_MIXOUTL */ | ||
| 1481 | #define WM8994_IN2LN_TO_MIXOUTL_WIDTH 1 /* IN2LN_TO_MIXOUTL */ | ||
| 1482 | #define WM8994_IN1R_TO_MIXOUTL 0x0008 /* IN1R_TO_MIXOUTL */ | ||
| 1483 | #define WM8994_IN1R_TO_MIXOUTL_MASK 0x0008 /* IN1R_TO_MIXOUTL */ | ||
| 1484 | #define WM8994_IN1R_TO_MIXOUTL_SHIFT 3 /* IN1R_TO_MIXOUTL */ | ||
| 1485 | #define WM8994_IN1R_TO_MIXOUTL_WIDTH 1 /* IN1R_TO_MIXOUTL */ | ||
| 1486 | #define WM8994_IN1L_TO_MIXOUTL 0x0004 /* IN1L_TO_MIXOUTL */ | ||
| 1487 | #define WM8994_IN1L_TO_MIXOUTL_MASK 0x0004 /* IN1L_TO_MIXOUTL */ | ||
| 1488 | #define WM8994_IN1L_TO_MIXOUTL_SHIFT 2 /* IN1L_TO_MIXOUTL */ | ||
| 1489 | #define WM8994_IN1L_TO_MIXOUTL_WIDTH 1 /* IN1L_TO_MIXOUTL */ | ||
| 1490 | #define WM8994_IN2LP_TO_MIXOUTL 0x0002 /* IN2LP_TO_MIXOUTL */ | ||
| 1491 | #define WM8994_IN2LP_TO_MIXOUTL_MASK 0x0002 /* IN2LP_TO_MIXOUTL */ | ||
| 1492 | #define WM8994_IN2LP_TO_MIXOUTL_SHIFT 1 /* IN2LP_TO_MIXOUTL */ | ||
| 1493 | #define WM8994_IN2LP_TO_MIXOUTL_WIDTH 1 /* IN2LP_TO_MIXOUTL */ | ||
| 1494 | #define WM8994_DAC1L_TO_MIXOUTL 0x0001 /* DAC1L_TO_MIXOUTL */ | ||
| 1495 | #define WM8994_DAC1L_TO_MIXOUTL_MASK 0x0001 /* DAC1L_TO_MIXOUTL */ | ||
| 1496 | #define WM8994_DAC1L_TO_MIXOUTL_SHIFT 0 /* DAC1L_TO_MIXOUTL */ | ||
| 1497 | #define WM8994_DAC1L_TO_MIXOUTL_WIDTH 1 /* DAC1L_TO_MIXOUTL */ | ||
| 1498 | |||
| 1499 | /* | ||
| 1500 | * R46 (0x2E) - Output Mixer (2) | ||
| 1501 | */ | ||
| 1502 | #define WM8994_DAC1R_TO_HPOUT1R 0x0100 /* DAC1R_TO_HPOUT1R */ | ||
| 1503 | #define WM8994_DAC1R_TO_HPOUT1R_MASK 0x0100 /* DAC1R_TO_HPOUT1R */ | ||
| 1504 | #define WM8994_DAC1R_TO_HPOUT1R_SHIFT 8 /* DAC1R_TO_HPOUT1R */ | ||
| 1505 | #define WM8994_DAC1R_TO_HPOUT1R_WIDTH 1 /* DAC1R_TO_HPOUT1R */ | ||
| 1506 | #define WM8994_MIXINL_TO_MIXOUTR 0x0080 /* MIXINL_TO_MIXOUTR */ | ||
| 1507 | #define WM8994_MIXINL_TO_MIXOUTR_MASK 0x0080 /* MIXINL_TO_MIXOUTR */ | ||
| 1508 | #define WM8994_MIXINL_TO_MIXOUTR_SHIFT 7 /* MIXINL_TO_MIXOUTR */ | ||
| 1509 | #define WM8994_MIXINL_TO_MIXOUTR_WIDTH 1 /* MIXINL_TO_MIXOUTR */ | ||
| 1510 | #define WM8994_MIXINR_TO_MIXOUTR 0x0040 /* MIXINR_TO_MIXOUTR */ | ||
| 1511 | #define WM8994_MIXINR_TO_MIXOUTR_MASK 0x0040 /* MIXINR_TO_MIXOUTR */ | ||
| 1512 | #define WM8994_MIXINR_TO_MIXOUTR_SHIFT 6 /* MIXINR_TO_MIXOUTR */ | ||
| 1513 | #define WM8994_MIXINR_TO_MIXOUTR_WIDTH 1 /* MIXINR_TO_MIXOUTR */ | ||
| 1514 | #define WM8994_IN2LN_TO_MIXOUTR 0x0020 /* IN2LN_TO_MIXOUTR */ | ||
| 1515 | #define WM8994_IN2LN_TO_MIXOUTR_MASK 0x0020 /* IN2LN_TO_MIXOUTR */ | ||
| 1516 | #define WM8994_IN2LN_TO_MIXOUTR_SHIFT 5 /* IN2LN_TO_MIXOUTR */ | ||
| 1517 | #define WM8994_IN2LN_TO_MIXOUTR_WIDTH 1 /* IN2LN_TO_MIXOUTR */ | ||
| 1518 | #define WM8994_IN2RN_TO_MIXOUTR 0x0010 /* IN2RN_TO_MIXOUTR */ | ||
| 1519 | #define WM8994_IN2RN_TO_MIXOUTR_MASK 0x0010 /* IN2RN_TO_MIXOUTR */ | ||
| 1520 | #define WM8994_IN2RN_TO_MIXOUTR_SHIFT 4 /* IN2RN_TO_MIXOUTR */ | ||
| 1521 | #define WM8994_IN2RN_TO_MIXOUTR_WIDTH 1 /* IN2RN_TO_MIXOUTR */ | ||
| 1522 | #define WM8994_IN1L_TO_MIXOUTR 0x0008 /* IN1L_TO_MIXOUTR */ | ||
| 1523 | #define WM8994_IN1L_TO_MIXOUTR_MASK 0x0008 /* IN1L_TO_MIXOUTR */ | ||
| 1524 | #define WM8994_IN1L_TO_MIXOUTR_SHIFT 3 /* IN1L_TO_MIXOUTR */ | ||
| 1525 | #define WM8994_IN1L_TO_MIXOUTR_WIDTH 1 /* IN1L_TO_MIXOUTR */ | ||
| 1526 | #define WM8994_IN1R_TO_MIXOUTR 0x0004 /* IN1R_TO_MIXOUTR */ | ||
| 1527 | #define WM8994_IN1R_TO_MIXOUTR_MASK 0x0004 /* IN1R_TO_MIXOUTR */ | ||
| 1528 | #define WM8994_IN1R_TO_MIXOUTR_SHIFT 2 /* IN1R_TO_MIXOUTR */ | ||
| 1529 | #define WM8994_IN1R_TO_MIXOUTR_WIDTH 1 /* IN1R_TO_MIXOUTR */ | ||
| 1530 | #define WM8994_IN2RP_TO_MIXOUTR 0x0002 /* IN2RP_TO_MIXOUTR */ | ||
| 1531 | #define WM8994_IN2RP_TO_MIXOUTR_MASK 0x0002 /* IN2RP_TO_MIXOUTR */ | ||
| 1532 | #define WM8994_IN2RP_TO_MIXOUTR_SHIFT 1 /* IN2RP_TO_MIXOUTR */ | ||
| 1533 | #define WM8994_IN2RP_TO_MIXOUTR_WIDTH 1 /* IN2RP_TO_MIXOUTR */ | ||
| 1534 | #define WM8994_DAC1R_TO_MIXOUTR 0x0001 /* DAC1R_TO_MIXOUTR */ | ||
| 1535 | #define WM8994_DAC1R_TO_MIXOUTR_MASK 0x0001 /* DAC1R_TO_MIXOUTR */ | ||
| 1536 | #define WM8994_DAC1R_TO_MIXOUTR_SHIFT 0 /* DAC1R_TO_MIXOUTR */ | ||
| 1537 | #define WM8994_DAC1R_TO_MIXOUTR_WIDTH 1 /* DAC1R_TO_MIXOUTR */ | ||
| 1538 | |||
| 1539 | /* | ||
| 1540 | * R47 (0x2F) - Output Mixer (3) | ||
| 1541 | */ | ||
| 1542 | #define WM8994_IN2LP_MIXOUTL_VOL_MASK 0x0E00 /* IN2LP_MIXOUTL_VOL - [11:9] */ | ||
| 1543 | #define WM8994_IN2LP_MIXOUTL_VOL_SHIFT 9 /* IN2LP_MIXOUTL_VOL - [11:9] */ | ||
| 1544 | #define WM8994_IN2LP_MIXOUTL_VOL_WIDTH 3 /* IN2LP_MIXOUTL_VOL - [11:9] */ | ||
| 1545 | #define WM8994_IN2LN_MIXOUTL_VOL_MASK 0x01C0 /* IN2LN_MIXOUTL_VOL - [8:6] */ | ||
| 1546 | #define WM8994_IN2LN_MIXOUTL_VOL_SHIFT 6 /* IN2LN_MIXOUTL_VOL - [8:6] */ | ||
| 1547 | #define WM8994_IN2LN_MIXOUTL_VOL_WIDTH 3 /* IN2LN_MIXOUTL_VOL - [8:6] */ | ||
| 1548 | #define WM8994_IN1R_MIXOUTL_VOL_MASK 0x0038 /* IN1R_MIXOUTL_VOL - [5:3] */ | ||
| 1549 | #define WM8994_IN1R_MIXOUTL_VOL_SHIFT 3 /* IN1R_MIXOUTL_VOL - [5:3] */ | ||
| 1550 | #define WM8994_IN1R_MIXOUTL_VOL_WIDTH 3 /* IN1R_MIXOUTL_VOL - [5:3] */ | ||
| 1551 | #define WM8994_IN1L_MIXOUTL_VOL_MASK 0x0007 /* IN1L_MIXOUTL_VOL - [2:0] */ | ||
| 1552 | #define WM8994_IN1L_MIXOUTL_VOL_SHIFT 0 /* IN1L_MIXOUTL_VOL - [2:0] */ | ||
| 1553 | #define WM8994_IN1L_MIXOUTL_VOL_WIDTH 3 /* IN1L_MIXOUTL_VOL - [2:0] */ | ||
| 1554 | |||
| 1555 | /* | ||
| 1556 | * R48 (0x30) - Output Mixer (4) | ||
| 1557 | */ | ||
| 1558 | #define WM8994_IN2RP_MIXOUTR_VOL_MASK 0x0E00 /* IN2RP_MIXOUTR_VOL - [11:9] */ | ||
| 1559 | #define WM8994_IN2RP_MIXOUTR_VOL_SHIFT 9 /* IN2RP_MIXOUTR_VOL - [11:9] */ | ||
| 1560 | #define WM8994_IN2RP_MIXOUTR_VOL_WIDTH 3 /* IN2RP_MIXOUTR_VOL - [11:9] */ | ||
| 1561 | #define WM8994_IN2RN_MIXOUTR_VOL_MASK 0x01C0 /* IN2RN_MIXOUTR_VOL - [8:6] */ | ||
| 1562 | #define WM8994_IN2RN_MIXOUTR_VOL_SHIFT 6 /* IN2RN_MIXOUTR_VOL - [8:6] */ | ||
| 1563 | #define WM8994_IN2RN_MIXOUTR_VOL_WIDTH 3 /* IN2RN_MIXOUTR_VOL - [8:6] */ | ||
| 1564 | #define WM8994_IN1L_MIXOUTR_VOL_MASK 0x0038 /* IN1L_MIXOUTR_VOL - [5:3] */ | ||
| 1565 | #define WM8994_IN1L_MIXOUTR_VOL_SHIFT 3 /* IN1L_MIXOUTR_VOL - [5:3] */ | ||
| 1566 | #define WM8994_IN1L_MIXOUTR_VOL_WIDTH 3 /* IN1L_MIXOUTR_VOL - [5:3] */ | ||
| 1567 | #define WM8994_IN1R_MIXOUTR_VOL_MASK 0x0007 /* IN1R_MIXOUTR_VOL - [2:0] */ | ||
| 1568 | #define WM8994_IN1R_MIXOUTR_VOL_SHIFT 0 /* IN1R_MIXOUTR_VOL - [2:0] */ | ||
| 1569 | #define WM8994_IN1R_MIXOUTR_VOL_WIDTH 3 /* IN1R_MIXOUTR_VOL - [2:0] */ | ||
| 1570 | |||
| 1571 | /* | ||
| 1572 | * R49 (0x31) - Output Mixer (5) | ||
| 1573 | */ | ||
| 1574 | #define WM8994_DAC1L_MIXOUTL_VOL_MASK 0x0E00 /* DAC1L_MIXOUTL_VOL - [11:9] */ | ||
| 1575 | #define WM8994_DAC1L_MIXOUTL_VOL_SHIFT 9 /* DAC1L_MIXOUTL_VOL - [11:9] */ | ||
| 1576 | #define WM8994_DAC1L_MIXOUTL_VOL_WIDTH 3 /* DAC1L_MIXOUTL_VOL - [11:9] */ | ||
| 1577 | #define WM8994_IN2RN_MIXOUTL_VOL_MASK 0x01C0 /* IN2RN_MIXOUTL_VOL - [8:6] */ | ||
| 1578 | #define WM8994_IN2RN_MIXOUTL_VOL_SHIFT 6 /* IN2RN_MIXOUTL_VOL - [8:6] */ | ||
| 1579 | #define WM8994_IN2RN_MIXOUTL_VOL_WIDTH 3 /* IN2RN_MIXOUTL_VOL - [8:6] */ | ||
| 1580 | #define WM8994_MIXINR_MIXOUTL_VOL_MASK 0x0038 /* MIXINR_MIXOUTL_VOL - [5:3] */ | ||
| 1581 | #define WM8994_MIXINR_MIXOUTL_VOL_SHIFT 3 /* MIXINR_MIXOUTL_VOL - [5:3] */ | ||
| 1582 | #define WM8994_MIXINR_MIXOUTL_VOL_WIDTH 3 /* MIXINR_MIXOUTL_VOL - [5:3] */ | ||
| 1583 | #define WM8994_MIXINL_MIXOUTL_VOL_MASK 0x0007 /* MIXINL_MIXOUTL_VOL - [2:0] */ | ||
| 1584 | #define WM8994_MIXINL_MIXOUTL_VOL_SHIFT 0 /* MIXINL_MIXOUTL_VOL - [2:0] */ | ||
| 1585 | #define WM8994_MIXINL_MIXOUTL_VOL_WIDTH 3 /* MIXINL_MIXOUTL_VOL - [2:0] */ | ||
| 1586 | |||
| 1587 | /* | ||
| 1588 | * R50 (0x32) - Output Mixer (6) | ||
| 1589 | */ | ||
| 1590 | #define WM8994_DAC1R_MIXOUTR_VOL_MASK 0x0E00 /* DAC1R_MIXOUTR_VOL - [11:9] */ | ||
| 1591 | #define WM8994_DAC1R_MIXOUTR_VOL_SHIFT 9 /* DAC1R_MIXOUTR_VOL - [11:9] */ | ||
| 1592 | #define WM8994_DAC1R_MIXOUTR_VOL_WIDTH 3 /* DAC1R_MIXOUTR_VOL - [11:9] */ | ||
| 1593 | #define WM8994_IN2LN_MIXOUTR_VOL_MASK 0x01C0 /* IN2LN_MIXOUTR_VOL - [8:6] */ | ||
| 1594 | #define WM8994_IN2LN_MIXOUTR_VOL_SHIFT 6 /* IN2LN_MIXOUTR_VOL - [8:6] */ | ||
| 1595 | #define WM8994_IN2LN_MIXOUTR_VOL_WIDTH 3 /* IN2LN_MIXOUTR_VOL - [8:6] */ | ||
| 1596 | #define WM8994_MIXINL_MIXOUTR_VOL_MASK 0x0038 /* MIXINL_MIXOUTR_VOL - [5:3] */ | ||
| 1597 | #define WM8994_MIXINL_MIXOUTR_VOL_SHIFT 3 /* MIXINL_MIXOUTR_VOL - [5:3] */ | ||
| 1598 | #define WM8994_MIXINL_MIXOUTR_VOL_WIDTH 3 /* MIXINL_MIXOUTR_VOL - [5:3] */ | ||
| 1599 | #define WM8994_MIXINR_MIXOUTR_VOL_MASK 0x0007 /* MIXINR_MIXOUTR_VOL - [2:0] */ | ||
| 1600 | #define WM8994_MIXINR_MIXOUTR_VOL_SHIFT 0 /* MIXINR_MIXOUTR_VOL - [2:0] */ | ||
| 1601 | #define WM8994_MIXINR_MIXOUTR_VOL_WIDTH 3 /* MIXINR_MIXOUTR_VOL - [2:0] */ | ||
| 1602 | |||
| 1603 | /* | ||
| 1604 | * R51 (0x33) - HPOUT2 Mixer | ||
| 1605 | */ | ||
| 1606 | #define WM8994_IN2LRP_TO_HPOUT2 0x0020 /* IN2LRP_TO_HPOUT2 */ | ||
| 1607 | #define WM8994_IN2LRP_TO_HPOUT2_MASK 0x0020 /* IN2LRP_TO_HPOUT2 */ | ||
| 1608 | #define WM8994_IN2LRP_TO_HPOUT2_SHIFT 5 /* IN2LRP_TO_HPOUT2 */ | ||
| 1609 | #define WM8994_IN2LRP_TO_HPOUT2_WIDTH 1 /* IN2LRP_TO_HPOUT2 */ | ||
| 1610 | #define WM8994_MIXOUTLVOL_TO_HPOUT2 0x0010 /* MIXOUTLVOL_TO_HPOUT2 */ | ||
| 1611 | #define WM8994_MIXOUTLVOL_TO_HPOUT2_MASK 0x0010 /* MIXOUTLVOL_TO_HPOUT2 */ | ||
| 1612 | #define WM8994_MIXOUTLVOL_TO_HPOUT2_SHIFT 4 /* MIXOUTLVOL_TO_HPOUT2 */ | ||
| 1613 | #define WM8994_MIXOUTLVOL_TO_HPOUT2_WIDTH 1 /* MIXOUTLVOL_TO_HPOUT2 */ | ||
| 1614 | #define WM8994_MIXOUTRVOL_TO_HPOUT2 0x0008 /* MIXOUTRVOL_TO_HPOUT2 */ | ||
| 1615 | #define WM8994_MIXOUTRVOL_TO_HPOUT2_MASK 0x0008 /* MIXOUTRVOL_TO_HPOUT2 */ | ||
| 1616 | #define WM8994_MIXOUTRVOL_TO_HPOUT2_SHIFT 3 /* MIXOUTRVOL_TO_HPOUT2 */ | ||
| 1617 | #define WM8994_MIXOUTRVOL_TO_HPOUT2_WIDTH 1 /* MIXOUTRVOL_TO_HPOUT2 */ | ||
| 1618 | |||
| 1619 | /* | ||
| 1620 | * R52 (0x34) - Line Mixer (1) | ||
| 1621 | */ | ||
| 1622 | #define WM8994_MIXOUTL_TO_LINEOUT1N 0x0040 /* MIXOUTL_TO_LINEOUT1N */ | ||
| 1623 | #define WM8994_MIXOUTL_TO_LINEOUT1N_MASK 0x0040 /* MIXOUTL_TO_LINEOUT1N */ | ||
| 1624 | #define WM8994_MIXOUTL_TO_LINEOUT1N_SHIFT 6 /* MIXOUTL_TO_LINEOUT1N */ | ||
| 1625 | #define WM8994_MIXOUTL_TO_LINEOUT1N_WIDTH 1 /* MIXOUTL_TO_LINEOUT1N */ | ||
| 1626 | #define WM8994_MIXOUTR_TO_LINEOUT1N 0x0020 /* MIXOUTR_TO_LINEOUT1N */ | ||
| 1627 | #define WM8994_MIXOUTR_TO_LINEOUT1N_MASK 0x0020 /* MIXOUTR_TO_LINEOUT1N */ | ||
| 1628 | #define WM8994_MIXOUTR_TO_LINEOUT1N_SHIFT 5 /* MIXOUTR_TO_LINEOUT1N */ | ||
| 1629 | #define WM8994_MIXOUTR_TO_LINEOUT1N_WIDTH 1 /* MIXOUTR_TO_LINEOUT1N */ | ||
| 1630 | #define WM8994_LINEOUT1_MODE 0x0010 /* LINEOUT1_MODE */ | ||
| 1631 | #define WM8994_LINEOUT1_MODE_MASK 0x0010 /* LINEOUT1_MODE */ | ||
| 1632 | #define WM8994_LINEOUT1_MODE_SHIFT 4 /* LINEOUT1_MODE */ | ||
| 1633 | #define WM8994_LINEOUT1_MODE_WIDTH 1 /* LINEOUT1_MODE */ | ||
| 1634 | #define WM8994_IN1R_TO_LINEOUT1P 0x0004 /* IN1R_TO_LINEOUT1P */ | ||
| 1635 | #define WM8994_IN1R_TO_LINEOUT1P_MASK 0x0004 /* IN1R_TO_LINEOUT1P */ | ||
| 1636 | #define WM8994_IN1R_TO_LINEOUT1P_SHIFT 2 /* IN1R_TO_LINEOUT1P */ | ||
| 1637 | #define WM8994_IN1R_TO_LINEOUT1P_WIDTH 1 /* IN1R_TO_LINEOUT1P */ | ||
| 1638 | #define WM8994_IN1L_TO_LINEOUT1P 0x0002 /* IN1L_TO_LINEOUT1P */ | ||
| 1639 | #define WM8994_IN1L_TO_LINEOUT1P_MASK 0x0002 /* IN1L_TO_LINEOUT1P */ | ||
| 1640 | #define WM8994_IN1L_TO_LINEOUT1P_SHIFT 1 /* IN1L_TO_LINEOUT1P */ | ||
| 1641 | #define WM8994_IN1L_TO_LINEOUT1P_WIDTH 1 /* IN1L_TO_LINEOUT1P */ | ||
| 1642 | #define WM8994_MIXOUTL_TO_LINEOUT1P 0x0001 /* MIXOUTL_TO_LINEOUT1P */ | ||
| 1643 | #define WM8994_MIXOUTL_TO_LINEOUT1P_MASK 0x0001 /* MIXOUTL_TO_LINEOUT1P */ | ||
| 1644 | #define WM8994_MIXOUTL_TO_LINEOUT1P_SHIFT 0 /* MIXOUTL_TO_LINEOUT1P */ | ||
| 1645 | #define WM8994_MIXOUTL_TO_LINEOUT1P_WIDTH 1 /* MIXOUTL_TO_LINEOUT1P */ | ||
| 1646 | |||
| 1647 | /* | ||
| 1648 | * R53 (0x35) - Line Mixer (2) | ||
| 1649 | */ | ||
| 1650 | #define WM8994_MIXOUTR_TO_LINEOUT2N 0x0040 /* MIXOUTR_TO_LINEOUT2N */ | ||
| 1651 | #define WM8994_MIXOUTR_TO_LINEOUT2N_MASK 0x0040 /* MIXOUTR_TO_LINEOUT2N */ | ||
| 1652 | #define WM8994_MIXOUTR_TO_LINEOUT2N_SHIFT 6 /* MIXOUTR_TO_LINEOUT2N */ | ||
| 1653 | #define WM8994_MIXOUTR_TO_LINEOUT2N_WIDTH 1 /* MIXOUTR_TO_LINEOUT2N */ | ||
| 1654 | #define WM8994_MIXOUTL_TO_LINEOUT2N 0x0020 /* MIXOUTL_TO_LINEOUT2N */ | ||
| 1655 | #define WM8994_MIXOUTL_TO_LINEOUT2N_MASK 0x0020 /* MIXOUTL_TO_LINEOUT2N */ | ||
| 1656 | #define WM8994_MIXOUTL_TO_LINEOUT2N_SHIFT 5 /* MIXOUTL_TO_LINEOUT2N */ | ||
| 1657 | #define WM8994_MIXOUTL_TO_LINEOUT2N_WIDTH 1 /* MIXOUTL_TO_LINEOUT2N */ | ||
| 1658 | #define WM8994_LINEOUT2_MODE 0x0010 /* LINEOUT2_MODE */ | ||
| 1659 | #define WM8994_LINEOUT2_MODE_MASK 0x0010 /* LINEOUT2_MODE */ | ||
| 1660 | #define WM8994_LINEOUT2_MODE_SHIFT 4 /* LINEOUT2_MODE */ | ||
| 1661 | #define WM8994_LINEOUT2_MODE_WIDTH 1 /* LINEOUT2_MODE */ | ||
| 1662 | #define WM8994_IN1L_TO_LINEOUT2P 0x0004 /* IN1L_TO_LINEOUT2P */ | ||
| 1663 | #define WM8994_IN1L_TO_LINEOUT2P_MASK 0x0004 /* IN1L_TO_LINEOUT2P */ | ||
| 1664 | #define WM8994_IN1L_TO_LINEOUT2P_SHIFT 2 /* IN1L_TO_LINEOUT2P */ | ||
| 1665 | #define WM8994_IN1L_TO_LINEOUT2P_WIDTH 1 /* IN1L_TO_LINEOUT2P */ | ||
| 1666 | #define WM8994_IN1R_TO_LINEOUT2P 0x0002 /* IN1R_TO_LINEOUT2P */ | ||
| 1667 | #define WM8994_IN1R_TO_LINEOUT2P_MASK 0x0002 /* IN1R_TO_LINEOUT2P */ | ||
| 1668 | #define WM8994_IN1R_TO_LINEOUT2P_SHIFT 1 /* IN1R_TO_LINEOUT2P */ | ||
| 1669 | #define WM8994_IN1R_TO_LINEOUT2P_WIDTH 1 /* IN1R_TO_LINEOUT2P */ | ||
| 1670 | #define WM8994_MIXOUTR_TO_LINEOUT2P 0x0001 /* MIXOUTR_TO_LINEOUT2P */ | ||
| 1671 | #define WM8994_MIXOUTR_TO_LINEOUT2P_MASK 0x0001 /* MIXOUTR_TO_LINEOUT2P */ | ||
| 1672 | #define WM8994_MIXOUTR_TO_LINEOUT2P_SHIFT 0 /* MIXOUTR_TO_LINEOUT2P */ | ||
| 1673 | #define WM8994_MIXOUTR_TO_LINEOUT2P_WIDTH 1 /* MIXOUTR_TO_LINEOUT2P */ | ||
| 1674 | |||
| 1675 | /* | ||
| 1676 | * R54 (0x36) - Speaker Mixer | ||
| 1677 | */ | ||
| 1678 | #define WM8994_DAC2L_TO_SPKMIXL 0x0200 /* DAC2L_TO_SPKMIXL */ | ||
| 1679 | #define WM8994_DAC2L_TO_SPKMIXL_MASK 0x0200 /* DAC2L_TO_SPKMIXL */ | ||
| 1680 | #define WM8994_DAC2L_TO_SPKMIXL_SHIFT 9 /* DAC2L_TO_SPKMIXL */ | ||
| 1681 | #define WM8994_DAC2L_TO_SPKMIXL_WIDTH 1 /* DAC2L_TO_SPKMIXL */ | ||
| 1682 | #define WM8994_DAC2R_TO_SPKMIXR 0x0100 /* DAC2R_TO_SPKMIXR */ | ||
| 1683 | #define WM8994_DAC2R_TO_SPKMIXR_MASK 0x0100 /* DAC2R_TO_SPKMIXR */ | ||
| 1684 | #define WM8994_DAC2R_TO_SPKMIXR_SHIFT 8 /* DAC2R_TO_SPKMIXR */ | ||
| 1685 | #define WM8994_DAC2R_TO_SPKMIXR_WIDTH 1 /* DAC2R_TO_SPKMIXR */ | ||
| 1686 | #define WM8994_MIXINL_TO_SPKMIXL 0x0080 /* MIXINL_TO_SPKMIXL */ | ||
| 1687 | #define WM8994_MIXINL_TO_SPKMIXL_MASK 0x0080 /* MIXINL_TO_SPKMIXL */ | ||
| 1688 | #define WM8994_MIXINL_TO_SPKMIXL_SHIFT 7 /* MIXINL_TO_SPKMIXL */ | ||
| 1689 | #define WM8994_MIXINL_TO_SPKMIXL_WIDTH 1 /* MIXINL_TO_SPKMIXL */ | ||
| 1690 | #define WM8994_MIXINR_TO_SPKMIXR 0x0040 /* MIXINR_TO_SPKMIXR */ | ||
| 1691 | #define WM8994_MIXINR_TO_SPKMIXR_MASK 0x0040 /* MIXINR_TO_SPKMIXR */ | ||
| 1692 | #define WM8994_MIXINR_TO_SPKMIXR_SHIFT 6 /* MIXINR_TO_SPKMIXR */ | ||
| 1693 | #define WM8994_MIXINR_TO_SPKMIXR_WIDTH 1 /* MIXINR_TO_SPKMIXR */ | ||
| 1694 | #define WM8994_IN1LP_TO_SPKMIXL 0x0020 /* IN1LP_TO_SPKMIXL */ | ||
| 1695 | #define WM8994_IN1LP_TO_SPKMIXL_MASK 0x0020 /* IN1LP_TO_SPKMIXL */ | ||
| 1696 | #define WM8994_IN1LP_TO_SPKMIXL_SHIFT 5 /* IN1LP_TO_SPKMIXL */ | ||
| 1697 | #define WM8994_IN1LP_TO_SPKMIXL_WIDTH 1 /* IN1LP_TO_SPKMIXL */ | ||
| 1698 | #define WM8994_IN1RP_TO_SPKMIXR 0x0010 /* IN1RP_TO_SPKMIXR */ | ||
| 1699 | #define WM8994_IN1RP_TO_SPKMIXR_MASK 0x0010 /* IN1RP_TO_SPKMIXR */ | ||
| 1700 | #define WM8994_IN1RP_TO_SPKMIXR_SHIFT 4 /* IN1RP_TO_SPKMIXR */ | ||
| 1701 | #define WM8994_IN1RP_TO_SPKMIXR_WIDTH 1 /* IN1RP_TO_SPKMIXR */ | ||
| 1702 | #define WM8994_MIXOUTL_TO_SPKMIXL 0x0008 /* MIXOUTL_TO_SPKMIXL */ | ||
| 1703 | #define WM8994_MIXOUTL_TO_SPKMIXL_MASK 0x0008 /* MIXOUTL_TO_SPKMIXL */ | ||
| 1704 | #define WM8994_MIXOUTL_TO_SPKMIXL_SHIFT 3 /* MIXOUTL_TO_SPKMIXL */ | ||
| 1705 | #define WM8994_MIXOUTL_TO_SPKMIXL_WIDTH 1 /* MIXOUTL_TO_SPKMIXL */ | ||
| 1706 | #define WM8994_MIXOUTR_TO_SPKMIXR 0x0004 /* MIXOUTR_TO_SPKMIXR */ | ||
| 1707 | #define WM8994_MIXOUTR_TO_SPKMIXR_MASK 0x0004 /* MIXOUTR_TO_SPKMIXR */ | ||
| 1708 | #define WM8994_MIXOUTR_TO_SPKMIXR_SHIFT 2 /* MIXOUTR_TO_SPKMIXR */ | ||
| 1709 | #define WM8994_MIXOUTR_TO_SPKMIXR_WIDTH 1 /* MIXOUTR_TO_SPKMIXR */ | ||
| 1710 | #define WM8994_DAC1L_TO_SPKMIXL 0x0002 /* DAC1L_TO_SPKMIXL */ | ||
| 1711 | #define WM8994_DAC1L_TO_SPKMIXL_MASK 0x0002 /* DAC1L_TO_SPKMIXL */ | ||
| 1712 | #define WM8994_DAC1L_TO_SPKMIXL_SHIFT 1 /* DAC1L_TO_SPKMIXL */ | ||
| 1713 | #define WM8994_DAC1L_TO_SPKMIXL_WIDTH 1 /* DAC1L_TO_SPKMIXL */ | ||
| 1714 | #define WM8994_DAC1R_TO_SPKMIXR 0x0001 /* DAC1R_TO_SPKMIXR */ | ||
| 1715 | #define WM8994_DAC1R_TO_SPKMIXR_MASK 0x0001 /* DAC1R_TO_SPKMIXR */ | ||
| 1716 | #define WM8994_DAC1R_TO_SPKMIXR_SHIFT 0 /* DAC1R_TO_SPKMIXR */ | ||
| 1717 | #define WM8994_DAC1R_TO_SPKMIXR_WIDTH 1 /* DAC1R_TO_SPKMIXR */ | ||
| 1718 | |||
| 1719 | /* | ||
| 1720 | * R55 (0x37) - Additional Control | ||
| 1721 | */ | ||
| 1722 | #define WM8994_LINEOUT1_FB 0x0080 /* LINEOUT1_FB */ | ||
| 1723 | #define WM8994_LINEOUT1_FB_MASK 0x0080 /* LINEOUT1_FB */ | ||
| 1724 | #define WM8994_LINEOUT1_FB_SHIFT 7 /* LINEOUT1_FB */ | ||
| 1725 | #define WM8994_LINEOUT1_FB_WIDTH 1 /* LINEOUT1_FB */ | ||
| 1726 | #define WM8994_LINEOUT2_FB 0x0040 /* LINEOUT2_FB */ | ||
| 1727 | #define WM8994_LINEOUT2_FB_MASK 0x0040 /* LINEOUT2_FB */ | ||
| 1728 | #define WM8994_LINEOUT2_FB_SHIFT 6 /* LINEOUT2_FB */ | ||
| 1729 | #define WM8994_LINEOUT2_FB_WIDTH 1 /* LINEOUT2_FB */ | ||
| 1730 | #define WM8994_VROI 0x0001 /* VROI */ | ||
| 1731 | #define WM8994_VROI_MASK 0x0001 /* VROI */ | ||
| 1732 | #define WM8994_VROI_SHIFT 0 /* VROI */ | ||
| 1733 | #define WM8994_VROI_WIDTH 1 /* VROI */ | ||
| 1734 | |||
| 1735 | /* | ||
| 1736 | * R56 (0x38) - AntiPOP (1) | ||
| 1737 | */ | ||
| 1738 | #define WM8994_LINEOUT_VMID_BUF_ENA 0x0080 /* LINEOUT_VMID_BUF_ENA */ | ||
| 1739 | #define WM8994_LINEOUT_VMID_BUF_ENA_MASK 0x0080 /* LINEOUT_VMID_BUF_ENA */ | ||
| 1740 | #define WM8994_LINEOUT_VMID_BUF_ENA_SHIFT 7 /* LINEOUT_VMID_BUF_ENA */ | ||
| 1741 | #define WM8994_LINEOUT_VMID_BUF_ENA_WIDTH 1 /* LINEOUT_VMID_BUF_ENA */ | ||
| 1742 | #define WM8994_HPOUT2_IN_ENA 0x0040 /* HPOUT2_IN_ENA */ | ||
| 1743 | #define WM8994_HPOUT2_IN_ENA_MASK 0x0040 /* HPOUT2_IN_ENA */ | ||
| 1744 | #define WM8994_HPOUT2_IN_ENA_SHIFT 6 /* HPOUT2_IN_ENA */ | ||
| 1745 | #define WM8994_HPOUT2_IN_ENA_WIDTH 1 /* HPOUT2_IN_ENA */ | ||
| 1746 | #define WM8994_LINEOUT1_DISCH 0x0020 /* LINEOUT1_DISCH */ | ||
| 1747 | #define WM8994_LINEOUT1_DISCH_MASK 0x0020 /* LINEOUT1_DISCH */ | ||
| 1748 | #define WM8994_LINEOUT1_DISCH_SHIFT 5 /* LINEOUT1_DISCH */ | ||
| 1749 | #define WM8994_LINEOUT1_DISCH_WIDTH 1 /* LINEOUT1_DISCH */ | ||
| 1750 | #define WM8994_LINEOUT2_DISCH 0x0010 /* LINEOUT2_DISCH */ | ||
| 1751 | #define WM8994_LINEOUT2_DISCH_MASK 0x0010 /* LINEOUT2_DISCH */ | ||
| 1752 | #define WM8994_LINEOUT2_DISCH_SHIFT 4 /* LINEOUT2_DISCH */ | ||
| 1753 | #define WM8994_LINEOUT2_DISCH_WIDTH 1 /* LINEOUT2_DISCH */ | ||
| 1754 | |||
| 1755 | /* | ||
| 1756 | * R57 (0x39) - AntiPOP (2) | ||
| 1757 | */ | ||
| 1758 | #define WM8994_MICB2_DISCH 0x0100 /* MICB2_DISCH */ | ||
| 1759 | #define WM8994_MICB2_DISCH_MASK 0x0100 /* MICB2_DISCH */ | ||
| 1760 | #define WM8994_MICB2_DISCH_SHIFT 8 /* MICB2_DISCH */ | ||
| 1761 | #define WM8994_MICB2_DISCH_WIDTH 1 /* MICB2_DISCH */ | ||
| 1762 | #define WM8994_MICB1_DISCH 0x0080 /* MICB1_DISCH */ | ||
| 1763 | #define WM8994_MICB1_DISCH_MASK 0x0080 /* MICB1_DISCH */ | ||
| 1764 | #define WM8994_MICB1_DISCH_SHIFT 7 /* MICB1_DISCH */ | ||
| 1765 | #define WM8994_MICB1_DISCH_WIDTH 1 /* MICB1_DISCH */ | ||
| 1766 | #define WM8994_VMID_RAMP_MASK 0x0060 /* VMID_RAMP - [6:5] */ | ||
| 1767 | #define WM8994_VMID_RAMP_SHIFT 5 /* VMID_RAMP - [6:5] */ | ||
| 1768 | #define WM8994_VMID_RAMP_WIDTH 2 /* VMID_RAMP - [6:5] */ | ||
| 1769 | #define WM8994_VMID_BUF_ENA 0x0008 /* VMID_BUF_ENA */ | ||
| 1770 | #define WM8994_VMID_BUF_ENA_MASK 0x0008 /* VMID_BUF_ENA */ | ||
| 1771 | #define WM8994_VMID_BUF_ENA_SHIFT 3 /* VMID_BUF_ENA */ | ||
| 1772 | #define WM8994_VMID_BUF_ENA_WIDTH 1 /* VMID_BUF_ENA */ | ||
| 1773 | #define WM8994_STARTUP_BIAS_ENA 0x0004 /* STARTUP_BIAS_ENA */ | ||
| 1774 | #define WM8994_STARTUP_BIAS_ENA_MASK 0x0004 /* STARTUP_BIAS_ENA */ | ||
| 1775 | #define WM8994_STARTUP_BIAS_ENA_SHIFT 2 /* STARTUP_BIAS_ENA */ | ||
| 1776 | #define WM8994_STARTUP_BIAS_ENA_WIDTH 1 /* STARTUP_BIAS_ENA */ | ||
| 1777 | #define WM8994_BIAS_SRC 0x0002 /* BIAS_SRC */ | ||
| 1778 | #define WM8994_BIAS_SRC_MASK 0x0002 /* BIAS_SRC */ | ||
| 1779 | #define WM8994_BIAS_SRC_SHIFT 1 /* BIAS_SRC */ | ||
| 1780 | #define WM8994_BIAS_SRC_WIDTH 1 /* BIAS_SRC */ | ||
| 1781 | #define WM8994_VMID_DISCH 0x0001 /* VMID_DISCH */ | ||
| 1782 | #define WM8994_VMID_DISCH_MASK 0x0001 /* VMID_DISCH */ | ||
| 1783 | #define WM8994_VMID_DISCH_SHIFT 0 /* VMID_DISCH */ | ||
| 1784 | #define WM8994_VMID_DISCH_WIDTH 1 /* VMID_DISCH */ | ||
| 1785 | |||
| 1786 | /* | ||
| 1787 | * R58 (0x3A) - MICBIAS | ||
| 1788 | */ | ||
| 1789 | #define WM8994_MICD_SCTHR_MASK 0x00C0 /* MICD_SCTHR - [7:6] */ | ||
| 1790 | #define WM8994_MICD_SCTHR_SHIFT 6 /* MICD_SCTHR - [7:6] */ | ||
| 1791 | #define WM8994_MICD_SCTHR_WIDTH 2 /* MICD_SCTHR - [7:6] */ | ||
| 1792 | #define WM8994_MICD_THR_MASK 0x0038 /* MICD_THR - [5:3] */ | ||
| 1793 | #define WM8994_MICD_THR_SHIFT 3 /* MICD_THR - [5:3] */ | ||
| 1794 | #define WM8994_MICD_THR_WIDTH 3 /* MICD_THR - [5:3] */ | ||
| 1795 | #define WM8994_MICD_ENA 0x0004 /* MICD_ENA */ | ||
| 1796 | #define WM8994_MICD_ENA_MASK 0x0004 /* MICD_ENA */ | ||
| 1797 | #define WM8994_MICD_ENA_SHIFT 2 /* MICD_ENA */ | ||
| 1798 | #define WM8994_MICD_ENA_WIDTH 1 /* MICD_ENA */ | ||
| 1799 | #define WM8994_MICB2_LVL 0x0002 /* MICB2_LVL */ | ||
| 1800 | #define WM8994_MICB2_LVL_MASK 0x0002 /* MICB2_LVL */ | ||
| 1801 | #define WM8994_MICB2_LVL_SHIFT 1 /* MICB2_LVL */ | ||
| 1802 | #define WM8994_MICB2_LVL_WIDTH 1 /* MICB2_LVL */ | ||
| 1803 | #define WM8994_MICB1_LVL 0x0001 /* MICB1_LVL */ | ||
| 1804 | #define WM8994_MICB1_LVL_MASK 0x0001 /* MICB1_LVL */ | ||
| 1805 | #define WM8994_MICB1_LVL_SHIFT 0 /* MICB1_LVL */ | ||
| 1806 | #define WM8994_MICB1_LVL_WIDTH 1 /* MICB1_LVL */ | ||
| 1807 | |||
| 1808 | /* | ||
| 1809 | * R59 (0x3B) - LDO 1 | ||
| 1810 | */ | ||
| 1811 | #define WM8994_LDO1_VSEL_MASK 0x000E /* LDO1_VSEL - [3:1] */ | ||
| 1812 | #define WM8994_LDO1_VSEL_SHIFT 1 /* LDO1_VSEL - [3:1] */ | ||
| 1813 | #define WM8994_LDO1_VSEL_WIDTH 3 /* LDO1_VSEL - [3:1] */ | ||
| 1814 | #define WM8994_LDO1_DISCH 0x0001 /* LDO1_DISCH */ | ||
| 1815 | #define WM8994_LDO1_DISCH_MASK 0x0001 /* LDO1_DISCH */ | ||
| 1816 | #define WM8994_LDO1_DISCH_SHIFT 0 /* LDO1_DISCH */ | ||
| 1817 | #define WM8994_LDO1_DISCH_WIDTH 1 /* LDO1_DISCH */ | ||
| 1818 | |||
| 1819 | /* | ||
| 1820 | * R60 (0x3C) - LDO 2 | ||
| 1821 | */ | ||
| 1822 | #define WM8994_LDO2_VSEL_MASK 0x0006 /* LDO2_VSEL - [2:1] */ | ||
| 1823 | #define WM8994_LDO2_VSEL_SHIFT 1 /* LDO2_VSEL - [2:1] */ | ||
| 1824 | #define WM8994_LDO2_VSEL_WIDTH 2 /* LDO2_VSEL - [2:1] */ | ||
| 1825 | #define WM8994_LDO2_DISCH 0x0001 /* LDO2_DISCH */ | ||
| 1826 | #define WM8994_LDO2_DISCH_MASK 0x0001 /* LDO2_DISCH */ | ||
| 1827 | #define WM8994_LDO2_DISCH_SHIFT 0 /* LDO2_DISCH */ | ||
| 1828 | #define WM8994_LDO2_DISCH_WIDTH 1 /* LDO2_DISCH */ | ||
| 1829 | |||
| 1830 | /* | ||
| 1831 | * R76 (0x4C) - Charge Pump (1) | ||
| 1832 | */ | ||
| 1833 | #define WM8994_CP_ENA 0x8000 /* CP_ENA */ | ||
| 1834 | #define WM8994_CP_ENA_MASK 0x8000 /* CP_ENA */ | ||
| 1835 | #define WM8994_CP_ENA_SHIFT 15 /* CP_ENA */ | ||
| 1836 | #define WM8994_CP_ENA_WIDTH 1 /* CP_ENA */ | ||
| 1837 | |||
| 1838 | /* | ||
| 1839 | * R81 (0x51) - Class W (1) | ||
| 1840 | */ | ||
| 1841 | #define WM8994_CP_DYN_SRC_SEL_MASK 0x0300 /* CP_DYN_SRC_SEL - [9:8] */ | ||
| 1842 | #define WM8994_CP_DYN_SRC_SEL_SHIFT 8 /* CP_DYN_SRC_SEL - [9:8] */ | ||
| 1843 | #define WM8994_CP_DYN_SRC_SEL_WIDTH 2 /* CP_DYN_SRC_SEL - [9:8] */ | ||
| 1844 | #define WM8994_CP_DYN_PWR 0x0001 /* CP_DYN_PWR */ | ||
| 1845 | #define WM8994_CP_DYN_PWR_MASK 0x0001 /* CP_DYN_PWR */ | ||
| 1846 | #define WM8994_CP_DYN_PWR_SHIFT 0 /* CP_DYN_PWR */ | ||
| 1847 | #define WM8994_CP_DYN_PWR_WIDTH 1 /* CP_DYN_PWR */ | ||
| 1848 | |||
| 1849 | /* | ||
| 1850 | * R84 (0x54) - DC Servo (1) | ||
| 1851 | */ | ||
| 1852 | #define WM8994_DCS_TRIG_SINGLE_1 0x2000 /* DCS_TRIG_SINGLE_1 */ | ||
| 1853 | #define WM8994_DCS_TRIG_SINGLE_1_MASK 0x2000 /* DCS_TRIG_SINGLE_1 */ | ||
| 1854 | #define WM8994_DCS_TRIG_SINGLE_1_SHIFT 13 /* DCS_TRIG_SINGLE_1 */ | ||
| 1855 | #define WM8994_DCS_TRIG_SINGLE_1_WIDTH 1 /* DCS_TRIG_SINGLE_1 */ | ||
| 1856 | #define WM8994_DCS_TRIG_SINGLE_0 0x1000 /* DCS_TRIG_SINGLE_0 */ | ||
| 1857 | #define WM8994_DCS_TRIG_SINGLE_0_MASK 0x1000 /* DCS_TRIG_SINGLE_0 */ | ||
| 1858 | #define WM8994_DCS_TRIG_SINGLE_0_SHIFT 12 /* DCS_TRIG_SINGLE_0 */ | ||
| 1859 | #define WM8994_DCS_TRIG_SINGLE_0_WIDTH 1 /* DCS_TRIG_SINGLE_0 */ | ||
| 1860 | #define WM8994_DCS_TRIG_SERIES_1 0x0200 /* DCS_TRIG_SERIES_1 */ | ||
| 1861 | #define WM8994_DCS_TRIG_SERIES_1_MASK 0x0200 /* DCS_TRIG_SERIES_1 */ | ||
| 1862 | #define WM8994_DCS_TRIG_SERIES_1_SHIFT 9 /* DCS_TRIG_SERIES_1 */ | ||
| 1863 | #define WM8994_DCS_TRIG_SERIES_1_WIDTH 1 /* DCS_TRIG_SERIES_1 */ | ||
| 1864 | #define WM8994_DCS_TRIG_SERIES_0 0x0100 /* DCS_TRIG_SERIES_0 */ | ||
| 1865 | #define WM8994_DCS_TRIG_SERIES_0_MASK 0x0100 /* DCS_TRIG_SERIES_0 */ | ||
| 1866 | #define WM8994_DCS_TRIG_SERIES_0_SHIFT 8 /* DCS_TRIG_SERIES_0 */ | ||
| 1867 | #define WM8994_DCS_TRIG_SERIES_0_WIDTH 1 /* DCS_TRIG_SERIES_0 */ | ||
| 1868 | #define WM8994_DCS_TRIG_STARTUP_1 0x0020 /* DCS_TRIG_STARTUP_1 */ | ||
| 1869 | #define WM8994_DCS_TRIG_STARTUP_1_MASK 0x0020 /* DCS_TRIG_STARTUP_1 */ | ||
| 1870 | #define WM8994_DCS_TRIG_STARTUP_1_SHIFT 5 /* DCS_TRIG_STARTUP_1 */ | ||
| 1871 | #define WM8994_DCS_TRIG_STARTUP_1_WIDTH 1 /* DCS_TRIG_STARTUP_1 */ | ||
| 1872 | #define WM8994_DCS_TRIG_STARTUP_0 0x0010 /* DCS_TRIG_STARTUP_0 */ | ||
| 1873 | #define WM8994_DCS_TRIG_STARTUP_0_MASK 0x0010 /* DCS_TRIG_STARTUP_0 */ | ||
| 1874 | #define WM8994_DCS_TRIG_STARTUP_0_SHIFT 4 /* DCS_TRIG_STARTUP_0 */ | ||
| 1875 | #define WM8994_DCS_TRIG_STARTUP_0_WIDTH 1 /* DCS_TRIG_STARTUP_0 */ | ||
| 1876 | #define WM8994_DCS_TRIG_DAC_WR_1 0x0008 /* DCS_TRIG_DAC_WR_1 */ | ||
| 1877 | #define WM8994_DCS_TRIG_DAC_WR_1_MASK 0x0008 /* DCS_TRIG_DAC_WR_1 */ | ||
| 1878 | #define WM8994_DCS_TRIG_DAC_WR_1_SHIFT 3 /* DCS_TRIG_DAC_WR_1 */ | ||
| 1879 | #define WM8994_DCS_TRIG_DAC_WR_1_WIDTH 1 /* DCS_TRIG_DAC_WR_1 */ | ||
| 1880 | #define WM8994_DCS_TRIG_DAC_WR_0 0x0004 /* DCS_TRIG_DAC_WR_0 */ | ||
| 1881 | #define WM8994_DCS_TRIG_DAC_WR_0_MASK 0x0004 /* DCS_TRIG_DAC_WR_0 */ | ||
| 1882 | #define WM8994_DCS_TRIG_DAC_WR_0_SHIFT 2 /* DCS_TRIG_DAC_WR_0 */ | ||
| 1883 | #define WM8994_DCS_TRIG_DAC_WR_0_WIDTH 1 /* DCS_TRIG_DAC_WR_0 */ | ||
| 1884 | #define WM8994_DCS_ENA_CHAN_1 0x0002 /* DCS_ENA_CHAN_1 */ | ||
| 1885 | #define WM8994_DCS_ENA_CHAN_1_MASK 0x0002 /* DCS_ENA_CHAN_1 */ | ||
| 1886 | #define WM8994_DCS_ENA_CHAN_1_SHIFT 1 /* DCS_ENA_CHAN_1 */ | ||
| 1887 | #define WM8994_DCS_ENA_CHAN_1_WIDTH 1 /* DCS_ENA_CHAN_1 */ | ||
| 1888 | #define WM8994_DCS_ENA_CHAN_0 0x0001 /* DCS_ENA_CHAN_0 */ | ||
| 1889 | #define WM8994_DCS_ENA_CHAN_0_MASK 0x0001 /* DCS_ENA_CHAN_0 */ | ||
| 1890 | #define WM8994_DCS_ENA_CHAN_0_SHIFT 0 /* DCS_ENA_CHAN_0 */ | ||
| 1891 | #define WM8994_DCS_ENA_CHAN_0_WIDTH 1 /* DCS_ENA_CHAN_0 */ | ||
| 1892 | |||
| 1893 | /* | ||
| 1894 | * R85 (0x55) - DC Servo (2) | ||
| 1895 | */ | ||
| 1896 | #define WM8994_DCS_SERIES_NO_01_MASK 0x0FE0 /* DCS_SERIES_NO_01 - [11:5] */ | ||
| 1897 | #define WM8994_DCS_SERIES_NO_01_SHIFT 5 /* DCS_SERIES_NO_01 - [11:5] */ | ||
| 1898 | #define WM8994_DCS_SERIES_NO_01_WIDTH 7 /* DCS_SERIES_NO_01 - [11:5] */ | ||
| 1899 | #define WM8994_DCS_TIMER_PERIOD_01_MASK 0x000F /* DCS_TIMER_PERIOD_01 - [3:0] */ | ||
| 1900 | #define WM8994_DCS_TIMER_PERIOD_01_SHIFT 0 /* DCS_TIMER_PERIOD_01 - [3:0] */ | ||
| 1901 | #define WM8994_DCS_TIMER_PERIOD_01_WIDTH 4 /* DCS_TIMER_PERIOD_01 - [3:0] */ | ||
| 1902 | |||
| 1903 | /* | ||
| 1904 | * R87 (0x57) - DC Servo (4) | ||
| 1905 | */ | ||
| 1906 | #define WM8994_DCS_DAC_WR_VAL_1_MASK 0xFF00 /* DCS_DAC_WR_VAL_1 - [15:8] */ | ||
| 1907 | #define WM8994_DCS_DAC_WR_VAL_1_SHIFT 8 /* DCS_DAC_WR_VAL_1 - [15:8] */ | ||
| 1908 | #define WM8994_DCS_DAC_WR_VAL_1_WIDTH 8 /* DCS_DAC_WR_VAL_1 - [15:8] */ | ||
| 1909 | #define WM8994_DCS_DAC_WR_VAL_0_MASK 0x00FF /* DCS_DAC_WR_VAL_0 - [7:0] */ | ||
| 1910 | #define WM8994_DCS_DAC_WR_VAL_0_SHIFT 0 /* DCS_DAC_WR_VAL_0 - [7:0] */ | ||
| 1911 | #define WM8994_DCS_DAC_WR_VAL_0_WIDTH 8 /* DCS_DAC_WR_VAL_0 - [7:0] */ | ||
| 1912 | |||
| 1913 | /* | ||
| 1914 | * R88 (0x58) - DC Servo Readback | ||
| 1915 | */ | ||
| 1916 | #define WM8994_DCS_CAL_COMPLETE_MASK 0x0300 /* DCS_CAL_COMPLETE - [9:8] */ | ||
| 1917 | #define WM8994_DCS_CAL_COMPLETE_SHIFT 8 /* DCS_CAL_COMPLETE - [9:8] */ | ||
| 1918 | #define WM8994_DCS_CAL_COMPLETE_WIDTH 2 /* DCS_CAL_COMPLETE - [9:8] */ | ||
| 1919 | #define WM8994_DCS_DAC_WR_COMPLETE_MASK 0x0030 /* DCS_DAC_WR_COMPLETE - [5:4] */ | ||
| 1920 | #define WM8994_DCS_DAC_WR_COMPLETE_SHIFT 4 /* DCS_DAC_WR_COMPLETE - [5:4] */ | ||
| 1921 | #define WM8994_DCS_DAC_WR_COMPLETE_WIDTH 2 /* DCS_DAC_WR_COMPLETE - [5:4] */ | ||
| 1922 | #define WM8994_DCS_STARTUP_COMPLETE_MASK 0x0003 /* DCS_STARTUP_COMPLETE - [1:0] */ | ||
| 1923 | #define WM8994_DCS_STARTUP_COMPLETE_SHIFT 0 /* DCS_STARTUP_COMPLETE - [1:0] */ | ||
| 1924 | #define WM8994_DCS_STARTUP_COMPLETE_WIDTH 2 /* DCS_STARTUP_COMPLETE - [1:0] */ | ||
| 1925 | |||
| 1926 | /* | ||
| 1927 | * R96 (0x60) - Analogue HP (1) | ||
| 1928 | */ | ||
| 1929 | #define WM8994_HPOUT1L_RMV_SHORT 0x0080 /* HPOUT1L_RMV_SHORT */ | ||
| 1930 | #define WM8994_HPOUT1L_RMV_SHORT_MASK 0x0080 /* HPOUT1L_RMV_SHORT */ | ||
| 1931 | #define WM8994_HPOUT1L_RMV_SHORT_SHIFT 7 /* HPOUT1L_RMV_SHORT */ | ||
| 1932 | #define WM8994_HPOUT1L_RMV_SHORT_WIDTH 1 /* HPOUT1L_RMV_SHORT */ | ||
| 1933 | #define WM8994_HPOUT1L_OUTP 0x0040 /* HPOUT1L_OUTP */ | ||
| 1934 | #define WM8994_HPOUT1L_OUTP_MASK 0x0040 /* HPOUT1L_OUTP */ | ||
| 1935 | #define WM8994_HPOUT1L_OUTP_SHIFT 6 /* HPOUT1L_OUTP */ | ||
| 1936 | #define WM8994_HPOUT1L_OUTP_WIDTH 1 /* HPOUT1L_OUTP */ | ||
| 1937 | #define WM8994_HPOUT1L_DLY 0x0020 /* HPOUT1L_DLY */ | ||
| 1938 | #define WM8994_HPOUT1L_DLY_MASK 0x0020 /* HPOUT1L_DLY */ | ||
| 1939 | #define WM8994_HPOUT1L_DLY_SHIFT 5 /* HPOUT1L_DLY */ | ||
| 1940 | #define WM8994_HPOUT1L_DLY_WIDTH 1 /* HPOUT1L_DLY */ | ||
| 1941 | #define WM8994_HPOUT1R_RMV_SHORT 0x0008 /* HPOUT1R_RMV_SHORT */ | ||
| 1942 | #define WM8994_HPOUT1R_RMV_SHORT_MASK 0x0008 /* HPOUT1R_RMV_SHORT */ | ||
| 1943 | #define WM8994_HPOUT1R_RMV_SHORT_SHIFT 3 /* HPOUT1R_RMV_SHORT */ | ||
| 1944 | #define WM8994_HPOUT1R_RMV_SHORT_WIDTH 1 /* HPOUT1R_RMV_SHORT */ | ||
| 1945 | #define WM8994_HPOUT1R_OUTP 0x0004 /* HPOUT1R_OUTP */ | ||
| 1946 | #define WM8994_HPOUT1R_OUTP_MASK 0x0004 /* HPOUT1R_OUTP */ | ||
| 1947 | #define WM8994_HPOUT1R_OUTP_SHIFT 2 /* HPOUT1R_OUTP */ | ||
| 1948 | #define WM8994_HPOUT1R_OUTP_WIDTH 1 /* HPOUT1R_OUTP */ | ||
| 1949 | #define WM8994_HPOUT1R_DLY 0x0002 /* HPOUT1R_DLY */ | ||
| 1950 | #define WM8994_HPOUT1R_DLY_MASK 0x0002 /* HPOUT1R_DLY */ | ||
| 1951 | #define WM8994_HPOUT1R_DLY_SHIFT 1 /* HPOUT1R_DLY */ | ||
| 1952 | #define WM8994_HPOUT1R_DLY_WIDTH 1 /* HPOUT1R_DLY */ | ||
| 1953 | |||
| 1954 | /* | ||
| 1955 | * R256 (0x100) - Chip Revision | ||
| 1956 | */ | ||
| 1957 | #define WM8994_CHIP_REV_MASK 0x000F /* CHIP_REV - [3:0] */ | ||
| 1958 | #define WM8994_CHIP_REV_SHIFT 0 /* CHIP_REV - [3:0] */ | ||
| 1959 | #define WM8994_CHIP_REV_WIDTH 4 /* CHIP_REV - [3:0] */ | ||
| 1960 | |||
| 1961 | /* | ||
| 1962 | * R257 (0x101) - Control Interface | ||
| 1963 | */ | ||
| 1964 | #define WM8994_SPI_CONTRD 0x0040 /* SPI_CONTRD */ | ||
| 1965 | #define WM8994_SPI_CONTRD_MASK 0x0040 /* SPI_CONTRD */ | ||
| 1966 | #define WM8994_SPI_CONTRD_SHIFT 6 /* SPI_CONTRD */ | ||
| 1967 | #define WM8994_SPI_CONTRD_WIDTH 1 /* SPI_CONTRD */ | ||
| 1968 | #define WM8994_SPI_4WIRE 0x0020 /* SPI_4WIRE */ | ||
| 1969 | #define WM8994_SPI_4WIRE_MASK 0x0020 /* SPI_4WIRE */ | ||
| 1970 | #define WM8994_SPI_4WIRE_SHIFT 5 /* SPI_4WIRE */ | ||
| 1971 | #define WM8994_SPI_4WIRE_WIDTH 1 /* SPI_4WIRE */ | ||
| 1972 | #define WM8994_SPI_CFG 0x0010 /* SPI_CFG */ | ||
| 1973 | #define WM8994_SPI_CFG_MASK 0x0010 /* SPI_CFG */ | ||
| 1974 | #define WM8994_SPI_CFG_SHIFT 4 /* SPI_CFG */ | ||
| 1975 | #define WM8994_SPI_CFG_WIDTH 1 /* SPI_CFG */ | ||
| 1976 | #define WM8994_AUTO_INC 0x0004 /* AUTO_INC */ | ||
| 1977 | #define WM8994_AUTO_INC_MASK 0x0004 /* AUTO_INC */ | ||
| 1978 | #define WM8994_AUTO_INC_SHIFT 2 /* AUTO_INC */ | ||
| 1979 | #define WM8994_AUTO_INC_WIDTH 1 /* AUTO_INC */ | ||
| 1980 | |||
| 1981 | /* | ||
| 1982 | * R272 (0x110) - Write Sequencer Ctrl (1) | ||
| 1983 | */ | ||
| 1984 | #define WM8994_WSEQ_ENA 0x8000 /* WSEQ_ENA */ | ||
| 1985 | #define WM8994_WSEQ_ENA_MASK 0x8000 /* WSEQ_ENA */ | ||
| 1986 | #define WM8994_WSEQ_ENA_SHIFT 15 /* WSEQ_ENA */ | ||
| 1987 | #define WM8994_WSEQ_ENA_WIDTH 1 /* WSEQ_ENA */ | ||
| 1988 | #define WM8994_WSEQ_ABORT 0x0200 /* WSEQ_ABORT */ | ||
| 1989 | #define WM8994_WSEQ_ABORT_MASK 0x0200 /* WSEQ_ABORT */ | ||
| 1990 | #define WM8994_WSEQ_ABORT_SHIFT 9 /* WSEQ_ABORT */ | ||
| 1991 | #define WM8994_WSEQ_ABORT_WIDTH 1 /* WSEQ_ABORT */ | ||
| 1992 | #define WM8994_WSEQ_START 0x0100 /* WSEQ_START */ | ||
| 1993 | #define WM8994_WSEQ_START_MASK 0x0100 /* WSEQ_START */ | ||
| 1994 | #define WM8994_WSEQ_START_SHIFT 8 /* WSEQ_START */ | ||
| 1995 | #define WM8994_WSEQ_START_WIDTH 1 /* WSEQ_START */ | ||
| 1996 | #define WM8994_WSEQ_START_INDEX_MASK 0x007F /* WSEQ_START_INDEX - [6:0] */ | ||
| 1997 | #define WM8994_WSEQ_START_INDEX_SHIFT 0 /* WSEQ_START_INDEX - [6:0] */ | ||
| 1998 | #define WM8994_WSEQ_START_INDEX_WIDTH 7 /* WSEQ_START_INDEX - [6:0] */ | ||
| 1999 | |||
| 2000 | /* | ||
| 2001 | * R273 (0x111) - Write Sequencer Ctrl (2) | ||
| 2002 | */ | ||
| 2003 | #define WM8994_WSEQ_BUSY 0x0100 /* WSEQ_BUSY */ | ||
| 2004 | #define WM8994_WSEQ_BUSY_MASK 0x0100 /* WSEQ_BUSY */ | ||
| 2005 | #define WM8994_WSEQ_BUSY_SHIFT 8 /* WSEQ_BUSY */ | ||
| 2006 | #define WM8994_WSEQ_BUSY_WIDTH 1 /* WSEQ_BUSY */ | ||
| 2007 | #define WM8994_WSEQ_CURRENT_INDEX_MASK 0x007F /* WSEQ_CURRENT_INDEX - [6:0] */ | ||
| 2008 | #define WM8994_WSEQ_CURRENT_INDEX_SHIFT 0 /* WSEQ_CURRENT_INDEX - [6:0] */ | ||
| 2009 | #define WM8994_WSEQ_CURRENT_INDEX_WIDTH 7 /* WSEQ_CURRENT_INDEX - [6:0] */ | ||
| 2010 | |||
| 2011 | /* | ||
| 2012 | * R512 (0x200) - AIF1 Clocking (1) | ||
| 2013 | */ | ||
| 2014 | #define WM8994_AIF1CLK_SRC_MASK 0x0018 /* AIF1CLK_SRC - [4:3] */ | ||
| 2015 | #define WM8994_AIF1CLK_SRC_SHIFT 3 /* AIF1CLK_SRC - [4:3] */ | ||
| 2016 | #define WM8994_AIF1CLK_SRC_WIDTH 2 /* AIF1CLK_SRC - [4:3] */ | ||
| 2017 | #define WM8994_AIF1CLK_INV 0x0004 /* AIF1CLK_INV */ | ||
| 2018 | #define WM8994_AIF1CLK_INV_MASK 0x0004 /* AIF1CLK_INV */ | ||
| 2019 | #define WM8994_AIF1CLK_INV_SHIFT 2 /* AIF1CLK_INV */ | ||
| 2020 | #define WM8994_AIF1CLK_INV_WIDTH 1 /* AIF1CLK_INV */ | ||
| 2021 | #define WM8994_AIF1CLK_DIV 0x0002 /* AIF1CLK_DIV */ | ||
| 2022 | #define WM8994_AIF1CLK_DIV_MASK 0x0002 /* AIF1CLK_DIV */ | ||
| 2023 | #define WM8994_AIF1CLK_DIV_SHIFT 1 /* AIF1CLK_DIV */ | ||
| 2024 | #define WM8994_AIF1CLK_DIV_WIDTH 1 /* AIF1CLK_DIV */ | ||
| 2025 | #define WM8994_AIF1CLK_ENA 0x0001 /* AIF1CLK_ENA */ | ||
| 2026 | #define WM8994_AIF1CLK_ENA_MASK 0x0001 /* AIF1CLK_ENA */ | ||
| 2027 | #define WM8994_AIF1CLK_ENA_SHIFT 0 /* AIF1CLK_ENA */ | ||
| 2028 | #define WM8994_AIF1CLK_ENA_WIDTH 1 /* AIF1CLK_ENA */ | ||
| 2029 | |||
| 2030 | /* | ||
| 2031 | * R513 (0x201) - AIF1 Clocking (2) | ||
| 2032 | */ | ||
| 2033 | #define WM8994_AIF1DAC_DIV_MASK 0x0038 /* AIF1DAC_DIV - [5:3] */ | ||
| 2034 | #define WM8994_AIF1DAC_DIV_SHIFT 3 /* AIF1DAC_DIV - [5:3] */ | ||
| 2035 | #define WM8994_AIF1DAC_DIV_WIDTH 3 /* AIF1DAC_DIV - [5:3] */ | ||
| 2036 | #define WM8994_AIF1ADC_DIV_MASK 0x0007 /* AIF1ADC_DIV - [2:0] */ | ||
| 2037 | #define WM8994_AIF1ADC_DIV_SHIFT 0 /* AIF1ADC_DIV - [2:0] */ | ||
| 2038 | #define WM8994_AIF1ADC_DIV_WIDTH 3 /* AIF1ADC_DIV - [2:0] */ | ||
| 2039 | |||
| 2040 | /* | ||
| 2041 | * R516 (0x204) - AIF2 Clocking (1) | ||
| 2042 | */ | ||
| 2043 | #define WM8994_AIF2CLK_SRC_MASK 0x0018 /* AIF2CLK_SRC - [4:3] */ | ||
| 2044 | #define WM8994_AIF2CLK_SRC_SHIFT 3 /* AIF2CLK_SRC - [4:3] */ | ||
| 2045 | #define WM8994_AIF2CLK_SRC_WIDTH 2 /* AIF2CLK_SRC - [4:3] */ | ||
| 2046 | #define WM8994_AIF2CLK_INV 0x0004 /* AIF2CLK_INV */ | ||
| 2047 | #define WM8994_AIF2CLK_INV_MASK 0x0004 /* AIF2CLK_INV */ | ||
| 2048 | #define WM8994_AIF2CLK_INV_SHIFT 2 /* AIF2CLK_INV */ | ||
| 2049 | #define WM8994_AIF2CLK_INV_WIDTH 1 /* AIF2CLK_INV */ | ||
| 2050 | #define WM8994_AIF2CLK_DIV 0x0002 /* AIF2CLK_DIV */ | ||
| 2051 | #define WM8994_AIF2CLK_DIV_MASK 0x0002 /* AIF2CLK_DIV */ | ||
| 2052 | #define WM8994_AIF2CLK_DIV_SHIFT 1 /* AIF2CLK_DIV */ | ||
| 2053 | #define WM8994_AIF2CLK_DIV_WIDTH 1 /* AIF2CLK_DIV */ | ||
| 2054 | #define WM8994_AIF2CLK_ENA 0x0001 /* AIF2CLK_ENA */ | ||
| 2055 | #define WM8994_AIF2CLK_ENA_MASK 0x0001 /* AIF2CLK_ENA */ | ||
| 2056 | #define WM8994_AIF2CLK_ENA_SHIFT 0 /* AIF2CLK_ENA */ | ||
| 2057 | #define WM8994_AIF2CLK_ENA_WIDTH 1 /* AIF2CLK_ENA */ | ||
| 2058 | |||
| 2059 | /* | ||
| 2060 | * R517 (0x205) - AIF2 Clocking (2) | ||
| 2061 | */ | ||
| 2062 | #define WM8994_AIF2DAC_DIV_MASK 0x0038 /* AIF2DAC_DIV - [5:3] */ | ||
| 2063 | #define WM8994_AIF2DAC_DIV_SHIFT 3 /* AIF2DAC_DIV - [5:3] */ | ||
| 2064 | #define WM8994_AIF2DAC_DIV_WIDTH 3 /* AIF2DAC_DIV - [5:3] */ | ||
| 2065 | #define WM8994_AIF2ADC_DIV_MASK 0x0007 /* AIF2ADC_DIV - [2:0] */ | ||
| 2066 | #define WM8994_AIF2ADC_DIV_SHIFT 0 /* AIF2ADC_DIV - [2:0] */ | ||
| 2067 | #define WM8994_AIF2ADC_DIV_WIDTH 3 /* AIF2ADC_DIV - [2:0] */ | ||
| 2068 | |||
| 2069 | /* | ||
| 2070 | * R520 (0x208) - Clocking (1) | ||
| 2071 | */ | ||
| 2072 | #define WM8994_TOCLK_ENA 0x0010 /* TOCLK_ENA */ | ||
| 2073 | #define WM8994_TOCLK_ENA_MASK 0x0010 /* TOCLK_ENA */ | ||
| 2074 | #define WM8994_TOCLK_ENA_SHIFT 4 /* TOCLK_ENA */ | ||
| 2075 | #define WM8994_TOCLK_ENA_WIDTH 1 /* TOCLK_ENA */ | ||
| 2076 | #define WM8994_AIF1DSPCLK_ENA 0x0008 /* AIF1DSPCLK_ENA */ | ||
| 2077 | #define WM8994_AIF1DSPCLK_ENA_MASK 0x0008 /* AIF1DSPCLK_ENA */ | ||
| 2078 | #define WM8994_AIF1DSPCLK_ENA_SHIFT 3 /* AIF1DSPCLK_ENA */ | ||
| 2079 | #define WM8994_AIF1DSPCLK_ENA_WIDTH 1 /* AIF1DSPCLK_ENA */ | ||
| 2080 | #define WM8994_AIF2DSPCLK_ENA 0x0004 /* AIF2DSPCLK_ENA */ | ||
| 2081 | #define WM8994_AIF2DSPCLK_ENA_MASK 0x0004 /* AIF2DSPCLK_ENA */ | ||
| 2082 | #define WM8994_AIF2DSPCLK_ENA_SHIFT 2 /* AIF2DSPCLK_ENA */ | ||
| 2083 | #define WM8994_AIF2DSPCLK_ENA_WIDTH 1 /* AIF2DSPCLK_ENA */ | ||
| 2084 | #define WM8994_SYSDSPCLK_ENA 0x0002 /* SYSDSPCLK_ENA */ | ||
| 2085 | #define WM8994_SYSDSPCLK_ENA_MASK 0x0002 /* SYSDSPCLK_ENA */ | ||
| 2086 | #define WM8994_SYSDSPCLK_ENA_SHIFT 1 /* SYSDSPCLK_ENA */ | ||
| 2087 | #define WM8994_SYSDSPCLK_ENA_WIDTH 1 /* SYSDSPCLK_ENA */ | ||
| 2088 | #define WM8994_SYSCLK_SRC 0x0001 /* SYSCLK_SRC */ | ||
| 2089 | #define WM8994_SYSCLK_SRC_MASK 0x0001 /* SYSCLK_SRC */ | ||
| 2090 | #define WM8994_SYSCLK_SRC_SHIFT 0 /* SYSCLK_SRC */ | ||
| 2091 | #define WM8994_SYSCLK_SRC_WIDTH 1 /* SYSCLK_SRC */ | ||
| 2092 | |||
| 2093 | /* | ||
| 2094 | * R521 (0x209) - Clocking (2) | ||
| 2095 | */ | ||
| 2096 | #define WM8994_TOCLK_DIV_MASK 0x0700 /* TOCLK_DIV - [10:8] */ | ||
| 2097 | #define WM8994_TOCLK_DIV_SHIFT 8 /* TOCLK_DIV - [10:8] */ | ||
| 2098 | #define WM8994_TOCLK_DIV_WIDTH 3 /* TOCLK_DIV - [10:8] */ | ||
| 2099 | #define WM8994_DBCLK_DIV_MASK 0x0070 /* DBCLK_DIV - [6:4] */ | ||
| 2100 | #define WM8994_DBCLK_DIV_SHIFT 4 /* DBCLK_DIV - [6:4] */ | ||
| 2101 | #define WM8994_DBCLK_DIV_WIDTH 3 /* DBCLK_DIV - [6:4] */ | ||
| 2102 | #define WM8994_OPCLK_DIV_MASK 0x0007 /* OPCLK_DIV - [2:0] */ | ||
| 2103 | #define WM8994_OPCLK_DIV_SHIFT 0 /* OPCLK_DIV - [2:0] */ | ||
| 2104 | #define WM8994_OPCLK_DIV_WIDTH 3 /* OPCLK_DIV - [2:0] */ | ||
| 2105 | |||
| 2106 | /* | ||
| 2107 | * R528 (0x210) - AIF1 Rate | ||
| 2108 | */ | ||
| 2109 | #define WM8994_AIF1_SR_MASK 0x00F0 /* AIF1_SR - [7:4] */ | ||
| 2110 | #define WM8994_AIF1_SR_SHIFT 4 /* AIF1_SR - [7:4] */ | ||
| 2111 | #define WM8994_AIF1_SR_WIDTH 4 /* AIF1_SR - [7:4] */ | ||
| 2112 | #define WM8994_AIF1CLK_RATE_MASK 0x000F /* AIF1CLK_RATE - [3:0] */ | ||
| 2113 | #define WM8994_AIF1CLK_RATE_SHIFT 0 /* AIF1CLK_RATE - [3:0] */ | ||
| 2114 | #define WM8994_AIF1CLK_RATE_WIDTH 4 /* AIF1CLK_RATE - [3:0] */ | ||
| 2115 | |||
| 2116 | /* | ||
| 2117 | * R529 (0x211) - AIF2 Rate | ||
| 2118 | */ | ||
| 2119 | #define WM8994_AIF2_SR_MASK 0x00F0 /* AIF2_SR - [7:4] */ | ||
| 2120 | #define WM8994_AIF2_SR_SHIFT 4 /* AIF2_SR - [7:4] */ | ||
| 2121 | #define WM8994_AIF2_SR_WIDTH 4 /* AIF2_SR - [7:4] */ | ||
| 2122 | #define WM8994_AIF2CLK_RATE_MASK 0x000F /* AIF2CLK_RATE - [3:0] */ | ||
| 2123 | #define WM8994_AIF2CLK_RATE_SHIFT 0 /* AIF2CLK_RATE - [3:0] */ | ||
| 2124 | #define WM8994_AIF2CLK_RATE_WIDTH 4 /* AIF2CLK_RATE - [3:0] */ | ||
| 2125 | |||
| 2126 | /* | ||
| 2127 | * R530 (0x212) - Rate Status | ||
| 2128 | */ | ||
| 2129 | #define WM8994_SR_ERROR_MASK 0x000F /* SR_ERROR - [3:0] */ | ||
| 2130 | #define WM8994_SR_ERROR_SHIFT 0 /* SR_ERROR - [3:0] */ | ||
| 2131 | #define WM8994_SR_ERROR_WIDTH 4 /* SR_ERROR - [3:0] */ | ||
| 2132 | |||
| 2133 | /* | ||
| 2134 | * R544 (0x220) - FLL1 Control (1) | ||
| 2135 | */ | ||
| 2136 | #define WM8994_FLL1_FRAC 0x0004 /* FLL1_FRAC */ | ||
| 2137 | #define WM8994_FLL1_FRAC_MASK 0x0004 /* FLL1_FRAC */ | ||
| 2138 | #define WM8994_FLL1_FRAC_SHIFT 2 /* FLL1_FRAC */ | ||
| 2139 | #define WM8994_FLL1_FRAC_WIDTH 1 /* FLL1_FRAC */ | ||
| 2140 | #define WM8994_FLL1_OSC_ENA 0x0002 /* FLL1_OSC_ENA */ | ||
| 2141 | #define WM8994_FLL1_OSC_ENA_MASK 0x0002 /* FLL1_OSC_ENA */ | ||
| 2142 | #define WM8994_FLL1_OSC_ENA_SHIFT 1 /* FLL1_OSC_ENA */ | ||
| 2143 | #define WM8994_FLL1_OSC_ENA_WIDTH 1 /* FLL1_OSC_ENA */ | ||
| 2144 | #define WM8994_FLL1_ENA 0x0001 /* FLL1_ENA */ | ||
| 2145 | #define WM8994_FLL1_ENA_MASK 0x0001 /* FLL1_ENA */ | ||
| 2146 | #define WM8994_FLL1_ENA_SHIFT 0 /* FLL1_ENA */ | ||
| 2147 | #define WM8994_FLL1_ENA_WIDTH 1 /* FLL1_ENA */ | ||
| 2148 | |||
| 2149 | /* | ||
| 2150 | * R545 (0x221) - FLL1 Control (2) | ||
| 2151 | */ | ||
| 2152 | #define WM8994_FLL1_OUTDIV_MASK 0x3F00 /* FLL1_OUTDIV - [13:8] */ | ||
| 2153 | #define WM8994_FLL1_OUTDIV_SHIFT 8 /* FLL1_OUTDIV - [13:8] */ | ||
| 2154 | #define WM8994_FLL1_OUTDIV_WIDTH 6 /* FLL1_OUTDIV - [13:8] */ | ||
| 2155 | #define WM8994_FLL1_CTRL_RATE_MASK 0x0070 /* FLL1_CTRL_RATE - [6:4] */ | ||
| 2156 | #define WM8994_FLL1_CTRL_RATE_SHIFT 4 /* FLL1_CTRL_RATE - [6:4] */ | ||
| 2157 | #define WM8994_FLL1_CTRL_RATE_WIDTH 3 /* FLL1_CTRL_RATE - [6:4] */ | ||
| 2158 | #define WM8994_FLL1_FRATIO_MASK 0x0007 /* FLL1_FRATIO - [2:0] */ | ||
| 2159 | #define WM8994_FLL1_FRATIO_SHIFT 0 /* FLL1_FRATIO - [2:0] */ | ||
| 2160 | #define WM8994_FLL1_FRATIO_WIDTH 3 /* FLL1_FRATIO - [2:0] */ | ||
| 2161 | |||
| 2162 | /* | ||
| 2163 | * R546 (0x222) - FLL1 Control (3) | ||
| 2164 | */ | ||
| 2165 | #define WM8994_FLL1_K_MASK 0xFFFF /* FLL1_K - [15:0] */ | ||
| 2166 | #define WM8994_FLL1_K_SHIFT 0 /* FLL1_K - [15:0] */ | ||
| 2167 | #define WM8994_FLL1_K_WIDTH 16 /* FLL1_K - [15:0] */ | ||
| 2168 | |||
| 2169 | /* | ||
| 2170 | * R547 (0x223) - FLL1 Control (4) | ||
| 2171 | */ | ||
| 2172 | #define WM8994_FLL1_N_MASK 0x7FE0 /* FLL1_N - [14:5] */ | ||
| 2173 | #define WM8994_FLL1_N_SHIFT 5 /* FLL1_N - [14:5] */ | ||
| 2174 | #define WM8994_FLL1_N_WIDTH 10 /* FLL1_N - [14:5] */ | ||
| 2175 | #define WM8994_FLL1_LOOP_GAIN_MASK 0x000F /* FLL1_LOOP_GAIN - [3:0] */ | ||
| 2176 | #define WM8994_FLL1_LOOP_GAIN_SHIFT 0 /* FLL1_LOOP_GAIN - [3:0] */ | ||
| 2177 | #define WM8994_FLL1_LOOP_GAIN_WIDTH 4 /* FLL1_LOOP_GAIN - [3:0] */ | ||
| 2178 | |||
| 2179 | /* | ||
| 2180 | * R548 (0x224) - FLL1 Control (5) | ||
| 2181 | */ | ||
| 2182 | #define WM8994_FLL1_FRC_NCO_VAL_MASK 0x1F80 /* FLL1_FRC_NCO_VAL - [12:7] */ | ||
| 2183 | #define WM8994_FLL1_FRC_NCO_VAL_SHIFT 7 /* FLL1_FRC_NCO_VAL - [12:7] */ | ||
| 2184 | #define WM8994_FLL1_FRC_NCO_VAL_WIDTH 6 /* FLL1_FRC_NCO_VAL - [12:7] */ | ||
| 2185 | #define WM8994_FLL1_FRC_NCO 0x0040 /* FLL1_FRC_NCO */ | ||
| 2186 | #define WM8994_FLL1_FRC_NCO_MASK 0x0040 /* FLL1_FRC_NCO */ | ||
| 2187 | #define WM8994_FLL1_FRC_NCO_SHIFT 6 /* FLL1_FRC_NCO */ | ||
| 2188 | #define WM8994_FLL1_FRC_NCO_WIDTH 1 /* FLL1_FRC_NCO */ | ||
| 2189 | #define WM8994_FLL1_REFCLK_DIV_MASK 0x0018 /* FLL1_REFCLK_DIV - [4:3] */ | ||
| 2190 | #define WM8994_FLL1_REFCLK_DIV_SHIFT 3 /* FLL1_REFCLK_DIV - [4:3] */ | ||
| 2191 | #define WM8994_FLL1_REFCLK_DIV_WIDTH 2 /* FLL1_REFCLK_DIV - [4:3] */ | ||
| 2192 | #define WM8994_FLL1_REFCLK_SRC_MASK 0x0003 /* FLL1_REFCLK_SRC - [1:0] */ | ||
| 2193 | #define WM8994_FLL1_REFCLK_SRC_SHIFT 0 /* FLL1_REFCLK_SRC - [1:0] */ | ||
| 2194 | #define WM8994_FLL1_REFCLK_SRC_WIDTH 2 /* FLL1_REFCLK_SRC - [1:0] */ | ||
| 2195 | |||
| 2196 | /* | ||
| 2197 | * R576 (0x240) - FLL2 Control (1) | ||
| 2198 | */ | ||
| 2199 | #define WM8994_FLL2_FRAC 0x0004 /* FLL2_FRAC */ | ||
| 2200 | #define WM8994_FLL2_FRAC_MASK 0x0004 /* FLL2_FRAC */ | ||
| 2201 | #define WM8994_FLL2_FRAC_SHIFT 2 /* FLL2_FRAC */ | ||
| 2202 | #define WM8994_FLL2_FRAC_WIDTH 1 /* FLL2_FRAC */ | ||
| 2203 | #define WM8994_FLL2_OSC_ENA 0x0002 /* FLL2_OSC_ENA */ | ||
| 2204 | #define WM8994_FLL2_OSC_ENA_MASK 0x0002 /* FLL2_OSC_ENA */ | ||
| 2205 | #define WM8994_FLL2_OSC_ENA_SHIFT 1 /* FLL2_OSC_ENA */ | ||
| 2206 | #define WM8994_FLL2_OSC_ENA_WIDTH 1 /* FLL2_OSC_ENA */ | ||
| 2207 | #define WM8994_FLL2_ENA 0x0001 /* FLL2_ENA */ | ||
| 2208 | #define WM8994_FLL2_ENA_MASK 0x0001 /* FLL2_ENA */ | ||
| 2209 | #define WM8994_FLL2_ENA_SHIFT 0 /* FLL2_ENA */ | ||
| 2210 | #define WM8994_FLL2_ENA_WIDTH 1 /* FLL2_ENA */ | ||
| 2211 | |||
| 2212 | /* | ||
| 2213 | * R577 (0x241) - FLL2 Control (2) | ||
| 2214 | */ | ||
| 2215 | #define WM8994_FLL2_OUTDIV_MASK 0x3F00 /* FLL2_OUTDIV - [13:8] */ | ||
| 2216 | #define WM8994_FLL2_OUTDIV_SHIFT 8 /* FLL2_OUTDIV - [13:8] */ | ||
| 2217 | #define WM8994_FLL2_OUTDIV_WIDTH 6 /* FLL2_OUTDIV - [13:8] */ | ||
| 2218 | #define WM8994_FLL2_CTRL_RATE_MASK 0x0070 /* FLL2_CTRL_RATE - [6:4] */ | ||
| 2219 | #define WM8994_FLL2_CTRL_RATE_SHIFT 4 /* FLL2_CTRL_RATE - [6:4] */ | ||
| 2220 | #define WM8994_FLL2_CTRL_RATE_WIDTH 3 /* FLL2_CTRL_RATE - [6:4] */ | ||
| 2221 | #define WM8994_FLL2_FRATIO_MASK 0x0007 /* FLL2_FRATIO - [2:0] */ | ||
| 2222 | #define WM8994_FLL2_FRATIO_SHIFT 0 /* FLL2_FRATIO - [2:0] */ | ||
| 2223 | #define WM8994_FLL2_FRATIO_WIDTH 3 /* FLL2_FRATIO - [2:0] */ | ||
| 2224 | |||
| 2225 | /* | ||
| 2226 | * R578 (0x242) - FLL2 Control (3) | ||
| 2227 | */ | ||
| 2228 | #define WM8994_FLL2_K_MASK 0xFFFF /* FLL2_K - [15:0] */ | ||
| 2229 | #define WM8994_FLL2_K_SHIFT 0 /* FLL2_K - [15:0] */ | ||
| 2230 | #define WM8994_FLL2_K_WIDTH 16 /* FLL2_K - [15:0] */ | ||
| 2231 | |||
| 2232 | /* | ||
| 2233 | * R579 (0x243) - FLL2 Control (4) | ||
| 2234 | */ | ||
| 2235 | #define WM8994_FLL2_N_MASK 0x7FE0 /* FLL2_N - [14:5] */ | ||
| 2236 | #define WM8994_FLL2_N_SHIFT 5 /* FLL2_N - [14:5] */ | ||
| 2237 | #define WM8994_FLL2_N_WIDTH 10 /* FLL2_N - [14:5] */ | ||
| 2238 | #define WM8994_FLL2_LOOP_GAIN_MASK 0x000F /* FLL2_LOOP_GAIN - [3:0] */ | ||
| 2239 | #define WM8994_FLL2_LOOP_GAIN_SHIFT 0 /* FLL2_LOOP_GAIN - [3:0] */ | ||
| 2240 | #define WM8994_FLL2_LOOP_GAIN_WIDTH 4 /* FLL2_LOOP_GAIN - [3:0] */ | ||
| 2241 | |||
| 2242 | /* | ||
| 2243 | * R580 (0x244) - FLL2 Control (5) | ||
| 2244 | */ | ||
| 2245 | #define WM8994_FLL2_FRC_NCO_VAL_MASK 0x1F80 /* FLL2_FRC_NCO_VAL - [12:7] */ | ||
| 2246 | #define WM8994_FLL2_FRC_NCO_VAL_SHIFT 7 /* FLL2_FRC_NCO_VAL - [12:7] */ | ||
| 2247 | #define WM8994_FLL2_FRC_NCO_VAL_WIDTH 6 /* FLL2_FRC_NCO_VAL - [12:7] */ | ||
| 2248 | #define WM8994_FLL2_FRC_NCO 0x0040 /* FLL2_FRC_NCO */ | ||
| 2249 | #define WM8994_FLL2_FRC_NCO_MASK 0x0040 /* FLL2_FRC_NCO */ | ||
| 2250 | #define WM8994_FLL2_FRC_NCO_SHIFT 6 /* FLL2_FRC_NCO */ | ||
| 2251 | #define WM8994_FLL2_FRC_NCO_WIDTH 1 /* FLL2_FRC_NCO */ | ||
| 2252 | #define WM8994_FLL2_REFCLK_DIV_MASK 0x0018 /* FLL2_REFCLK_DIV - [4:3] */ | ||
| 2253 | #define WM8994_FLL2_REFCLK_DIV_SHIFT 3 /* FLL2_REFCLK_DIV - [4:3] */ | ||
| 2254 | #define WM8994_FLL2_REFCLK_DIV_WIDTH 2 /* FLL2_REFCLK_DIV - [4:3] */ | ||
| 2255 | #define WM8994_FLL2_REFCLK_SRC_MASK 0x0003 /* FLL2_REFCLK_SRC - [1:0] */ | ||
| 2256 | #define WM8994_FLL2_REFCLK_SRC_SHIFT 0 /* FLL2_REFCLK_SRC - [1:0] */ | ||
| 2257 | #define WM8994_FLL2_REFCLK_SRC_WIDTH 2 /* FLL2_REFCLK_SRC - [1:0] */ | ||
| 2258 | |||
| 2259 | /* | ||
| 2260 | * R768 (0x300) - AIF1 Control (1) | ||
| 2261 | */ | ||
| 2262 | #define WM8994_AIF1ADCL_SRC 0x8000 /* AIF1ADCL_SRC */ | ||
| 2263 | #define WM8994_AIF1ADCL_SRC_MASK 0x8000 /* AIF1ADCL_SRC */ | ||
| 2264 | #define WM8994_AIF1ADCL_SRC_SHIFT 15 /* AIF1ADCL_SRC */ | ||
| 2265 | #define WM8994_AIF1ADCL_SRC_WIDTH 1 /* AIF1ADCL_SRC */ | ||
| 2266 | #define WM8994_AIF1ADCR_SRC 0x4000 /* AIF1ADCR_SRC */ | ||
| 2267 | #define WM8994_AIF1ADCR_SRC_MASK 0x4000 /* AIF1ADCR_SRC */ | ||
| 2268 | #define WM8994_AIF1ADCR_SRC_SHIFT 14 /* AIF1ADCR_SRC */ | ||
| 2269 | #define WM8994_AIF1ADCR_SRC_WIDTH 1 /* AIF1ADCR_SRC */ | ||
| 2270 | #define WM8994_AIF1ADC_TDM 0x2000 /* AIF1ADC_TDM */ | ||
| 2271 | #define WM8994_AIF1ADC_TDM_MASK 0x2000 /* AIF1ADC_TDM */ | ||
| 2272 | #define WM8994_AIF1ADC_TDM_SHIFT 13 /* AIF1ADC_TDM */ | ||
| 2273 | #define WM8994_AIF1ADC_TDM_WIDTH 1 /* AIF1ADC_TDM */ | ||
| 2274 | #define WM8994_AIF1_BCLK_INV 0x0100 /* AIF1_BCLK_INV */ | ||
| 2275 | #define WM8994_AIF1_BCLK_INV_MASK 0x0100 /* AIF1_BCLK_INV */ | ||
| 2276 | #define WM8994_AIF1_BCLK_INV_SHIFT 8 /* AIF1_BCLK_INV */ | ||
| 2277 | #define WM8994_AIF1_BCLK_INV_WIDTH 1 /* AIF1_BCLK_INV */ | ||
| 2278 | #define WM8994_AIF1_LRCLK_INV 0x0080 /* AIF1_LRCLK_INV */ | ||
| 2279 | #define WM8994_AIF1_LRCLK_INV_MASK 0x0080 /* AIF1_LRCLK_INV */ | ||
| 2280 | #define WM8994_AIF1_LRCLK_INV_SHIFT 7 /* AIF1_LRCLK_INV */ | ||
| 2281 | #define WM8994_AIF1_LRCLK_INV_WIDTH 1 /* AIF1_LRCLK_INV */ | ||
| 2282 | #define WM8994_AIF1_WL_MASK 0x0060 /* AIF1_WL - [6:5] */ | ||
| 2283 | #define WM8994_AIF1_WL_SHIFT 5 /* AIF1_WL - [6:5] */ | ||
| 2284 | #define WM8994_AIF1_WL_WIDTH 2 /* AIF1_WL - [6:5] */ | ||
| 2285 | #define WM8994_AIF1_FMT_MASK 0x0018 /* AIF1_FMT - [4:3] */ | ||
| 2286 | #define WM8994_AIF1_FMT_SHIFT 3 /* AIF1_FMT - [4:3] */ | ||
| 2287 | #define WM8994_AIF1_FMT_WIDTH 2 /* AIF1_FMT - [4:3] */ | ||
| 2288 | |||
| 2289 | /* | ||
| 2290 | * R769 (0x301) - AIF1 Control (2) | ||
| 2291 | */ | ||
| 2292 | #define WM8994_AIF1DACL_SRC 0x8000 /* AIF1DACL_SRC */ | ||
| 2293 | #define WM8994_AIF1DACL_SRC_MASK 0x8000 /* AIF1DACL_SRC */ | ||
| 2294 | #define WM8994_AIF1DACL_SRC_SHIFT 15 /* AIF1DACL_SRC */ | ||
| 2295 | #define WM8994_AIF1DACL_SRC_WIDTH 1 /* AIF1DACL_SRC */ | ||
| 2296 | #define WM8994_AIF1DACR_SRC 0x4000 /* AIF1DACR_SRC */ | ||
| 2297 | #define WM8994_AIF1DACR_SRC_MASK 0x4000 /* AIF1DACR_SRC */ | ||
| 2298 | #define WM8994_AIF1DACR_SRC_SHIFT 14 /* AIF1DACR_SRC */ | ||
| 2299 | #define WM8994_AIF1DACR_SRC_WIDTH 1 /* AIF1DACR_SRC */ | ||
| 2300 | #define WM8994_AIF1DAC_BOOST_MASK 0x0C00 /* AIF1DAC_BOOST - [11:10] */ | ||
| 2301 | #define WM8994_AIF1DAC_BOOST_SHIFT 10 /* AIF1DAC_BOOST - [11:10] */ | ||
| 2302 | #define WM8994_AIF1DAC_BOOST_WIDTH 2 /* AIF1DAC_BOOST - [11:10] */ | ||
| 2303 | #define WM8994_AIF1_MONO 0x0100 /* AIF1_MONO */ | ||
| 2304 | #define WM8994_AIF1_MONO_MASK 0x0100 /* AIF1_MONO */ | ||
| 2305 | #define WM8994_AIF1_MONO_SHIFT 8 /* AIF1_MONO */ | ||
| 2306 | #define WM8994_AIF1_MONO_WIDTH 1 /* AIF1_MONO */ | ||
| 2307 | #define WM8994_AIF1DAC_COMP 0x0010 /* AIF1DAC_COMP */ | ||
| 2308 | #define WM8994_AIF1DAC_COMP_MASK 0x0010 /* AIF1DAC_COMP */ | ||
| 2309 | #define WM8994_AIF1DAC_COMP_SHIFT 4 /* AIF1DAC_COMP */ | ||
| 2310 | #define WM8994_AIF1DAC_COMP_WIDTH 1 /* AIF1DAC_COMP */ | ||
| 2311 | #define WM8994_AIF1DAC_COMPMODE 0x0008 /* AIF1DAC_COMPMODE */ | ||
| 2312 | #define WM8994_AIF1DAC_COMPMODE_MASK 0x0008 /* AIF1DAC_COMPMODE */ | ||
| 2313 | #define WM8994_AIF1DAC_COMPMODE_SHIFT 3 /* AIF1DAC_COMPMODE */ | ||
| 2314 | #define WM8994_AIF1DAC_COMPMODE_WIDTH 1 /* AIF1DAC_COMPMODE */ | ||
| 2315 | #define WM8994_AIF1ADC_COMP 0x0004 /* AIF1ADC_COMP */ | ||
| 2316 | #define WM8994_AIF1ADC_COMP_MASK 0x0004 /* AIF1ADC_COMP */ | ||
| 2317 | #define WM8994_AIF1ADC_COMP_SHIFT 2 /* AIF1ADC_COMP */ | ||
| 2318 | #define WM8994_AIF1ADC_COMP_WIDTH 1 /* AIF1ADC_COMP */ | ||
| 2319 | #define WM8994_AIF1ADC_COMPMODE 0x0002 /* AIF1ADC_COMPMODE */ | ||
| 2320 | #define WM8994_AIF1ADC_COMPMODE_MASK 0x0002 /* AIF1ADC_COMPMODE */ | ||
| 2321 | #define WM8994_AIF1ADC_COMPMODE_SHIFT 1 /* AIF1ADC_COMPMODE */ | ||
| 2322 | #define WM8994_AIF1ADC_COMPMODE_WIDTH 1 /* AIF1ADC_COMPMODE */ | ||
| 2323 | #define WM8994_AIF1_LOOPBACK 0x0001 /* AIF1_LOOPBACK */ | ||
| 2324 | #define WM8994_AIF1_LOOPBACK_MASK 0x0001 /* AIF1_LOOPBACK */ | ||
| 2325 | #define WM8994_AIF1_LOOPBACK_SHIFT 0 /* AIF1_LOOPBACK */ | ||
| 2326 | #define WM8994_AIF1_LOOPBACK_WIDTH 1 /* AIF1_LOOPBACK */ | ||
| 2327 | |||
| 2328 | /* | ||
| 2329 | * R770 (0x302) - AIF1 Master/Slave | ||
| 2330 | */ | ||
| 2331 | #define WM8994_AIF1_TRI 0x8000 /* AIF1_TRI */ | ||
| 2332 | #define WM8994_AIF1_TRI_MASK 0x8000 /* AIF1_TRI */ | ||
| 2333 | #define WM8994_AIF1_TRI_SHIFT 15 /* AIF1_TRI */ | ||
| 2334 | #define WM8994_AIF1_TRI_WIDTH 1 /* AIF1_TRI */ | ||
| 2335 | #define WM8994_AIF1_MSTR 0x4000 /* AIF1_MSTR */ | ||
| 2336 | #define WM8994_AIF1_MSTR_MASK 0x4000 /* AIF1_MSTR */ | ||
| 2337 | #define WM8994_AIF1_MSTR_SHIFT 14 /* AIF1_MSTR */ | ||
| 2338 | #define WM8994_AIF1_MSTR_WIDTH 1 /* AIF1_MSTR */ | ||
| 2339 | #define WM8994_AIF1_CLK_FRC 0x2000 /* AIF1_CLK_FRC */ | ||
| 2340 | #define WM8994_AIF1_CLK_FRC_MASK 0x2000 /* AIF1_CLK_FRC */ | ||
| 2341 | #define WM8994_AIF1_CLK_FRC_SHIFT 13 /* AIF1_CLK_FRC */ | ||
| 2342 | #define WM8994_AIF1_CLK_FRC_WIDTH 1 /* AIF1_CLK_FRC */ | ||
| 2343 | #define WM8994_AIF1_LRCLK_FRC 0x1000 /* AIF1_LRCLK_FRC */ | ||
| 2344 | #define WM8994_AIF1_LRCLK_FRC_MASK 0x1000 /* AIF1_LRCLK_FRC */ | ||
| 2345 | #define WM8994_AIF1_LRCLK_FRC_SHIFT 12 /* AIF1_LRCLK_FRC */ | ||
| 2346 | #define WM8994_AIF1_LRCLK_FRC_WIDTH 1 /* AIF1_LRCLK_FRC */ | ||
| 2347 | |||
| 2348 | /* | ||
| 2349 | * R771 (0x303) - AIF1 BCLK | ||
| 2350 | */ | ||
| 2351 | #define WM8994_AIF1_BCLK_DIV_MASK 0x01F0 /* AIF1_BCLK_DIV - [8:4] */ | ||
| 2352 | #define WM8994_AIF1_BCLK_DIV_SHIFT 4 /* AIF1_BCLK_DIV - [8:4] */ | ||
| 2353 | #define WM8994_AIF1_BCLK_DIV_WIDTH 5 /* AIF1_BCLK_DIV - [8:4] */ | ||
| 2354 | |||
| 2355 | /* | ||
| 2356 | * R772 (0x304) - AIF1ADC LRCLK | ||
| 2357 | */ | ||
| 2358 | #define WM8994_AIF1ADC_LRCLK_DIR 0x0800 /* AIF1ADC_LRCLK_DIR */ | ||
| 2359 | #define WM8994_AIF1ADC_LRCLK_DIR_MASK 0x0800 /* AIF1ADC_LRCLK_DIR */ | ||
| 2360 | #define WM8994_AIF1ADC_LRCLK_DIR_SHIFT 11 /* AIF1ADC_LRCLK_DIR */ | ||
| 2361 | #define WM8994_AIF1ADC_LRCLK_DIR_WIDTH 1 /* AIF1ADC_LRCLK_DIR */ | ||
| 2362 | #define WM8994_AIF1ADC_RATE_MASK 0x07FF /* AIF1ADC_RATE - [10:0] */ | ||
| 2363 | #define WM8994_AIF1ADC_RATE_SHIFT 0 /* AIF1ADC_RATE - [10:0] */ | ||
| 2364 | #define WM8994_AIF1ADC_RATE_WIDTH 11 /* AIF1ADC_RATE - [10:0] */ | ||
| 2365 | |||
| 2366 | /* | ||
| 2367 | * R773 (0x305) - AIF1DAC LRCLK | ||
| 2368 | */ | ||
| 2369 | #define WM8994_AIF1DAC_LRCLK_DIR 0x0800 /* AIF1DAC_LRCLK_DIR */ | ||
| 2370 | #define WM8994_AIF1DAC_LRCLK_DIR_MASK 0x0800 /* AIF1DAC_LRCLK_DIR */ | ||
| 2371 | #define WM8994_AIF1DAC_LRCLK_DIR_SHIFT 11 /* AIF1DAC_LRCLK_DIR */ | ||
| 2372 | #define WM8994_AIF1DAC_LRCLK_DIR_WIDTH 1 /* AIF1DAC_LRCLK_DIR */ | ||
| 2373 | #define WM8994_AIF1DAC_RATE_MASK 0x07FF /* AIF1DAC_RATE - [10:0] */ | ||
| 2374 | #define WM8994_AIF1DAC_RATE_SHIFT 0 /* AIF1DAC_RATE - [10:0] */ | ||
| 2375 | #define WM8994_AIF1DAC_RATE_WIDTH 11 /* AIF1DAC_RATE - [10:0] */ | ||
| 2376 | |||
| 2377 | /* | ||
| 2378 | * R774 (0x306) - AIF1DAC Data | ||
| 2379 | */ | ||
| 2380 | #define WM8994_AIF1DACL_DAT_INV 0x0002 /* AIF1DACL_DAT_INV */ | ||
| 2381 | #define WM8994_AIF1DACL_DAT_INV_MASK 0x0002 /* AIF1DACL_DAT_INV */ | ||
| 2382 | #define WM8994_AIF1DACL_DAT_INV_SHIFT 1 /* AIF1DACL_DAT_INV */ | ||
| 2383 | #define WM8994_AIF1DACL_DAT_INV_WIDTH 1 /* AIF1DACL_DAT_INV */ | ||
| 2384 | #define WM8994_AIF1DACR_DAT_INV 0x0001 /* AIF1DACR_DAT_INV */ | ||
| 2385 | #define WM8994_AIF1DACR_DAT_INV_MASK 0x0001 /* AIF1DACR_DAT_INV */ | ||
| 2386 | #define WM8994_AIF1DACR_DAT_INV_SHIFT 0 /* AIF1DACR_DAT_INV */ | ||
| 2387 | #define WM8994_AIF1DACR_DAT_INV_WIDTH 1 /* AIF1DACR_DAT_INV */ | ||
| 2388 | |||
| 2389 | /* | ||
| 2390 | * R775 (0x307) - AIF1ADC Data | ||
| 2391 | */ | ||
| 2392 | #define WM8994_AIF1ADCL_DAT_INV 0x0002 /* AIF1ADCL_DAT_INV */ | ||
| 2393 | #define WM8994_AIF1ADCL_DAT_INV_MASK 0x0002 /* AIF1ADCL_DAT_INV */ | ||
| 2394 | #define WM8994_AIF1ADCL_DAT_INV_SHIFT 1 /* AIF1ADCL_DAT_INV */ | ||
| 2395 | #define WM8994_AIF1ADCL_DAT_INV_WIDTH 1 /* AIF1ADCL_DAT_INV */ | ||
| 2396 | #define WM8994_AIF1ADCR_DAT_INV 0x0001 /* AIF1ADCR_DAT_INV */ | ||
| 2397 | #define WM8994_AIF1ADCR_DAT_INV_MASK 0x0001 /* AIF1ADCR_DAT_INV */ | ||
| 2398 | #define WM8994_AIF1ADCR_DAT_INV_SHIFT 0 /* AIF1ADCR_DAT_INV */ | ||
| 2399 | #define WM8994_AIF1ADCR_DAT_INV_WIDTH 1 /* AIF1ADCR_DAT_INV */ | ||
| 2400 | |||
| 2401 | /* | ||
| 2402 | * R784 (0x310) - AIF2 Control (1) | ||
| 2403 | */ | ||
| 2404 | #define WM8994_AIF2ADCL_SRC 0x8000 /* AIF2ADCL_SRC */ | ||
| 2405 | #define WM8994_AIF2ADCL_SRC_MASK 0x8000 /* AIF2ADCL_SRC */ | ||
| 2406 | #define WM8994_AIF2ADCL_SRC_SHIFT 15 /* AIF2ADCL_SRC */ | ||
| 2407 | #define WM8994_AIF2ADCL_SRC_WIDTH 1 /* AIF2ADCL_SRC */ | ||
| 2408 | #define WM8994_AIF2ADCR_SRC 0x4000 /* AIF2ADCR_SRC */ | ||
| 2409 | #define WM8994_AIF2ADCR_SRC_MASK 0x4000 /* AIF2ADCR_SRC */ | ||
| 2410 | #define WM8994_AIF2ADCR_SRC_SHIFT 14 /* AIF2ADCR_SRC */ | ||
| 2411 | #define WM8994_AIF2ADCR_SRC_WIDTH 1 /* AIF2ADCR_SRC */ | ||
| 2412 | #define WM8994_AIF2ADC_TDM 0x2000 /* AIF2ADC_TDM */ | ||
| 2413 | #define WM8994_AIF2ADC_TDM_MASK 0x2000 /* AIF2ADC_TDM */ | ||
| 2414 | #define WM8994_AIF2ADC_TDM_SHIFT 13 /* AIF2ADC_TDM */ | ||
| 2415 | #define WM8994_AIF2ADC_TDM_WIDTH 1 /* AIF2ADC_TDM */ | ||
| 2416 | #define WM8994_AIF2ADC_TDM_CHAN 0x1000 /* AIF2ADC_TDM_CHAN */ | ||
| 2417 | #define WM8994_AIF2ADC_TDM_CHAN_MASK 0x1000 /* AIF2ADC_TDM_CHAN */ | ||
| 2418 | #define WM8994_AIF2ADC_TDM_CHAN_SHIFT 12 /* AIF2ADC_TDM_CHAN */ | ||
| 2419 | #define WM8994_AIF2ADC_TDM_CHAN_WIDTH 1 /* AIF2ADC_TDM_CHAN */ | ||
| 2420 | #define WM8994_AIF2_BCLK_INV 0x0100 /* AIF2_BCLK_INV */ | ||
| 2421 | #define WM8994_AIF2_BCLK_INV_MASK 0x0100 /* AIF2_BCLK_INV */ | ||
| 2422 | #define WM8994_AIF2_BCLK_INV_SHIFT 8 /* AIF2_BCLK_INV */ | ||
| 2423 | #define WM8994_AIF2_BCLK_INV_WIDTH 1 /* AIF2_BCLK_INV */ | ||
| 2424 | #define WM8994_AIF2_LRCLK_INV 0x0080 /* AIF2_LRCLK_INV */ | ||
| 2425 | #define WM8994_AIF2_LRCLK_INV_MASK 0x0080 /* AIF2_LRCLK_INV */ | ||
| 2426 | #define WM8994_AIF2_LRCLK_INV_SHIFT 7 /* AIF2_LRCLK_INV */ | ||
| 2427 | #define WM8994_AIF2_LRCLK_INV_WIDTH 1 /* AIF2_LRCLK_INV */ | ||
| 2428 | #define WM8994_AIF2_WL_MASK 0x0060 /* AIF2_WL - [6:5] */ | ||
| 2429 | #define WM8994_AIF2_WL_SHIFT 5 /* AIF2_WL - [6:5] */ | ||
| 2430 | #define WM8994_AIF2_WL_WIDTH 2 /* AIF2_WL - [6:5] */ | ||
| 2431 | #define WM8994_AIF2_FMT_MASK 0x0018 /* AIF2_FMT - [4:3] */ | ||
| 2432 | #define WM8994_AIF2_FMT_SHIFT 3 /* AIF2_FMT - [4:3] */ | ||
| 2433 | #define WM8994_AIF2_FMT_WIDTH 2 /* AIF2_FMT - [4:3] */ | ||
| 2434 | |||
| 2435 | /* | ||
| 2436 | * R785 (0x311) - AIF2 Control (2) | ||
| 2437 | */ | ||
| 2438 | #define WM8994_AIF2DACL_SRC 0x8000 /* AIF2DACL_SRC */ | ||
| 2439 | #define WM8994_AIF2DACL_SRC_MASK 0x8000 /* AIF2DACL_SRC */ | ||
| 2440 | #define WM8994_AIF2DACL_SRC_SHIFT 15 /* AIF2DACL_SRC */ | ||
| 2441 | #define WM8994_AIF2DACL_SRC_WIDTH 1 /* AIF2DACL_SRC */ | ||
| 2442 | #define WM8994_AIF2DACR_SRC 0x4000 /* AIF2DACR_SRC */ | ||
| 2443 | #define WM8994_AIF2DACR_SRC_MASK 0x4000 /* AIF2DACR_SRC */ | ||
| 2444 | #define WM8994_AIF2DACR_SRC_SHIFT 14 /* AIF2DACR_SRC */ | ||
| 2445 | #define WM8994_AIF2DACR_SRC_WIDTH 1 /* AIF2DACR_SRC */ | ||
| 2446 | #define WM8994_AIF2DAC_TDM 0x2000 /* AIF2DAC_TDM */ | ||
| 2447 | #define WM8994_AIF2DAC_TDM_MASK 0x2000 /* AIF2DAC_TDM */ | ||
| 2448 | #define WM8994_AIF2DAC_TDM_SHIFT 13 /* AIF2DAC_TDM */ | ||
| 2449 | #define WM8994_AIF2DAC_TDM_WIDTH 1 /* AIF2DAC_TDM */ | ||
| 2450 | #define WM8994_AIF2DAC_TDM_CHAN 0x1000 /* AIF2DAC_TDM_CHAN */ | ||
| 2451 | #define WM8994_AIF2DAC_TDM_CHAN_MASK 0x1000 /* AIF2DAC_TDM_CHAN */ | ||
| 2452 | #define WM8994_AIF2DAC_TDM_CHAN_SHIFT 12 /* AIF2DAC_TDM_CHAN */ | ||
| 2453 | #define WM8994_AIF2DAC_TDM_CHAN_WIDTH 1 /* AIF2DAC_TDM_CHAN */ | ||
| 2454 | #define WM8994_AIF2DAC_BOOST_MASK 0x0C00 /* AIF2DAC_BOOST - [11:10] */ | ||
| 2455 | #define WM8994_AIF2DAC_BOOST_SHIFT 10 /* AIF2DAC_BOOST - [11:10] */ | ||
| 2456 | #define WM8994_AIF2DAC_BOOST_WIDTH 2 /* AIF2DAC_BOOST - [11:10] */ | ||
| 2457 | #define WM8994_AIF2_MONO 0x0100 /* AIF2_MONO */ | ||
| 2458 | #define WM8994_AIF2_MONO_MASK 0x0100 /* AIF2_MONO */ | ||
| 2459 | #define WM8994_AIF2_MONO_SHIFT 8 /* AIF2_MONO */ | ||
| 2460 | #define WM8994_AIF2_MONO_WIDTH 1 /* AIF2_MONO */ | ||
| 2461 | #define WM8994_AIF2DAC_COMP 0x0010 /* AIF2DAC_COMP */ | ||
| 2462 | #define WM8994_AIF2DAC_COMP_MASK 0x0010 /* AIF2DAC_COMP */ | ||
| 2463 | #define WM8994_AIF2DAC_COMP_SHIFT 4 /* AIF2DAC_COMP */ | ||
| 2464 | #define WM8994_AIF2DAC_COMP_WIDTH 1 /* AIF2DAC_COMP */ | ||
| 2465 | #define WM8994_AIF2DAC_COMPMODE 0x0008 /* AIF2DAC_COMPMODE */ | ||
| 2466 | #define WM8994_AIF2DAC_COMPMODE_MASK 0x0008 /* AIF2DAC_COMPMODE */ | ||
| 2467 | #define WM8994_AIF2DAC_COMPMODE_SHIFT 3 /* AIF2DAC_COMPMODE */ | ||
| 2468 | #define WM8994_AIF2DAC_COMPMODE_WIDTH 1 /* AIF2DAC_COMPMODE */ | ||
| 2469 | #define WM8994_AIF2ADC_COMP 0x0004 /* AIF2ADC_COMP */ | ||
| 2470 | #define WM8994_AIF2ADC_COMP_MASK 0x0004 /* AIF2ADC_COMP */ | ||
| 2471 | #define WM8994_AIF2ADC_COMP_SHIFT 2 /* AIF2ADC_COMP */ | ||
| 2472 | #define WM8994_AIF2ADC_COMP_WIDTH 1 /* AIF2ADC_COMP */ | ||
| 2473 | #define WM8994_AIF2ADC_COMPMODE 0x0002 /* AIF2ADC_COMPMODE */ | ||
| 2474 | #define WM8994_AIF2ADC_COMPMODE_MASK 0x0002 /* AIF2ADC_COMPMODE */ | ||
| 2475 | #define WM8994_AIF2ADC_COMPMODE_SHIFT 1 /* AIF2ADC_COMPMODE */ | ||
| 2476 | #define WM8994_AIF2ADC_COMPMODE_WIDTH 1 /* AIF2ADC_COMPMODE */ | ||
| 2477 | #define WM8994_AIF2_LOOPBACK 0x0001 /* AIF2_LOOPBACK */ | ||
| 2478 | #define WM8994_AIF2_LOOPBACK_MASK 0x0001 /* AIF2_LOOPBACK */ | ||
| 2479 | #define WM8994_AIF2_LOOPBACK_SHIFT 0 /* AIF2_LOOPBACK */ | ||
| 2480 | #define WM8994_AIF2_LOOPBACK_WIDTH 1 /* AIF2_LOOPBACK */ | ||
| 2481 | |||
| 2482 | /* | ||
| 2483 | * R786 (0x312) - AIF2 Master/Slave | ||
| 2484 | */ | ||
| 2485 | #define WM8994_AIF2_TRI 0x8000 /* AIF2_TRI */ | ||
| 2486 | #define WM8994_AIF2_TRI_MASK 0x8000 /* AIF2_TRI */ | ||
| 2487 | #define WM8994_AIF2_TRI_SHIFT 15 /* AIF2_TRI */ | ||
| 2488 | #define WM8994_AIF2_TRI_WIDTH 1 /* AIF2_TRI */ | ||
| 2489 | #define WM8994_AIF2_MSTR 0x4000 /* AIF2_MSTR */ | ||
| 2490 | #define WM8994_AIF2_MSTR_MASK 0x4000 /* AIF2_MSTR */ | ||
| 2491 | #define WM8994_AIF2_MSTR_SHIFT 14 /* AIF2_MSTR */ | ||
| 2492 | #define WM8994_AIF2_MSTR_WIDTH 1 /* AIF2_MSTR */ | ||
| 2493 | #define WM8994_AIF2_CLK_FRC 0x2000 /* AIF2_CLK_FRC */ | ||
| 2494 | #define WM8994_AIF2_CLK_FRC_MASK 0x2000 /* AIF2_CLK_FRC */ | ||
| 2495 | #define WM8994_AIF2_CLK_FRC_SHIFT 13 /* AIF2_CLK_FRC */ | ||
| 2496 | #define WM8994_AIF2_CLK_FRC_WIDTH 1 /* AIF2_CLK_FRC */ | ||
| 2497 | #define WM8994_AIF2_LRCLK_FRC 0x1000 /* AIF2_LRCLK_FRC */ | ||
| 2498 | #define WM8994_AIF2_LRCLK_FRC_MASK 0x1000 /* AIF2_LRCLK_FRC */ | ||
| 2499 | #define WM8994_AIF2_LRCLK_FRC_SHIFT 12 /* AIF2_LRCLK_FRC */ | ||
| 2500 | #define WM8994_AIF2_LRCLK_FRC_WIDTH 1 /* AIF2_LRCLK_FRC */ | ||
| 2501 | |||
| 2502 | /* | ||
| 2503 | * R787 (0x313) - AIF2 BCLK | ||
| 2504 | */ | ||
| 2505 | #define WM8994_AIF2_BCLK_DIV_MASK 0x01F0 /* AIF2_BCLK_DIV - [8:4] */ | ||
| 2506 | #define WM8994_AIF2_BCLK_DIV_SHIFT 4 /* AIF2_BCLK_DIV - [8:4] */ | ||
| 2507 | #define WM8994_AIF2_BCLK_DIV_WIDTH 5 /* AIF2_BCLK_DIV - [8:4] */ | ||
| 2508 | |||
| 2509 | /* | ||
| 2510 | * R788 (0x314) - AIF2ADC LRCLK | ||
| 2511 | */ | ||
| 2512 | #define WM8994_AIF2ADC_LRCLK_DIR 0x0800 /* AIF2ADC_LRCLK_DIR */ | ||
| 2513 | #define WM8994_AIF2ADC_LRCLK_DIR_MASK 0x0800 /* AIF2ADC_LRCLK_DIR */ | ||
| 2514 | #define WM8994_AIF2ADC_LRCLK_DIR_SHIFT 11 /* AIF2ADC_LRCLK_DIR */ | ||
| 2515 | #define WM8994_AIF2ADC_LRCLK_DIR_WIDTH 1 /* AIF2ADC_LRCLK_DIR */ | ||
| 2516 | #define WM8994_AIF2ADC_RATE_MASK 0x07FF /* AIF2ADC_RATE - [10:0] */ | ||
| 2517 | #define WM8994_AIF2ADC_RATE_SHIFT 0 /* AIF2ADC_RATE - [10:0] */ | ||
| 2518 | #define WM8994_AIF2ADC_RATE_WIDTH 11 /* AIF2ADC_RATE - [10:0] */ | ||
| 2519 | |||
| 2520 | /* | ||
| 2521 | * R789 (0x315) - AIF2DAC LRCLK | ||
| 2522 | */ | ||
| 2523 | #define WM8994_AIF2DAC_LRCLK_DIR 0x0800 /* AIF2DAC_LRCLK_DIR */ | ||
| 2524 | #define WM8994_AIF2DAC_LRCLK_DIR_MASK 0x0800 /* AIF2DAC_LRCLK_DIR */ | ||
| 2525 | #define WM8994_AIF2DAC_LRCLK_DIR_SHIFT 11 /* AIF2DAC_LRCLK_DIR */ | ||
| 2526 | #define WM8994_AIF2DAC_LRCLK_DIR_WIDTH 1 /* AIF2DAC_LRCLK_DIR */ | ||
| 2527 | #define WM8994_AIF2DAC_RATE_MASK 0x07FF /* AIF2DAC_RATE - [10:0] */ | ||
| 2528 | #define WM8994_AIF2DAC_RATE_SHIFT 0 /* AIF2DAC_RATE - [10:0] */ | ||
| 2529 | #define WM8994_AIF2DAC_RATE_WIDTH 11 /* AIF2DAC_RATE - [10:0] */ | ||
| 2530 | |||
| 2531 | /* | ||
| 2532 | * R790 (0x316) - AIF2DAC Data | ||
| 2533 | */ | ||
| 2534 | #define WM8994_AIF2DACL_DAT_INV 0x0002 /* AIF2DACL_DAT_INV */ | ||
| 2535 | #define WM8994_AIF2DACL_DAT_INV_MASK 0x0002 /* AIF2DACL_DAT_INV */ | ||
| 2536 | #define WM8994_AIF2DACL_DAT_INV_SHIFT 1 /* AIF2DACL_DAT_INV */ | ||
| 2537 | #define WM8994_AIF2DACL_DAT_INV_WIDTH 1 /* AIF2DACL_DAT_INV */ | ||
| 2538 | #define WM8994_AIF2DACR_DAT_INV 0x0001 /* AIF2DACR_DAT_INV */ | ||
| 2539 | #define WM8994_AIF2DACR_DAT_INV_MASK 0x0001 /* AIF2DACR_DAT_INV */ | ||
| 2540 | #define WM8994_AIF2DACR_DAT_INV_SHIFT 0 /* AIF2DACR_DAT_INV */ | ||
| 2541 | #define WM8994_AIF2DACR_DAT_INV_WIDTH 1 /* AIF2DACR_DAT_INV */ | ||
| 2542 | |||
| 2543 | /* | ||
| 2544 | * R791 (0x317) - AIF2ADC Data | ||
| 2545 | */ | ||
| 2546 | #define WM8994_AIF2ADCL_DAT_INV 0x0002 /* AIF2ADCL_DAT_INV */ | ||
| 2547 | #define WM8994_AIF2ADCL_DAT_INV_MASK 0x0002 /* AIF2ADCL_DAT_INV */ | ||
| 2548 | #define WM8994_AIF2ADCL_DAT_INV_SHIFT 1 /* AIF2ADCL_DAT_INV */ | ||
| 2549 | #define WM8994_AIF2ADCL_DAT_INV_WIDTH 1 /* AIF2ADCL_DAT_INV */ | ||
| 2550 | #define WM8994_AIF2ADCR_DAT_INV 0x0001 /* AIF2ADCR_DAT_INV */ | ||
| 2551 | #define WM8994_AIF2ADCR_DAT_INV_MASK 0x0001 /* AIF2ADCR_DAT_INV */ | ||
| 2552 | #define WM8994_AIF2ADCR_DAT_INV_SHIFT 0 /* AIF2ADCR_DAT_INV */ | ||
| 2553 | #define WM8994_AIF2ADCR_DAT_INV_WIDTH 1 /* AIF2ADCR_DAT_INV */ | ||
| 2554 | |||
| 2555 | /* | ||
| 2556 | * R1024 (0x400) - AIF1 ADC1 Left Volume | ||
| 2557 | */ | ||
| 2558 | #define WM8994_AIF1ADC1_VU 0x0100 /* AIF1ADC1_VU */ | ||
| 2559 | #define WM8994_AIF1ADC1_VU_MASK 0x0100 /* AIF1ADC1_VU */ | ||
| 2560 | #define WM8994_AIF1ADC1_VU_SHIFT 8 /* AIF1ADC1_VU */ | ||
| 2561 | #define WM8994_AIF1ADC1_VU_WIDTH 1 /* AIF1ADC1_VU */ | ||
| 2562 | #define WM8994_AIF1ADC1L_VOL_MASK 0x00FF /* AIF1ADC1L_VOL - [7:0] */ | ||
| 2563 | #define WM8994_AIF1ADC1L_VOL_SHIFT 0 /* AIF1ADC1L_VOL - [7:0] */ | ||
| 2564 | #define WM8994_AIF1ADC1L_VOL_WIDTH 8 /* AIF1ADC1L_VOL - [7:0] */ | ||
| 2565 | |||
| 2566 | /* | ||
| 2567 | * R1025 (0x401) - AIF1 ADC1 Right Volume | ||
| 2568 | */ | ||
| 2569 | #define WM8994_AIF1ADC1_VU 0x0100 /* AIF1ADC1_VU */ | ||
| 2570 | #define WM8994_AIF1ADC1_VU_MASK 0x0100 /* AIF1ADC1_VU */ | ||
| 2571 | #define WM8994_AIF1ADC1_VU_SHIFT 8 /* AIF1ADC1_VU */ | ||
| 2572 | #define WM8994_AIF1ADC1_VU_WIDTH 1 /* AIF1ADC1_VU */ | ||
| 2573 | #define WM8994_AIF1ADC1R_VOL_MASK 0x00FF /* AIF1ADC1R_VOL - [7:0] */ | ||
| 2574 | #define WM8994_AIF1ADC1R_VOL_SHIFT 0 /* AIF1ADC1R_VOL - [7:0] */ | ||
| 2575 | #define WM8994_AIF1ADC1R_VOL_WIDTH 8 /* AIF1ADC1R_VOL - [7:0] */ | ||
| 2576 | |||
| 2577 | /* | ||
| 2578 | * R1026 (0x402) - AIF1 DAC1 Left Volume | ||
| 2579 | */ | ||
| 2580 | #define WM8994_AIF1DAC1_VU 0x0100 /* AIF1DAC1_VU */ | ||
| 2581 | #define WM8994_AIF1DAC1_VU_MASK 0x0100 /* AIF1DAC1_VU */ | ||
| 2582 | #define WM8994_AIF1DAC1_VU_SHIFT 8 /* AIF1DAC1_VU */ | ||
| 2583 | #define WM8994_AIF1DAC1_VU_WIDTH 1 /* AIF1DAC1_VU */ | ||
| 2584 | #define WM8994_AIF1DAC1L_VOL_MASK 0x00FF /* AIF1DAC1L_VOL - [7:0] */ | ||
| 2585 | #define WM8994_AIF1DAC1L_VOL_SHIFT 0 /* AIF1DAC1L_VOL - [7:0] */ | ||
| 2586 | #define WM8994_AIF1DAC1L_VOL_WIDTH 8 /* AIF1DAC1L_VOL - [7:0] */ | ||
| 2587 | |||
| 2588 | /* | ||
| 2589 | * R1027 (0x403) - AIF1 DAC1 Right Volume | ||
| 2590 | */ | ||
| 2591 | #define WM8994_AIF1DAC1_VU 0x0100 /* AIF1DAC1_VU */ | ||
| 2592 | #define WM8994_AIF1DAC1_VU_MASK 0x0100 /* AIF1DAC1_VU */ | ||
| 2593 | #define WM8994_AIF1DAC1_VU_SHIFT 8 /* AIF1DAC1_VU */ | ||
| 2594 | #define WM8994_AIF1DAC1_VU_WIDTH 1 /* AIF1DAC1_VU */ | ||
| 2595 | #define WM8994_AIF1DAC1R_VOL_MASK 0x00FF /* AIF1DAC1R_VOL - [7:0] */ | ||
| 2596 | #define WM8994_AIF1DAC1R_VOL_SHIFT 0 /* AIF1DAC1R_VOL - [7:0] */ | ||
| 2597 | #define WM8994_AIF1DAC1R_VOL_WIDTH 8 /* AIF1DAC1R_VOL - [7:0] */ | ||
| 2598 | |||
| 2599 | /* | ||
| 2600 | * R1028 (0x404) - AIF1 ADC2 Left Volume | ||
| 2601 | */ | ||
| 2602 | #define WM8994_AIF1ADC2_VU 0x0100 /* AIF1ADC2_VU */ | ||
| 2603 | #define WM8994_AIF1ADC2_VU_MASK 0x0100 /* AIF1ADC2_VU */ | ||
| 2604 | #define WM8994_AIF1ADC2_VU_SHIFT 8 /* AIF1ADC2_VU */ | ||
| 2605 | #define WM8994_AIF1ADC2_VU_WIDTH 1 /* AIF1ADC2_VU */ | ||
| 2606 | #define WM8994_AIF1ADC2L_VOL_MASK 0x00FF /* AIF1ADC2L_VOL - [7:0] */ | ||
| 2607 | #define WM8994_AIF1ADC2L_VOL_SHIFT 0 /* AIF1ADC2L_VOL - [7:0] */ | ||
| 2608 | #define WM8994_AIF1ADC2L_VOL_WIDTH 8 /* AIF1ADC2L_VOL - [7:0] */ | ||
| 2609 | |||
| 2610 | /* | ||
| 2611 | * R1029 (0x405) - AIF1 ADC2 Right Volume | ||
| 2612 | */ | ||
| 2613 | #define WM8994_AIF1ADC2_VU 0x0100 /* AIF1ADC2_VU */ | ||
| 2614 | #define WM8994_AIF1ADC2_VU_MASK 0x0100 /* AIF1ADC2_VU */ | ||
| 2615 | #define WM8994_AIF1ADC2_VU_SHIFT 8 /* AIF1ADC2_VU */ | ||
| 2616 | #define WM8994_AIF1ADC2_VU_WIDTH 1 /* AIF1ADC2_VU */ | ||
| 2617 | #define WM8994_AIF1ADC2R_VOL_MASK 0x00FF /* AIF1ADC2R_VOL - [7:0] */ | ||
| 2618 | #define WM8994_AIF1ADC2R_VOL_SHIFT 0 /* AIF1ADC2R_VOL - [7:0] */ | ||
| 2619 | #define WM8994_AIF1ADC2R_VOL_WIDTH 8 /* AIF1ADC2R_VOL - [7:0] */ | ||
| 2620 | |||
| 2621 | /* | ||
| 2622 | * R1030 (0x406) - AIF1 DAC2 Left Volume | ||
| 2623 | */ | ||
| 2624 | #define WM8994_AIF1DAC2_VU 0x0100 /* AIF1DAC2_VU */ | ||
| 2625 | #define WM8994_AIF1DAC2_VU_MASK 0x0100 /* AIF1DAC2_VU */ | ||
| 2626 | #define WM8994_AIF1DAC2_VU_SHIFT 8 /* AIF1DAC2_VU */ | ||
| 2627 | #define WM8994_AIF1DAC2_VU_WIDTH 1 /* AIF1DAC2_VU */ | ||
| 2628 | #define WM8994_AIF1DAC2L_VOL_MASK 0x00FF /* AIF1DAC2L_VOL - [7:0] */ | ||
| 2629 | #define WM8994_AIF1DAC2L_VOL_SHIFT 0 /* AIF1DAC2L_VOL - [7:0] */ | ||
| 2630 | #define WM8994_AIF1DAC2L_VOL_WIDTH 8 /* AIF1DAC2L_VOL - [7:0] */ | ||
| 2631 | |||
| 2632 | /* | ||
| 2633 | * R1031 (0x407) - AIF1 DAC2 Right Volume | ||
| 2634 | */ | ||
| 2635 | #define WM8994_AIF1DAC2_VU 0x0100 /* AIF1DAC2_VU */ | ||
| 2636 | #define WM8994_AIF1DAC2_VU_MASK 0x0100 /* AIF1DAC2_VU */ | ||
| 2637 | #define WM8994_AIF1DAC2_VU_SHIFT 8 /* AIF1DAC2_VU */ | ||
| 2638 | #define WM8994_AIF1DAC2_VU_WIDTH 1 /* AIF1DAC2_VU */ | ||
| 2639 | #define WM8994_AIF1DAC2R_VOL_MASK 0x00FF /* AIF1DAC2R_VOL - [7:0] */ | ||
| 2640 | #define WM8994_AIF1DAC2R_VOL_SHIFT 0 /* AIF1DAC2R_VOL - [7:0] */ | ||
| 2641 | #define WM8994_AIF1DAC2R_VOL_WIDTH 8 /* AIF1DAC2R_VOL - [7:0] */ | ||
| 2642 | |||
| 2643 | /* | ||
| 2644 | * R1040 (0x410) - AIF1 ADC1 Filters | ||
| 2645 | */ | ||
| 2646 | #define WM8994_AIF1ADC_4FS 0x8000 /* AIF1ADC_4FS */ | ||
| 2647 | #define WM8994_AIF1ADC_4FS_MASK 0x8000 /* AIF1ADC_4FS */ | ||
| 2648 | #define WM8994_AIF1ADC_4FS_SHIFT 15 /* AIF1ADC_4FS */ | ||
| 2649 | #define WM8994_AIF1ADC_4FS_WIDTH 1 /* AIF1ADC_4FS */ | ||
| 2650 | #define WM8994_AIF1ADC1_HPF_CUT_MASK 0x6000 /* AIF1ADC1_HPF_CUT - [14:13] */ | ||
| 2651 | #define WM8994_AIF1ADC1_HPF_CUT_SHIFT 13 /* AIF1ADC1_HPF_CUT - [14:13] */ | ||
| 2652 | #define WM8994_AIF1ADC1_HPF_CUT_WIDTH 2 /* AIF1ADC1_HPF_CUT - [14:13] */ | ||
| 2653 | #define WM8994_AIF1ADC1L_HPF 0x1000 /* AIF1ADC1L_HPF */ | ||
| 2654 | #define WM8994_AIF1ADC1L_HPF_MASK 0x1000 /* AIF1ADC1L_HPF */ | ||
| 2655 | #define WM8994_AIF1ADC1L_HPF_SHIFT 12 /* AIF1ADC1L_HPF */ | ||
| 2656 | #define WM8994_AIF1ADC1L_HPF_WIDTH 1 /* AIF1ADC1L_HPF */ | ||
| 2657 | #define WM8994_AIF1ADC1R_HPF 0x0800 /* AIF1ADC1R_HPF */ | ||
| 2658 | #define WM8994_AIF1ADC1R_HPF_MASK 0x0800 /* AIF1ADC1R_HPF */ | ||
| 2659 | #define WM8994_AIF1ADC1R_HPF_SHIFT 11 /* AIF1ADC1R_HPF */ | ||
| 2660 | #define WM8994_AIF1ADC1R_HPF_WIDTH 1 /* AIF1ADC1R_HPF */ | ||
| 2661 | |||
| 2662 | /* | ||
| 2663 | * R1041 (0x411) - AIF1 ADC2 Filters | ||
| 2664 | */ | ||
| 2665 | #define WM8994_AIF1ADC2_HPF_CUT_MASK 0x6000 /* AIF1ADC2_HPF_CUT - [14:13] */ | ||
| 2666 | #define WM8994_AIF1ADC2_HPF_CUT_SHIFT 13 /* AIF1ADC2_HPF_CUT - [14:13] */ | ||
| 2667 | #define WM8994_AIF1ADC2_HPF_CUT_WIDTH 2 /* AIF1ADC2_HPF_CUT - [14:13] */ | ||
| 2668 | #define WM8994_AIF1ADC2L_HPF 0x1000 /* AIF1ADC2L_HPF */ | ||
| 2669 | #define WM8994_AIF1ADC2L_HPF_MASK 0x1000 /* AIF1ADC2L_HPF */ | ||
| 2670 | #define WM8994_AIF1ADC2L_HPF_SHIFT 12 /* AIF1ADC2L_HPF */ | ||
| 2671 | #define WM8994_AIF1ADC2L_HPF_WIDTH 1 /* AIF1ADC2L_HPF */ | ||
| 2672 | #define WM8994_AIF1ADC2R_HPF 0x0800 /* AIF1ADC2R_HPF */ | ||
| 2673 | #define WM8994_AIF1ADC2R_HPF_MASK 0x0800 /* AIF1ADC2R_HPF */ | ||
| 2674 | #define WM8994_AIF1ADC2R_HPF_SHIFT 11 /* AIF1ADC2R_HPF */ | ||
| 2675 | #define WM8994_AIF1ADC2R_HPF_WIDTH 1 /* AIF1ADC2R_HPF */ | ||
| 2676 | |||
| 2677 | /* | ||
| 2678 | * R1056 (0x420) - AIF1 DAC1 Filters (1) | ||
| 2679 | */ | ||
| 2680 | #define WM8994_AIF1DAC1_MUTE 0x0200 /* AIF1DAC1_MUTE */ | ||
| 2681 | #define WM8994_AIF1DAC1_MUTE_MASK 0x0200 /* AIF1DAC1_MUTE */ | ||
| 2682 | #define WM8994_AIF1DAC1_MUTE_SHIFT 9 /* AIF1DAC1_MUTE */ | ||
| 2683 | #define WM8994_AIF1DAC1_MUTE_WIDTH 1 /* AIF1DAC1_MUTE */ | ||
| 2684 | #define WM8994_AIF1DAC1_MONO 0x0080 /* AIF1DAC1_MONO */ | ||
| 2685 | #define WM8994_AIF1DAC1_MONO_MASK 0x0080 /* AIF1DAC1_MONO */ | ||
| 2686 | #define WM8994_AIF1DAC1_MONO_SHIFT 7 /* AIF1DAC1_MONO */ | ||
| 2687 | #define WM8994_AIF1DAC1_MONO_WIDTH 1 /* AIF1DAC1_MONO */ | ||
| 2688 | #define WM8994_AIF1DAC1_MUTERATE 0x0020 /* AIF1DAC1_MUTERATE */ | ||
| 2689 | #define WM8994_AIF1DAC1_MUTERATE_MASK 0x0020 /* AIF1DAC1_MUTERATE */ | ||
| 2690 | #define WM8994_AIF1DAC1_MUTERATE_SHIFT 5 /* AIF1DAC1_MUTERATE */ | ||
| 2691 | #define WM8994_AIF1DAC1_MUTERATE_WIDTH 1 /* AIF1DAC1_MUTERATE */ | ||
| 2692 | #define WM8994_AIF1DAC1_UNMUTE_RAMP 0x0010 /* AIF1DAC1_UNMUTE_RAMP */ | ||
| 2693 | #define WM8994_AIF1DAC1_UNMUTE_RAMP_MASK 0x0010 /* AIF1DAC1_UNMUTE_RAMP */ | ||
| 2694 | #define WM8994_AIF1DAC1_UNMUTE_RAMP_SHIFT 4 /* AIF1DAC1_UNMUTE_RAMP */ | ||
| 2695 | #define WM8994_AIF1DAC1_UNMUTE_RAMP_WIDTH 1 /* AIF1DAC1_UNMUTE_RAMP */ | ||
| 2696 | #define WM8994_AIF1DAC1_DEEMP_MASK 0x0006 /* AIF1DAC1_DEEMP - [2:1] */ | ||
| 2697 | #define WM8994_AIF1DAC1_DEEMP_SHIFT 1 /* AIF1DAC1_DEEMP - [2:1] */ | ||
| 2698 | #define WM8994_AIF1DAC1_DEEMP_WIDTH 2 /* AIF1DAC1_DEEMP - [2:1] */ | ||
| 2699 | |||
| 2700 | /* | ||
| 2701 | * R1057 (0x421) - AIF1 DAC1 Filters (2) | ||
| 2702 | */ | ||
| 2703 | #define WM8994_AIF1DAC1_3D_GAIN_MASK 0x3E00 /* AIF1DAC1_3D_GAIN - [13:9] */ | ||
| 2704 | #define WM8994_AIF1DAC1_3D_GAIN_SHIFT 9 /* AIF1DAC1_3D_GAIN - [13:9] */ | ||
| 2705 | #define WM8994_AIF1DAC1_3D_GAIN_WIDTH 5 /* AIF1DAC1_3D_GAIN - [13:9] */ | ||
| 2706 | #define WM8994_AIF1DAC1_3D_ENA 0x0100 /* AIF1DAC1_3D_ENA */ | ||
| 2707 | #define WM8994_AIF1DAC1_3D_ENA_MASK 0x0100 /* AIF1DAC1_3D_ENA */ | ||
| 2708 | #define WM8994_AIF1DAC1_3D_ENA_SHIFT 8 /* AIF1DAC1_3D_ENA */ | ||
| 2709 | #define WM8994_AIF1DAC1_3D_ENA_WIDTH 1 /* AIF1DAC1_3D_ENA */ | ||
| 2710 | |||
| 2711 | /* | ||
| 2712 | * R1058 (0x422) - AIF1 DAC2 Filters (1) | ||
| 2713 | */ | ||
| 2714 | #define WM8994_AIF1DAC2_MUTE 0x0200 /* AIF1DAC2_MUTE */ | ||
| 2715 | #define WM8994_AIF1DAC2_MUTE_MASK 0x0200 /* AIF1DAC2_MUTE */ | ||
| 2716 | #define WM8994_AIF1DAC2_MUTE_SHIFT 9 /* AIF1DAC2_MUTE */ | ||
| 2717 | #define WM8994_AIF1DAC2_MUTE_WIDTH 1 /* AIF1DAC2_MUTE */ | ||
| 2718 | #define WM8994_AIF1DAC2_MONO 0x0080 /* AIF1DAC2_MONO */ | ||
| 2719 | #define WM8994_AIF1DAC2_MONO_MASK 0x0080 /* AIF1DAC2_MONO */ | ||
| 2720 | #define WM8994_AIF1DAC2_MONO_SHIFT 7 /* AIF1DAC2_MONO */ | ||
| 2721 | #define WM8994_AIF1DAC2_MONO_WIDTH 1 /* AIF1DAC2_MONO */ | ||
| 2722 | #define WM8994_AIF1DAC2_MUTERATE 0x0020 /* AIF1DAC2_MUTERATE */ | ||
| 2723 | #define WM8994_AIF1DAC2_MUTERATE_MASK 0x0020 /* AIF1DAC2_MUTERATE */ | ||
| 2724 | #define WM8994_AIF1DAC2_MUTERATE_SHIFT 5 /* AIF1DAC2_MUTERATE */ | ||
| 2725 | #define WM8994_AIF1DAC2_MUTERATE_WIDTH 1 /* AIF1DAC2_MUTERATE */ | ||
| 2726 | #define WM8994_AIF1DAC2_UNMUTE_RAMP 0x0010 /* AIF1DAC2_UNMUTE_RAMP */ | ||
| 2727 | #define WM8994_AIF1DAC2_UNMUTE_RAMP_MASK 0x0010 /* AIF1DAC2_UNMUTE_RAMP */ | ||
| 2728 | #define WM8994_AIF1DAC2_UNMUTE_RAMP_SHIFT 4 /* AIF1DAC2_UNMUTE_RAMP */ | ||
| 2729 | #define WM8994_AIF1DAC2_UNMUTE_RAMP_WIDTH 1 /* AIF1DAC2_UNMUTE_RAMP */ | ||
| 2730 | #define WM8994_AIF1DAC2_DEEMP_MASK 0x0006 /* AIF1DAC2_DEEMP - [2:1] */ | ||
| 2731 | #define WM8994_AIF1DAC2_DEEMP_SHIFT 1 /* AIF1DAC2_DEEMP - [2:1] */ | ||
| 2732 | #define WM8994_AIF1DAC2_DEEMP_WIDTH 2 /* AIF1DAC2_DEEMP - [2:1] */ | ||
| 2733 | |||
| 2734 | /* | ||
| 2735 | * R1059 (0x423) - AIF1 DAC2 Filters (2) | ||
| 2736 | */ | ||
| 2737 | #define WM8994_AIF1DAC2_3D_GAIN_MASK 0x3E00 /* AIF1DAC2_3D_GAIN - [13:9] */ | ||
| 2738 | #define WM8994_AIF1DAC2_3D_GAIN_SHIFT 9 /* AIF1DAC2_3D_GAIN - [13:9] */ | ||
| 2739 | #define WM8994_AIF1DAC2_3D_GAIN_WIDTH 5 /* AIF1DAC2_3D_GAIN - [13:9] */ | ||
| 2740 | #define WM8994_AIF1DAC2_3D_ENA 0x0100 /* AIF1DAC2_3D_ENA */ | ||
| 2741 | #define WM8994_AIF1DAC2_3D_ENA_MASK 0x0100 /* AIF1DAC2_3D_ENA */ | ||
| 2742 | #define WM8994_AIF1DAC2_3D_ENA_SHIFT 8 /* AIF1DAC2_3D_ENA */ | ||
| 2743 | #define WM8994_AIF1DAC2_3D_ENA_WIDTH 1 /* AIF1DAC2_3D_ENA */ | ||
| 2744 | |||
| 2745 | /* | ||
| 2746 | * R1088 (0x440) - AIF1 DRC1 (1) | ||
| 2747 | */ | ||
| 2748 | #define WM8994_AIF1DRC1_SIG_DET_RMS_MASK 0xF800 /* AIF1DRC1_SIG_DET_RMS - [15:11] */ | ||
| 2749 | #define WM8994_AIF1DRC1_SIG_DET_RMS_SHIFT 11 /* AIF1DRC1_SIG_DET_RMS - [15:11] */ | ||
| 2750 | #define WM8994_AIF1DRC1_SIG_DET_RMS_WIDTH 5 /* AIF1DRC1_SIG_DET_RMS - [15:11] */ | ||
| 2751 | #define WM8994_AIF1DRC1_SIG_DET_PK_MASK 0x0600 /* AIF1DRC1_SIG_DET_PK - [10:9] */ | ||
| 2752 | #define WM8994_AIF1DRC1_SIG_DET_PK_SHIFT 9 /* AIF1DRC1_SIG_DET_PK - [10:9] */ | ||
| 2753 | #define WM8994_AIF1DRC1_SIG_DET_PK_WIDTH 2 /* AIF1DRC1_SIG_DET_PK - [10:9] */ | ||
| 2754 | #define WM8994_AIF1DRC1_NG_ENA 0x0100 /* AIF1DRC1_NG_ENA */ | ||
| 2755 | #define WM8994_AIF1DRC1_NG_ENA_MASK 0x0100 /* AIF1DRC1_NG_ENA */ | ||
| 2756 | #define WM8994_AIF1DRC1_NG_ENA_SHIFT 8 /* AIF1DRC1_NG_ENA */ | ||
| 2757 | #define WM8994_AIF1DRC1_NG_ENA_WIDTH 1 /* AIF1DRC1_NG_ENA */ | ||
| 2758 | #define WM8994_AIF1DRC1_SIG_DET_MODE 0x0080 /* AIF1DRC1_SIG_DET_MODE */ | ||
| 2759 | #define WM8994_AIF1DRC1_SIG_DET_MODE_MASK 0x0080 /* AIF1DRC1_SIG_DET_MODE */ | ||
| 2760 | #define WM8994_AIF1DRC1_SIG_DET_MODE_SHIFT 7 /* AIF1DRC1_SIG_DET_MODE */ | ||
| 2761 | #define WM8994_AIF1DRC1_SIG_DET_MODE_WIDTH 1 /* AIF1DRC1_SIG_DET_MODE */ | ||
| 2762 | #define WM8994_AIF1DRC1_SIG_DET 0x0040 /* AIF1DRC1_SIG_DET */ | ||
| 2763 | #define WM8994_AIF1DRC1_SIG_DET_MASK 0x0040 /* AIF1DRC1_SIG_DET */ | ||
| 2764 | #define WM8994_AIF1DRC1_SIG_DET_SHIFT 6 /* AIF1DRC1_SIG_DET */ | ||
| 2765 | #define WM8994_AIF1DRC1_SIG_DET_WIDTH 1 /* AIF1DRC1_SIG_DET */ | ||
| 2766 | #define WM8994_AIF1DRC1_KNEE2_OP_ENA 0x0020 /* AIF1DRC1_KNEE2_OP_ENA */ | ||
| 2767 | #define WM8994_AIF1DRC1_KNEE2_OP_ENA_MASK 0x0020 /* AIF1DRC1_KNEE2_OP_ENA */ | ||
| 2768 | #define WM8994_AIF1DRC1_KNEE2_OP_ENA_SHIFT 5 /* AIF1DRC1_KNEE2_OP_ENA */ | ||
| 2769 | #define WM8994_AIF1DRC1_KNEE2_OP_ENA_WIDTH 1 /* AIF1DRC1_KNEE2_OP_ENA */ | ||
| 2770 | #define WM8994_AIF1DRC1_QR 0x0010 /* AIF1DRC1_QR */ | ||
| 2771 | #define WM8994_AIF1DRC1_QR_MASK 0x0010 /* AIF1DRC1_QR */ | ||
| 2772 | #define WM8994_AIF1DRC1_QR_SHIFT 4 /* AIF1DRC1_QR */ | ||
| 2773 | #define WM8994_AIF1DRC1_QR_WIDTH 1 /* AIF1DRC1_QR */ | ||
| 2774 | #define WM8994_AIF1DRC1_ANTICLIP 0x0008 /* AIF1DRC1_ANTICLIP */ | ||
| 2775 | #define WM8994_AIF1DRC1_ANTICLIP_MASK 0x0008 /* AIF1DRC1_ANTICLIP */ | ||
| 2776 | #define WM8994_AIF1DRC1_ANTICLIP_SHIFT 3 /* AIF1DRC1_ANTICLIP */ | ||
| 2777 | #define WM8994_AIF1DRC1_ANTICLIP_WIDTH 1 /* AIF1DRC1_ANTICLIP */ | ||
| 2778 | #define WM8994_AIF1DAC1_DRC_ENA 0x0004 /* AIF1DAC1_DRC_ENA */ | ||
| 2779 | #define WM8994_AIF1DAC1_DRC_ENA_MASK 0x0004 /* AIF1DAC1_DRC_ENA */ | ||
| 2780 | #define WM8994_AIF1DAC1_DRC_ENA_SHIFT 2 /* AIF1DAC1_DRC_ENA */ | ||
| 2781 | #define WM8994_AIF1DAC1_DRC_ENA_WIDTH 1 /* AIF1DAC1_DRC_ENA */ | ||
| 2782 | #define WM8994_AIF1ADC1L_DRC_ENA 0x0002 /* AIF1ADC1L_DRC_ENA */ | ||
| 2783 | #define WM8994_AIF1ADC1L_DRC_ENA_MASK 0x0002 /* AIF1ADC1L_DRC_ENA */ | ||
| 2784 | #define WM8994_AIF1ADC1L_DRC_ENA_SHIFT 1 /* AIF1ADC1L_DRC_ENA */ | ||
| 2785 | #define WM8994_AIF1ADC1L_DRC_ENA_WIDTH 1 /* AIF1ADC1L_DRC_ENA */ | ||
| 2786 | #define WM8994_AIF1ADC1R_DRC_ENA 0x0001 /* AIF1ADC1R_DRC_ENA */ | ||
| 2787 | #define WM8994_AIF1ADC1R_DRC_ENA_MASK 0x0001 /* AIF1ADC1R_DRC_ENA */ | ||
| 2788 | #define WM8994_AIF1ADC1R_DRC_ENA_SHIFT 0 /* AIF1ADC1R_DRC_ENA */ | ||
| 2789 | #define WM8994_AIF1ADC1R_DRC_ENA_WIDTH 1 /* AIF1ADC1R_DRC_ENA */ | ||
| 2790 | |||
| 2791 | /* | ||
| 2792 | * R1089 (0x441) - AIF1 DRC1 (2) | ||
| 2793 | */ | ||
| 2794 | #define WM8994_AIF1DRC1_ATK_MASK 0x1E00 /* AIF1DRC1_ATK - [12:9] */ | ||
| 2795 | #define WM8994_AIF1DRC1_ATK_SHIFT 9 /* AIF1DRC1_ATK - [12:9] */ | ||
| 2796 | #define WM8994_AIF1DRC1_ATK_WIDTH 4 /* AIF1DRC1_ATK - [12:9] */ | ||
| 2797 | #define WM8994_AIF1DRC1_DCY_MASK 0x01E0 /* AIF1DRC1_DCY - [8:5] */ | ||
| 2798 | #define WM8994_AIF1DRC1_DCY_SHIFT 5 /* AIF1DRC1_DCY - [8:5] */ | ||
| 2799 | #define WM8994_AIF1DRC1_DCY_WIDTH 4 /* AIF1DRC1_DCY - [8:5] */ | ||
| 2800 | #define WM8994_AIF1DRC1_MINGAIN_MASK 0x001C /* AIF1DRC1_MINGAIN - [4:2] */ | ||
| 2801 | #define WM8994_AIF1DRC1_MINGAIN_SHIFT 2 /* AIF1DRC1_MINGAIN - [4:2] */ | ||
| 2802 | #define WM8994_AIF1DRC1_MINGAIN_WIDTH 3 /* AIF1DRC1_MINGAIN - [4:2] */ | ||
| 2803 | #define WM8994_AIF1DRC1_MAXGAIN_MASK 0x0003 /* AIF1DRC1_MAXGAIN - [1:0] */ | ||
| 2804 | #define WM8994_AIF1DRC1_MAXGAIN_SHIFT 0 /* AIF1DRC1_MAXGAIN - [1:0] */ | ||
| 2805 | #define WM8994_AIF1DRC1_MAXGAIN_WIDTH 2 /* AIF1DRC1_MAXGAIN - [1:0] */ | ||
| 2806 | |||
| 2807 | /* | ||
| 2808 | * R1090 (0x442) - AIF1 DRC1 (3) | ||
| 2809 | */ | ||
| 2810 | #define WM8994_AIF1DRC1_NG_MINGAIN_MASK 0xF000 /* AIF1DRC1_NG_MINGAIN - [15:12] */ | ||
| 2811 | #define WM8994_AIF1DRC1_NG_MINGAIN_SHIFT 12 /* AIF1DRC1_NG_MINGAIN - [15:12] */ | ||
| 2812 | #define WM8994_AIF1DRC1_NG_MINGAIN_WIDTH 4 /* AIF1DRC1_NG_MINGAIN - [15:12] */ | ||
| 2813 | #define WM8994_AIF1DRC1_NG_EXP_MASK 0x0C00 /* AIF1DRC1_NG_EXP - [11:10] */ | ||
| 2814 | #define WM8994_AIF1DRC1_NG_EXP_SHIFT 10 /* AIF1DRC1_NG_EXP - [11:10] */ | ||
| 2815 | #define WM8994_AIF1DRC1_NG_EXP_WIDTH 2 /* AIF1DRC1_NG_EXP - [11:10] */ | ||
| 2816 | #define WM8994_AIF1DRC1_QR_THR_MASK 0x0300 /* AIF1DRC1_QR_THR - [9:8] */ | ||
| 2817 | #define WM8994_AIF1DRC1_QR_THR_SHIFT 8 /* AIF1DRC1_QR_THR - [9:8] */ | ||
| 2818 | #define WM8994_AIF1DRC1_QR_THR_WIDTH 2 /* AIF1DRC1_QR_THR - [9:8] */ | ||
| 2819 | #define WM8994_AIF1DRC1_QR_DCY_MASK 0x00C0 /* AIF1DRC1_QR_DCY - [7:6] */ | ||
| 2820 | #define WM8994_AIF1DRC1_QR_DCY_SHIFT 6 /* AIF1DRC1_QR_DCY - [7:6] */ | ||
| 2821 | #define WM8994_AIF1DRC1_QR_DCY_WIDTH 2 /* AIF1DRC1_QR_DCY - [7:6] */ | ||
| 2822 | #define WM8994_AIF1DRC1_HI_COMP_MASK 0x0038 /* AIF1DRC1_HI_COMP - [5:3] */ | ||
| 2823 | #define WM8994_AIF1DRC1_HI_COMP_SHIFT 3 /* AIF1DRC1_HI_COMP - [5:3] */ | ||
| 2824 | #define WM8994_AIF1DRC1_HI_COMP_WIDTH 3 /* AIF1DRC1_HI_COMP - [5:3] */ | ||
| 2825 | #define WM8994_AIF1DRC1_LO_COMP_MASK 0x0007 /* AIF1DRC1_LO_COMP - [2:0] */ | ||
| 2826 | #define WM8994_AIF1DRC1_LO_COMP_SHIFT 0 /* AIF1DRC1_LO_COMP - [2:0] */ | ||
| 2827 | #define WM8994_AIF1DRC1_LO_COMP_WIDTH 3 /* AIF1DRC1_LO_COMP - [2:0] */ | ||
| 2828 | |||
| 2829 | /* | ||
| 2830 | * R1091 (0x443) - AIF1 DRC1 (4) | ||
| 2831 | */ | ||
| 2832 | #define WM8994_AIF1DRC1_KNEE_IP_MASK 0x07E0 /* AIF1DRC1_KNEE_IP - [10:5] */ | ||
| 2833 | #define WM8994_AIF1DRC1_KNEE_IP_SHIFT 5 /* AIF1DRC1_KNEE_IP - [10:5] */ | ||
| 2834 | #define WM8994_AIF1DRC1_KNEE_IP_WIDTH 6 /* AIF1DRC1_KNEE_IP - [10:5] */ | ||
| 2835 | #define WM8994_AIF1DRC1_KNEE_OP_MASK 0x001F /* AIF1DRC1_KNEE_OP - [4:0] */ | ||
| 2836 | #define WM8994_AIF1DRC1_KNEE_OP_SHIFT 0 /* AIF1DRC1_KNEE_OP - [4:0] */ | ||
| 2837 | #define WM8994_AIF1DRC1_KNEE_OP_WIDTH 5 /* AIF1DRC1_KNEE_OP - [4:0] */ | ||
| 2838 | |||
| 2839 | /* | ||
| 2840 | * R1092 (0x444) - AIF1 DRC1 (5) | ||
| 2841 | */ | ||
| 2842 | #define WM8994_AIF1DRC1_KNEE2_IP_MASK 0x03E0 /* AIF1DRC1_KNEE2_IP - [9:5] */ | ||
| 2843 | #define WM8994_AIF1DRC1_KNEE2_IP_SHIFT 5 /* AIF1DRC1_KNEE2_IP - [9:5] */ | ||
| 2844 | #define WM8994_AIF1DRC1_KNEE2_IP_WIDTH 5 /* AIF1DRC1_KNEE2_IP - [9:5] */ | ||
| 2845 | #define WM8994_AIF1DRC1_KNEE2_OP_MASK 0x001F /* AIF1DRC1_KNEE2_OP - [4:0] */ | ||
| 2846 | #define WM8994_AIF1DRC1_KNEE2_OP_SHIFT 0 /* AIF1DRC1_KNEE2_OP - [4:0] */ | ||
| 2847 | #define WM8994_AIF1DRC1_KNEE2_OP_WIDTH 5 /* AIF1DRC1_KNEE2_OP - [4:0] */ | ||
| 2848 | |||
| 2849 | /* | ||
| 2850 | * R1104 (0x450) - AIF1 DRC2 (1) | ||
| 2851 | */ | ||
| 2852 | #define WM8994_AIF1DRC2_SIG_DET_RMS_MASK 0xF800 /* AIF1DRC2_SIG_DET_RMS - [15:11] */ | ||
| 2853 | #define WM8994_AIF1DRC2_SIG_DET_RMS_SHIFT 11 /* AIF1DRC2_SIG_DET_RMS - [15:11] */ | ||
| 2854 | #define WM8994_AIF1DRC2_SIG_DET_RMS_WIDTH 5 /* AIF1DRC2_SIG_DET_RMS - [15:11] */ | ||
| 2855 | #define WM8994_AIF1DRC2_SIG_DET_PK_MASK 0x0600 /* AIF1DRC2_SIG_DET_PK - [10:9] */ | ||
| 2856 | #define WM8994_AIF1DRC2_SIG_DET_PK_SHIFT 9 /* AIF1DRC2_SIG_DET_PK - [10:9] */ | ||
| 2857 | #define WM8994_AIF1DRC2_SIG_DET_PK_WIDTH 2 /* AIF1DRC2_SIG_DET_PK - [10:9] */ | ||
| 2858 | #define WM8994_AIF1DRC2_NG_ENA 0x0100 /* AIF1DRC2_NG_ENA */ | ||
| 2859 | #define WM8994_AIF1DRC2_NG_ENA_MASK 0x0100 /* AIF1DRC2_NG_ENA */ | ||
| 2860 | #define WM8994_AIF1DRC2_NG_ENA_SHIFT 8 /* AIF1DRC2_NG_ENA */ | ||
| 2861 | #define WM8994_AIF1DRC2_NG_ENA_WIDTH 1 /* AIF1DRC2_NG_ENA */ | ||
| 2862 | #define WM8994_AIF1DRC2_SIG_DET_MODE 0x0080 /* AIF1DRC2_SIG_DET_MODE */ | ||
| 2863 | #define WM8994_AIF1DRC2_SIG_DET_MODE_MASK 0x0080 /* AIF1DRC2_SIG_DET_MODE */ | ||
| 2864 | #define WM8994_AIF1DRC2_SIG_DET_MODE_SHIFT 7 /* AIF1DRC2_SIG_DET_MODE */ | ||
| 2865 | #define WM8994_AIF1DRC2_SIG_DET_MODE_WIDTH 1 /* AIF1DRC2_SIG_DET_MODE */ | ||
| 2866 | #define WM8994_AIF1DRC2_SIG_DET 0x0040 /* AIF1DRC2_SIG_DET */ | ||
| 2867 | #define WM8994_AIF1DRC2_SIG_DET_MASK 0x0040 /* AIF1DRC2_SIG_DET */ | ||
| 2868 | #define WM8994_AIF1DRC2_SIG_DET_SHIFT 6 /* AIF1DRC2_SIG_DET */ | ||
| 2869 | #define WM8994_AIF1DRC2_SIG_DET_WIDTH 1 /* AIF1DRC2_SIG_DET */ | ||
| 2870 | #define WM8994_AIF1DRC2_KNEE2_OP_ENA 0x0020 /* AIF1DRC2_KNEE2_OP_ENA */ | ||
| 2871 | #define WM8994_AIF1DRC2_KNEE2_OP_ENA_MASK 0x0020 /* AIF1DRC2_KNEE2_OP_ENA */ | ||
| 2872 | #define WM8994_AIF1DRC2_KNEE2_OP_ENA_SHIFT 5 /* AIF1DRC2_KNEE2_OP_ENA */ | ||
| 2873 | #define WM8994_AIF1DRC2_KNEE2_OP_ENA_WIDTH 1 /* AIF1DRC2_KNEE2_OP_ENA */ | ||
| 2874 | #define WM8994_AIF1DRC2_QR 0x0010 /* AIF1DRC2_QR */ | ||
| 2875 | #define WM8994_AIF1DRC2_QR_MASK 0x0010 /* AIF1DRC2_QR */ | ||
| 2876 | #define WM8994_AIF1DRC2_QR_SHIFT 4 /* AIF1DRC2_QR */ | ||
| 2877 | #define WM8994_AIF1DRC2_QR_WIDTH 1 /* AIF1DRC2_QR */ | ||
| 2878 | #define WM8994_AIF1DRC2_ANTICLIP 0x0008 /* AIF1DRC2_ANTICLIP */ | ||
| 2879 | #define WM8994_AIF1DRC2_ANTICLIP_MASK 0x0008 /* AIF1DRC2_ANTICLIP */ | ||
| 2880 | #define WM8994_AIF1DRC2_ANTICLIP_SHIFT 3 /* AIF1DRC2_ANTICLIP */ | ||
| 2881 | #define WM8994_AIF1DRC2_ANTICLIP_WIDTH 1 /* AIF1DRC2_ANTICLIP */ | ||
| 2882 | #define WM8994_AIF1DAC2_DRC_ENA 0x0004 /* AIF1DAC2_DRC_ENA */ | ||
| 2883 | #define WM8994_AIF1DAC2_DRC_ENA_MASK 0x0004 /* AIF1DAC2_DRC_ENA */ | ||
| 2884 | #define WM8994_AIF1DAC2_DRC_ENA_SHIFT 2 /* AIF1DAC2_DRC_ENA */ | ||
| 2885 | #define WM8994_AIF1DAC2_DRC_ENA_WIDTH 1 /* AIF1DAC2_DRC_ENA */ | ||
| 2886 | #define WM8994_AIF1ADC2L_DRC_ENA 0x0002 /* AIF1ADC2L_DRC_ENA */ | ||
| 2887 | #define WM8994_AIF1ADC2L_DRC_ENA_MASK 0x0002 /* AIF1ADC2L_DRC_ENA */ | ||
| 2888 | #define WM8994_AIF1ADC2L_DRC_ENA_SHIFT 1 /* AIF1ADC2L_DRC_ENA */ | ||
| 2889 | #define WM8994_AIF1ADC2L_DRC_ENA_WIDTH 1 /* AIF1ADC2L_DRC_ENA */ | ||
| 2890 | #define WM8994_AIF1ADC2R_DRC_ENA 0x0001 /* AIF1ADC2R_DRC_ENA */ | ||
| 2891 | #define WM8994_AIF1ADC2R_DRC_ENA_MASK 0x0001 /* AIF1ADC2R_DRC_ENA */ | ||
| 2892 | #define WM8994_AIF1ADC2R_DRC_ENA_SHIFT 0 /* AIF1ADC2R_DRC_ENA */ | ||
| 2893 | #define WM8994_AIF1ADC2R_DRC_ENA_WIDTH 1 /* AIF1ADC2R_DRC_ENA */ | ||
| 2894 | |||
| 2895 | /* | ||
| 2896 | * R1105 (0x451) - AIF1 DRC2 (2) | ||
| 2897 | */ | ||
| 2898 | #define WM8994_AIF1DRC2_ATK_MASK 0x1E00 /* AIF1DRC2_ATK - [12:9] */ | ||
| 2899 | #define WM8994_AIF1DRC2_ATK_SHIFT 9 /* AIF1DRC2_ATK - [12:9] */ | ||
| 2900 | #define WM8994_AIF1DRC2_ATK_WIDTH 4 /* AIF1DRC2_ATK - [12:9] */ | ||
| 2901 | #define WM8994_AIF1DRC2_DCY_MASK 0x01E0 /* AIF1DRC2_DCY - [8:5] */ | ||
| 2902 | #define WM8994_AIF1DRC2_DCY_SHIFT 5 /* AIF1DRC2_DCY - [8:5] */ | ||
| 2903 | #define WM8994_AIF1DRC2_DCY_WIDTH 4 /* AIF1DRC2_DCY - [8:5] */ | ||
| 2904 | #define WM8994_AIF1DRC2_MINGAIN_MASK 0x001C /* AIF1DRC2_MINGAIN - [4:2] */ | ||
| 2905 | #define WM8994_AIF1DRC2_MINGAIN_SHIFT 2 /* AIF1DRC2_MINGAIN - [4:2] */ | ||
| 2906 | #define WM8994_AIF1DRC2_MINGAIN_WIDTH 3 /* AIF1DRC2_MINGAIN - [4:2] */ | ||
| 2907 | #define WM8994_AIF1DRC2_MAXGAIN_MASK 0x0003 /* AIF1DRC2_MAXGAIN - [1:0] */ | ||
| 2908 | #define WM8994_AIF1DRC2_MAXGAIN_SHIFT 0 /* AIF1DRC2_MAXGAIN - [1:0] */ | ||
| 2909 | #define WM8994_AIF1DRC2_MAXGAIN_WIDTH 2 /* AIF1DRC2_MAXGAIN - [1:0] */ | ||
| 2910 | |||
| 2911 | /* | ||
| 2912 | * R1106 (0x452) - AIF1 DRC2 (3) | ||
| 2913 | */ | ||
| 2914 | #define WM8994_AIF1DRC2_NG_MINGAIN_MASK 0xF000 /* AIF1DRC2_NG_MINGAIN - [15:12] */ | ||
| 2915 | #define WM8994_AIF1DRC2_NG_MINGAIN_SHIFT 12 /* AIF1DRC2_NG_MINGAIN - [15:12] */ | ||
| 2916 | #define WM8994_AIF1DRC2_NG_MINGAIN_WIDTH 4 /* AIF1DRC2_NG_MINGAIN - [15:12] */ | ||
| 2917 | #define WM8994_AIF1DRC2_NG_EXP_MASK 0x0C00 /* AIF1DRC2_NG_EXP - [11:10] */ | ||
| 2918 | #define WM8994_AIF1DRC2_NG_EXP_SHIFT 10 /* AIF1DRC2_NG_EXP - [11:10] */ | ||
| 2919 | #define WM8994_AIF1DRC2_NG_EXP_WIDTH 2 /* AIF1DRC2_NG_EXP - [11:10] */ | ||
| 2920 | #define WM8994_AIF1DRC2_QR_THR_MASK 0x0300 /* AIF1DRC2_QR_THR - [9:8] */ | ||
| 2921 | #define WM8994_AIF1DRC2_QR_THR_SHIFT 8 /* AIF1DRC2_QR_THR - [9:8] */ | ||
| 2922 | #define WM8994_AIF1DRC2_QR_THR_WIDTH 2 /* AIF1DRC2_QR_THR - [9:8] */ | ||
| 2923 | #define WM8994_AIF1DRC2_QR_DCY_MASK 0x00C0 /* AIF1DRC2_QR_DCY - [7:6] */ | ||
| 2924 | #define WM8994_AIF1DRC2_QR_DCY_SHIFT 6 /* AIF1DRC2_QR_DCY - [7:6] */ | ||
| 2925 | #define WM8994_AIF1DRC2_QR_DCY_WIDTH 2 /* AIF1DRC2_QR_DCY - [7:6] */ | ||
| 2926 | #define WM8994_AIF1DRC2_HI_COMP_MASK 0x0038 /* AIF1DRC2_HI_COMP - [5:3] */ | ||
| 2927 | #define WM8994_AIF1DRC2_HI_COMP_SHIFT 3 /* AIF1DRC2_HI_COMP - [5:3] */ | ||
| 2928 | #define WM8994_AIF1DRC2_HI_COMP_WIDTH 3 /* AIF1DRC2_HI_COMP - [5:3] */ | ||
| 2929 | #define WM8994_AIF1DRC2_LO_COMP_MASK 0x0007 /* AIF1DRC2_LO_COMP - [2:0] */ | ||
| 2930 | #define WM8994_AIF1DRC2_LO_COMP_SHIFT 0 /* AIF1DRC2_LO_COMP - [2:0] */ | ||
| 2931 | #define WM8994_AIF1DRC2_LO_COMP_WIDTH 3 /* AIF1DRC2_LO_COMP - [2:0] */ | ||
| 2932 | |||
| 2933 | /* | ||
| 2934 | * R1107 (0x453) - AIF1 DRC2 (4) | ||
| 2935 | */ | ||
| 2936 | #define WM8994_AIF1DRC2_KNEE_IP_MASK 0x07E0 /* AIF1DRC2_KNEE_IP - [10:5] */ | ||
| 2937 | #define WM8994_AIF1DRC2_KNEE_IP_SHIFT 5 /* AIF1DRC2_KNEE_IP - [10:5] */ | ||
| 2938 | #define WM8994_AIF1DRC2_KNEE_IP_WIDTH 6 /* AIF1DRC2_KNEE_IP - [10:5] */ | ||
| 2939 | #define WM8994_AIF1DRC2_KNEE_OP_MASK 0x001F /* AIF1DRC2_KNEE_OP - [4:0] */ | ||
| 2940 | #define WM8994_AIF1DRC2_KNEE_OP_SHIFT 0 /* AIF1DRC2_KNEE_OP - [4:0] */ | ||
| 2941 | #define WM8994_AIF1DRC2_KNEE_OP_WIDTH 5 /* AIF1DRC2_KNEE_OP - [4:0] */ | ||
| 2942 | |||
| 2943 | /* | ||
| 2944 | * R1108 (0x454) - AIF1 DRC2 (5) | ||
| 2945 | */ | ||
| 2946 | #define WM8994_AIF1DRC2_KNEE2_IP_MASK 0x03E0 /* AIF1DRC2_KNEE2_IP - [9:5] */ | ||
| 2947 | #define WM8994_AIF1DRC2_KNEE2_IP_SHIFT 5 /* AIF1DRC2_KNEE2_IP - [9:5] */ | ||
| 2948 | #define WM8994_AIF1DRC2_KNEE2_IP_WIDTH 5 /* AIF1DRC2_KNEE2_IP - [9:5] */ | ||
| 2949 | #define WM8994_AIF1DRC2_KNEE2_OP_MASK 0x001F /* AIF1DRC2_KNEE2_OP - [4:0] */ | ||
| 2950 | #define WM8994_AIF1DRC2_KNEE2_OP_SHIFT 0 /* AIF1DRC2_KNEE2_OP - [4:0] */ | ||
| 2951 | #define WM8994_AIF1DRC2_KNEE2_OP_WIDTH 5 /* AIF1DRC2_KNEE2_OP - [4:0] */ | ||
| 2952 | |||
| 2953 | /* | ||
| 2954 | * R1152 (0x480) - AIF1 DAC1 EQ Gains (1) | ||
| 2955 | */ | ||
| 2956 | #define WM8994_AIF1DAC1_EQ_B1_GAIN_MASK 0xF800 /* AIF1DAC1_EQ_B1_GAIN - [15:11] */ | ||
| 2957 | #define WM8994_AIF1DAC1_EQ_B1_GAIN_SHIFT 11 /* AIF1DAC1_EQ_B1_GAIN - [15:11] */ | ||
| 2958 | #define WM8994_AIF1DAC1_EQ_B1_GAIN_WIDTH 5 /* AIF1DAC1_EQ_B1_GAIN - [15:11] */ | ||
| 2959 | #define WM8994_AIF1DAC1_EQ_B2_GAIN_MASK 0x07C0 /* AIF1DAC1_EQ_B2_GAIN - [10:6] */ | ||
| 2960 | #define WM8994_AIF1DAC1_EQ_B2_GAIN_SHIFT 6 /* AIF1DAC1_EQ_B2_GAIN - [10:6] */ | ||
| 2961 | #define WM8994_AIF1DAC1_EQ_B2_GAIN_WIDTH 5 /* AIF1DAC1_EQ_B2_GAIN - [10:6] */ | ||
| 2962 | #define WM8994_AIF1DAC1_EQ_B3_GAIN_MASK 0x003E /* AIF1DAC1_EQ_B3_GAIN - [5:1] */ | ||
| 2963 | #define WM8994_AIF1DAC1_EQ_B3_GAIN_SHIFT 1 /* AIF1DAC1_EQ_B3_GAIN - [5:1] */ | ||
| 2964 | #define WM8994_AIF1DAC1_EQ_B3_GAIN_WIDTH 5 /* AIF1DAC1_EQ_B3_GAIN - [5:1] */ | ||
| 2965 | #define WM8994_AIF1DAC1_EQ_ENA 0x0001 /* AIF1DAC1_EQ_ENA */ | ||
| 2966 | #define WM8994_AIF1DAC1_EQ_ENA_MASK 0x0001 /* AIF1DAC1_EQ_ENA */ | ||
| 2967 | #define WM8994_AIF1DAC1_EQ_ENA_SHIFT 0 /* AIF1DAC1_EQ_ENA */ | ||
| 2968 | #define WM8994_AIF1DAC1_EQ_ENA_WIDTH 1 /* AIF1DAC1_EQ_ENA */ | ||
| 2969 | |||
| 2970 | /* | ||
| 2971 | * R1153 (0x481) - AIF1 DAC1 EQ Gains (2) | ||
| 2972 | */ | ||
| 2973 | #define WM8994_AIF1DAC1_EQ_B4_GAIN_MASK 0xF800 /* AIF1DAC1_EQ_B4_GAIN - [15:11] */ | ||
| 2974 | #define WM8994_AIF1DAC1_EQ_B4_GAIN_SHIFT 11 /* AIF1DAC1_EQ_B4_GAIN - [15:11] */ | ||
| 2975 | #define WM8994_AIF1DAC1_EQ_B4_GAIN_WIDTH 5 /* AIF1DAC1_EQ_B4_GAIN - [15:11] */ | ||
| 2976 | #define WM8994_AIF1DAC1_EQ_B5_GAIN_MASK 0x07C0 /* AIF1DAC1_EQ_B5_GAIN - [10:6] */ | ||
| 2977 | #define WM8994_AIF1DAC1_EQ_B5_GAIN_SHIFT 6 /* AIF1DAC1_EQ_B5_GAIN - [10:6] */ | ||
| 2978 | #define WM8994_AIF1DAC1_EQ_B5_GAIN_WIDTH 5 /* AIF1DAC1_EQ_B5_GAIN - [10:6] */ | ||
| 2979 | |||
| 2980 | /* | ||
| 2981 | * R1154 (0x482) - AIF1 DAC1 EQ Band 1 A | ||
| 2982 | */ | ||
| 2983 | #define WM8994_AIF1DAC1_EQ_B1_A_MASK 0xFFFF /* AIF1DAC1_EQ_B1_A - [15:0] */ | ||
| 2984 | #define WM8994_AIF1DAC1_EQ_B1_A_SHIFT 0 /* AIF1DAC1_EQ_B1_A - [15:0] */ | ||
| 2985 | #define WM8994_AIF1DAC1_EQ_B1_A_WIDTH 16 /* AIF1DAC1_EQ_B1_A - [15:0] */ | ||
| 2986 | |||
| 2987 | /* | ||
| 2988 | * R1155 (0x483) - AIF1 DAC1 EQ Band 1 B | ||
| 2989 | */ | ||
| 2990 | #define WM8994_AIF1DAC1_EQ_B1_B_MASK 0xFFFF /* AIF1DAC1_EQ_B1_B - [15:0] */ | ||
| 2991 | #define WM8994_AIF1DAC1_EQ_B1_B_SHIFT 0 /* AIF1DAC1_EQ_B1_B - [15:0] */ | ||
| 2992 | #define WM8994_AIF1DAC1_EQ_B1_B_WIDTH 16 /* AIF1DAC1_EQ_B1_B - [15:0] */ | ||
| 2993 | |||
| 2994 | /* | ||
| 2995 | * R1156 (0x484) - AIF1 DAC1 EQ Band 1 PG | ||
| 2996 | */ | ||
| 2997 | #define WM8994_AIF1DAC1_EQ_B1_PG_MASK 0xFFFF /* AIF1DAC1_EQ_B1_PG - [15:0] */ | ||
| 2998 | #define WM8994_AIF1DAC1_EQ_B1_PG_SHIFT 0 /* AIF1DAC1_EQ_B1_PG - [15:0] */ | ||
| 2999 | #define WM8994_AIF1DAC1_EQ_B1_PG_WIDTH 16 /* AIF1DAC1_EQ_B1_PG - [15:0] */ | ||
| 3000 | |||
| 3001 | /* | ||
| 3002 | * R1157 (0x485) - AIF1 DAC1 EQ Band 2 A | ||
| 3003 | */ | ||
| 3004 | #define WM8994_AIF1DAC1_EQ_B2_A_MASK 0xFFFF /* AIF1DAC1_EQ_B2_A - [15:0] */ | ||
| 3005 | #define WM8994_AIF1DAC1_EQ_B2_A_SHIFT 0 /* AIF1DAC1_EQ_B2_A - [15:0] */ | ||
| 3006 | #define WM8994_AIF1DAC1_EQ_B2_A_WIDTH 16 /* AIF1DAC1_EQ_B2_A - [15:0] */ | ||
| 3007 | |||
| 3008 | /* | ||
| 3009 | * R1158 (0x486) - AIF1 DAC1 EQ Band 2 B | ||
| 3010 | */ | ||
| 3011 | #define WM8994_AIF1DAC1_EQ_B2_B_MASK 0xFFFF /* AIF1DAC1_EQ_B2_B - [15:0] */ | ||
| 3012 | #define WM8994_AIF1DAC1_EQ_B2_B_SHIFT 0 /* AIF1DAC1_EQ_B2_B - [15:0] */ | ||
| 3013 | #define WM8994_AIF1DAC1_EQ_B2_B_WIDTH 16 /* AIF1DAC1_EQ_B2_B - [15:0] */ | ||
| 3014 | |||
| 3015 | /* | ||
| 3016 | * R1159 (0x487) - AIF1 DAC1 EQ Band 2 C | ||
| 3017 | */ | ||
| 3018 | #define WM8994_AIF1DAC1_EQ_B2_C_MASK 0xFFFF /* AIF1DAC1_EQ_B2_C - [15:0] */ | ||
| 3019 | #define WM8994_AIF1DAC1_EQ_B2_C_SHIFT 0 /* AIF1DAC1_EQ_B2_C - [15:0] */ | ||
| 3020 | #define WM8994_AIF1DAC1_EQ_B2_C_WIDTH 16 /* AIF1DAC1_EQ_B2_C - [15:0] */ | ||
| 3021 | |||
| 3022 | /* | ||
| 3023 | * R1160 (0x488) - AIF1 DAC1 EQ Band 2 PG | ||
| 3024 | */ | ||
| 3025 | #define WM8994_AIF1DAC1_EQ_B2_PG_MASK 0xFFFF /* AIF1DAC1_EQ_B2_PG - [15:0] */ | ||
| 3026 | #define WM8994_AIF1DAC1_EQ_B2_PG_SHIFT 0 /* AIF1DAC1_EQ_B2_PG - [15:0] */ | ||
| 3027 | #define WM8994_AIF1DAC1_EQ_B2_PG_WIDTH 16 /* AIF1DAC1_EQ_B2_PG - [15:0] */ | ||
| 3028 | |||
| 3029 | /* | ||
| 3030 | * R1161 (0x489) - AIF1 DAC1 EQ Band 3 A | ||
| 3031 | */ | ||
| 3032 | #define WM8994_AIF1DAC1_EQ_B3_A_MASK 0xFFFF /* AIF1DAC1_EQ_B3_A - [15:0] */ | ||
| 3033 | #define WM8994_AIF1DAC1_EQ_B3_A_SHIFT 0 /* AIF1DAC1_EQ_B3_A - [15:0] */ | ||
| 3034 | #define WM8994_AIF1DAC1_EQ_B3_A_WIDTH 16 /* AIF1DAC1_EQ_B3_A - [15:0] */ | ||
| 3035 | |||
| 3036 | /* | ||
| 3037 | * R1162 (0x48A) - AIF1 DAC1 EQ Band 3 B | ||
| 3038 | */ | ||
| 3039 | #define WM8994_AIF1DAC1_EQ_B3_B_MASK 0xFFFF /* AIF1DAC1_EQ_B3_B - [15:0] */ | ||
| 3040 | #define WM8994_AIF1DAC1_EQ_B3_B_SHIFT 0 /* AIF1DAC1_EQ_B3_B - [15:0] */ | ||
| 3041 | #define WM8994_AIF1DAC1_EQ_B3_B_WIDTH 16 /* AIF1DAC1_EQ_B3_B - [15:0] */ | ||
| 3042 | |||
| 3043 | /* | ||
| 3044 | * R1163 (0x48B) - AIF1 DAC1 EQ Band 3 C | ||
| 3045 | */ | ||
| 3046 | #define WM8994_AIF1DAC1_EQ_B3_C_MASK 0xFFFF /* AIF1DAC1_EQ_B3_C - [15:0] */ | ||
| 3047 | #define WM8994_AIF1DAC1_EQ_B3_C_SHIFT 0 /* AIF1DAC1_EQ_B3_C - [15:0] */ | ||
| 3048 | #define WM8994_AIF1DAC1_EQ_B3_C_WIDTH 16 /* AIF1DAC1_EQ_B3_C - [15:0] */ | ||
| 3049 | |||
| 3050 | /* | ||
| 3051 | * R1164 (0x48C) - AIF1 DAC1 EQ Band 3 PG | ||
| 3052 | */ | ||
| 3053 | #define WM8994_AIF1DAC1_EQ_B3_PG_MASK 0xFFFF /* AIF1DAC1_EQ_B3_PG - [15:0] */ | ||
| 3054 | #define WM8994_AIF1DAC1_EQ_B3_PG_SHIFT 0 /* AIF1DAC1_EQ_B3_PG - [15:0] */ | ||
| 3055 | #define WM8994_AIF1DAC1_EQ_B3_PG_WIDTH 16 /* AIF1DAC1_EQ_B3_PG - [15:0] */ | ||
| 3056 | |||
| 3057 | /* | ||
| 3058 | * R1165 (0x48D) - AIF1 DAC1 EQ Band 4 A | ||
| 3059 | */ | ||
| 3060 | #define WM8994_AIF1DAC1_EQ_B4_A_MASK 0xFFFF /* AIF1DAC1_EQ_B4_A - [15:0] */ | ||
| 3061 | #define WM8994_AIF1DAC1_EQ_B4_A_SHIFT 0 /* AIF1DAC1_EQ_B4_A - [15:0] */ | ||
| 3062 | #define WM8994_AIF1DAC1_EQ_B4_A_WIDTH 16 /* AIF1DAC1_EQ_B4_A - [15:0] */ | ||
| 3063 | |||
| 3064 | /* | ||
| 3065 | * R1166 (0x48E) - AIF1 DAC1 EQ Band 4 B | ||
| 3066 | */ | ||
| 3067 | #define WM8994_AIF1DAC1_EQ_B4_B_MASK 0xFFFF /* AIF1DAC1_EQ_B4_B - [15:0] */ | ||
| 3068 | #define WM8994_AIF1DAC1_EQ_B4_B_SHIFT 0 /* AIF1DAC1_EQ_B4_B - [15:0] */ | ||
| 3069 | #define WM8994_AIF1DAC1_EQ_B4_B_WIDTH 16 /* AIF1DAC1_EQ_B4_B - [15:0] */ | ||
| 3070 | |||
| 3071 | /* | ||
| 3072 | * R1167 (0x48F) - AIF1 DAC1 EQ Band 4 C | ||
| 3073 | */ | ||
| 3074 | #define WM8994_AIF1DAC1_EQ_B4_C_MASK 0xFFFF /* AIF1DAC1_EQ_B4_C - [15:0] */ | ||
| 3075 | #define WM8994_AIF1DAC1_EQ_B4_C_SHIFT 0 /* AIF1DAC1_EQ_B4_C - [15:0] */ | ||
| 3076 | #define WM8994_AIF1DAC1_EQ_B4_C_WIDTH 16 /* AIF1DAC1_EQ_B4_C - [15:0] */ | ||
| 3077 | |||
| 3078 | /* | ||
| 3079 | * R1168 (0x490) - AIF1 DAC1 EQ Band 4 PG | ||
| 3080 | */ | ||
| 3081 | #define WM8994_AIF1DAC1_EQ_B4_PG_MASK 0xFFFF /* AIF1DAC1_EQ_B4_PG - [15:0] */ | ||
| 3082 | #define WM8994_AIF1DAC1_EQ_B4_PG_SHIFT 0 /* AIF1DAC1_EQ_B4_PG - [15:0] */ | ||
| 3083 | #define WM8994_AIF1DAC1_EQ_B4_PG_WIDTH 16 /* AIF1DAC1_EQ_B4_PG - [15:0] */ | ||
| 3084 | |||
| 3085 | /* | ||
| 3086 | * R1169 (0x491) - AIF1 DAC1 EQ Band 5 A | ||
| 3087 | */ | ||
| 3088 | #define WM8994_AIF1DAC1_EQ_B5_A_MASK 0xFFFF /* AIF1DAC1_EQ_B5_A - [15:0] */ | ||
| 3089 | #define WM8994_AIF1DAC1_EQ_B5_A_SHIFT 0 /* AIF1DAC1_EQ_B5_A - [15:0] */ | ||
| 3090 | #define WM8994_AIF1DAC1_EQ_B5_A_WIDTH 16 /* AIF1DAC1_EQ_B5_A - [15:0] */ | ||
| 3091 | |||
| 3092 | /* | ||
| 3093 | * R1170 (0x492) - AIF1 DAC1 EQ Band 5 B | ||
| 3094 | */ | ||
| 3095 | #define WM8994_AIF1DAC1_EQ_B5_B_MASK 0xFFFF /* AIF1DAC1_EQ_B5_B - [15:0] */ | ||
| 3096 | #define WM8994_AIF1DAC1_EQ_B5_B_SHIFT 0 /* AIF1DAC1_EQ_B5_B - [15:0] */ | ||
| 3097 | #define WM8994_AIF1DAC1_EQ_B5_B_WIDTH 16 /* AIF1DAC1_EQ_B5_B - [15:0] */ | ||
| 3098 | |||
| 3099 | /* | ||
| 3100 | * R1171 (0x493) - AIF1 DAC1 EQ Band 5 PG | ||
| 3101 | */ | ||
| 3102 | #define WM8994_AIF1DAC1_EQ_B5_PG_MASK 0xFFFF /* AIF1DAC1_EQ_B5_PG - [15:0] */ | ||
| 3103 | #define WM8994_AIF1DAC1_EQ_B5_PG_SHIFT 0 /* AIF1DAC1_EQ_B5_PG - [15:0] */ | ||
| 3104 | #define WM8994_AIF1DAC1_EQ_B5_PG_WIDTH 16 /* AIF1DAC1_EQ_B5_PG - [15:0] */ | ||
| 3105 | |||
| 3106 | /* | ||
| 3107 | * R1184 (0x4A0) - AIF1 DAC2 EQ Gains (1) | ||
| 3108 | */ | ||
| 3109 | #define WM8994_AIF1DAC2_EQ_B1_GAIN_MASK 0xF800 /* AIF1DAC2_EQ_B1_GAIN - [15:11] */ | ||
| 3110 | #define WM8994_AIF1DAC2_EQ_B1_GAIN_SHIFT 11 /* AIF1DAC2_EQ_B1_GAIN - [15:11] */ | ||
| 3111 | #define WM8994_AIF1DAC2_EQ_B1_GAIN_WIDTH 5 /* AIF1DAC2_EQ_B1_GAIN - [15:11] */ | ||
| 3112 | #define WM8994_AIF1DAC2_EQ_B2_GAIN_MASK 0x07C0 /* AIF1DAC2_EQ_B2_GAIN - [10:6] */ | ||
| 3113 | #define WM8994_AIF1DAC2_EQ_B2_GAIN_SHIFT 6 /* AIF1DAC2_EQ_B2_GAIN - [10:6] */ | ||
| 3114 | #define WM8994_AIF1DAC2_EQ_B2_GAIN_WIDTH 5 /* AIF1DAC2_EQ_B2_GAIN - [10:6] */ | ||
| 3115 | #define WM8994_AIF1DAC2_EQ_B3_GAIN_MASK 0x003E /* AIF1DAC2_EQ_B3_GAIN - [5:1] */ | ||
| 3116 | #define WM8994_AIF1DAC2_EQ_B3_GAIN_SHIFT 1 /* AIF1DAC2_EQ_B3_GAIN - [5:1] */ | ||
| 3117 | #define WM8994_AIF1DAC2_EQ_B3_GAIN_WIDTH 5 /* AIF1DAC2_EQ_B3_GAIN - [5:1] */ | ||
| 3118 | #define WM8994_AIF1DAC2_EQ_ENA 0x0001 /* AIF1DAC2_EQ_ENA */ | ||
| 3119 | #define WM8994_AIF1DAC2_EQ_ENA_MASK 0x0001 /* AIF1DAC2_EQ_ENA */ | ||
| 3120 | #define WM8994_AIF1DAC2_EQ_ENA_SHIFT 0 /* AIF1DAC2_EQ_ENA */ | ||
| 3121 | #define WM8994_AIF1DAC2_EQ_ENA_WIDTH 1 /* AIF1DAC2_EQ_ENA */ | ||
| 3122 | |||
| 3123 | /* | ||
| 3124 | * R1185 (0x4A1) - AIF1 DAC2 EQ Gains (2) | ||
| 3125 | */ | ||
| 3126 | #define WM8994_AIF1DAC2_EQ_B4_GAIN_MASK 0xF800 /* AIF1DAC2_EQ_B4_GAIN - [15:11] */ | ||
| 3127 | #define WM8994_AIF1DAC2_EQ_B4_GAIN_SHIFT 11 /* AIF1DAC2_EQ_B4_GAIN - [15:11] */ | ||
| 3128 | #define WM8994_AIF1DAC2_EQ_B4_GAIN_WIDTH 5 /* AIF1DAC2_EQ_B4_GAIN - [15:11] */ | ||
| 3129 | #define WM8994_AIF1DAC2_EQ_B5_GAIN_MASK 0x07C0 /* AIF1DAC2_EQ_B5_GAIN - [10:6] */ | ||
| 3130 | #define WM8994_AIF1DAC2_EQ_B5_GAIN_SHIFT 6 /* AIF1DAC2_EQ_B5_GAIN - [10:6] */ | ||
| 3131 | #define WM8994_AIF1DAC2_EQ_B5_GAIN_WIDTH 5 /* AIF1DAC2_EQ_B5_GAIN - [10:6] */ | ||
| 3132 | |||
| 3133 | /* | ||
| 3134 | * R1186 (0x4A2) - AIF1 DAC2 EQ Band 1 A | ||
| 3135 | */ | ||
| 3136 | #define WM8994_AIF1DAC2_EQ_B1_A_MASK 0xFFFF /* AIF1DAC2_EQ_B1_A - [15:0] */ | ||
| 3137 | #define WM8994_AIF1DAC2_EQ_B1_A_SHIFT 0 /* AIF1DAC2_EQ_B1_A - [15:0] */ | ||
| 3138 | #define WM8994_AIF1DAC2_EQ_B1_A_WIDTH 16 /* AIF1DAC2_EQ_B1_A - [15:0] */ | ||
| 3139 | |||
| 3140 | /* | ||
| 3141 | * R1187 (0x4A3) - AIF1 DAC2 EQ Band 1 B | ||
| 3142 | */ | ||
| 3143 | #define WM8994_AIF1DAC2_EQ_B1_B_MASK 0xFFFF /* AIF1DAC2_EQ_B1_B - [15:0] */ | ||
| 3144 | #define WM8994_AIF1DAC2_EQ_B1_B_SHIFT 0 /* AIF1DAC2_EQ_B1_B - [15:0] */ | ||
| 3145 | #define WM8994_AIF1DAC2_EQ_B1_B_WIDTH 16 /* AIF1DAC2_EQ_B1_B - [15:0] */ | ||
| 3146 | |||
| 3147 | /* | ||
| 3148 | * R1188 (0x4A4) - AIF1 DAC2 EQ Band 1 PG | ||
| 3149 | */ | ||
| 3150 | #define WM8994_AIF1DAC2_EQ_B1_PG_MASK 0xFFFF /* AIF1DAC2_EQ_B1_PG - [15:0] */ | ||
| 3151 | #define WM8994_AIF1DAC2_EQ_B1_PG_SHIFT 0 /* AIF1DAC2_EQ_B1_PG - [15:0] */ | ||
| 3152 | #define WM8994_AIF1DAC2_EQ_B1_PG_WIDTH 16 /* AIF1DAC2_EQ_B1_PG - [15:0] */ | ||
| 3153 | |||
| 3154 | /* | ||
| 3155 | * R1189 (0x4A5) - AIF1 DAC2 EQ Band 2 A | ||
| 3156 | */ | ||
| 3157 | #define WM8994_AIF1DAC2_EQ_B2_A_MASK 0xFFFF /* AIF1DAC2_EQ_B2_A - [15:0] */ | ||
| 3158 | #define WM8994_AIF1DAC2_EQ_B2_A_SHIFT 0 /* AIF1DAC2_EQ_B2_A - [15:0] */ | ||
| 3159 | #define WM8994_AIF1DAC2_EQ_B2_A_WIDTH 16 /* AIF1DAC2_EQ_B2_A - [15:0] */ | ||
| 3160 | |||
| 3161 | /* | ||
| 3162 | * R1190 (0x4A6) - AIF1 DAC2 EQ Band 2 B | ||
| 3163 | */ | ||
| 3164 | #define WM8994_AIF1DAC2_EQ_B2_B_MASK 0xFFFF /* AIF1DAC2_EQ_B2_B - [15:0] */ | ||
| 3165 | #define WM8994_AIF1DAC2_EQ_B2_B_SHIFT 0 /* AIF1DAC2_EQ_B2_B - [15:0] */ | ||
| 3166 | #define WM8994_AIF1DAC2_EQ_B2_B_WIDTH 16 /* AIF1DAC2_EQ_B2_B - [15:0] */ | ||
| 3167 | |||
| 3168 | /* | ||
| 3169 | * R1191 (0x4A7) - AIF1 DAC2 EQ Band 2 C | ||
| 3170 | */ | ||
| 3171 | #define WM8994_AIF1DAC2_EQ_B2_C_MASK 0xFFFF /* AIF1DAC2_EQ_B2_C - [15:0] */ | ||
| 3172 | #define WM8994_AIF1DAC2_EQ_B2_C_SHIFT 0 /* AIF1DAC2_EQ_B2_C - [15:0] */ | ||
| 3173 | #define WM8994_AIF1DAC2_EQ_B2_C_WIDTH 16 /* AIF1DAC2_EQ_B2_C - [15:0] */ | ||
| 3174 | |||
| 3175 | /* | ||
| 3176 | * R1192 (0x4A8) - AIF1 DAC2 EQ Band 2 PG | ||
| 3177 | */ | ||
| 3178 | #define WM8994_AIF1DAC2_EQ_B2_PG_MASK 0xFFFF /* AIF1DAC2_EQ_B2_PG - [15:0] */ | ||
| 3179 | #define WM8994_AIF1DAC2_EQ_B2_PG_SHIFT 0 /* AIF1DAC2_EQ_B2_PG - [15:0] */ | ||
| 3180 | #define WM8994_AIF1DAC2_EQ_B2_PG_WIDTH 16 /* AIF1DAC2_EQ_B2_PG - [15:0] */ | ||
| 3181 | |||
| 3182 | /* | ||
| 3183 | * R1193 (0x4A9) - AIF1 DAC2 EQ Band 3 A | ||
| 3184 | */ | ||
| 3185 | #define WM8994_AIF1DAC2_EQ_B3_A_MASK 0xFFFF /* AIF1DAC2_EQ_B3_A - [15:0] */ | ||
| 3186 | #define WM8994_AIF1DAC2_EQ_B3_A_SHIFT 0 /* AIF1DAC2_EQ_B3_A - [15:0] */ | ||
| 3187 | #define WM8994_AIF1DAC2_EQ_B3_A_WIDTH 16 /* AIF1DAC2_EQ_B3_A - [15:0] */ | ||
| 3188 | |||
| 3189 | /* | ||
| 3190 | * R1194 (0x4AA) - AIF1 DAC2 EQ Band 3 B | ||
| 3191 | */ | ||
| 3192 | #define WM8994_AIF1DAC2_EQ_B3_B_MASK 0xFFFF /* AIF1DAC2_EQ_B3_B - [15:0] */ | ||
| 3193 | #define WM8994_AIF1DAC2_EQ_B3_B_SHIFT 0 /* AIF1DAC2_EQ_B3_B - [15:0] */ | ||
| 3194 | #define WM8994_AIF1DAC2_EQ_B3_B_WIDTH 16 /* AIF1DAC2_EQ_B3_B - [15:0] */ | ||
| 3195 | |||
| 3196 | /* | ||
| 3197 | * R1195 (0x4AB) - AIF1 DAC2 EQ Band 3 C | ||
| 3198 | */ | ||
| 3199 | #define WM8994_AIF1DAC2_EQ_B3_C_MASK 0xFFFF /* AIF1DAC2_EQ_B3_C - [15:0] */ | ||
| 3200 | #define WM8994_AIF1DAC2_EQ_B3_C_SHIFT 0 /* AIF1DAC2_EQ_B3_C - [15:0] */ | ||
| 3201 | #define WM8994_AIF1DAC2_EQ_B3_C_WIDTH 16 /* AIF1DAC2_EQ_B3_C - [15:0] */ | ||
| 3202 | |||
| 3203 | /* | ||
| 3204 | * R1196 (0x4AC) - AIF1 DAC2 EQ Band 3 PG | ||
| 3205 | */ | ||
| 3206 | #define WM8994_AIF1DAC2_EQ_B3_PG_MASK 0xFFFF /* AIF1DAC2_EQ_B3_PG - [15:0] */ | ||
| 3207 | #define WM8994_AIF1DAC2_EQ_B3_PG_SHIFT 0 /* AIF1DAC2_EQ_B3_PG - [15:0] */ | ||
| 3208 | #define WM8994_AIF1DAC2_EQ_B3_PG_WIDTH 16 /* AIF1DAC2_EQ_B3_PG - [15:0] */ | ||
| 3209 | |||
| 3210 | /* | ||
| 3211 | * R1197 (0x4AD) - AIF1 DAC2 EQ Band 4 A | ||
| 3212 | */ | ||
| 3213 | #define WM8994_AIF1DAC2_EQ_B4_A_MASK 0xFFFF /* AIF1DAC2_EQ_B4_A - [15:0] */ | ||
| 3214 | #define WM8994_AIF1DAC2_EQ_B4_A_SHIFT 0 /* AIF1DAC2_EQ_B4_A - [15:0] */ | ||
| 3215 | #define WM8994_AIF1DAC2_EQ_B4_A_WIDTH 16 /* AIF1DAC2_EQ_B4_A - [15:0] */ | ||
| 3216 | |||
| 3217 | /* | ||
| 3218 | * R1198 (0x4AE) - AIF1 DAC2 EQ Band 4 B | ||
| 3219 | */ | ||
| 3220 | #define WM8994_AIF1DAC2_EQ_B4_B_MASK 0xFFFF /* AIF1DAC2_EQ_B4_B - [15:0] */ | ||
| 3221 | #define WM8994_AIF1DAC2_EQ_B4_B_SHIFT 0 /* AIF1DAC2_EQ_B4_B - [15:0] */ | ||
| 3222 | #define WM8994_AIF1DAC2_EQ_B4_B_WIDTH 16 /* AIF1DAC2_EQ_B4_B - [15:0] */ | ||
| 3223 | |||
| 3224 | /* | ||
| 3225 | * R1199 (0x4AF) - AIF1 DAC2 EQ Band 4 C | ||
| 3226 | */ | ||
| 3227 | #define WM8994_AIF1DAC2_EQ_B4_C_MASK 0xFFFF /* AIF1DAC2_EQ_B4_C - [15:0] */ | ||
| 3228 | #define WM8994_AIF1DAC2_EQ_B4_C_SHIFT 0 /* AIF1DAC2_EQ_B4_C - [15:0] */ | ||
| 3229 | #define WM8994_AIF1DAC2_EQ_B4_C_WIDTH 16 /* AIF1DAC2_EQ_B4_C - [15:0] */ | ||
| 3230 | |||
| 3231 | /* | ||
| 3232 | * R1200 (0x4B0) - AIF1 DAC2 EQ Band 4 PG | ||
| 3233 | */ | ||
| 3234 | #define WM8994_AIF1DAC2_EQ_B4_PG_MASK 0xFFFF /* AIF1DAC2_EQ_B4_PG - [15:0] */ | ||
| 3235 | #define WM8994_AIF1DAC2_EQ_B4_PG_SHIFT 0 /* AIF1DAC2_EQ_B4_PG - [15:0] */ | ||
| 3236 | #define WM8994_AIF1DAC2_EQ_B4_PG_WIDTH 16 /* AIF1DAC2_EQ_B4_PG - [15:0] */ | ||
| 3237 | |||
| 3238 | /* | ||
| 3239 | * R1201 (0x4B1) - AIF1 DAC2 EQ Band 5 A | ||
| 3240 | */ | ||
| 3241 | #define WM8994_AIF1DAC2_EQ_B5_A_MASK 0xFFFF /* AIF1DAC2_EQ_B5_A - [15:0] */ | ||
| 3242 | #define WM8994_AIF1DAC2_EQ_B5_A_SHIFT 0 /* AIF1DAC2_EQ_B5_A - [15:0] */ | ||
| 3243 | #define WM8994_AIF1DAC2_EQ_B5_A_WIDTH 16 /* AIF1DAC2_EQ_B5_A - [15:0] */ | ||
| 3244 | |||
| 3245 | /* | ||
| 3246 | * R1202 (0x4B2) - AIF1 DAC2 EQ Band 5 B | ||
| 3247 | */ | ||
| 3248 | #define WM8994_AIF1DAC2_EQ_B5_B_MASK 0xFFFF /* AIF1DAC2_EQ_B5_B - [15:0] */ | ||
| 3249 | #define WM8994_AIF1DAC2_EQ_B5_B_SHIFT 0 /* AIF1DAC2_EQ_B5_B - [15:0] */ | ||
| 3250 | #define WM8994_AIF1DAC2_EQ_B5_B_WIDTH 16 /* AIF1DAC2_EQ_B5_B - [15:0] */ | ||
| 3251 | |||
| 3252 | /* | ||
| 3253 | * R1203 (0x4B3) - AIF1 DAC2 EQ Band 5 PG | ||
| 3254 | */ | ||
| 3255 | #define WM8994_AIF1DAC2_EQ_B5_PG_MASK 0xFFFF /* AIF1DAC2_EQ_B5_PG - [15:0] */ | ||
| 3256 | #define WM8994_AIF1DAC2_EQ_B5_PG_SHIFT 0 /* AIF1DAC2_EQ_B5_PG - [15:0] */ | ||
| 3257 | #define WM8994_AIF1DAC2_EQ_B5_PG_WIDTH 16 /* AIF1DAC2_EQ_B5_PG - [15:0] */ | ||
| 3258 | |||
| 3259 | /* | ||
| 3260 | * R1280 (0x500) - AIF2 ADC Left Volume | ||
| 3261 | */ | ||
| 3262 | #define WM8994_AIF2ADC_VU 0x0100 /* AIF2ADC_VU */ | ||
| 3263 | #define WM8994_AIF2ADC_VU_MASK 0x0100 /* AIF2ADC_VU */ | ||
| 3264 | #define WM8994_AIF2ADC_VU_SHIFT 8 /* AIF2ADC_VU */ | ||
| 3265 | #define WM8994_AIF2ADC_VU_WIDTH 1 /* AIF2ADC_VU */ | ||
| 3266 | #define WM8994_AIF2ADCL_VOL_MASK 0x00FF /* AIF2ADCL_VOL - [7:0] */ | ||
| 3267 | #define WM8994_AIF2ADCL_VOL_SHIFT 0 /* AIF2ADCL_VOL - [7:0] */ | ||
| 3268 | #define WM8994_AIF2ADCL_VOL_WIDTH 8 /* AIF2ADCL_VOL - [7:0] */ | ||
| 3269 | |||
| 3270 | /* | ||
| 3271 | * R1281 (0x501) - AIF2 ADC Right Volume | ||
| 3272 | */ | ||
| 3273 | #define WM8994_AIF2ADC_VU 0x0100 /* AIF2ADC_VU */ | ||
| 3274 | #define WM8994_AIF2ADC_VU_MASK 0x0100 /* AIF2ADC_VU */ | ||
| 3275 | #define WM8994_AIF2ADC_VU_SHIFT 8 /* AIF2ADC_VU */ | ||
| 3276 | #define WM8994_AIF2ADC_VU_WIDTH 1 /* AIF2ADC_VU */ | ||
| 3277 | #define WM8994_AIF2ADCR_VOL_MASK 0x00FF /* AIF2ADCR_VOL - [7:0] */ | ||
| 3278 | #define WM8994_AIF2ADCR_VOL_SHIFT 0 /* AIF2ADCR_VOL - [7:0] */ | ||
| 3279 | #define WM8994_AIF2ADCR_VOL_WIDTH 8 /* AIF2ADCR_VOL - [7:0] */ | ||
| 3280 | |||
| 3281 | /* | ||
| 3282 | * R1282 (0x502) - AIF2 DAC Left Volume | ||
| 3283 | */ | ||
| 3284 | #define WM8994_AIF2DAC_VU 0x0100 /* AIF2DAC_VU */ | ||
| 3285 | #define WM8994_AIF2DAC_VU_MASK 0x0100 /* AIF2DAC_VU */ | ||
| 3286 | #define WM8994_AIF2DAC_VU_SHIFT 8 /* AIF2DAC_VU */ | ||
| 3287 | #define WM8994_AIF2DAC_VU_WIDTH 1 /* AIF2DAC_VU */ | ||
| 3288 | #define WM8994_AIF2DACL_VOL_MASK 0x00FF /* AIF2DACL_VOL - [7:0] */ | ||
| 3289 | #define WM8994_AIF2DACL_VOL_SHIFT 0 /* AIF2DACL_VOL - [7:0] */ | ||
| 3290 | #define WM8994_AIF2DACL_VOL_WIDTH 8 /* AIF2DACL_VOL - [7:0] */ | ||
| 3291 | |||
| 3292 | /* | ||
| 3293 | * R1283 (0x503) - AIF2 DAC Right Volume | ||
| 3294 | */ | ||
| 3295 | #define WM8994_AIF2DAC_VU 0x0100 /* AIF2DAC_VU */ | ||
| 3296 | #define WM8994_AIF2DAC_VU_MASK 0x0100 /* AIF2DAC_VU */ | ||
| 3297 | #define WM8994_AIF2DAC_VU_SHIFT 8 /* AIF2DAC_VU */ | ||
| 3298 | #define WM8994_AIF2DAC_VU_WIDTH 1 /* AIF2DAC_VU */ | ||
| 3299 | #define WM8994_AIF2DACR_VOL_MASK 0x00FF /* AIF2DACR_VOL - [7:0] */ | ||
| 3300 | #define WM8994_AIF2DACR_VOL_SHIFT 0 /* AIF2DACR_VOL - [7:0] */ | ||
| 3301 | #define WM8994_AIF2DACR_VOL_WIDTH 8 /* AIF2DACR_VOL - [7:0] */ | ||
| 3302 | |||
| 3303 | /* | ||
| 3304 | * R1296 (0x510) - AIF2 ADC Filters | ||
| 3305 | */ | ||
| 3306 | #define WM8994_AIF2ADC_4FS 0x8000 /* AIF2ADC_4FS */ | ||
| 3307 | #define WM8994_AIF2ADC_4FS_MASK 0x8000 /* AIF2ADC_4FS */ | ||
| 3308 | #define WM8994_AIF2ADC_4FS_SHIFT 15 /* AIF2ADC_4FS */ | ||
| 3309 | #define WM8994_AIF2ADC_4FS_WIDTH 1 /* AIF2ADC_4FS */ | ||
| 3310 | #define WM8994_AIF2ADC_HPF_CUT_MASK 0x6000 /* AIF2ADC_HPF_CUT - [14:13] */ | ||
| 3311 | #define WM8994_AIF2ADC_HPF_CUT_SHIFT 13 /* AIF2ADC_HPF_CUT - [14:13] */ | ||
| 3312 | #define WM8994_AIF2ADC_HPF_CUT_WIDTH 2 /* AIF2ADC_HPF_CUT - [14:13] */ | ||
| 3313 | #define WM8994_AIF2ADCL_HPF 0x1000 /* AIF2ADCL_HPF */ | ||
| 3314 | #define WM8994_AIF2ADCL_HPF_MASK 0x1000 /* AIF2ADCL_HPF */ | ||
| 3315 | #define WM8994_AIF2ADCL_HPF_SHIFT 12 /* AIF2ADCL_HPF */ | ||
| 3316 | #define WM8994_AIF2ADCL_HPF_WIDTH 1 /* AIF2ADCL_HPF */ | ||
| 3317 | #define WM8994_AIF2ADCR_HPF 0x0800 /* AIF2ADCR_HPF */ | ||
| 3318 | #define WM8994_AIF2ADCR_HPF_MASK 0x0800 /* AIF2ADCR_HPF */ | ||
| 3319 | #define WM8994_AIF2ADCR_HPF_SHIFT 11 /* AIF2ADCR_HPF */ | ||
| 3320 | #define WM8994_AIF2ADCR_HPF_WIDTH 1 /* AIF2ADCR_HPF */ | ||
| 3321 | |||
| 3322 | /* | ||
| 3323 | * R1312 (0x520) - AIF2 DAC Filters (1) | ||
| 3324 | */ | ||
| 3325 | #define WM8994_AIF2DAC_MUTE 0x0200 /* AIF2DAC_MUTE */ | ||
| 3326 | #define WM8994_AIF2DAC_MUTE_MASK 0x0200 /* AIF2DAC_MUTE */ | ||
| 3327 | #define WM8994_AIF2DAC_MUTE_SHIFT 9 /* AIF2DAC_MUTE */ | ||
| 3328 | #define WM8994_AIF2DAC_MUTE_WIDTH 1 /* AIF2DAC_MUTE */ | ||
| 3329 | #define WM8994_AIF2DAC_MONO 0x0080 /* AIF2DAC_MONO */ | ||
| 3330 | #define WM8994_AIF2DAC_MONO_MASK 0x0080 /* AIF2DAC_MONO */ | ||
| 3331 | #define WM8994_AIF2DAC_MONO_SHIFT 7 /* AIF2DAC_MONO */ | ||
| 3332 | #define WM8994_AIF2DAC_MONO_WIDTH 1 /* AIF2DAC_MONO */ | ||
| 3333 | #define WM8994_AIF2DAC_MUTERATE 0x0020 /* AIF2DAC_MUTERATE */ | ||
| 3334 | #define WM8994_AIF2DAC_MUTERATE_MASK 0x0020 /* AIF2DAC_MUTERATE */ | ||
| 3335 | #define WM8994_AIF2DAC_MUTERATE_SHIFT 5 /* AIF2DAC_MUTERATE */ | ||
| 3336 | #define WM8994_AIF2DAC_MUTERATE_WIDTH 1 /* AIF2DAC_MUTERATE */ | ||
| 3337 | #define WM8994_AIF2DAC_UNMUTE_RAMP 0x0010 /* AIF2DAC_UNMUTE_RAMP */ | ||
| 3338 | #define WM8994_AIF2DAC_UNMUTE_RAMP_MASK 0x0010 /* AIF2DAC_UNMUTE_RAMP */ | ||
| 3339 | #define WM8994_AIF2DAC_UNMUTE_RAMP_SHIFT 4 /* AIF2DAC_UNMUTE_RAMP */ | ||
| 3340 | #define WM8994_AIF2DAC_UNMUTE_RAMP_WIDTH 1 /* AIF2DAC_UNMUTE_RAMP */ | ||
| 3341 | #define WM8994_AIF2DAC_DEEMP_MASK 0x0006 /* AIF2DAC_DEEMP - [2:1] */ | ||
| 3342 | #define WM8994_AIF2DAC_DEEMP_SHIFT 1 /* AIF2DAC_DEEMP - [2:1] */ | ||
| 3343 | #define WM8994_AIF2DAC_DEEMP_WIDTH 2 /* AIF2DAC_DEEMP - [2:1] */ | ||
| 3344 | |||
| 3345 | /* | ||
| 3346 | * R1313 (0x521) - AIF2 DAC Filters (2) | ||
| 3347 | */ | ||
| 3348 | #define WM8994_AIF2DAC_3D_GAIN_MASK 0x3E00 /* AIF2DAC_3D_GAIN - [13:9] */ | ||
| 3349 | #define WM8994_AIF2DAC_3D_GAIN_SHIFT 9 /* AIF2DAC_3D_GAIN - [13:9] */ | ||
| 3350 | #define WM8994_AIF2DAC_3D_GAIN_WIDTH 5 /* AIF2DAC_3D_GAIN - [13:9] */ | ||
| 3351 | #define WM8994_AIF2DAC_3D_ENA 0x0100 /* AIF2DAC_3D_ENA */ | ||
| 3352 | #define WM8994_AIF2DAC_3D_ENA_MASK 0x0100 /* AIF2DAC_3D_ENA */ | ||
| 3353 | #define WM8994_AIF2DAC_3D_ENA_SHIFT 8 /* AIF2DAC_3D_ENA */ | ||
| 3354 | #define WM8994_AIF2DAC_3D_ENA_WIDTH 1 /* AIF2DAC_3D_ENA */ | ||
| 3355 | |||
| 3356 | /* | ||
| 3357 | * R1344 (0x540) - AIF2 DRC (1) | ||
| 3358 | */ | ||
| 3359 | #define WM8994_AIF2DRC_SIG_DET_RMS_MASK 0xF800 /* AIF2DRC_SIG_DET_RMS - [15:11] */ | ||
| 3360 | #define WM8994_AIF2DRC_SIG_DET_RMS_SHIFT 11 /* AIF2DRC_SIG_DET_RMS - [15:11] */ | ||
| 3361 | #define WM8994_AIF2DRC_SIG_DET_RMS_WIDTH 5 /* AIF2DRC_SIG_DET_RMS - [15:11] */ | ||
| 3362 | #define WM8994_AIF2DRC_SIG_DET_PK_MASK 0x0600 /* AIF2DRC_SIG_DET_PK - [10:9] */ | ||
| 3363 | #define WM8994_AIF2DRC_SIG_DET_PK_SHIFT 9 /* AIF2DRC_SIG_DET_PK - [10:9] */ | ||
| 3364 | #define WM8994_AIF2DRC_SIG_DET_PK_WIDTH 2 /* AIF2DRC_SIG_DET_PK - [10:9] */ | ||
| 3365 | #define WM8994_AIF2DRC_NG_ENA 0x0100 /* AIF2DRC_NG_ENA */ | ||
| 3366 | #define WM8994_AIF2DRC_NG_ENA_MASK 0x0100 /* AIF2DRC_NG_ENA */ | ||
| 3367 | #define WM8994_AIF2DRC_NG_ENA_SHIFT 8 /* AIF2DRC_NG_ENA */ | ||
| 3368 | #define WM8994_AIF2DRC_NG_ENA_WIDTH 1 /* AIF2DRC_NG_ENA */ | ||
| 3369 | #define WM8994_AIF2DRC_SIG_DET_MODE 0x0080 /* AIF2DRC_SIG_DET_MODE */ | ||
| 3370 | #define WM8994_AIF2DRC_SIG_DET_MODE_MASK 0x0080 /* AIF2DRC_SIG_DET_MODE */ | ||
| 3371 | #define WM8994_AIF2DRC_SIG_DET_MODE_SHIFT 7 /* AIF2DRC_SIG_DET_MODE */ | ||
| 3372 | #define WM8994_AIF2DRC_SIG_DET_MODE_WIDTH 1 /* AIF2DRC_SIG_DET_MODE */ | ||
| 3373 | #define WM8994_AIF2DRC_SIG_DET 0x0040 /* AIF2DRC_SIG_DET */ | ||
| 3374 | #define WM8994_AIF2DRC_SIG_DET_MASK 0x0040 /* AIF2DRC_SIG_DET */ | ||
| 3375 | #define WM8994_AIF2DRC_SIG_DET_SHIFT 6 /* AIF2DRC_SIG_DET */ | ||
| 3376 | #define WM8994_AIF2DRC_SIG_DET_WIDTH 1 /* AIF2DRC_SIG_DET */ | ||
| 3377 | #define WM8994_AIF2DRC_KNEE2_OP_ENA 0x0020 /* AIF2DRC_KNEE2_OP_ENA */ | ||
| 3378 | #define WM8994_AIF2DRC_KNEE2_OP_ENA_MASK 0x0020 /* AIF2DRC_KNEE2_OP_ENA */ | ||
| 3379 | #define WM8994_AIF2DRC_KNEE2_OP_ENA_SHIFT 5 /* AIF2DRC_KNEE2_OP_ENA */ | ||
| 3380 | #define WM8994_AIF2DRC_KNEE2_OP_ENA_WIDTH 1 /* AIF2DRC_KNEE2_OP_ENA */ | ||
| 3381 | #define WM8994_AIF2DRC_QR 0x0010 /* AIF2DRC_QR */ | ||
| 3382 | #define WM8994_AIF2DRC_QR_MASK 0x0010 /* AIF2DRC_QR */ | ||
| 3383 | #define WM8994_AIF2DRC_QR_SHIFT 4 /* AIF2DRC_QR */ | ||
| 3384 | #define WM8994_AIF2DRC_QR_WIDTH 1 /* AIF2DRC_QR */ | ||
| 3385 | #define WM8994_AIF2DRC_ANTICLIP 0x0008 /* AIF2DRC_ANTICLIP */ | ||
| 3386 | #define WM8994_AIF2DRC_ANTICLIP_MASK 0x0008 /* AIF2DRC_ANTICLIP */ | ||
| 3387 | #define WM8994_AIF2DRC_ANTICLIP_SHIFT 3 /* AIF2DRC_ANTICLIP */ | ||
| 3388 | #define WM8994_AIF2DRC_ANTICLIP_WIDTH 1 /* AIF2DRC_ANTICLIP */ | ||
| 3389 | #define WM8994_AIF2DAC_DRC_ENA 0x0004 /* AIF2DAC_DRC_ENA */ | ||
| 3390 | #define WM8994_AIF2DAC_DRC_ENA_MASK 0x0004 /* AIF2DAC_DRC_ENA */ | ||
| 3391 | #define WM8994_AIF2DAC_DRC_ENA_SHIFT 2 /* AIF2DAC_DRC_ENA */ | ||
| 3392 | #define WM8994_AIF2DAC_DRC_ENA_WIDTH 1 /* AIF2DAC_DRC_ENA */ | ||
| 3393 | #define WM8994_AIF2ADCL_DRC_ENA 0x0002 /* AIF2ADCL_DRC_ENA */ | ||
| 3394 | #define WM8994_AIF2ADCL_DRC_ENA_MASK 0x0002 /* AIF2ADCL_DRC_ENA */ | ||
| 3395 | #define WM8994_AIF2ADCL_DRC_ENA_SHIFT 1 /* AIF2ADCL_DRC_ENA */ | ||
| 3396 | #define WM8994_AIF2ADCL_DRC_ENA_WIDTH 1 /* AIF2ADCL_DRC_ENA */ | ||
| 3397 | #define WM8994_AIF2ADCR_DRC_ENA 0x0001 /* AIF2ADCR_DRC_ENA */ | ||
| 3398 | #define WM8994_AIF2ADCR_DRC_ENA_MASK 0x0001 /* AIF2ADCR_DRC_ENA */ | ||
| 3399 | #define WM8994_AIF2ADCR_DRC_ENA_SHIFT 0 /* AIF2ADCR_DRC_ENA */ | ||
| 3400 | #define WM8994_AIF2ADCR_DRC_ENA_WIDTH 1 /* AIF2ADCR_DRC_ENA */ | ||
| 3401 | |||
| 3402 | /* | ||
| 3403 | * R1345 (0x541) - AIF2 DRC (2) | ||
| 3404 | */ | ||
| 3405 | #define WM8994_AIF2DRC_ATK_MASK 0x1E00 /* AIF2DRC_ATK - [12:9] */ | ||
| 3406 | #define WM8994_AIF2DRC_ATK_SHIFT 9 /* AIF2DRC_ATK - [12:9] */ | ||
| 3407 | #define WM8994_AIF2DRC_ATK_WIDTH 4 /* AIF2DRC_ATK - [12:9] */ | ||
| 3408 | #define WM8994_AIF2DRC_DCY_MASK 0x01E0 /* AIF2DRC_DCY - [8:5] */ | ||
| 3409 | #define WM8994_AIF2DRC_DCY_SHIFT 5 /* AIF2DRC_DCY - [8:5] */ | ||
| 3410 | #define WM8994_AIF2DRC_DCY_WIDTH 4 /* AIF2DRC_DCY - [8:5] */ | ||
| 3411 | #define WM8994_AIF2DRC_MINGAIN_MASK 0x001C /* AIF2DRC_MINGAIN - [4:2] */ | ||
| 3412 | #define WM8994_AIF2DRC_MINGAIN_SHIFT 2 /* AIF2DRC_MINGAIN - [4:2] */ | ||
| 3413 | #define WM8994_AIF2DRC_MINGAIN_WIDTH 3 /* AIF2DRC_MINGAIN - [4:2] */ | ||
| 3414 | #define WM8994_AIF2DRC_MAXGAIN_MASK 0x0003 /* AIF2DRC_MAXGAIN - [1:0] */ | ||
| 3415 | #define WM8994_AIF2DRC_MAXGAIN_SHIFT 0 /* AIF2DRC_MAXGAIN - [1:0] */ | ||
| 3416 | #define WM8994_AIF2DRC_MAXGAIN_WIDTH 2 /* AIF2DRC_MAXGAIN - [1:0] */ | ||
| 3417 | |||
| 3418 | /* | ||
| 3419 | * R1346 (0x542) - AIF2 DRC (3) | ||
| 3420 | */ | ||
| 3421 | #define WM8994_AIF2DRC_NG_MINGAIN_MASK 0xF000 /* AIF2DRC_NG_MINGAIN - [15:12] */ | ||
| 3422 | #define WM8994_AIF2DRC_NG_MINGAIN_SHIFT 12 /* AIF2DRC_NG_MINGAIN - [15:12] */ | ||
| 3423 | #define WM8994_AIF2DRC_NG_MINGAIN_WIDTH 4 /* AIF2DRC_NG_MINGAIN - [15:12] */ | ||
| 3424 | #define WM8994_AIF2DRC_NG_EXP_MASK 0x0C00 /* AIF2DRC_NG_EXP - [11:10] */ | ||
| 3425 | #define WM8994_AIF2DRC_NG_EXP_SHIFT 10 /* AIF2DRC_NG_EXP - [11:10] */ | ||
| 3426 | #define WM8994_AIF2DRC_NG_EXP_WIDTH 2 /* AIF2DRC_NG_EXP - [11:10] */ | ||
| 3427 | #define WM8994_AIF2DRC_QR_THR_MASK 0x0300 /* AIF2DRC_QR_THR - [9:8] */ | ||
| 3428 | #define WM8994_AIF2DRC_QR_THR_SHIFT 8 /* AIF2DRC_QR_THR - [9:8] */ | ||
| 3429 | #define WM8994_AIF2DRC_QR_THR_WIDTH 2 /* AIF2DRC_QR_THR - [9:8] */ | ||
| 3430 | #define WM8994_AIF2DRC_QR_DCY_MASK 0x00C0 /* AIF2DRC_QR_DCY - [7:6] */ | ||
| 3431 | #define WM8994_AIF2DRC_QR_DCY_SHIFT 6 /* AIF2DRC_QR_DCY - [7:6] */ | ||
| 3432 | #define WM8994_AIF2DRC_QR_DCY_WIDTH 2 /* AIF2DRC_QR_DCY - [7:6] */ | ||
| 3433 | #define WM8994_AIF2DRC_HI_COMP_MASK 0x0038 /* AIF2DRC_HI_COMP - [5:3] */ | ||
| 3434 | #define WM8994_AIF2DRC_HI_COMP_SHIFT 3 /* AIF2DRC_HI_COMP - [5:3] */ | ||
| 3435 | #define WM8994_AIF2DRC_HI_COMP_WIDTH 3 /* AIF2DRC_HI_COMP - [5:3] */ | ||
| 3436 | #define WM8994_AIF2DRC_LO_COMP_MASK 0x0007 /* AIF2DRC_LO_COMP - [2:0] */ | ||
| 3437 | #define WM8994_AIF2DRC_LO_COMP_SHIFT 0 /* AIF2DRC_LO_COMP - [2:0] */ | ||
| 3438 | #define WM8994_AIF2DRC_LO_COMP_WIDTH 3 /* AIF2DRC_LO_COMP - [2:0] */ | ||
| 3439 | |||
| 3440 | /* | ||
| 3441 | * R1347 (0x543) - AIF2 DRC (4) | ||
| 3442 | */ | ||
| 3443 | #define WM8994_AIF2DRC_KNEE_IP_MASK 0x07E0 /* AIF2DRC_KNEE_IP - [10:5] */ | ||
| 3444 | #define WM8994_AIF2DRC_KNEE_IP_SHIFT 5 /* AIF2DRC_KNEE_IP - [10:5] */ | ||
| 3445 | #define WM8994_AIF2DRC_KNEE_IP_WIDTH 6 /* AIF2DRC_KNEE_IP - [10:5] */ | ||
| 3446 | #define WM8994_AIF2DRC_KNEE_OP_MASK 0x001F /* AIF2DRC_KNEE_OP - [4:0] */ | ||
| 3447 | #define WM8994_AIF2DRC_KNEE_OP_SHIFT 0 /* AIF2DRC_KNEE_OP - [4:0] */ | ||
| 3448 | #define WM8994_AIF2DRC_KNEE_OP_WIDTH 5 /* AIF2DRC_KNEE_OP - [4:0] */ | ||
| 3449 | |||
| 3450 | /* | ||
| 3451 | * R1348 (0x544) - AIF2 DRC (5) | ||
| 3452 | */ | ||
| 3453 | #define WM8994_AIF2DRC_KNEE2_IP_MASK 0x03E0 /* AIF2DRC_KNEE2_IP - [9:5] */ | ||
| 3454 | #define WM8994_AIF2DRC_KNEE2_IP_SHIFT 5 /* AIF2DRC_KNEE2_IP - [9:5] */ | ||
| 3455 | #define WM8994_AIF2DRC_KNEE2_IP_WIDTH 5 /* AIF2DRC_KNEE2_IP - [9:5] */ | ||
| 3456 | #define WM8994_AIF2DRC_KNEE2_OP_MASK 0x001F /* AIF2DRC_KNEE2_OP - [4:0] */ | ||
| 3457 | #define WM8994_AIF2DRC_KNEE2_OP_SHIFT 0 /* AIF2DRC_KNEE2_OP - [4:0] */ | ||
| 3458 | #define WM8994_AIF2DRC_KNEE2_OP_WIDTH 5 /* AIF2DRC_KNEE2_OP - [4:0] */ | ||
| 3459 | |||
| 3460 | /* | ||
| 3461 | * R1408 (0x580) - AIF2 EQ Gains (1) | ||
| 3462 | */ | ||
| 3463 | #define WM8994_AIF2DAC_EQ_B1_GAIN_MASK 0xF800 /* AIF2DAC_EQ_B1_GAIN - [15:11] */ | ||
| 3464 | #define WM8994_AIF2DAC_EQ_B1_GAIN_SHIFT 11 /* AIF2DAC_EQ_B1_GAIN - [15:11] */ | ||
| 3465 | #define WM8994_AIF2DAC_EQ_B1_GAIN_WIDTH 5 /* AIF2DAC_EQ_B1_GAIN - [15:11] */ | ||
| 3466 | #define WM8994_AIF2DAC_EQ_B2_GAIN_MASK 0x07C0 /* AIF2DAC_EQ_B2_GAIN - [10:6] */ | ||
| 3467 | #define WM8994_AIF2DAC_EQ_B2_GAIN_SHIFT 6 /* AIF2DAC_EQ_B2_GAIN - [10:6] */ | ||
| 3468 | #define WM8994_AIF2DAC_EQ_B2_GAIN_WIDTH 5 /* AIF2DAC_EQ_B2_GAIN - [10:6] */ | ||
| 3469 | #define WM8994_AIF2DAC_EQ_B3_GAIN_MASK 0x003E /* AIF2DAC_EQ_B3_GAIN - [5:1] */ | ||
| 3470 | #define WM8994_AIF2DAC_EQ_B3_GAIN_SHIFT 1 /* AIF2DAC_EQ_B3_GAIN - [5:1] */ | ||
| 3471 | #define WM8994_AIF2DAC_EQ_B3_GAIN_WIDTH 5 /* AIF2DAC_EQ_B3_GAIN - [5:1] */ | ||
| 3472 | #define WM8994_AIF2DAC_EQ_ENA 0x0001 /* AIF2DAC_EQ_ENA */ | ||
| 3473 | #define WM8994_AIF2DAC_EQ_ENA_MASK 0x0001 /* AIF2DAC_EQ_ENA */ | ||
| 3474 | #define WM8994_AIF2DAC_EQ_ENA_SHIFT 0 /* AIF2DAC_EQ_ENA */ | ||
| 3475 | #define WM8994_AIF2DAC_EQ_ENA_WIDTH 1 /* AIF2DAC_EQ_ENA */ | ||
| 3476 | |||
| 3477 | /* | ||
| 3478 | * R1409 (0x581) - AIF2 EQ Gains (2) | ||
| 3479 | */ | ||
| 3480 | #define WM8994_AIF2DAC_EQ_B4_GAIN_MASK 0xF800 /* AIF2DAC_EQ_B4_GAIN - [15:11] */ | ||
| 3481 | #define WM8994_AIF2DAC_EQ_B4_GAIN_SHIFT 11 /* AIF2DAC_EQ_B4_GAIN - [15:11] */ | ||
| 3482 | #define WM8994_AIF2DAC_EQ_B4_GAIN_WIDTH 5 /* AIF2DAC_EQ_B4_GAIN - [15:11] */ | ||
| 3483 | #define WM8994_AIF2DAC_EQ_B5_GAIN_MASK 0x07C0 /* AIF2DAC_EQ_B5_GAIN - [10:6] */ | ||
| 3484 | #define WM8994_AIF2DAC_EQ_B5_GAIN_SHIFT 6 /* AIF2DAC_EQ_B5_GAIN - [10:6] */ | ||
| 3485 | #define WM8994_AIF2DAC_EQ_B5_GAIN_WIDTH 5 /* AIF2DAC_EQ_B5_GAIN - [10:6] */ | ||
| 3486 | |||
| 3487 | /* | ||
| 3488 | * R1410 (0x582) - AIF2 EQ Band 1 A | ||
| 3489 | */ | ||
| 3490 | #define WM8994_AIF2DAC_EQ_B1_A_MASK 0xFFFF /* AIF2DAC_EQ_B1_A - [15:0] */ | ||
| 3491 | #define WM8994_AIF2DAC_EQ_B1_A_SHIFT 0 /* AIF2DAC_EQ_B1_A - [15:0] */ | ||
| 3492 | #define WM8994_AIF2DAC_EQ_B1_A_WIDTH 16 /* AIF2DAC_EQ_B1_A - [15:0] */ | ||
| 3493 | |||
| 3494 | /* | ||
| 3495 | * R1411 (0x583) - AIF2 EQ Band 1 B | ||
| 3496 | */ | ||
| 3497 | #define WM8994_AIF2DAC_EQ_B1_B_MASK 0xFFFF /* AIF2DAC_EQ_B1_B - [15:0] */ | ||
| 3498 | #define WM8994_AIF2DAC_EQ_B1_B_SHIFT 0 /* AIF2DAC_EQ_B1_B - [15:0] */ | ||
| 3499 | #define WM8994_AIF2DAC_EQ_B1_B_WIDTH 16 /* AIF2DAC_EQ_B1_B - [15:0] */ | ||
| 3500 | |||
| 3501 | /* | ||
| 3502 | * R1412 (0x584) - AIF2 EQ Band 1 PG | ||
| 3503 | */ | ||
| 3504 | #define WM8994_AIF2DAC_EQ_B1_PG_MASK 0xFFFF /* AIF2DAC_EQ_B1_PG - [15:0] */ | ||
| 3505 | #define WM8994_AIF2DAC_EQ_B1_PG_SHIFT 0 /* AIF2DAC_EQ_B1_PG - [15:0] */ | ||
| 3506 | #define WM8994_AIF2DAC_EQ_B1_PG_WIDTH 16 /* AIF2DAC_EQ_B1_PG - [15:0] */ | ||
| 3507 | |||
| 3508 | /* | ||
| 3509 | * R1413 (0x585) - AIF2 EQ Band 2 A | ||
| 3510 | */ | ||
| 3511 | #define WM8994_AIF2DAC_EQ_B2_A_MASK 0xFFFF /* AIF2DAC_EQ_B2_A - [15:0] */ | ||
| 3512 | #define WM8994_AIF2DAC_EQ_B2_A_SHIFT 0 /* AIF2DAC_EQ_B2_A - [15:0] */ | ||
| 3513 | #define WM8994_AIF2DAC_EQ_B2_A_WIDTH 16 /* AIF2DAC_EQ_B2_A - [15:0] */ | ||
| 3514 | |||
| 3515 | /* | ||
| 3516 | * R1414 (0x586) - AIF2 EQ Band 2 B | ||
| 3517 | */ | ||
| 3518 | #define WM8994_AIF2DAC_EQ_B2_B_MASK 0xFFFF /* AIF2DAC_EQ_B2_B - [15:0] */ | ||
| 3519 | #define WM8994_AIF2DAC_EQ_B2_B_SHIFT 0 /* AIF2DAC_EQ_B2_B - [15:0] */ | ||
| 3520 | #define WM8994_AIF2DAC_EQ_B2_B_WIDTH 16 /* AIF2DAC_EQ_B2_B - [15:0] */ | ||
| 3521 | |||
| 3522 | /* | ||
| 3523 | * R1415 (0x587) - AIF2 EQ Band 2 C | ||
| 3524 | */ | ||
| 3525 | #define WM8994_AIF2DAC_EQ_B2_C_MASK 0xFFFF /* AIF2DAC_EQ_B2_C - [15:0] */ | ||
| 3526 | #define WM8994_AIF2DAC_EQ_B2_C_SHIFT 0 /* AIF2DAC_EQ_B2_C - [15:0] */ | ||
| 3527 | #define WM8994_AIF2DAC_EQ_B2_C_WIDTH 16 /* AIF2DAC_EQ_B2_C - [15:0] */ | ||
| 3528 | |||
| 3529 | /* | ||
| 3530 | * R1416 (0x588) - AIF2 EQ Band 2 PG | ||
| 3531 | */ | ||
| 3532 | #define WM8994_AIF2DAC_EQ_B2_PG_MASK 0xFFFF /* AIF2DAC_EQ_B2_PG - [15:0] */ | ||
| 3533 | #define WM8994_AIF2DAC_EQ_B2_PG_SHIFT 0 /* AIF2DAC_EQ_B2_PG - [15:0] */ | ||
| 3534 | #define WM8994_AIF2DAC_EQ_B2_PG_WIDTH 16 /* AIF2DAC_EQ_B2_PG - [15:0] */ | ||
| 3535 | |||
| 3536 | /* | ||
| 3537 | * R1417 (0x589) - AIF2 EQ Band 3 A | ||
| 3538 | */ | ||
| 3539 | #define WM8994_AIF2DAC_EQ_B3_A_MASK 0xFFFF /* AIF2DAC_EQ_B3_A - [15:0] */ | ||
| 3540 | #define WM8994_AIF2DAC_EQ_B3_A_SHIFT 0 /* AIF2DAC_EQ_B3_A - [15:0] */ | ||
| 3541 | #define WM8994_AIF2DAC_EQ_B3_A_WIDTH 16 /* AIF2DAC_EQ_B3_A - [15:0] */ | ||
| 3542 | |||
| 3543 | /* | ||
| 3544 | * R1418 (0x58A) - AIF2 EQ Band 3 B | ||
| 3545 | */ | ||
| 3546 | #define WM8994_AIF2DAC_EQ_B3_B_MASK 0xFFFF /* AIF2DAC_EQ_B3_B - [15:0] */ | ||
| 3547 | #define WM8994_AIF2DAC_EQ_B3_B_SHIFT 0 /* AIF2DAC_EQ_B3_B - [15:0] */ | ||
| 3548 | #define WM8994_AIF2DAC_EQ_B3_B_WIDTH 16 /* AIF2DAC_EQ_B3_B - [15:0] */ | ||
| 3549 | |||
| 3550 | /* | ||
| 3551 | * R1419 (0x58B) - AIF2 EQ Band 3 C | ||
| 3552 | */ | ||
| 3553 | #define WM8994_AIF2DAC_EQ_B3_C_MASK 0xFFFF /* AIF2DAC_EQ_B3_C - [15:0] */ | ||
| 3554 | #define WM8994_AIF2DAC_EQ_B3_C_SHIFT 0 /* AIF2DAC_EQ_B3_C - [15:0] */ | ||
| 3555 | #define WM8994_AIF2DAC_EQ_B3_C_WIDTH 16 /* AIF2DAC_EQ_B3_C - [15:0] */ | ||
| 3556 | |||
| 3557 | /* | ||
| 3558 | * R1420 (0x58C) - AIF2 EQ Band 3 PG | ||
| 3559 | */ | ||
| 3560 | #define WM8994_AIF2DAC_EQ_B3_PG_MASK 0xFFFF /* AIF2DAC_EQ_B3_PG - [15:0] */ | ||
| 3561 | #define WM8994_AIF2DAC_EQ_B3_PG_SHIFT 0 /* AIF2DAC_EQ_B3_PG - [15:0] */ | ||
| 3562 | #define WM8994_AIF2DAC_EQ_B3_PG_WIDTH 16 /* AIF2DAC_EQ_B3_PG - [15:0] */ | ||
| 3563 | |||
| 3564 | /* | ||
| 3565 | * R1421 (0x58D) - AIF2 EQ Band 4 A | ||
| 3566 | */ | ||
| 3567 | #define WM8994_AIF2DAC_EQ_B4_A_MASK 0xFFFF /* AIF2DAC_EQ_B4_A - [15:0] */ | ||
| 3568 | #define WM8994_AIF2DAC_EQ_B4_A_SHIFT 0 /* AIF2DAC_EQ_B4_A - [15:0] */ | ||
| 3569 | #define WM8994_AIF2DAC_EQ_B4_A_WIDTH 16 /* AIF2DAC_EQ_B4_A - [15:0] */ | ||
| 3570 | |||
| 3571 | /* | ||
| 3572 | * R1422 (0x58E) - AIF2 EQ Band 4 B | ||
| 3573 | */ | ||
| 3574 | #define WM8994_AIF2DAC_EQ_B4_B_MASK 0xFFFF /* AIF2DAC_EQ_B4_B - [15:0] */ | ||
| 3575 | #define WM8994_AIF2DAC_EQ_B4_B_SHIFT 0 /* AIF2DAC_EQ_B4_B - [15:0] */ | ||
| 3576 | #define WM8994_AIF2DAC_EQ_B4_B_WIDTH 16 /* AIF2DAC_EQ_B4_B - [15:0] */ | ||
| 3577 | |||
| 3578 | /* | ||
| 3579 | * R1423 (0x58F) - AIF2 EQ Band 4 C | ||
| 3580 | */ | ||
| 3581 | #define WM8994_AIF2DAC_EQ_B4_C_MASK 0xFFFF /* AIF2DAC_EQ_B4_C - [15:0] */ | ||
| 3582 | #define WM8994_AIF2DAC_EQ_B4_C_SHIFT 0 /* AIF2DAC_EQ_B4_C - [15:0] */ | ||
| 3583 | #define WM8994_AIF2DAC_EQ_B4_C_WIDTH 16 /* AIF2DAC_EQ_B4_C - [15:0] */ | ||
| 3584 | |||
| 3585 | /* | ||
| 3586 | * R1424 (0x590) - AIF2 EQ Band 4 PG | ||
| 3587 | */ | ||
| 3588 | #define WM8994_AIF2DAC_EQ_B4_PG_MASK 0xFFFF /* AIF2DAC_EQ_B4_PG - [15:0] */ | ||
| 3589 | #define WM8994_AIF2DAC_EQ_B4_PG_SHIFT 0 /* AIF2DAC_EQ_B4_PG - [15:0] */ | ||
| 3590 | #define WM8994_AIF2DAC_EQ_B4_PG_WIDTH 16 /* AIF2DAC_EQ_B4_PG - [15:0] */ | ||
| 3591 | |||
| 3592 | /* | ||
| 3593 | * R1425 (0x591) - AIF2 EQ Band 5 A | ||
| 3594 | */ | ||
| 3595 | #define WM8994_AIF2DAC_EQ_B5_A_MASK 0xFFFF /* AIF2DAC_EQ_B5_A - [15:0] */ | ||
| 3596 | #define WM8994_AIF2DAC_EQ_B5_A_SHIFT 0 /* AIF2DAC_EQ_B5_A - [15:0] */ | ||
| 3597 | #define WM8994_AIF2DAC_EQ_B5_A_WIDTH 16 /* AIF2DAC_EQ_B5_A - [15:0] */ | ||
| 3598 | |||
| 3599 | /* | ||
| 3600 | * R1426 (0x592) - AIF2 EQ Band 5 B | ||
| 3601 | */ | ||
| 3602 | #define WM8994_AIF2DAC_EQ_B5_B_MASK 0xFFFF /* AIF2DAC_EQ_B5_B - [15:0] */ | ||
| 3603 | #define WM8994_AIF2DAC_EQ_B5_B_SHIFT 0 /* AIF2DAC_EQ_B5_B - [15:0] */ | ||
| 3604 | #define WM8994_AIF2DAC_EQ_B5_B_WIDTH 16 /* AIF2DAC_EQ_B5_B - [15:0] */ | ||
| 3605 | |||
| 3606 | /* | ||
| 3607 | * R1427 (0x593) - AIF2 EQ Band 5 PG | ||
| 3608 | */ | ||
| 3609 | #define WM8994_AIF2DAC_EQ_B5_PG_MASK 0xFFFF /* AIF2DAC_EQ_B5_PG - [15:0] */ | ||
| 3610 | #define WM8994_AIF2DAC_EQ_B5_PG_SHIFT 0 /* AIF2DAC_EQ_B5_PG - [15:0] */ | ||
| 3611 | #define WM8994_AIF2DAC_EQ_B5_PG_WIDTH 16 /* AIF2DAC_EQ_B5_PG - [15:0] */ | ||
| 3612 | |||
| 3613 | /* | ||
| 3614 | * R1536 (0x600) - DAC1 Mixer Volumes | ||
| 3615 | */ | ||
| 3616 | #define WM8994_ADCR_DAC1_VOL_MASK 0x01E0 /* ADCR_DAC1_VOL - [8:5] */ | ||
| 3617 | #define WM8994_ADCR_DAC1_VOL_SHIFT 5 /* ADCR_DAC1_VOL - [8:5] */ | ||
| 3618 | #define WM8994_ADCR_DAC1_VOL_WIDTH 4 /* ADCR_DAC1_VOL - [8:5] */ | ||
| 3619 | #define WM8994_ADCL_DAC1_VOL_MASK 0x000F /* ADCL_DAC1_VOL - [3:0] */ | ||
| 3620 | #define WM8994_ADCL_DAC1_VOL_SHIFT 0 /* ADCL_DAC1_VOL - [3:0] */ | ||
| 3621 | #define WM8994_ADCL_DAC1_VOL_WIDTH 4 /* ADCL_DAC1_VOL - [3:0] */ | ||
| 3622 | |||
| 3623 | /* | ||
| 3624 | * R1537 (0x601) - DAC1 Left Mixer Routing | ||
| 3625 | */ | ||
| 3626 | #define WM8994_ADCR_TO_DAC1L 0x0020 /* ADCR_TO_DAC1L */ | ||
| 3627 | #define WM8994_ADCR_TO_DAC1L_MASK 0x0020 /* ADCR_TO_DAC1L */ | ||
| 3628 | #define WM8994_ADCR_TO_DAC1L_SHIFT 5 /* ADCR_TO_DAC1L */ | ||
| 3629 | #define WM8994_ADCR_TO_DAC1L_WIDTH 1 /* ADCR_TO_DAC1L */ | ||
| 3630 | #define WM8994_ADCL_TO_DAC1L 0x0010 /* ADCL_TO_DAC1L */ | ||
| 3631 | #define WM8994_ADCL_TO_DAC1L_MASK 0x0010 /* ADCL_TO_DAC1L */ | ||
| 3632 | #define WM8994_ADCL_TO_DAC1L_SHIFT 4 /* ADCL_TO_DAC1L */ | ||
| 3633 | #define WM8994_ADCL_TO_DAC1L_WIDTH 1 /* ADCL_TO_DAC1L */ | ||
| 3634 | #define WM8994_AIF2DACL_TO_DAC1L 0x0004 /* AIF2DACL_TO_DAC1L */ | ||
| 3635 | #define WM8994_AIF2DACL_TO_DAC1L_MASK 0x0004 /* AIF2DACL_TO_DAC1L */ | ||
| 3636 | #define WM8994_AIF2DACL_TO_DAC1L_SHIFT 2 /* AIF2DACL_TO_DAC1L */ | ||
| 3637 | #define WM8994_AIF2DACL_TO_DAC1L_WIDTH 1 /* AIF2DACL_TO_DAC1L */ | ||
| 3638 | #define WM8994_AIF1DAC2L_TO_DAC1L 0x0002 /* AIF1DAC2L_TO_DAC1L */ | ||
| 3639 | #define WM8994_AIF1DAC2L_TO_DAC1L_MASK 0x0002 /* AIF1DAC2L_TO_DAC1L */ | ||
| 3640 | #define WM8994_AIF1DAC2L_TO_DAC1L_SHIFT 1 /* AIF1DAC2L_TO_DAC1L */ | ||
| 3641 | #define WM8994_AIF1DAC2L_TO_DAC1L_WIDTH 1 /* AIF1DAC2L_TO_DAC1L */ | ||
| 3642 | #define WM8994_AIF1DAC1L_TO_DAC1L 0x0001 /* AIF1DAC1L_TO_DAC1L */ | ||
| 3643 | #define WM8994_AIF1DAC1L_TO_DAC1L_MASK 0x0001 /* AIF1DAC1L_TO_DAC1L */ | ||
| 3644 | #define WM8994_AIF1DAC1L_TO_DAC1L_SHIFT 0 /* AIF1DAC1L_TO_DAC1L */ | ||
| 3645 | #define WM8994_AIF1DAC1L_TO_DAC1L_WIDTH 1 /* AIF1DAC1L_TO_DAC1L */ | ||
| 3646 | |||
| 3647 | /* | ||
| 3648 | * R1538 (0x602) - DAC1 Right Mixer Routing | ||
| 3649 | */ | ||
| 3650 | #define WM8994_ADCR_TO_DAC1R 0x0020 /* ADCR_TO_DAC1R */ | ||
| 3651 | #define WM8994_ADCR_TO_DAC1R_MASK 0x0020 /* ADCR_TO_DAC1R */ | ||
| 3652 | #define WM8994_ADCR_TO_DAC1R_SHIFT 5 /* ADCR_TO_DAC1R */ | ||
| 3653 | #define WM8994_ADCR_TO_DAC1R_WIDTH 1 /* ADCR_TO_DAC1R */ | ||
| 3654 | #define WM8994_ADCL_TO_DAC1R 0x0010 /* ADCL_TO_DAC1R */ | ||
| 3655 | #define WM8994_ADCL_TO_DAC1R_MASK 0x0010 /* ADCL_TO_DAC1R */ | ||
| 3656 | #define WM8994_ADCL_TO_DAC1R_SHIFT 4 /* ADCL_TO_DAC1R */ | ||
| 3657 | #define WM8994_ADCL_TO_DAC1R_WIDTH 1 /* ADCL_TO_DAC1R */ | ||
| 3658 | #define WM8994_AIF2DACR_TO_DAC1R 0x0004 /* AIF2DACR_TO_DAC1R */ | ||
| 3659 | #define WM8994_AIF2DACR_TO_DAC1R_MASK 0x0004 /* AIF2DACR_TO_DAC1R */ | ||
| 3660 | #define WM8994_AIF2DACR_TO_DAC1R_SHIFT 2 /* AIF2DACR_TO_DAC1R */ | ||
| 3661 | #define WM8994_AIF2DACR_TO_DAC1R_WIDTH 1 /* AIF2DACR_TO_DAC1R */ | ||
| 3662 | #define WM8994_AIF1DAC2R_TO_DAC1R 0x0002 /* AIF1DAC2R_TO_DAC1R */ | ||
| 3663 | #define WM8994_AIF1DAC2R_TO_DAC1R_MASK 0x0002 /* AIF1DAC2R_TO_DAC1R */ | ||
| 3664 | #define WM8994_AIF1DAC2R_TO_DAC1R_SHIFT 1 /* AIF1DAC2R_TO_DAC1R */ | ||
| 3665 | #define WM8994_AIF1DAC2R_TO_DAC1R_WIDTH 1 /* AIF1DAC2R_TO_DAC1R */ | ||
| 3666 | #define WM8994_AIF1DAC1R_TO_DAC1R 0x0001 /* AIF1DAC1R_TO_DAC1R */ | ||
| 3667 | #define WM8994_AIF1DAC1R_TO_DAC1R_MASK 0x0001 /* AIF1DAC1R_TO_DAC1R */ | ||
| 3668 | #define WM8994_AIF1DAC1R_TO_DAC1R_SHIFT 0 /* AIF1DAC1R_TO_DAC1R */ | ||
| 3669 | #define WM8994_AIF1DAC1R_TO_DAC1R_WIDTH 1 /* AIF1DAC1R_TO_DAC1R */ | ||
| 3670 | |||
| 3671 | /* | ||
| 3672 | * R1539 (0x603) - DAC2 Mixer Volumes | ||
| 3673 | */ | ||
| 3674 | #define WM8994_ADCR_DAC2_VOL_MASK 0x01E0 /* ADCR_DAC2_VOL - [8:5] */ | ||
| 3675 | #define WM8994_ADCR_DAC2_VOL_SHIFT 5 /* ADCR_DAC2_VOL - [8:5] */ | ||
| 3676 | #define WM8994_ADCR_DAC2_VOL_WIDTH 4 /* ADCR_DAC2_VOL - [8:5] */ | ||
| 3677 | #define WM8994_ADCL_DAC2_VOL_MASK 0x000F /* ADCL_DAC2_VOL - [3:0] */ | ||
| 3678 | #define WM8994_ADCL_DAC2_VOL_SHIFT 0 /* ADCL_DAC2_VOL - [3:0] */ | ||
| 3679 | #define WM8994_ADCL_DAC2_VOL_WIDTH 4 /* ADCL_DAC2_VOL - [3:0] */ | ||
| 3680 | |||
| 3681 | /* | ||
| 3682 | * R1540 (0x604) - DAC2 Left Mixer Routing | ||
| 3683 | */ | ||
| 3684 | #define WM8994_ADCR_TO_DAC2L 0x0020 /* ADCR_TO_DAC2L */ | ||
| 3685 | #define WM8994_ADCR_TO_DAC2L_MASK 0x0020 /* ADCR_TO_DAC2L */ | ||
| 3686 | #define WM8994_ADCR_TO_DAC2L_SHIFT 5 /* ADCR_TO_DAC2L */ | ||
| 3687 | #define WM8994_ADCR_TO_DAC2L_WIDTH 1 /* ADCR_TO_DAC2L */ | ||
| 3688 | #define WM8994_ADCL_TO_DAC2L 0x0010 /* ADCL_TO_DAC2L */ | ||
| 3689 | #define WM8994_ADCL_TO_DAC2L_MASK 0x0010 /* ADCL_TO_DAC2L */ | ||
| 3690 | #define WM8994_ADCL_TO_DAC2L_SHIFT 4 /* ADCL_TO_DAC2L */ | ||
| 3691 | #define WM8994_ADCL_TO_DAC2L_WIDTH 1 /* ADCL_TO_DAC2L */ | ||
| 3692 | #define WM8994_AIF2DACL_TO_DAC2L 0x0004 /* AIF2DACL_TO_DAC2L */ | ||
| 3693 | #define WM8994_AIF2DACL_TO_DAC2L_MASK 0x0004 /* AIF2DACL_TO_DAC2L */ | ||
| 3694 | #define WM8994_AIF2DACL_TO_DAC2L_SHIFT 2 /* AIF2DACL_TO_DAC2L */ | ||
| 3695 | #define WM8994_AIF2DACL_TO_DAC2L_WIDTH 1 /* AIF2DACL_TO_DAC2L */ | ||
| 3696 | #define WM8994_AIF1DAC2L_TO_DAC2L 0x0002 /* AIF1DAC2L_TO_DAC2L */ | ||
| 3697 | #define WM8994_AIF1DAC2L_TO_DAC2L_MASK 0x0002 /* AIF1DAC2L_TO_DAC2L */ | ||
| 3698 | #define WM8994_AIF1DAC2L_TO_DAC2L_SHIFT 1 /* AIF1DAC2L_TO_DAC2L */ | ||
| 3699 | #define WM8994_AIF1DAC2L_TO_DAC2L_WIDTH 1 /* AIF1DAC2L_TO_DAC2L */ | ||
| 3700 | #define WM8994_AIF1DAC1L_TO_DAC2L 0x0001 /* AIF1DAC1L_TO_DAC2L */ | ||
| 3701 | #define WM8994_AIF1DAC1L_TO_DAC2L_MASK 0x0001 /* AIF1DAC1L_TO_DAC2L */ | ||
| 3702 | #define WM8994_AIF1DAC1L_TO_DAC2L_SHIFT 0 /* AIF1DAC1L_TO_DAC2L */ | ||
| 3703 | #define WM8994_AIF1DAC1L_TO_DAC2L_WIDTH 1 /* AIF1DAC1L_TO_DAC2L */ | ||
| 3704 | |||
| 3705 | /* | ||
| 3706 | * R1541 (0x605) - DAC2 Right Mixer Routing | ||
| 3707 | */ | ||
| 3708 | #define WM8994_ADCR_TO_DAC2R 0x0020 /* ADCR_TO_DAC2R */ | ||
| 3709 | #define WM8994_ADCR_TO_DAC2R_MASK 0x0020 /* ADCR_TO_DAC2R */ | ||
| 3710 | #define WM8994_ADCR_TO_DAC2R_SHIFT 5 /* ADCR_TO_DAC2R */ | ||
| 3711 | #define WM8994_ADCR_TO_DAC2R_WIDTH 1 /* ADCR_TO_DAC2R */ | ||
| 3712 | #define WM8994_ADCL_TO_DAC2R 0x0010 /* ADCL_TO_DAC2R */ | ||
| 3713 | #define WM8994_ADCL_TO_DAC2R_MASK 0x0010 /* ADCL_TO_DAC2R */ | ||
| 3714 | #define WM8994_ADCL_TO_DAC2R_SHIFT 4 /* ADCL_TO_DAC2R */ | ||
| 3715 | #define WM8994_ADCL_TO_DAC2R_WIDTH 1 /* ADCL_TO_DAC2R */ | ||
| 3716 | #define WM8994_AIF2DACR_TO_DAC2R 0x0004 /* AIF2DACR_TO_DAC2R */ | ||
| 3717 | #define WM8994_AIF2DACR_TO_DAC2R_MASK 0x0004 /* AIF2DACR_TO_DAC2R */ | ||
| 3718 | #define WM8994_AIF2DACR_TO_DAC2R_SHIFT 2 /* AIF2DACR_TO_DAC2R */ | ||
| 3719 | #define WM8994_AIF2DACR_TO_DAC2R_WIDTH 1 /* AIF2DACR_TO_DAC2R */ | ||
| 3720 | #define WM8994_AIF1DAC2R_TO_DAC2R 0x0002 /* AIF1DAC2R_TO_DAC2R */ | ||
| 3721 | #define WM8994_AIF1DAC2R_TO_DAC2R_MASK 0x0002 /* AIF1DAC2R_TO_DAC2R */ | ||
| 3722 | #define WM8994_AIF1DAC2R_TO_DAC2R_SHIFT 1 /* AIF1DAC2R_TO_DAC2R */ | ||
| 3723 | #define WM8994_AIF1DAC2R_TO_DAC2R_WIDTH 1 /* AIF1DAC2R_TO_DAC2R */ | ||
| 3724 | #define WM8994_AIF1DAC1R_TO_DAC2R 0x0001 /* AIF1DAC1R_TO_DAC2R */ | ||
| 3725 | #define WM8994_AIF1DAC1R_TO_DAC2R_MASK 0x0001 /* AIF1DAC1R_TO_DAC2R */ | ||
| 3726 | #define WM8994_AIF1DAC1R_TO_DAC2R_SHIFT 0 /* AIF1DAC1R_TO_DAC2R */ | ||
| 3727 | #define WM8994_AIF1DAC1R_TO_DAC2R_WIDTH 1 /* AIF1DAC1R_TO_DAC2R */ | ||
| 3728 | |||
| 3729 | /* | ||
| 3730 | * R1542 (0x606) - AIF1 ADC1 Left Mixer Routing | ||
| 3731 | */ | ||
| 3732 | #define WM8994_ADC1L_TO_AIF1ADC1L 0x0002 /* ADC1L_TO_AIF1ADC1L */ | ||
| 3733 | #define WM8994_ADC1L_TO_AIF1ADC1L_MASK 0x0002 /* ADC1L_TO_AIF1ADC1L */ | ||
| 3734 | #define WM8994_ADC1L_TO_AIF1ADC1L_SHIFT 1 /* ADC1L_TO_AIF1ADC1L */ | ||
| 3735 | #define WM8994_ADC1L_TO_AIF1ADC1L_WIDTH 1 /* ADC1L_TO_AIF1ADC1L */ | ||
| 3736 | #define WM8994_AIF2DACL_TO_AIF1ADC1L 0x0001 /* AIF2DACL_TO_AIF1ADC1L */ | ||
| 3737 | #define WM8994_AIF2DACL_TO_AIF1ADC1L_MASK 0x0001 /* AIF2DACL_TO_AIF1ADC1L */ | ||
| 3738 | #define WM8994_AIF2DACL_TO_AIF1ADC1L_SHIFT 0 /* AIF2DACL_TO_AIF1ADC1L */ | ||
| 3739 | #define WM8994_AIF2DACL_TO_AIF1ADC1L_WIDTH 1 /* AIF2DACL_TO_AIF1ADC1L */ | ||
| 3740 | |||
| 3741 | /* | ||
| 3742 | * R1543 (0x607) - AIF1 ADC1 Right Mixer Routing | ||
| 3743 | */ | ||
| 3744 | #define WM8994_ADC1R_TO_AIF1ADC1R 0x0002 /* ADC1R_TO_AIF1ADC1R */ | ||
| 3745 | #define WM8994_ADC1R_TO_AIF1ADC1R_MASK 0x0002 /* ADC1R_TO_AIF1ADC1R */ | ||
| 3746 | #define WM8994_ADC1R_TO_AIF1ADC1R_SHIFT 1 /* ADC1R_TO_AIF1ADC1R */ | ||
| 3747 | #define WM8994_ADC1R_TO_AIF1ADC1R_WIDTH 1 /* ADC1R_TO_AIF1ADC1R */ | ||
| 3748 | #define WM8994_AIF2DACR_TO_AIF1ADC1R 0x0001 /* AIF2DACR_TO_AIF1ADC1R */ | ||
| 3749 | #define WM8994_AIF2DACR_TO_AIF1ADC1R_MASK 0x0001 /* AIF2DACR_TO_AIF1ADC1R */ | ||
| 3750 | #define WM8994_AIF2DACR_TO_AIF1ADC1R_SHIFT 0 /* AIF2DACR_TO_AIF1ADC1R */ | ||
| 3751 | #define WM8994_AIF2DACR_TO_AIF1ADC1R_WIDTH 1 /* AIF2DACR_TO_AIF1ADC1R */ | ||
| 3752 | |||
| 3753 | /* | ||
| 3754 | * R1544 (0x608) - AIF1 ADC2 Left Mixer Routing | ||
| 3755 | */ | ||
| 3756 | #define WM8994_ADC2L_TO_AIF1ADC2L 0x0002 /* ADC2L_TO_AIF1ADC2L */ | ||
| 3757 | #define WM8994_ADC2L_TO_AIF1ADC2L_MASK 0x0002 /* ADC2L_TO_AIF1ADC2L */ | ||
| 3758 | #define WM8994_ADC2L_TO_AIF1ADC2L_SHIFT 1 /* ADC2L_TO_AIF1ADC2L */ | ||
| 3759 | #define WM8994_ADC2L_TO_AIF1ADC2L_WIDTH 1 /* ADC2L_TO_AIF1ADC2L */ | ||
| 3760 | #define WM8994_AIF2DACL_TO_AIF1ADC2L 0x0001 /* AIF2DACL_TO_AIF1ADC2L */ | ||
| 3761 | #define WM8994_AIF2DACL_TO_AIF1ADC2L_MASK 0x0001 /* AIF2DACL_TO_AIF1ADC2L */ | ||
| 3762 | #define WM8994_AIF2DACL_TO_AIF1ADC2L_SHIFT 0 /* AIF2DACL_TO_AIF1ADC2L */ | ||
| 3763 | #define WM8994_AIF2DACL_TO_AIF1ADC2L_WIDTH 1 /* AIF2DACL_TO_AIF1ADC2L */ | ||
| 3764 | |||
| 3765 | /* | ||
| 3766 | * R1545 (0x609) - AIF1 ADC2 Right mixer Routing | ||
| 3767 | */ | ||
| 3768 | #define WM8994_ADC2R_TO_AIF1ADC2R 0x0002 /* ADC2R_TO_AIF1ADC2R */ | ||
| 3769 | #define WM8994_ADC2R_TO_AIF1ADC2R_MASK 0x0002 /* ADC2R_TO_AIF1ADC2R */ | ||
| 3770 | #define WM8994_ADC2R_TO_AIF1ADC2R_SHIFT 1 /* ADC2R_TO_AIF1ADC2R */ | ||
| 3771 | #define WM8994_ADC2R_TO_AIF1ADC2R_WIDTH 1 /* ADC2R_TO_AIF1ADC2R */ | ||
| 3772 | #define WM8994_AIF2DACR_TO_AIF1ADC2R 0x0001 /* AIF2DACR_TO_AIF1ADC2R */ | ||
| 3773 | #define WM8994_AIF2DACR_TO_AIF1ADC2R_MASK 0x0001 /* AIF2DACR_TO_AIF1ADC2R */ | ||
| 3774 | #define WM8994_AIF2DACR_TO_AIF1ADC2R_SHIFT 0 /* AIF2DACR_TO_AIF1ADC2R */ | ||
| 3775 | #define WM8994_AIF2DACR_TO_AIF1ADC2R_WIDTH 1 /* AIF2DACR_TO_AIF1ADC2R */ | ||
| 3776 | |||
| 3777 | /* | ||
| 3778 | * R1552 (0x610) - DAC1 Left Volume | ||
| 3779 | */ | ||
| 3780 | #define WM8994_DAC1L_MUTE 0x0200 /* DAC1L_MUTE */ | ||
| 3781 | #define WM8994_DAC1L_MUTE_MASK 0x0200 /* DAC1L_MUTE */ | ||
| 3782 | #define WM8994_DAC1L_MUTE_SHIFT 9 /* DAC1L_MUTE */ | ||
| 3783 | #define WM8994_DAC1L_MUTE_WIDTH 1 /* DAC1L_MUTE */ | ||
| 3784 | #define WM8994_DAC1_VU 0x0100 /* DAC1_VU */ | ||
| 3785 | #define WM8994_DAC1_VU_MASK 0x0100 /* DAC1_VU */ | ||
| 3786 | #define WM8994_DAC1_VU_SHIFT 8 /* DAC1_VU */ | ||
| 3787 | #define WM8994_DAC1_VU_WIDTH 1 /* DAC1_VU */ | ||
| 3788 | #define WM8994_DAC1L_VOL_MASK 0x00FF /* DAC1L_VOL - [7:0] */ | ||
| 3789 | #define WM8994_DAC1L_VOL_SHIFT 0 /* DAC1L_VOL - [7:0] */ | ||
| 3790 | #define WM8994_DAC1L_VOL_WIDTH 8 /* DAC1L_VOL - [7:0] */ | ||
| 3791 | |||
| 3792 | /* | ||
| 3793 | * R1553 (0x611) - DAC1 Right Volume | ||
| 3794 | */ | ||
| 3795 | #define WM8994_DAC1R_MUTE 0x0200 /* DAC1R_MUTE */ | ||
| 3796 | #define WM8994_DAC1R_MUTE_MASK 0x0200 /* DAC1R_MUTE */ | ||
| 3797 | #define WM8994_DAC1R_MUTE_SHIFT 9 /* DAC1R_MUTE */ | ||
| 3798 | #define WM8994_DAC1R_MUTE_WIDTH 1 /* DAC1R_MUTE */ | ||
| 3799 | #define WM8994_DAC1_VU 0x0100 /* DAC1_VU */ | ||
| 3800 | #define WM8994_DAC1_VU_MASK 0x0100 /* DAC1_VU */ | ||
| 3801 | #define WM8994_DAC1_VU_SHIFT 8 /* DAC1_VU */ | ||
| 3802 | #define WM8994_DAC1_VU_WIDTH 1 /* DAC1_VU */ | ||
| 3803 | #define WM8994_DAC1R_VOL_MASK 0x00FF /* DAC1R_VOL - [7:0] */ | ||
| 3804 | #define WM8994_DAC1R_VOL_SHIFT 0 /* DAC1R_VOL - [7:0] */ | ||
| 3805 | #define WM8994_DAC1R_VOL_WIDTH 8 /* DAC1R_VOL - [7:0] */ | ||
| 3806 | |||
| 3807 | /* | ||
| 3808 | * R1554 (0x612) - DAC2 Left Volume | ||
| 3809 | */ | ||
| 3810 | #define WM8994_DAC2L_MUTE 0x0200 /* DAC2L_MUTE */ | ||
| 3811 | #define WM8994_DAC2L_MUTE_MASK 0x0200 /* DAC2L_MUTE */ | ||
| 3812 | #define WM8994_DAC2L_MUTE_SHIFT 9 /* DAC2L_MUTE */ | ||
| 3813 | #define WM8994_DAC2L_MUTE_WIDTH 1 /* DAC2L_MUTE */ | ||
| 3814 | #define WM8994_DAC2_VU 0x0100 /* DAC2_VU */ | ||
| 3815 | #define WM8994_DAC2_VU_MASK 0x0100 /* DAC2_VU */ | ||
| 3816 | #define WM8994_DAC2_VU_SHIFT 8 /* DAC2_VU */ | ||
| 3817 | #define WM8994_DAC2_VU_WIDTH 1 /* DAC2_VU */ | ||
| 3818 | #define WM8994_DAC2L_VOL_MASK 0x00FF /* DAC2L_VOL - [7:0] */ | ||
| 3819 | #define WM8994_DAC2L_VOL_SHIFT 0 /* DAC2L_VOL - [7:0] */ | ||
| 3820 | #define WM8994_DAC2L_VOL_WIDTH 8 /* DAC2L_VOL - [7:0] */ | ||
| 3821 | |||
| 3822 | /* | ||
| 3823 | * R1555 (0x613) - DAC2 Right Volume | ||
| 3824 | */ | ||
| 3825 | #define WM8994_DAC2R_MUTE 0x0200 /* DAC2R_MUTE */ | ||
| 3826 | #define WM8994_DAC2R_MUTE_MASK 0x0200 /* DAC2R_MUTE */ | ||
| 3827 | #define WM8994_DAC2R_MUTE_SHIFT 9 /* DAC2R_MUTE */ | ||
| 3828 | #define WM8994_DAC2R_MUTE_WIDTH 1 /* DAC2R_MUTE */ | ||
| 3829 | #define WM8994_DAC2_VU 0x0100 /* DAC2_VU */ | ||
| 3830 | #define WM8994_DAC2_VU_MASK 0x0100 /* DAC2_VU */ | ||
| 3831 | #define WM8994_DAC2_VU_SHIFT 8 /* DAC2_VU */ | ||
| 3832 | #define WM8994_DAC2_VU_WIDTH 1 /* DAC2_VU */ | ||
| 3833 | #define WM8994_DAC2R_VOL_MASK 0x00FF /* DAC2R_VOL - [7:0] */ | ||
| 3834 | #define WM8994_DAC2R_VOL_SHIFT 0 /* DAC2R_VOL - [7:0] */ | ||
| 3835 | #define WM8994_DAC2R_VOL_WIDTH 8 /* DAC2R_VOL - [7:0] */ | ||
| 3836 | |||
| 3837 | /* | ||
| 3838 | * R1556 (0x614) - DAC Softmute | ||
| 3839 | */ | ||
| 3840 | #define WM8994_DAC_SOFTMUTEMODE 0x0002 /* DAC_SOFTMUTEMODE */ | ||
| 3841 | #define WM8994_DAC_SOFTMUTEMODE_MASK 0x0002 /* DAC_SOFTMUTEMODE */ | ||
| 3842 | #define WM8994_DAC_SOFTMUTEMODE_SHIFT 1 /* DAC_SOFTMUTEMODE */ | ||
| 3843 | #define WM8994_DAC_SOFTMUTEMODE_WIDTH 1 /* DAC_SOFTMUTEMODE */ | ||
| 3844 | #define WM8994_DAC_MUTERATE 0x0001 /* DAC_MUTERATE */ | ||
| 3845 | #define WM8994_DAC_MUTERATE_MASK 0x0001 /* DAC_MUTERATE */ | ||
| 3846 | #define WM8994_DAC_MUTERATE_SHIFT 0 /* DAC_MUTERATE */ | ||
| 3847 | #define WM8994_DAC_MUTERATE_WIDTH 1 /* DAC_MUTERATE */ | ||
| 3848 | |||
| 3849 | /* | ||
| 3850 | * R1568 (0x620) - Oversampling | ||
| 3851 | */ | ||
| 3852 | #define WM8994_ADC_OSR128 0x0002 /* ADC_OSR128 */ | ||
| 3853 | #define WM8994_ADC_OSR128_MASK 0x0002 /* ADC_OSR128 */ | ||
| 3854 | #define WM8994_ADC_OSR128_SHIFT 1 /* ADC_OSR128 */ | ||
| 3855 | #define WM8994_ADC_OSR128_WIDTH 1 /* ADC_OSR128 */ | ||
| 3856 | #define WM8994_DAC_OSR128 0x0001 /* DAC_OSR128 */ | ||
| 3857 | #define WM8994_DAC_OSR128_MASK 0x0001 /* DAC_OSR128 */ | ||
| 3858 | #define WM8994_DAC_OSR128_SHIFT 0 /* DAC_OSR128 */ | ||
| 3859 | #define WM8994_DAC_OSR128_WIDTH 1 /* DAC_OSR128 */ | ||
| 3860 | |||
| 3861 | /* | ||
| 3862 | * R1569 (0x621) - Sidetone | ||
| 3863 | */ | ||
| 3864 | #define WM8994_ST_HPF_CUT_MASK 0x0380 /* ST_HPF_CUT - [9:7] */ | ||
| 3865 | #define WM8994_ST_HPF_CUT_SHIFT 7 /* ST_HPF_CUT - [9:7] */ | ||
| 3866 | #define WM8994_ST_HPF_CUT_WIDTH 3 /* ST_HPF_CUT - [9:7] */ | ||
| 3867 | #define WM8994_ST_HPF 0x0040 /* ST_HPF */ | ||
| 3868 | #define WM8994_ST_HPF_MASK 0x0040 /* ST_HPF */ | ||
| 3869 | #define WM8994_ST_HPF_SHIFT 6 /* ST_HPF */ | ||
| 3870 | #define WM8994_ST_HPF_WIDTH 1 /* ST_HPF */ | ||
| 3871 | #define WM8994_STR_SEL 0x0002 /* STR_SEL */ | ||
| 3872 | #define WM8994_STR_SEL_MASK 0x0002 /* STR_SEL */ | ||
| 3873 | #define WM8994_STR_SEL_SHIFT 1 /* STR_SEL */ | ||
| 3874 | #define WM8994_STR_SEL_WIDTH 1 /* STR_SEL */ | ||
| 3875 | #define WM8994_STL_SEL 0x0001 /* STL_SEL */ | ||
| 3876 | #define WM8994_STL_SEL_MASK 0x0001 /* STL_SEL */ | ||
| 3877 | #define WM8994_STL_SEL_SHIFT 0 /* STL_SEL */ | ||
| 3878 | #define WM8994_STL_SEL_WIDTH 1 /* STL_SEL */ | ||
| 3879 | |||
| 3880 | /* | ||
| 3881 | * R1824 (0x720) - Pull Control (1) | ||
| 3882 | */ | ||
| 3883 | #define WM8994_DMICDAT2_PU 0x0800 /* DMICDAT2_PU */ | ||
| 3884 | #define WM8994_DMICDAT2_PU_MASK 0x0800 /* DMICDAT2_PU */ | ||
| 3885 | #define WM8994_DMICDAT2_PU_SHIFT 11 /* DMICDAT2_PU */ | ||
| 3886 | #define WM8994_DMICDAT2_PU_WIDTH 1 /* DMICDAT2_PU */ | ||
| 3887 | #define WM8994_DMICDAT2_PD 0x0400 /* DMICDAT2_PD */ | ||
| 3888 | #define WM8994_DMICDAT2_PD_MASK 0x0400 /* DMICDAT2_PD */ | ||
| 3889 | #define WM8994_DMICDAT2_PD_SHIFT 10 /* DMICDAT2_PD */ | ||
| 3890 | #define WM8994_DMICDAT2_PD_WIDTH 1 /* DMICDAT2_PD */ | ||
| 3891 | #define WM8994_DMICDAT1_PU 0x0200 /* DMICDAT1_PU */ | ||
| 3892 | #define WM8994_DMICDAT1_PU_MASK 0x0200 /* DMICDAT1_PU */ | ||
| 3893 | #define WM8994_DMICDAT1_PU_SHIFT 9 /* DMICDAT1_PU */ | ||
| 3894 | #define WM8994_DMICDAT1_PU_WIDTH 1 /* DMICDAT1_PU */ | ||
| 3895 | #define WM8994_DMICDAT1_PD 0x0100 /* DMICDAT1_PD */ | ||
| 3896 | #define WM8994_DMICDAT1_PD_MASK 0x0100 /* DMICDAT1_PD */ | ||
| 3897 | #define WM8994_DMICDAT1_PD_SHIFT 8 /* DMICDAT1_PD */ | ||
| 3898 | #define WM8994_DMICDAT1_PD_WIDTH 1 /* DMICDAT1_PD */ | ||
| 3899 | #define WM8994_MCLK1_PU 0x0080 /* MCLK1_PU */ | ||
| 3900 | #define WM8994_MCLK1_PU_MASK 0x0080 /* MCLK1_PU */ | ||
| 3901 | #define WM8994_MCLK1_PU_SHIFT 7 /* MCLK1_PU */ | ||
| 3902 | #define WM8994_MCLK1_PU_WIDTH 1 /* MCLK1_PU */ | ||
| 3903 | #define WM8994_MCLK1_PD 0x0040 /* MCLK1_PD */ | ||
| 3904 | #define WM8994_MCLK1_PD_MASK 0x0040 /* MCLK1_PD */ | ||
| 3905 | #define WM8994_MCLK1_PD_SHIFT 6 /* MCLK1_PD */ | ||
| 3906 | #define WM8994_MCLK1_PD_WIDTH 1 /* MCLK1_PD */ | ||
| 3907 | #define WM8994_DACDAT1_PU 0x0020 /* DACDAT1_PU */ | ||
| 3908 | #define WM8994_DACDAT1_PU_MASK 0x0020 /* DACDAT1_PU */ | ||
| 3909 | #define WM8994_DACDAT1_PU_SHIFT 5 /* DACDAT1_PU */ | ||
| 3910 | #define WM8994_DACDAT1_PU_WIDTH 1 /* DACDAT1_PU */ | ||
| 3911 | #define WM8994_DACDAT1_PD 0x0010 /* DACDAT1_PD */ | ||
| 3912 | #define WM8994_DACDAT1_PD_MASK 0x0010 /* DACDAT1_PD */ | ||
| 3913 | #define WM8994_DACDAT1_PD_SHIFT 4 /* DACDAT1_PD */ | ||
| 3914 | #define WM8994_DACDAT1_PD_WIDTH 1 /* DACDAT1_PD */ | ||
| 3915 | #define WM8994_DACLRCLK1_PU 0x0008 /* DACLRCLK1_PU */ | ||
| 3916 | #define WM8994_DACLRCLK1_PU_MASK 0x0008 /* DACLRCLK1_PU */ | ||
| 3917 | #define WM8994_DACLRCLK1_PU_SHIFT 3 /* DACLRCLK1_PU */ | ||
| 3918 | #define WM8994_DACLRCLK1_PU_WIDTH 1 /* DACLRCLK1_PU */ | ||
| 3919 | #define WM8994_DACLRCLK1_PD 0x0004 /* DACLRCLK1_PD */ | ||
| 3920 | #define WM8994_DACLRCLK1_PD_MASK 0x0004 /* DACLRCLK1_PD */ | ||
| 3921 | #define WM8994_DACLRCLK1_PD_SHIFT 2 /* DACLRCLK1_PD */ | ||
| 3922 | #define WM8994_DACLRCLK1_PD_WIDTH 1 /* DACLRCLK1_PD */ | ||
| 3923 | #define WM8994_BCLK1_PU 0x0002 /* BCLK1_PU */ | ||
| 3924 | #define WM8994_BCLK1_PU_MASK 0x0002 /* BCLK1_PU */ | ||
| 3925 | #define WM8994_BCLK1_PU_SHIFT 1 /* BCLK1_PU */ | ||
| 3926 | #define WM8994_BCLK1_PU_WIDTH 1 /* BCLK1_PU */ | ||
| 3927 | #define WM8994_BCLK1_PD 0x0001 /* BCLK1_PD */ | ||
| 3928 | #define WM8994_BCLK1_PD_MASK 0x0001 /* BCLK1_PD */ | ||
| 3929 | #define WM8994_BCLK1_PD_SHIFT 0 /* BCLK1_PD */ | ||
| 3930 | #define WM8994_BCLK1_PD_WIDTH 1 /* BCLK1_PD */ | ||
| 3931 | |||
| 3932 | /* | ||
| 3933 | * R1825 (0x721) - Pull Control (2) | ||
| 3934 | */ | ||
| 3935 | #define WM8994_CSNADDR_PD 0x0100 /* CSNADDR_PD */ | ||
| 3936 | #define WM8994_CSNADDR_PD_MASK 0x0100 /* CSNADDR_PD */ | ||
| 3937 | #define WM8994_CSNADDR_PD_SHIFT 8 /* CSNADDR_PD */ | ||
| 3938 | #define WM8994_CSNADDR_PD_WIDTH 1 /* CSNADDR_PD */ | ||
| 3939 | #define WM8994_LDO2ENA_PD 0x0040 /* LDO2ENA_PD */ | ||
| 3940 | #define WM8994_LDO2ENA_PD_MASK 0x0040 /* LDO2ENA_PD */ | ||
| 3941 | #define WM8994_LDO2ENA_PD_SHIFT 6 /* LDO2ENA_PD */ | ||
| 3942 | #define WM8994_LDO2ENA_PD_WIDTH 1 /* LDO2ENA_PD */ | ||
| 3943 | #define WM8994_LDO1ENA_PD 0x0010 /* LDO1ENA_PD */ | ||
| 3944 | #define WM8994_LDO1ENA_PD_MASK 0x0010 /* LDO1ENA_PD */ | ||
| 3945 | #define WM8994_LDO1ENA_PD_SHIFT 4 /* LDO1ENA_PD */ | ||
| 3946 | #define WM8994_LDO1ENA_PD_WIDTH 1 /* LDO1ENA_PD */ | ||
| 3947 | #define WM8994_CIFMODE_PD 0x0004 /* CIFMODE_PD */ | ||
| 3948 | #define WM8994_CIFMODE_PD_MASK 0x0004 /* CIFMODE_PD */ | ||
| 3949 | #define WM8994_CIFMODE_PD_SHIFT 2 /* CIFMODE_PD */ | ||
| 3950 | #define WM8994_CIFMODE_PD_WIDTH 1 /* CIFMODE_PD */ | ||
| 3951 | #define WM8994_SPKMODE_PU 0x0002 /* SPKMODE_PU */ | ||
| 3952 | #define WM8994_SPKMODE_PU_MASK 0x0002 /* SPKMODE_PU */ | ||
| 3953 | #define WM8994_SPKMODE_PU_SHIFT 1 /* SPKMODE_PU */ | ||
| 3954 | #define WM8994_SPKMODE_PU_WIDTH 1 /* SPKMODE_PU */ | ||
| 3955 | |||
| 3956 | /* | ||
| 3957 | * R1840 (0x730) - Interrupt Status 1 | ||
| 3958 | */ | ||
| 3959 | #define WM8994_GP11_EINT 0x0400 /* GP11_EINT */ | ||
| 3960 | #define WM8994_GP11_EINT_MASK 0x0400 /* GP11_EINT */ | ||
| 3961 | #define WM8994_GP11_EINT_SHIFT 10 /* GP11_EINT */ | ||
| 3962 | #define WM8994_GP11_EINT_WIDTH 1 /* GP11_EINT */ | ||
| 3963 | #define WM8994_GP10_EINT 0x0200 /* GP10_EINT */ | ||
| 3964 | #define WM8994_GP10_EINT_MASK 0x0200 /* GP10_EINT */ | ||
| 3965 | #define WM8994_GP10_EINT_SHIFT 9 /* GP10_EINT */ | ||
| 3966 | #define WM8994_GP10_EINT_WIDTH 1 /* GP10_EINT */ | ||
| 3967 | #define WM8994_GP9_EINT 0x0100 /* GP9_EINT */ | ||
| 3968 | #define WM8994_GP9_EINT_MASK 0x0100 /* GP9_EINT */ | ||
| 3969 | #define WM8994_GP9_EINT_SHIFT 8 /* GP9_EINT */ | ||
| 3970 | #define WM8994_GP9_EINT_WIDTH 1 /* GP9_EINT */ | ||
| 3971 | #define WM8994_GP8_EINT 0x0080 /* GP8_EINT */ | ||
| 3972 | #define WM8994_GP8_EINT_MASK 0x0080 /* GP8_EINT */ | ||
| 3973 | #define WM8994_GP8_EINT_SHIFT 7 /* GP8_EINT */ | ||
| 3974 | #define WM8994_GP8_EINT_WIDTH 1 /* GP8_EINT */ | ||
| 3975 | #define WM8994_GP7_EINT 0x0040 /* GP7_EINT */ | ||
| 3976 | #define WM8994_GP7_EINT_MASK 0x0040 /* GP7_EINT */ | ||
| 3977 | #define WM8994_GP7_EINT_SHIFT 6 /* GP7_EINT */ | ||
| 3978 | #define WM8994_GP7_EINT_WIDTH 1 /* GP7_EINT */ | ||
| 3979 | #define WM8994_GP6_EINT 0x0020 /* GP6_EINT */ | ||
| 3980 | #define WM8994_GP6_EINT_MASK 0x0020 /* GP6_EINT */ | ||
| 3981 | #define WM8994_GP6_EINT_SHIFT 5 /* GP6_EINT */ | ||
| 3982 | #define WM8994_GP6_EINT_WIDTH 1 /* GP6_EINT */ | ||
| 3983 | #define WM8994_GP5_EINT 0x0010 /* GP5_EINT */ | ||
| 3984 | #define WM8994_GP5_EINT_MASK 0x0010 /* GP5_EINT */ | ||
| 3985 | #define WM8994_GP5_EINT_SHIFT 4 /* GP5_EINT */ | ||
| 3986 | #define WM8994_GP5_EINT_WIDTH 1 /* GP5_EINT */ | ||
| 3987 | #define WM8994_GP4_EINT 0x0008 /* GP4_EINT */ | ||
| 3988 | #define WM8994_GP4_EINT_MASK 0x0008 /* GP4_EINT */ | ||
| 3989 | #define WM8994_GP4_EINT_SHIFT 3 /* GP4_EINT */ | ||
| 3990 | #define WM8994_GP4_EINT_WIDTH 1 /* GP4_EINT */ | ||
| 3991 | #define WM8994_GP3_EINT 0x0004 /* GP3_EINT */ | ||
| 3992 | #define WM8994_GP3_EINT_MASK 0x0004 /* GP3_EINT */ | ||
| 3993 | #define WM8994_GP3_EINT_SHIFT 2 /* GP3_EINT */ | ||
| 3994 | #define WM8994_GP3_EINT_WIDTH 1 /* GP3_EINT */ | ||
| 3995 | #define WM8994_GP2_EINT 0x0002 /* GP2_EINT */ | ||
| 3996 | #define WM8994_GP2_EINT_MASK 0x0002 /* GP2_EINT */ | ||
| 3997 | #define WM8994_GP2_EINT_SHIFT 1 /* GP2_EINT */ | ||
| 3998 | #define WM8994_GP2_EINT_WIDTH 1 /* GP2_EINT */ | ||
| 3999 | #define WM8994_GP1_EINT 0x0001 /* GP1_EINT */ | ||
| 4000 | #define WM8994_GP1_EINT_MASK 0x0001 /* GP1_EINT */ | ||
| 4001 | #define WM8994_GP1_EINT_SHIFT 0 /* GP1_EINT */ | ||
| 4002 | #define WM8994_GP1_EINT_WIDTH 1 /* GP1_EINT */ | ||
| 4003 | |||
| 4004 | /* | ||
| 4005 | * R1841 (0x731) - Interrupt Status 2 | ||
| 4006 | */ | ||
| 4007 | #define WM8994_TEMP_WARN_EINT 0x8000 /* TEMP_WARN_EINT */ | ||
| 4008 | #define WM8994_TEMP_WARN_EINT_MASK 0x8000 /* TEMP_WARN_EINT */ | ||
| 4009 | #define WM8994_TEMP_WARN_EINT_SHIFT 15 /* TEMP_WARN_EINT */ | ||
| 4010 | #define WM8994_TEMP_WARN_EINT_WIDTH 1 /* TEMP_WARN_EINT */ | ||
| 4011 | #define WM8994_DCS_DONE_EINT 0x4000 /* DCS_DONE_EINT */ | ||
| 4012 | #define WM8994_DCS_DONE_EINT_MASK 0x4000 /* DCS_DONE_EINT */ | ||
| 4013 | #define WM8994_DCS_DONE_EINT_SHIFT 14 /* DCS_DONE_EINT */ | ||
| 4014 | #define WM8994_DCS_DONE_EINT_WIDTH 1 /* DCS_DONE_EINT */ | ||
| 4015 | #define WM8994_WSEQ_DONE_EINT 0x2000 /* WSEQ_DONE_EINT */ | ||
| 4016 | #define WM8994_WSEQ_DONE_EINT_MASK 0x2000 /* WSEQ_DONE_EINT */ | ||
| 4017 | #define WM8994_WSEQ_DONE_EINT_SHIFT 13 /* WSEQ_DONE_EINT */ | ||
| 4018 | #define WM8994_WSEQ_DONE_EINT_WIDTH 1 /* WSEQ_DONE_EINT */ | ||
| 4019 | #define WM8994_FIFOS_ERR_EINT 0x1000 /* FIFOS_ERR_EINT */ | ||
| 4020 | #define WM8994_FIFOS_ERR_EINT_MASK 0x1000 /* FIFOS_ERR_EINT */ | ||
| 4021 | #define WM8994_FIFOS_ERR_EINT_SHIFT 12 /* FIFOS_ERR_EINT */ | ||
| 4022 | #define WM8994_FIFOS_ERR_EINT_WIDTH 1 /* FIFOS_ERR_EINT */ | ||
| 4023 | #define WM8994_AIF2DRC_SIG_DET_EINT 0x0800 /* AIF2DRC_SIG_DET_EINT */ | ||
| 4024 | #define WM8994_AIF2DRC_SIG_DET_EINT_MASK 0x0800 /* AIF2DRC_SIG_DET_EINT */ | ||
| 4025 | #define WM8994_AIF2DRC_SIG_DET_EINT_SHIFT 11 /* AIF2DRC_SIG_DET_EINT */ | ||
| 4026 | #define WM8994_AIF2DRC_SIG_DET_EINT_WIDTH 1 /* AIF2DRC_SIG_DET_EINT */ | ||
| 4027 | #define WM8994_AIF1DRC2_SIG_DET_EINT 0x0400 /* AIF1DRC2_SIG_DET_EINT */ | ||
| 4028 | #define WM8994_AIF1DRC2_SIG_DET_EINT_MASK 0x0400 /* AIF1DRC2_SIG_DET_EINT */ | ||
| 4029 | #define WM8994_AIF1DRC2_SIG_DET_EINT_SHIFT 10 /* AIF1DRC2_SIG_DET_EINT */ | ||
| 4030 | #define WM8994_AIF1DRC2_SIG_DET_EINT_WIDTH 1 /* AIF1DRC2_SIG_DET_EINT */ | ||
| 4031 | #define WM8994_AIF1DRC1_SIG_DET_EINT 0x0200 /* AIF1DRC1_SIG_DET_EINT */ | ||
| 4032 | #define WM8994_AIF1DRC1_SIG_DET_EINT_MASK 0x0200 /* AIF1DRC1_SIG_DET_EINT */ | ||
| 4033 | #define WM8994_AIF1DRC1_SIG_DET_EINT_SHIFT 9 /* AIF1DRC1_SIG_DET_EINT */ | ||
| 4034 | #define WM8994_AIF1DRC1_SIG_DET_EINT_WIDTH 1 /* AIF1DRC1_SIG_DET_EINT */ | ||
| 4035 | #define WM8994_SRC2_LOCK_EINT 0x0100 /* SRC2_LOCK_EINT */ | ||
| 4036 | #define WM8994_SRC2_LOCK_EINT_MASK 0x0100 /* SRC2_LOCK_EINT */ | ||
| 4037 | #define WM8994_SRC2_LOCK_EINT_SHIFT 8 /* SRC2_LOCK_EINT */ | ||
| 4038 | #define WM8994_SRC2_LOCK_EINT_WIDTH 1 /* SRC2_LOCK_EINT */ | ||
| 4039 | #define WM8994_SRC1_LOCK_EINT 0x0080 /* SRC1_LOCK_EINT */ | ||
| 4040 | #define WM8994_SRC1_LOCK_EINT_MASK 0x0080 /* SRC1_LOCK_EINT */ | ||
| 4041 | #define WM8994_SRC1_LOCK_EINT_SHIFT 7 /* SRC1_LOCK_EINT */ | ||
| 4042 | #define WM8994_SRC1_LOCK_EINT_WIDTH 1 /* SRC1_LOCK_EINT */ | ||
| 4043 | #define WM8994_FLL2_LOCK_EINT 0x0040 /* FLL2_LOCK_EINT */ | ||
| 4044 | #define WM8994_FLL2_LOCK_EINT_MASK 0x0040 /* FLL2_LOCK_EINT */ | ||
| 4045 | #define WM8994_FLL2_LOCK_EINT_SHIFT 6 /* FLL2_LOCK_EINT */ | ||
| 4046 | #define WM8994_FLL2_LOCK_EINT_WIDTH 1 /* FLL2_LOCK_EINT */ | ||
| 4047 | #define WM8994_FLL1_LOCK_EINT 0x0020 /* FLL1_LOCK_EINT */ | ||
| 4048 | #define WM8994_FLL1_LOCK_EINT_MASK 0x0020 /* FLL1_LOCK_EINT */ | ||
| 4049 | #define WM8994_FLL1_LOCK_EINT_SHIFT 5 /* FLL1_LOCK_EINT */ | ||
| 4050 | #define WM8994_FLL1_LOCK_EINT_WIDTH 1 /* FLL1_LOCK_EINT */ | ||
| 4051 | #define WM8994_MIC2_SHRT_EINT 0x0010 /* MIC2_SHRT_EINT */ | ||
| 4052 | #define WM8994_MIC2_SHRT_EINT_MASK 0x0010 /* MIC2_SHRT_EINT */ | ||
| 4053 | #define WM8994_MIC2_SHRT_EINT_SHIFT 4 /* MIC2_SHRT_EINT */ | ||
| 4054 | #define WM8994_MIC2_SHRT_EINT_WIDTH 1 /* MIC2_SHRT_EINT */ | ||
| 4055 | #define WM8994_MIC2_DET_EINT 0x0008 /* MIC2_DET_EINT */ | ||
| 4056 | #define WM8994_MIC2_DET_EINT_MASK 0x0008 /* MIC2_DET_EINT */ | ||
| 4057 | #define WM8994_MIC2_DET_EINT_SHIFT 3 /* MIC2_DET_EINT */ | ||
| 4058 | #define WM8994_MIC2_DET_EINT_WIDTH 1 /* MIC2_DET_EINT */ | ||
| 4059 | #define WM8994_MIC1_SHRT_EINT 0x0004 /* MIC1_SHRT_EINT */ | ||
| 4060 | #define WM8994_MIC1_SHRT_EINT_MASK 0x0004 /* MIC1_SHRT_EINT */ | ||
| 4061 | #define WM8994_MIC1_SHRT_EINT_SHIFT 2 /* MIC1_SHRT_EINT */ | ||
| 4062 | #define WM8994_MIC1_SHRT_EINT_WIDTH 1 /* MIC1_SHRT_EINT */ | ||
| 4063 | #define WM8994_MIC1_DET_EINT 0x0002 /* MIC1_DET_EINT */ | ||
| 4064 | #define WM8994_MIC1_DET_EINT_MASK 0x0002 /* MIC1_DET_EINT */ | ||
| 4065 | #define WM8994_MIC1_DET_EINT_SHIFT 1 /* MIC1_DET_EINT */ | ||
| 4066 | #define WM8994_MIC1_DET_EINT_WIDTH 1 /* MIC1_DET_EINT */ | ||
| 4067 | #define WM8994_TEMP_SHUT_EINT 0x0001 /* TEMP_SHUT_EINT */ | ||
| 4068 | #define WM8994_TEMP_SHUT_EINT_MASK 0x0001 /* TEMP_SHUT_EINT */ | ||
| 4069 | #define WM8994_TEMP_SHUT_EINT_SHIFT 0 /* TEMP_SHUT_EINT */ | ||
| 4070 | #define WM8994_TEMP_SHUT_EINT_WIDTH 1 /* TEMP_SHUT_EINT */ | ||
| 4071 | |||
| 4072 | /* | ||
| 4073 | * R1842 (0x732) - Interrupt Raw Status 2 | ||
| 4074 | */ | ||
| 4075 | #define WM8994_TEMP_WARN_STS 0x8000 /* TEMP_WARN_STS */ | ||
| 4076 | #define WM8994_TEMP_WARN_STS_MASK 0x8000 /* TEMP_WARN_STS */ | ||
| 4077 | #define WM8994_TEMP_WARN_STS_SHIFT 15 /* TEMP_WARN_STS */ | ||
| 4078 | #define WM8994_TEMP_WARN_STS_WIDTH 1 /* TEMP_WARN_STS */ | ||
| 4079 | #define WM8994_DCS_DONE_STS 0x4000 /* DCS_DONE_STS */ | ||
| 4080 | #define WM8994_DCS_DONE_STS_MASK 0x4000 /* DCS_DONE_STS */ | ||
| 4081 | #define WM8994_DCS_DONE_STS_SHIFT 14 /* DCS_DONE_STS */ | ||
| 4082 | #define WM8994_DCS_DONE_STS_WIDTH 1 /* DCS_DONE_STS */ | ||
| 4083 | #define WM8994_WSEQ_DONE_STS 0x2000 /* WSEQ_DONE_STS */ | ||
| 4084 | #define WM8994_WSEQ_DONE_STS_MASK 0x2000 /* WSEQ_DONE_STS */ | ||
| 4085 | #define WM8994_WSEQ_DONE_STS_SHIFT 13 /* WSEQ_DONE_STS */ | ||
| 4086 | #define WM8994_WSEQ_DONE_STS_WIDTH 1 /* WSEQ_DONE_STS */ | ||
| 4087 | #define WM8994_FIFOS_ERR_STS 0x1000 /* FIFOS_ERR_STS */ | ||
| 4088 | #define WM8994_FIFOS_ERR_STS_MASK 0x1000 /* FIFOS_ERR_STS */ | ||
| 4089 | #define WM8994_FIFOS_ERR_STS_SHIFT 12 /* FIFOS_ERR_STS */ | ||
| 4090 | #define WM8994_FIFOS_ERR_STS_WIDTH 1 /* FIFOS_ERR_STS */ | ||
| 4091 | #define WM8994_AIF2DRC_SIG_DET_STS 0x0800 /* AIF2DRC_SIG_DET_STS */ | ||
| 4092 | #define WM8994_AIF2DRC_SIG_DET_STS_MASK 0x0800 /* AIF2DRC_SIG_DET_STS */ | ||
| 4093 | #define WM8994_AIF2DRC_SIG_DET_STS_SHIFT 11 /* AIF2DRC_SIG_DET_STS */ | ||
| 4094 | #define WM8994_AIF2DRC_SIG_DET_STS_WIDTH 1 /* AIF2DRC_SIG_DET_STS */ | ||
| 4095 | #define WM8994_AIF1DRC2_SIG_DET_STS 0x0400 /* AIF1DRC2_SIG_DET_STS */ | ||
| 4096 | #define WM8994_AIF1DRC2_SIG_DET_STS_MASK 0x0400 /* AIF1DRC2_SIG_DET_STS */ | ||
| 4097 | #define WM8994_AIF1DRC2_SIG_DET_STS_SHIFT 10 /* AIF1DRC2_SIG_DET_STS */ | ||
| 4098 | #define WM8994_AIF1DRC2_SIG_DET_STS_WIDTH 1 /* AIF1DRC2_SIG_DET_STS */ | ||
| 4099 | #define WM8994_AIF1DRC1_SIG_DET_STS 0x0200 /* AIF1DRC1_SIG_DET_STS */ | ||
| 4100 | #define WM8994_AIF1DRC1_SIG_DET_STS_MASK 0x0200 /* AIF1DRC1_SIG_DET_STS */ | ||
| 4101 | #define WM8994_AIF1DRC1_SIG_DET_STS_SHIFT 9 /* AIF1DRC1_SIG_DET_STS */ | ||
| 4102 | #define WM8994_AIF1DRC1_SIG_DET_STS_WIDTH 1 /* AIF1DRC1_SIG_DET_STS */ | ||
| 4103 | #define WM8994_SRC2_LOCK_STS 0x0100 /* SRC2_LOCK_STS */ | ||
| 4104 | #define WM8994_SRC2_LOCK_STS_MASK 0x0100 /* SRC2_LOCK_STS */ | ||
| 4105 | #define WM8994_SRC2_LOCK_STS_SHIFT 8 /* SRC2_LOCK_STS */ | ||
| 4106 | #define WM8994_SRC2_LOCK_STS_WIDTH 1 /* SRC2_LOCK_STS */ | ||
| 4107 | #define WM8994_SRC1_LOCK_STS 0x0080 /* SRC1_LOCK_STS */ | ||
| 4108 | #define WM8994_SRC1_LOCK_STS_MASK 0x0080 /* SRC1_LOCK_STS */ | ||
| 4109 | #define WM8994_SRC1_LOCK_STS_SHIFT 7 /* SRC1_LOCK_STS */ | ||
| 4110 | #define WM8994_SRC1_LOCK_STS_WIDTH 1 /* SRC1_LOCK_STS */ | ||
| 4111 | #define WM8994_FLL2_LOCK_STS 0x0040 /* FLL2_LOCK_STS */ | ||
| 4112 | #define WM8994_FLL2_LOCK_STS_MASK 0x0040 /* FLL2_LOCK_STS */ | ||
| 4113 | #define WM8994_FLL2_LOCK_STS_SHIFT 6 /* FLL2_LOCK_STS */ | ||
| 4114 | #define WM8994_FLL2_LOCK_STS_WIDTH 1 /* FLL2_LOCK_STS */ | ||
| 4115 | #define WM8994_FLL1_LOCK_STS 0x0020 /* FLL1_LOCK_STS */ | ||
| 4116 | #define WM8994_FLL1_LOCK_STS_MASK 0x0020 /* FLL1_LOCK_STS */ | ||
| 4117 | #define WM8994_FLL1_LOCK_STS_SHIFT 5 /* FLL1_LOCK_STS */ | ||
| 4118 | #define WM8994_FLL1_LOCK_STS_WIDTH 1 /* FLL1_LOCK_STS */ | ||
| 4119 | #define WM8994_MIC2_SHRT_STS 0x0010 /* MIC2_SHRT_STS */ | ||
| 4120 | #define WM8994_MIC2_SHRT_STS_MASK 0x0010 /* MIC2_SHRT_STS */ | ||
| 4121 | #define WM8994_MIC2_SHRT_STS_SHIFT 4 /* MIC2_SHRT_STS */ | ||
| 4122 | #define WM8994_MIC2_SHRT_STS_WIDTH 1 /* MIC2_SHRT_STS */ | ||
| 4123 | #define WM8994_MIC2_DET_STS 0x0008 /* MIC2_DET_STS */ | ||
| 4124 | #define WM8994_MIC2_DET_STS_MASK 0x0008 /* MIC2_DET_STS */ | ||
| 4125 | #define WM8994_MIC2_DET_STS_SHIFT 3 /* MIC2_DET_STS */ | ||
| 4126 | #define WM8994_MIC2_DET_STS_WIDTH 1 /* MIC2_DET_STS */ | ||
| 4127 | #define WM8994_MIC1_SHRT_STS 0x0004 /* MIC1_SHRT_STS */ | ||
| 4128 | #define WM8994_MIC1_SHRT_STS_MASK 0x0004 /* MIC1_SHRT_STS */ | ||
| 4129 | #define WM8994_MIC1_SHRT_STS_SHIFT 2 /* MIC1_SHRT_STS */ | ||
| 4130 | #define WM8994_MIC1_SHRT_STS_WIDTH 1 /* MIC1_SHRT_STS */ | ||
| 4131 | #define WM8994_MIC1_DET_STS 0x0002 /* MIC1_DET_STS */ | ||
| 4132 | #define WM8994_MIC1_DET_STS_MASK 0x0002 /* MIC1_DET_STS */ | ||
| 4133 | #define WM8994_MIC1_DET_STS_SHIFT 1 /* MIC1_DET_STS */ | ||
| 4134 | #define WM8994_MIC1_DET_STS_WIDTH 1 /* MIC1_DET_STS */ | ||
| 4135 | #define WM8994_TEMP_SHUT_STS 0x0001 /* TEMP_SHUT_STS */ | ||
| 4136 | #define WM8994_TEMP_SHUT_STS_MASK 0x0001 /* TEMP_SHUT_STS */ | ||
| 4137 | #define WM8994_TEMP_SHUT_STS_SHIFT 0 /* TEMP_SHUT_STS */ | ||
| 4138 | #define WM8994_TEMP_SHUT_STS_WIDTH 1 /* TEMP_SHUT_STS */ | ||
| 4139 | |||
| 4140 | /* | ||
| 4141 | * R1848 (0x738) - Interrupt Status 1 Mask | ||
| 4142 | */ | ||
| 4143 | #define WM8994_IM_GP11_EINT 0x0400 /* IM_GP11_EINT */ | ||
| 4144 | #define WM8994_IM_GP11_EINT_MASK 0x0400 /* IM_GP11_EINT */ | ||
| 4145 | #define WM8994_IM_GP11_EINT_SHIFT 10 /* IM_GP11_EINT */ | ||
| 4146 | #define WM8994_IM_GP11_EINT_WIDTH 1 /* IM_GP11_EINT */ | ||
| 4147 | #define WM8994_IM_GP10_EINT 0x0200 /* IM_GP10_EINT */ | ||
| 4148 | #define WM8994_IM_GP10_EINT_MASK 0x0200 /* IM_GP10_EINT */ | ||
| 4149 | #define WM8994_IM_GP10_EINT_SHIFT 9 /* IM_GP10_EINT */ | ||
| 4150 | #define WM8994_IM_GP10_EINT_WIDTH 1 /* IM_GP10_EINT */ | ||
| 4151 | #define WM8994_IM_GP9_EINT 0x0100 /* IM_GP9_EINT */ | ||
| 4152 | #define WM8994_IM_GP9_EINT_MASK 0x0100 /* IM_GP9_EINT */ | ||
| 4153 | #define WM8994_IM_GP9_EINT_SHIFT 8 /* IM_GP9_EINT */ | ||
| 4154 | #define WM8994_IM_GP9_EINT_WIDTH 1 /* IM_GP9_EINT */ | ||
| 4155 | #define WM8994_IM_GP8_EINT 0x0080 /* IM_GP8_EINT */ | ||
| 4156 | #define WM8994_IM_GP8_EINT_MASK 0x0080 /* IM_GP8_EINT */ | ||
| 4157 | #define WM8994_IM_GP8_EINT_SHIFT 7 /* IM_GP8_EINT */ | ||
| 4158 | #define WM8994_IM_GP8_EINT_WIDTH 1 /* IM_GP8_EINT */ | ||
| 4159 | #define WM8994_IM_GP7_EINT 0x0040 /* IM_GP7_EINT */ | ||
| 4160 | #define WM8994_IM_GP7_EINT_MASK 0x0040 /* IM_GP7_EINT */ | ||
| 4161 | #define WM8994_IM_GP7_EINT_SHIFT 6 /* IM_GP7_EINT */ | ||
| 4162 | #define WM8994_IM_GP7_EINT_WIDTH 1 /* IM_GP7_EINT */ | ||
| 4163 | #define WM8994_IM_GP6_EINT 0x0020 /* IM_GP6_EINT */ | ||
| 4164 | #define WM8994_IM_GP6_EINT_MASK 0x0020 /* IM_GP6_EINT */ | ||
| 4165 | #define WM8994_IM_GP6_EINT_SHIFT 5 /* IM_GP6_EINT */ | ||
| 4166 | #define WM8994_IM_GP6_EINT_WIDTH 1 /* IM_GP6_EINT */ | ||
| 4167 | #define WM8994_IM_GP5_EINT 0x0010 /* IM_GP5_EINT */ | ||
| 4168 | #define WM8994_IM_GP5_EINT_MASK 0x0010 /* IM_GP5_EINT */ | ||
| 4169 | #define WM8994_IM_GP5_EINT_SHIFT 4 /* IM_GP5_EINT */ | ||
| 4170 | #define WM8994_IM_GP5_EINT_WIDTH 1 /* IM_GP5_EINT */ | ||
| 4171 | #define WM8994_IM_GP4_EINT 0x0008 /* IM_GP4_EINT */ | ||
| 4172 | #define WM8994_IM_GP4_EINT_MASK 0x0008 /* IM_GP4_EINT */ | ||
| 4173 | #define WM8994_IM_GP4_EINT_SHIFT 3 /* IM_GP4_EINT */ | ||
| 4174 | #define WM8994_IM_GP4_EINT_WIDTH 1 /* IM_GP4_EINT */ | ||
| 4175 | #define WM8994_IM_GP3_EINT 0x0004 /* IM_GP3_EINT */ | ||
| 4176 | #define WM8994_IM_GP3_EINT_MASK 0x0004 /* IM_GP3_EINT */ | ||
| 4177 | #define WM8994_IM_GP3_EINT_SHIFT 2 /* IM_GP3_EINT */ | ||
| 4178 | #define WM8994_IM_GP3_EINT_WIDTH 1 /* IM_GP3_EINT */ | ||
| 4179 | #define WM8994_IM_GP2_EINT 0x0002 /* IM_GP2_EINT */ | ||
| 4180 | #define WM8994_IM_GP2_EINT_MASK 0x0002 /* IM_GP2_EINT */ | ||
| 4181 | #define WM8994_IM_GP2_EINT_SHIFT 1 /* IM_GP2_EINT */ | ||
| 4182 | #define WM8994_IM_GP2_EINT_WIDTH 1 /* IM_GP2_EINT */ | ||
| 4183 | #define WM8994_IM_GP1_EINT 0x0001 /* IM_GP1_EINT */ | ||
| 4184 | #define WM8994_IM_GP1_EINT_MASK 0x0001 /* IM_GP1_EINT */ | ||
| 4185 | #define WM8994_IM_GP1_EINT_SHIFT 0 /* IM_GP1_EINT */ | ||
| 4186 | #define WM8994_IM_GP1_EINT_WIDTH 1 /* IM_GP1_EINT */ | ||
| 4187 | |||
| 4188 | /* | ||
| 4189 | * R1849 (0x739) - Interrupt Status 2 Mask | ||
| 4190 | */ | ||
| 4191 | #define WM8994_IM_TEMP_WARN_EINT 0x8000 /* IM_TEMP_WARN_EINT */ | ||
| 4192 | #define WM8994_IM_TEMP_WARN_EINT_MASK 0x8000 /* IM_TEMP_WARN_EINT */ | ||
| 4193 | #define WM8994_IM_TEMP_WARN_EINT_SHIFT 15 /* IM_TEMP_WARN_EINT */ | ||
| 4194 | #define WM8994_IM_TEMP_WARN_EINT_WIDTH 1 /* IM_TEMP_WARN_EINT */ | ||
| 4195 | #define WM8994_IM_DCS_DONE_EINT 0x4000 /* IM_DCS_DONE_EINT */ | ||
| 4196 | #define WM8994_IM_DCS_DONE_EINT_MASK 0x4000 /* IM_DCS_DONE_EINT */ | ||
| 4197 | #define WM8994_IM_DCS_DONE_EINT_SHIFT 14 /* IM_DCS_DONE_EINT */ | ||
| 4198 | #define WM8994_IM_DCS_DONE_EINT_WIDTH 1 /* IM_DCS_DONE_EINT */ | ||
| 4199 | #define WM8994_IM_WSEQ_DONE_EINT 0x2000 /* IM_WSEQ_DONE_EINT */ | ||
| 4200 | #define WM8994_IM_WSEQ_DONE_EINT_MASK 0x2000 /* IM_WSEQ_DONE_EINT */ | ||
| 4201 | #define WM8994_IM_WSEQ_DONE_EINT_SHIFT 13 /* IM_WSEQ_DONE_EINT */ | ||
| 4202 | #define WM8994_IM_WSEQ_DONE_EINT_WIDTH 1 /* IM_WSEQ_DONE_EINT */ | ||
| 4203 | #define WM8994_IM_FIFOS_ERR_EINT 0x1000 /* IM_FIFOS_ERR_EINT */ | ||
| 4204 | #define WM8994_IM_FIFOS_ERR_EINT_MASK 0x1000 /* IM_FIFOS_ERR_EINT */ | ||
| 4205 | #define WM8994_IM_FIFOS_ERR_EINT_SHIFT 12 /* IM_FIFOS_ERR_EINT */ | ||
| 4206 | #define WM8994_IM_FIFOS_ERR_EINT_WIDTH 1 /* IM_FIFOS_ERR_EINT */ | ||
| 4207 | #define WM8994_IM_AIF2DRC_SIG_DET_EINT 0x0800 /* IM_AIF2DRC_SIG_DET_EINT */ | ||
| 4208 | #define WM8994_IM_AIF2DRC_SIG_DET_EINT_MASK 0x0800 /* IM_AIF2DRC_SIG_DET_EINT */ | ||
| 4209 | #define WM8994_IM_AIF2DRC_SIG_DET_EINT_SHIFT 11 /* IM_AIF2DRC_SIG_DET_EINT */ | ||
| 4210 | #define WM8994_IM_AIF2DRC_SIG_DET_EINT_WIDTH 1 /* IM_AIF2DRC_SIG_DET_EINT */ | ||
| 4211 | #define WM8994_IM_AIF1DRC2_SIG_DET_EINT 0x0400 /* IM_AIF1DRC2_SIG_DET_EINT */ | ||
| 4212 | #define WM8994_IM_AIF1DRC2_SIG_DET_EINT_MASK 0x0400 /* IM_AIF1DRC2_SIG_DET_EINT */ | ||
| 4213 | #define WM8994_IM_AIF1DRC2_SIG_DET_EINT_SHIFT 10 /* IM_AIF1DRC2_SIG_DET_EINT */ | ||
| 4214 | #define WM8994_IM_AIF1DRC2_SIG_DET_EINT_WIDTH 1 /* IM_AIF1DRC2_SIG_DET_EINT */ | ||
| 4215 | #define WM8994_IM_AIF1DRC1_SIG_DET_EINT 0x0200 /* IM_AIF1DRC1_SIG_DET_EINT */ | ||
| 4216 | #define WM8994_IM_AIF1DRC1_SIG_DET_EINT_MASK 0x0200 /* IM_AIF1DRC1_SIG_DET_EINT */ | ||
| 4217 | #define WM8994_IM_AIF1DRC1_SIG_DET_EINT_SHIFT 9 /* IM_AIF1DRC1_SIG_DET_EINT */ | ||
| 4218 | #define WM8994_IM_AIF1DRC1_SIG_DET_EINT_WIDTH 1 /* IM_AIF1DRC1_SIG_DET_EINT */ | ||
| 4219 | #define WM8994_IM_SRC2_LOCK_EINT 0x0100 /* IM_SRC2_LOCK_EINT */ | ||
| 4220 | #define WM8994_IM_SRC2_LOCK_EINT_MASK 0x0100 /* IM_SRC2_LOCK_EINT */ | ||
| 4221 | #define WM8994_IM_SRC2_LOCK_EINT_SHIFT 8 /* IM_SRC2_LOCK_EINT */ | ||
| 4222 | #define WM8994_IM_SRC2_LOCK_EINT_WIDTH 1 /* IM_SRC2_LOCK_EINT */ | ||
| 4223 | #define WM8994_IM_SRC1_LOCK_EINT 0x0080 /* IM_SRC1_LOCK_EINT */ | ||
| 4224 | #define WM8994_IM_SRC1_LOCK_EINT_MASK 0x0080 /* IM_SRC1_LOCK_EINT */ | ||
| 4225 | #define WM8994_IM_SRC1_LOCK_EINT_SHIFT 7 /* IM_SRC1_LOCK_EINT */ | ||
| 4226 | #define WM8994_IM_SRC1_LOCK_EINT_WIDTH 1 /* IM_SRC1_LOCK_EINT */ | ||
| 4227 | #define WM8994_IM_FLL2_LOCK_EINT 0x0040 /* IM_FLL2_LOCK_EINT */ | ||
| 4228 | #define WM8994_IM_FLL2_LOCK_EINT_MASK 0x0040 /* IM_FLL2_LOCK_EINT */ | ||
| 4229 | #define WM8994_IM_FLL2_LOCK_EINT_SHIFT 6 /* IM_FLL2_LOCK_EINT */ | ||
| 4230 | #define WM8994_IM_FLL2_LOCK_EINT_WIDTH 1 /* IM_FLL2_LOCK_EINT */ | ||
| 4231 | #define WM8994_IM_FLL1_LOCK_EINT 0x0020 /* IM_FLL1_LOCK_EINT */ | ||
| 4232 | #define WM8994_IM_FLL1_LOCK_EINT_MASK 0x0020 /* IM_FLL1_LOCK_EINT */ | ||
| 4233 | #define WM8994_IM_FLL1_LOCK_EINT_SHIFT 5 /* IM_FLL1_LOCK_EINT */ | ||
| 4234 | #define WM8994_IM_FLL1_LOCK_EINT_WIDTH 1 /* IM_FLL1_LOCK_EINT */ | ||
| 4235 | #define WM8994_IM_MIC2_SHRT_EINT 0x0010 /* IM_MIC2_SHRT_EINT */ | ||
| 4236 | #define WM8994_IM_MIC2_SHRT_EINT_MASK 0x0010 /* IM_MIC2_SHRT_EINT */ | ||
| 4237 | #define WM8994_IM_MIC2_SHRT_EINT_SHIFT 4 /* IM_MIC2_SHRT_EINT */ | ||
| 4238 | #define WM8994_IM_MIC2_SHRT_EINT_WIDTH 1 /* IM_MIC2_SHRT_EINT */ | ||
| 4239 | #define WM8994_IM_MIC2_DET_EINT 0x0008 /* IM_MIC2_DET_EINT */ | ||
| 4240 | #define WM8994_IM_MIC2_DET_EINT_MASK 0x0008 /* IM_MIC2_DET_EINT */ | ||
| 4241 | #define WM8994_IM_MIC2_DET_EINT_SHIFT 3 /* IM_MIC2_DET_EINT */ | ||
| 4242 | #define WM8994_IM_MIC2_DET_EINT_WIDTH 1 /* IM_MIC2_DET_EINT */ | ||
| 4243 | #define WM8994_IM_MIC1_SHRT_EINT 0x0004 /* IM_MIC1_SHRT_EINT */ | ||
| 4244 | #define WM8994_IM_MIC1_SHRT_EINT_MASK 0x0004 /* IM_MIC1_SHRT_EINT */ | ||
| 4245 | #define WM8994_IM_MIC1_SHRT_EINT_SHIFT 2 /* IM_MIC1_SHRT_EINT */ | ||
| 4246 | #define WM8994_IM_MIC1_SHRT_EINT_WIDTH 1 /* IM_MIC1_SHRT_EINT */ | ||
| 4247 | #define WM8994_IM_MIC1_DET_EINT 0x0002 /* IM_MIC1_DET_EINT */ | ||
| 4248 | #define WM8994_IM_MIC1_DET_EINT_MASK 0x0002 /* IM_MIC1_DET_EINT */ | ||
| 4249 | #define WM8994_IM_MIC1_DET_EINT_SHIFT 1 /* IM_MIC1_DET_EINT */ | ||
| 4250 | #define WM8994_IM_MIC1_DET_EINT_WIDTH 1 /* IM_MIC1_DET_EINT */ | ||
| 4251 | #define WM8994_IM_TEMP_SHUT_EINT 0x0001 /* IM_TEMP_SHUT_EINT */ | ||
| 4252 | #define WM8994_IM_TEMP_SHUT_EINT_MASK 0x0001 /* IM_TEMP_SHUT_EINT */ | ||
| 4253 | #define WM8994_IM_TEMP_SHUT_EINT_SHIFT 0 /* IM_TEMP_SHUT_EINT */ | ||
| 4254 | #define WM8994_IM_TEMP_SHUT_EINT_WIDTH 1 /* IM_TEMP_SHUT_EINT */ | ||
| 4255 | |||
| 4256 | /* | ||
| 4257 | * R1856 (0x740) - Interrupt Control | ||
| 4258 | */ | ||
| 4259 | #define WM8994_IM_IRQ 0x0001 /* IM_IRQ */ | ||
| 4260 | #define WM8994_IM_IRQ_MASK 0x0001 /* IM_IRQ */ | ||
| 4261 | #define WM8994_IM_IRQ_SHIFT 0 /* IM_IRQ */ | ||
| 4262 | #define WM8994_IM_IRQ_WIDTH 1 /* IM_IRQ */ | ||
| 4263 | |||
| 4264 | /* | ||
| 4265 | * R1864 (0x748) - IRQ Debounce | ||
| 4266 | */ | ||
| 4267 | #define WM8994_TEMP_WARN_DB 0x0020 /* TEMP_WARN_DB */ | ||
| 4268 | #define WM8994_TEMP_WARN_DB_MASK 0x0020 /* TEMP_WARN_DB */ | ||
| 4269 | #define WM8994_TEMP_WARN_DB_SHIFT 5 /* TEMP_WARN_DB */ | ||
| 4270 | #define WM8994_TEMP_WARN_DB_WIDTH 1 /* TEMP_WARN_DB */ | ||
| 4271 | #define WM8994_MIC2_SHRT_DB 0x0010 /* MIC2_SHRT_DB */ | ||
| 4272 | #define WM8994_MIC2_SHRT_DB_MASK 0x0010 /* MIC2_SHRT_DB */ | ||
| 4273 | #define WM8994_MIC2_SHRT_DB_SHIFT 4 /* MIC2_SHRT_DB */ | ||
| 4274 | #define WM8994_MIC2_SHRT_DB_WIDTH 1 /* MIC2_SHRT_DB */ | ||
| 4275 | #define WM8994_MIC2_DET_DB 0x0008 /* MIC2_DET_DB */ | ||
| 4276 | #define WM8994_MIC2_DET_DB_MASK 0x0008 /* MIC2_DET_DB */ | ||
| 4277 | #define WM8994_MIC2_DET_DB_SHIFT 3 /* MIC2_DET_DB */ | ||
| 4278 | #define WM8994_MIC2_DET_DB_WIDTH 1 /* MIC2_DET_DB */ | ||
| 4279 | #define WM8994_MIC1_SHRT_DB 0x0004 /* MIC1_SHRT_DB */ | ||
| 4280 | #define WM8994_MIC1_SHRT_DB_MASK 0x0004 /* MIC1_SHRT_DB */ | ||
| 4281 | #define WM8994_MIC1_SHRT_DB_SHIFT 2 /* MIC1_SHRT_DB */ | ||
| 4282 | #define WM8994_MIC1_SHRT_DB_WIDTH 1 /* MIC1_SHRT_DB */ | ||
| 4283 | #define WM8994_MIC1_DET_DB 0x0002 /* MIC1_DET_DB */ | ||
| 4284 | #define WM8994_MIC1_DET_DB_MASK 0x0002 /* MIC1_DET_DB */ | ||
| 4285 | #define WM8994_MIC1_DET_DB_SHIFT 1 /* MIC1_DET_DB */ | ||
| 4286 | #define WM8994_MIC1_DET_DB_WIDTH 1 /* MIC1_DET_DB */ | ||
| 4287 | #define WM8994_TEMP_SHUT_DB 0x0001 /* TEMP_SHUT_DB */ | ||
| 4288 | #define WM8994_TEMP_SHUT_DB_MASK 0x0001 /* TEMP_SHUT_DB */ | ||
| 4289 | #define WM8994_TEMP_SHUT_DB_SHIFT 0 /* TEMP_SHUT_DB */ | ||
| 4290 | #define WM8994_TEMP_SHUT_DB_WIDTH 1 /* TEMP_SHUT_DB */ | ||
| 4291 | |||
| 4292 | #endif | ||
diff --git a/include/linux/mm.h b/include/linux/mm.h index 8b2fa8593c61..e70f21beb4b4 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #include <linux/prio_tree.h> | 12 | #include <linux/prio_tree.h> |
| 13 | #include <linux/debug_locks.h> | 13 | #include <linux/debug_locks.h> |
| 14 | #include <linux/mm_types.h> | 14 | #include <linux/mm_types.h> |
| 15 | #include <linux/range.h> | ||
| 15 | 16 | ||
| 16 | struct mempolicy; | 17 | struct mempolicy; |
| 17 | struct anon_vma; | 18 | struct anon_vma; |
| @@ -869,6 +870,114 @@ extern int mprotect_fixup(struct vm_area_struct *vma, | |||
| 869 | */ | 870 | */ |
| 870 | int __get_user_pages_fast(unsigned long start, int nr_pages, int write, | 871 | int __get_user_pages_fast(unsigned long start, int nr_pages, int write, |
| 871 | struct page **pages); | 872 | struct page **pages); |
| 873 | /* | ||
| 874 | * per-process(per-mm_struct) statistics. | ||
| 875 | */ | ||
| 876 | #if defined(SPLIT_RSS_COUNTING) | ||
| 877 | /* | ||
| 878 | * The mm counters are not protected by its page_table_lock, | ||
| 879 | * so must be incremented atomically. | ||
| 880 | */ | ||
| 881 | static inline void set_mm_counter(struct mm_struct *mm, int member, long value) | ||
| 882 | { | ||
| 883 | atomic_long_set(&mm->rss_stat.count[member], value); | ||
| 884 | } | ||
| 885 | |||
| 886 | unsigned long get_mm_counter(struct mm_struct *mm, int member); | ||
| 887 | |||
| 888 | static inline void add_mm_counter(struct mm_struct *mm, int member, long value) | ||
| 889 | { | ||
| 890 | atomic_long_add(value, &mm->rss_stat.count[member]); | ||
| 891 | } | ||
| 892 | |||
| 893 | static inline void inc_mm_counter(struct mm_struct *mm, int member) | ||
| 894 | { | ||
| 895 | atomic_long_inc(&mm->rss_stat.count[member]); | ||
| 896 | } | ||
| 897 | |||
| 898 | static inline void dec_mm_counter(struct mm_struct *mm, int member) | ||
| 899 | { | ||
| 900 | atomic_long_dec(&mm->rss_stat.count[member]); | ||
| 901 | } | ||
| 902 | |||
| 903 | #else /* !USE_SPLIT_PTLOCKS */ | ||
| 904 | /* | ||
| 905 | * The mm counters are protected by its page_table_lock, | ||
| 906 | * so can be incremented directly. | ||
| 907 | */ | ||
| 908 | static inline void set_mm_counter(struct mm_struct *mm, int member, long value) | ||
| 909 | { | ||
| 910 | mm->rss_stat.count[member] = value; | ||
| 911 | } | ||
| 912 | |||
| 913 | static inline unsigned long get_mm_counter(struct mm_struct *mm, int member) | ||
| 914 | { | ||
| 915 | return mm->rss_stat.count[member]; | ||
| 916 | } | ||
| 917 | |||
| 918 | static inline void add_mm_counter(struct mm_struct *mm, int member, long value) | ||
| 919 | { | ||
| 920 | mm->rss_stat.count[member] += value; | ||
| 921 | } | ||
| 922 | |||
| 923 | static inline void inc_mm_counter(struct mm_struct *mm, int member) | ||
| 924 | { | ||
| 925 | mm->rss_stat.count[member]++; | ||
| 926 | } | ||
| 927 | |||
| 928 | static inline void dec_mm_counter(struct mm_struct *mm, int member) | ||
| 929 | { | ||
| 930 | mm->rss_stat.count[member]--; | ||
| 931 | } | ||
| 932 | |||
| 933 | #endif /* !USE_SPLIT_PTLOCKS */ | ||
| 934 | |||
| 935 | static inline unsigned long get_mm_rss(struct mm_struct *mm) | ||
| 936 | { | ||
| 937 | return get_mm_counter(mm, MM_FILEPAGES) + | ||
| 938 | get_mm_counter(mm, MM_ANONPAGES); | ||
| 939 | } | ||
| 940 | |||
| 941 | static inline unsigned long get_mm_hiwater_rss(struct mm_struct *mm) | ||
| 942 | { | ||
| 943 | return max(mm->hiwater_rss, get_mm_rss(mm)); | ||
| 944 | } | ||
| 945 | |||
| 946 | static inline unsigned long get_mm_hiwater_vm(struct mm_struct *mm) | ||
| 947 | { | ||
| 948 | return max(mm->hiwater_vm, mm->total_vm); | ||
| 949 | } | ||
| 950 | |||
| 951 | static inline void update_hiwater_rss(struct mm_struct *mm) | ||
| 952 | { | ||
| 953 | unsigned long _rss = get_mm_rss(mm); | ||
| 954 | |||
| 955 | if ((mm)->hiwater_rss < _rss) | ||
| 956 | (mm)->hiwater_rss = _rss; | ||
| 957 | } | ||
| 958 | |||
| 959 | static inline void update_hiwater_vm(struct mm_struct *mm) | ||
| 960 | { | ||
| 961 | if (mm->hiwater_vm < mm->total_vm) | ||
| 962 | mm->hiwater_vm = mm->total_vm; | ||
| 963 | } | ||
| 964 | |||
| 965 | static inline void setmax_mm_hiwater_rss(unsigned long *maxrss, | ||
| 966 | struct mm_struct *mm) | ||
| 967 | { | ||
| 968 | unsigned long hiwater_rss = get_mm_hiwater_rss(mm); | ||
| 969 | |||
| 970 | if (*maxrss < hiwater_rss) | ||
| 971 | *maxrss = hiwater_rss; | ||
| 972 | } | ||
| 973 | |||
| 974 | #if defined(SPLIT_RSS_COUNTING) | ||
| 975 | void sync_mm_rss(struct task_struct *task, struct mm_struct *mm); | ||
| 976 | #else | ||
| 977 | static inline void sync_mm_rss(struct task_struct *task, struct mm_struct *mm) | ||
| 978 | { | ||
| 979 | } | ||
| 980 | #endif | ||
| 872 | 981 | ||
| 873 | /* | 982 | /* |
| 874 | * A callback you can register to apply pressure to ageable caches. | 983 | * A callback you can register to apply pressure to ageable caches. |
| @@ -1049,6 +1158,10 @@ extern void get_pfn_range_for_nid(unsigned int nid, | |||
| 1049 | extern unsigned long find_min_pfn_with_active_regions(void); | 1158 | extern unsigned long find_min_pfn_with_active_regions(void); |
| 1050 | extern void free_bootmem_with_active_regions(int nid, | 1159 | extern void free_bootmem_with_active_regions(int nid, |
| 1051 | unsigned long max_low_pfn); | 1160 | unsigned long max_low_pfn); |
| 1161 | int add_from_early_node_map(struct range *range, int az, | ||
| 1162 | int nr_range, int nid); | ||
| 1163 | void *__alloc_memory_core_early(int nodeid, u64 size, u64 align, | ||
| 1164 | u64 goal, u64 limit); | ||
| 1052 | typedef int (*work_fn_t)(unsigned long, unsigned long, void *); | 1165 | typedef int (*work_fn_t)(unsigned long, unsigned long, void *); |
| 1053 | extern void work_with_active_regions(int nid, work_fn_t work_fn, void *data); | 1166 | extern void work_with_active_regions(int nid, work_fn_t work_fn, void *data); |
| 1054 | extern void sparse_memory_present_with_active_regions(int nid); | 1167 | extern void sparse_memory_present_with_active_regions(int nid); |
| @@ -1081,11 +1194,7 @@ extern void si_meminfo(struct sysinfo * val); | |||
| 1081 | extern void si_meminfo_node(struct sysinfo *val, int nid); | 1194 | extern void si_meminfo_node(struct sysinfo *val, int nid); |
| 1082 | extern int after_bootmem; | 1195 | extern int after_bootmem; |
| 1083 | 1196 | ||
| 1084 | #ifdef CONFIG_NUMA | ||
| 1085 | extern void setup_per_cpu_pageset(void); | 1197 | extern void setup_per_cpu_pageset(void); |
| 1086 | #else | ||
| 1087 | static inline void setup_per_cpu_pageset(void) {} | ||
| 1088 | #endif | ||
| 1089 | 1198 | ||
| 1090 | extern void zone_pcp_update(struct zone *zone); | 1199 | extern void zone_pcp_update(struct zone *zone); |
| 1091 | 1200 | ||
| @@ -1113,7 +1222,7 @@ static inline void vma_nonlinear_insert(struct vm_area_struct *vma, | |||
| 1113 | 1222 | ||
| 1114 | /* mmap.c */ | 1223 | /* mmap.c */ |
| 1115 | extern int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin); | 1224 | extern int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin); |
| 1116 | extern void vma_adjust(struct vm_area_struct *vma, unsigned long start, | 1225 | extern int vma_adjust(struct vm_area_struct *vma, unsigned long start, |
| 1117 | unsigned long end, pgoff_t pgoff, struct vm_area_struct *insert); | 1226 | unsigned long end, pgoff_t pgoff, struct vm_area_struct *insert); |
| 1118 | extern struct vm_area_struct *vma_merge(struct mm_struct *, | 1227 | extern struct vm_area_struct *vma_merge(struct mm_struct *, |
| 1119 | struct vm_area_struct *prev, unsigned long addr, unsigned long end, | 1228 | struct vm_area_struct *prev, unsigned long addr, unsigned long end, |
| @@ -1321,12 +1430,19 @@ extern int randomize_va_space; | |||
| 1321 | const char * arch_vma_name(struct vm_area_struct *vma); | 1430 | const char * arch_vma_name(struct vm_area_struct *vma); |
| 1322 | void print_vma_addr(char *prefix, unsigned long rip); | 1431 | void print_vma_addr(char *prefix, unsigned long rip); |
| 1323 | 1432 | ||
| 1433 | void sparse_mem_maps_populate_node(struct page **map_map, | ||
| 1434 | unsigned long pnum_begin, | ||
| 1435 | unsigned long pnum_end, | ||
| 1436 | unsigned long map_count, | ||
| 1437 | int nodeid); | ||
| 1438 | |||
| 1324 | struct page *sparse_mem_map_populate(unsigned long pnum, int nid); | 1439 | struct page *sparse_mem_map_populate(unsigned long pnum, int nid); |
| 1325 | pgd_t *vmemmap_pgd_populate(unsigned long addr, int node); | 1440 | pgd_t *vmemmap_pgd_populate(unsigned long addr, int node); |
| 1326 | pud_t *vmemmap_pud_populate(pgd_t *pgd, unsigned long addr, int node); | 1441 | pud_t *vmemmap_pud_populate(pgd_t *pgd, unsigned long addr, int node); |
| 1327 | pmd_t *vmemmap_pmd_populate(pud_t *pud, unsigned long addr, int node); | 1442 | pmd_t *vmemmap_pmd_populate(pud_t *pud, unsigned long addr, int node); |
| 1328 | pte_t *vmemmap_pte_populate(pmd_t *pmd, unsigned long addr, int node); | 1443 | pte_t *vmemmap_pte_populate(pmd_t *pmd, unsigned long addr, int node); |
| 1329 | void *vmemmap_alloc_block(unsigned long size, int node); | 1444 | void *vmemmap_alloc_block(unsigned long size, int node); |
| 1445 | void *vmemmap_alloc_block_buf(unsigned long size, int node); | ||
| 1330 | void vmemmap_verify(pte_t *, int, unsigned long, unsigned long); | 1446 | void vmemmap_verify(pte_t *, int, unsigned long, unsigned long); |
| 1331 | int vmemmap_populate_basepages(struct page *start_page, | 1447 | int vmemmap_populate_basepages(struct page *start_page, |
| 1332 | unsigned long pages, int node); | 1448 | unsigned long pages, int node); |
| @@ -1349,5 +1465,7 @@ extern void shake_page(struct page *p, int access); | |||
| 1349 | extern atomic_long_t mce_bad_pages; | 1465 | extern atomic_long_t mce_bad_pages; |
| 1350 | extern int soft_offline_page(struct page *page, int flags); | 1466 | extern int soft_offline_page(struct page *page, int flags); |
| 1351 | 1467 | ||
| 1468 | extern void dump_page(struct page *page); | ||
| 1469 | |||
| 1352 | #endif /* __KERNEL__ */ | 1470 | #endif /* __KERNEL__ */ |
| 1353 | #endif /* _LINUX_MM_H */ | 1471 | #endif /* _LINUX_MM_H */ |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 36f96271306c..b8bb9a6a1f37 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
| @@ -24,12 +24,6 @@ struct address_space; | |||
| 24 | 24 | ||
| 25 | #define USE_SPLIT_PTLOCKS (NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS) | 25 | #define USE_SPLIT_PTLOCKS (NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS) |
| 26 | 26 | ||
| 27 | #if USE_SPLIT_PTLOCKS | ||
| 28 | typedef atomic_long_t mm_counter_t; | ||
| 29 | #else /* !USE_SPLIT_PTLOCKS */ | ||
| 30 | typedef unsigned long mm_counter_t; | ||
| 31 | #endif /* !USE_SPLIT_PTLOCKS */ | ||
| 32 | |||
| 33 | /* | 27 | /* |
| 34 | * Each physical page in the system has a struct page associated with | 28 | * Each physical page in the system has a struct page associated with |
| 35 | * it to keep track of whatever it is we are using the page for at the | 29 | * it to keep track of whatever it is we are using the page for at the |
| @@ -169,7 +163,8 @@ struct vm_area_struct { | |||
| 169 | * can only be in the i_mmap tree. An anonymous MAP_PRIVATE, stack | 163 | * can only be in the i_mmap tree. An anonymous MAP_PRIVATE, stack |
| 170 | * or brk vma (with NULL file) can only be in an anon_vma list. | 164 | * or brk vma (with NULL file) can only be in an anon_vma list. |
| 171 | */ | 165 | */ |
| 172 | struct list_head anon_vma_node; /* Serialized by anon_vma->lock */ | 166 | struct list_head anon_vma_chain; /* Serialized by mmap_sem & |
| 167 | * page_table_lock */ | ||
| 173 | struct anon_vma *anon_vma; /* Serialized by page_table_lock */ | 168 | struct anon_vma *anon_vma; /* Serialized by page_table_lock */ |
| 174 | 169 | ||
| 175 | /* Function pointers to deal with this struct. */ | 170 | /* Function pointers to deal with this struct. */ |
| @@ -201,6 +196,29 @@ struct core_state { | |||
| 201 | struct completion startup; | 196 | struct completion startup; |
| 202 | }; | 197 | }; |
| 203 | 198 | ||
| 199 | enum { | ||
| 200 | MM_FILEPAGES, | ||
| 201 | MM_ANONPAGES, | ||
| 202 | MM_SWAPENTS, | ||
| 203 | NR_MM_COUNTERS | ||
| 204 | }; | ||
| 205 | |||
| 206 | #if USE_SPLIT_PTLOCKS && defined(CONFIG_MMU) | ||
| 207 | #define SPLIT_RSS_COUNTING | ||
| 208 | struct mm_rss_stat { | ||
| 209 | atomic_long_t count[NR_MM_COUNTERS]; | ||
| 210 | }; | ||
| 211 | /* per-thread cached information, */ | ||
| 212 | struct task_rss_stat { | ||
| 213 | int events; /* for synchronization threshold */ | ||
| 214 | int count[NR_MM_COUNTERS]; | ||
| 215 | }; | ||
| 216 | #else /* !USE_SPLIT_PTLOCKS */ | ||
| 217 | struct mm_rss_stat { | ||
| 218 | unsigned long count[NR_MM_COUNTERS]; | ||
| 219 | }; | ||
| 220 | #endif /* !USE_SPLIT_PTLOCKS */ | ||
| 221 | |||
| 204 | struct mm_struct { | 222 | struct mm_struct { |
| 205 | struct vm_area_struct * mmap; /* list of VMAs */ | 223 | struct vm_area_struct * mmap; /* list of VMAs */ |
| 206 | struct rb_root mm_rb; | 224 | struct rb_root mm_rb; |
| @@ -227,11 +245,6 @@ struct mm_struct { | |||
| 227 | * by mmlist_lock | 245 | * by mmlist_lock |
| 228 | */ | 246 | */ |
| 229 | 247 | ||
| 230 | /* Special counters, in some configurations protected by the | ||
| 231 | * page_table_lock, in other configurations by being atomic. | ||
| 232 | */ | ||
| 233 | mm_counter_t _file_rss; | ||
| 234 | mm_counter_t _anon_rss; | ||
| 235 | 248 | ||
| 236 | unsigned long hiwater_rss; /* High-watermark of RSS usage */ | 249 | unsigned long hiwater_rss; /* High-watermark of RSS usage */ |
| 237 | unsigned long hiwater_vm; /* High-water virtual memory usage */ | 250 | unsigned long hiwater_vm; /* High-water virtual memory usage */ |
| @@ -244,6 +257,12 @@ struct mm_struct { | |||
| 244 | 257 | ||
| 245 | unsigned long saved_auxv[AT_VECTOR_SIZE]; /* for /proc/PID/auxv */ | 258 | unsigned long saved_auxv[AT_VECTOR_SIZE]; /* for /proc/PID/auxv */ |
| 246 | 259 | ||
| 260 | /* | ||
| 261 | * Special counters, in some configurations protected by the | ||
| 262 | * page_table_lock, in other configurations by being atomic. | ||
| 263 | */ | ||
| 264 | struct mm_rss_stat rss_stat; | ||
| 265 | |||
| 247 | struct linux_binfmt *binfmt; | 266 | struct linux_binfmt *binfmt; |
| 248 | 267 | ||
| 249 | cpumask_t cpu_vm_mask; | 268 | cpumask_t cpu_vm_mask; |
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index 2ee22e8af110..d02d2c6e0cfe 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h | |||
| @@ -99,6 +99,8 @@ struct mmc_card { | |||
| 99 | #define MMC_STATE_BLOCKADDR (1<<3) /* card uses block-addressing */ | 99 | #define MMC_STATE_BLOCKADDR (1<<3) /* card uses block-addressing */ |
| 100 | unsigned int quirks; /* card quirks */ | 100 | unsigned int quirks; /* card quirks */ |
| 101 | #define MMC_QUIRK_LENIENT_FN0 (1<<0) /* allow SDIO FN0 writes outside of the VS CCCR range */ | 101 | #define MMC_QUIRK_LENIENT_FN0 (1<<0) /* allow SDIO FN0 writes outside of the VS CCCR range */ |
| 102 | #define MMC_QUIRK_BLKSZ_FOR_BYTE_MODE (1<<1) /* use func->cur_blksize */ | ||
| 103 | /* for byte mode */ | ||
| 102 | 104 | ||
| 103 | u32 raw_cid[4]; /* raw card CID */ | 105 | u32 raw_cid[4]; /* raw card CID */ |
| 104 | u32 raw_csd[4]; /* raw card CSD */ | 106 | u32 raw_csd[4]; /* raw card CSD */ |
| @@ -139,6 +141,11 @@ static inline int mmc_card_lenient_fn0(const struct mmc_card *c) | |||
| 139 | return c->quirks & MMC_QUIRK_LENIENT_FN0; | 141 | return c->quirks & MMC_QUIRK_LENIENT_FN0; |
| 140 | } | 142 | } |
| 141 | 143 | ||
| 144 | static inline int mmc_blksz_for_byte_mode(const struct mmc_card *c) | ||
| 145 | { | ||
| 146 | return c->quirks & MMC_QUIRK_BLKSZ_FOR_BYTE_MODE; | ||
| 147 | } | ||
| 148 | |||
| 142 | #define mmc_card_name(c) ((c)->cid.prod_name) | 149 | #define mmc_card_name(c) ((c)->cid.prod_name) |
| 143 | #define mmc_card_id(c) (dev_name(&(c)->dev)) | 150 | #define mmc_card_id(c) (dev_name(&(c)->dev)) |
| 144 | 151 | ||
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index eaf36364b7d4..43eaf5ca5848 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
| 15 | 15 | ||
| 16 | #include <linux/mmc/core.h> | 16 | #include <linux/mmc/core.h> |
| 17 | #include <linux/mmc/pm.h> | ||
| 17 | 18 | ||
| 18 | struct mmc_ios { | 19 | struct mmc_ios { |
| 19 | unsigned int clock; /* clock rate */ | 20 | unsigned int clock; /* clock rate */ |
| @@ -152,6 +153,8 @@ struct mmc_host { | |||
| 152 | #define MMC_CAP_NONREMOVABLE (1 << 8) /* Nonremovable e.g. eMMC */ | 153 | #define MMC_CAP_NONREMOVABLE (1 << 8) /* Nonremovable e.g. eMMC */ |
| 153 | #define MMC_CAP_WAIT_WHILE_BUSY (1 << 9) /* Waits while card is busy */ | 154 | #define MMC_CAP_WAIT_WHILE_BUSY (1 << 9) /* Waits while card is busy */ |
| 154 | 155 | ||
| 156 | mmc_pm_flag_t pm_caps; /* supported pm features */ | ||
| 157 | |||
| 155 | /* host specific block data */ | 158 | /* host specific block data */ |
| 156 | unsigned int max_seg_size; /* see blk_queue_max_segment_size */ | 159 | unsigned int max_seg_size; /* see blk_queue_max_segment_size */ |
| 157 | unsigned short max_hw_segs; /* see blk_queue_max_hw_segments */ | 160 | unsigned short max_hw_segs; /* see blk_queue_max_hw_segments */ |
| @@ -197,6 +200,8 @@ struct mmc_host { | |||
| 197 | struct task_struct *sdio_irq_thread; | 200 | struct task_struct *sdio_irq_thread; |
| 198 | atomic_t sdio_irq_thread_abort; | 201 | atomic_t sdio_irq_thread_abort; |
| 199 | 202 | ||
| 203 | mmc_pm_flag_t pm_flags; /* requested pm features */ | ||
| 204 | |||
| 200 | #ifdef CONFIG_LEDS_TRIGGERS | 205 | #ifdef CONFIG_LEDS_TRIGGERS |
| 201 | struct led_trigger *led; /* activity led */ | 206 | struct led_trigger *led; /* activity led */ |
| 202 | #endif | 207 | #endif |
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index c02c8db73701..8a49cbf0376d 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
| @@ -268,6 +268,7 @@ struct _mmc_csd { | |||
| 268 | 268 | ||
| 269 | #define EXT_CSD_CARD_TYPE_26 (1<<0) /* Card can run at 26MHz */ | 269 | #define EXT_CSD_CARD_TYPE_26 (1<<0) /* Card can run at 26MHz */ |
| 270 | #define EXT_CSD_CARD_TYPE_52 (1<<1) /* Card can run at 52MHz */ | 270 | #define EXT_CSD_CARD_TYPE_52 (1<<1) /* Card can run at 52MHz */ |
| 271 | #define EXT_CSD_CARD_TYPE_MASK 0x3 /* Mask out reserved and DDR bits */ | ||
| 271 | 272 | ||
| 272 | #define EXT_CSD_BUS_WIDTH_1 0 /* Card is in 1 bit mode */ | 273 | #define EXT_CSD_BUS_WIDTH_1 0 /* Card is in 1 bit mode */ |
| 273 | #define EXT_CSD_BUS_WIDTH_4 1 /* Card is in 4 bit mode */ | 274 | #define EXT_CSD_BUS_WIDTH_4 1 /* Card is in 4 bit mode */ |
diff --git a/include/linux/mmc/pm.h b/include/linux/mmc/pm.h new file mode 100644 index 000000000000..d37aac49cf9a --- /dev/null +++ b/include/linux/mmc/pm.h | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | /* | ||
| 2 | * linux/include/linux/mmc/pm.h | ||
| 3 | * | ||
| 4 | * Author: Nicolas Pitre | ||
| 5 | * Copyright: (C) 2009 Marvell Technology Group Ltd. | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License version 2 as | ||
| 9 | * published by the Free Software Foundation. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef LINUX_MMC_PM_H | ||
| 13 | #define LINUX_MMC_PM_H | ||
| 14 | |||
| 15 | /* | ||
| 16 | * These flags are used to describe power management features that | ||
| 17 | * some cards (typically SDIO cards) might wish to benefit from when | ||
| 18 | * the host system is being suspended. There are several layers of | ||
| 19 | * abstractions involved, from the host controller driver, to the MMC core | ||
| 20 | * code, to the SDIO core code, to finally get to the actual SDIO function | ||
| 21 | * driver. This file is therefore used for common definitions shared across | ||
| 22 | * all those layers. | ||
| 23 | */ | ||
| 24 | |||
| 25 | typedef unsigned int mmc_pm_flag_t; | ||
| 26 | |||
| 27 | #define MMC_PM_KEEP_POWER (1 << 0) /* preserve card power during suspend */ | ||
| 28 | #define MMC_PM_WAKE_SDIO_IRQ (1 << 1) /* wake up host system on SDIO IRQ assertion */ | ||
| 29 | |||
| 30 | #endif | ||
diff --git a/include/linux/mmc/sdio.h b/include/linux/mmc/sdio.h index 47ba464f5170..0ebaef577ff5 100644 --- a/include/linux/mmc/sdio.h +++ b/include/linux/mmc/sdio.h | |||
| @@ -95,6 +95,8 @@ | |||
| 95 | #define SDIO_BUS_WIDTH_1BIT 0x00 | 95 | #define SDIO_BUS_WIDTH_1BIT 0x00 |
| 96 | #define SDIO_BUS_WIDTH_4BIT 0x02 | 96 | #define SDIO_BUS_WIDTH_4BIT 0x02 |
| 97 | 97 | ||
| 98 | #define SDIO_BUS_ASYNC_INT 0x20 | ||
| 99 | |||
| 98 | #define SDIO_BUS_CD_DISABLE 0x80 /* disable pull-up on DAT3 (pin 1) */ | 100 | #define SDIO_BUS_CD_DISABLE 0x80 /* disable pull-up on DAT3 (pin 1) */ |
| 99 | 101 | ||
| 100 | #define SDIO_CCCR_CAPS 0x08 | 102 | #define SDIO_CCCR_CAPS 0x08 |
diff --git a/include/linux/mmc/sdio_func.h b/include/linux/mmc/sdio_func.h index ac3ab683fec6..c6c0cceba5fe 100644 --- a/include/linux/mmc/sdio_func.h +++ b/include/linux/mmc/sdio_func.h | |||
| @@ -15,6 +15,8 @@ | |||
| 15 | #include <linux/device.h> | 15 | #include <linux/device.h> |
| 16 | #include <linux/mod_devicetable.h> | 16 | #include <linux/mod_devicetable.h> |
| 17 | 17 | ||
| 18 | #include <linux/mmc/pm.h> | ||
| 19 | |||
| 18 | struct mmc_card; | 20 | struct mmc_card; |
| 19 | struct sdio_func; | 21 | struct sdio_func; |
| 20 | 22 | ||
| @@ -153,5 +155,8 @@ extern unsigned char sdio_f0_readb(struct sdio_func *func, | |||
| 153 | extern void sdio_f0_writeb(struct sdio_func *func, unsigned char b, | 155 | extern void sdio_f0_writeb(struct sdio_func *func, unsigned char b, |
| 154 | unsigned int addr, int *err_ret); | 156 | unsigned int addr, int *err_ret); |
| 155 | 157 | ||
| 158 | extern mmc_pm_flag_t sdio_get_host_pm_caps(struct sdio_func *func); | ||
| 159 | extern int sdio_set_host_pm_flags(struct sdio_func *func, mmc_pm_flag_t flags); | ||
| 160 | |||
| 156 | #endif | 161 | #endif |
| 157 | 162 | ||
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 30fe668c2542..cf9e458e96b0 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
| @@ -184,13 +184,7 @@ struct per_cpu_pageset { | |||
| 184 | s8 stat_threshold; | 184 | s8 stat_threshold; |
| 185 | s8 vm_stat_diff[NR_VM_ZONE_STAT_ITEMS]; | 185 | s8 vm_stat_diff[NR_VM_ZONE_STAT_ITEMS]; |
| 186 | #endif | 186 | #endif |
| 187 | } ____cacheline_aligned_in_smp; | 187 | }; |
| 188 | |||
| 189 | #ifdef CONFIG_NUMA | ||
| 190 | #define zone_pcp(__z, __cpu) ((__z)->pageset[(__cpu)]) | ||
| 191 | #else | ||
| 192 | #define zone_pcp(__z, __cpu) (&(__z)->pageset[(__cpu)]) | ||
| 193 | #endif | ||
| 194 | 188 | ||
| 195 | #endif /* !__GENERATING_BOUNDS.H */ | 189 | #endif /* !__GENERATING_BOUNDS.H */ |
| 196 | 190 | ||
| @@ -306,14 +300,13 @@ struct zone { | |||
| 306 | */ | 300 | */ |
| 307 | unsigned long min_unmapped_pages; | 301 | unsigned long min_unmapped_pages; |
| 308 | unsigned long min_slab_pages; | 302 | unsigned long min_slab_pages; |
| 309 | struct per_cpu_pageset *pageset[NR_CPUS]; | ||
| 310 | #else | ||
| 311 | struct per_cpu_pageset pageset[NR_CPUS]; | ||
| 312 | #endif | 303 | #endif |
| 304 | struct per_cpu_pageset __percpu *pageset; | ||
| 313 | /* | 305 | /* |
| 314 | * free areas of different sizes | 306 | * free areas of different sizes |
| 315 | */ | 307 | */ |
| 316 | spinlock_t lock; | 308 | spinlock_t lock; |
| 309 | int all_unreclaimable; /* All pages pinned */ | ||
| 317 | #ifdef CONFIG_MEMORY_HOTPLUG | 310 | #ifdef CONFIG_MEMORY_HOTPLUG |
| 318 | /* see spanned/present_pages for more description */ | 311 | /* see spanned/present_pages for more description */ |
| 319 | seqlock_t span_seqlock; | 312 | seqlock_t span_seqlock; |
| @@ -349,7 +342,7 @@ struct zone { | |||
| 349 | * prev_priority holds the scanning priority for this zone. It is | 342 | * prev_priority holds the scanning priority for this zone. It is |
| 350 | * defined as the scanning priority at which we achieved our reclaim | 343 | * defined as the scanning priority at which we achieved our reclaim |
| 351 | * target at the previous try_to_free_pages() or balance_pgdat() | 344 | * target at the previous try_to_free_pages() or balance_pgdat() |
| 352 | * invokation. | 345 | * invocation. |
| 353 | * | 346 | * |
| 354 | * We use prev_priority as a measure of how much stress page reclaim is | 347 | * We use prev_priority as a measure of how much stress page reclaim is |
| 355 | * under - it drives the swappiness decision: whether to unmap mapped | 348 | * under - it drives the swappiness decision: whether to unmap mapped |
| @@ -425,7 +418,6 @@ struct zone { | |||
| 425 | } ____cacheline_internodealigned_in_smp; | 418 | } ____cacheline_internodealigned_in_smp; |
| 426 | 419 | ||
| 427 | typedef enum { | 420 | typedef enum { |
| 428 | ZONE_ALL_UNRECLAIMABLE, /* all pages pinned */ | ||
| 429 | ZONE_RECLAIM_LOCKED, /* prevents concurrent reclaim */ | 421 | ZONE_RECLAIM_LOCKED, /* prevents concurrent reclaim */ |
| 430 | ZONE_OOM_LOCKED, /* zone is in OOM killer zonelist */ | 422 | ZONE_OOM_LOCKED, /* zone is in OOM killer zonelist */ |
| 431 | } zone_flags_t; | 423 | } zone_flags_t; |
| @@ -445,11 +437,6 @@ static inline void zone_clear_flag(struct zone *zone, zone_flags_t flag) | |||
| 445 | clear_bit(flag, &zone->flags); | 437 | clear_bit(flag, &zone->flags); |
| 446 | } | 438 | } |
| 447 | 439 | ||
| 448 | static inline int zone_is_all_unreclaimable(const struct zone *zone) | ||
| 449 | { | ||
| 450 | return test_bit(ZONE_ALL_UNRECLAIMABLE, &zone->flags); | ||
| 451 | } | ||
| 452 | |||
| 453 | static inline int zone_is_reclaim_locked(const struct zone *zone) | 440 | static inline int zone_is_reclaim_locked(const struct zone *zone) |
| 454 | { | 441 | { |
| 455 | return test_bit(ZONE_RECLAIM_LOCKED, &zone->flags); | 442 | return test_bit(ZONE_RECLAIM_LOCKED, &zone->flags); |
| @@ -620,7 +607,9 @@ typedef struct pglist_data { | |||
| 620 | struct page_cgroup *node_page_cgroup; | 607 | struct page_cgroup *node_page_cgroup; |
| 621 | #endif | 608 | #endif |
| 622 | #endif | 609 | #endif |
| 610 | #ifndef CONFIG_NO_BOOTMEM | ||
| 623 | struct bootmem_data *bdata; | 611 | struct bootmem_data *bdata; |
| 612 | #endif | ||
| 624 | #ifdef CONFIG_MEMORY_HOTPLUG | 613 | #ifdef CONFIG_MEMORY_HOTPLUG |
| 625 | /* | 614 | /* |
| 626 | * Must be held any time you expect node_start_pfn, node_present_pages | 615 | * Must be held any time you expect node_start_pfn, node_present_pages |
diff --git a/include/linux/mnt_namespace.h b/include/linux/mnt_namespace.h index d74785c2393a..0b89efc6f215 100644 --- a/include/linux/mnt_namespace.h +++ b/include/linux/mnt_namespace.h | |||
| @@ -35,6 +35,7 @@ static inline void get_mnt_ns(struct mnt_namespace *ns) | |||
| 35 | extern const struct seq_operations mounts_op; | 35 | extern const struct seq_operations mounts_op; |
| 36 | extern const struct seq_operations mountinfo_op; | 36 | extern const struct seq_operations mountinfo_op; |
| 37 | extern const struct seq_operations mountstats_op; | 37 | extern const struct seq_operations mountstats_op; |
| 38 | extern int mnt_had_events(struct proc_mounts *); | ||
| 38 | 39 | ||
| 39 | #endif | 40 | #endif |
| 40 | #endif | 41 | #endif |
diff --git a/include/linux/module.h b/include/linux/module.h index 6cb1a3cab5d3..5e869ffd34aa 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | #include <linux/moduleparam.h> | 17 | #include <linux/moduleparam.h> |
| 18 | #include <linux/tracepoint.h> | 18 | #include <linux/tracepoint.h> |
| 19 | 19 | ||
| 20 | #include <asm/local.h> | 20 | #include <linux/percpu.h> |
| 21 | #include <asm/module.h> | 21 | #include <asm/module.h> |
| 22 | 22 | ||
| 23 | #include <trace/events/module.h> | 23 | #include <trace/events/module.h> |
| @@ -175,6 +175,7 @@ struct notifier_block; | |||
| 175 | 175 | ||
| 176 | #ifdef CONFIG_MODULES | 176 | #ifdef CONFIG_MODULES |
| 177 | 177 | ||
| 178 | extern int modules_disabled; /* for sysctl */ | ||
| 178 | /* Get/put a kernel symbol (calls must be symmetric) */ | 179 | /* Get/put a kernel symbol (calls must be symmetric) */ |
| 179 | void *__symbol_get(const char *symbol); | 180 | void *__symbol_get(const char *symbol); |
| 180 | void *__symbol_get_gpl(const char *symbol); | 181 | void *__symbol_get_gpl(const char *symbol); |
| @@ -363,11 +364,9 @@ struct module | |||
| 363 | /* Destruction function. */ | 364 | /* Destruction function. */ |
| 364 | void (*exit)(void); | 365 | void (*exit)(void); |
| 365 | 366 | ||
| 366 | #ifdef CONFIG_SMP | 367 | struct module_ref { |
| 367 | char *refptr; | 368 | int count; |
| 368 | #else | 369 | } __percpu *refptr; |
| 369 | local_t ref; | ||
| 370 | #endif | ||
| 371 | #endif | 370 | #endif |
| 372 | 371 | ||
| 373 | #ifdef CONFIG_CONSTRUCTORS | 372 | #ifdef CONFIG_CONSTRUCTORS |
| @@ -454,25 +453,16 @@ void __symbol_put(const char *symbol); | |||
| 454 | #define symbol_put(x) __symbol_put(MODULE_SYMBOL_PREFIX #x) | 453 | #define symbol_put(x) __symbol_put(MODULE_SYMBOL_PREFIX #x) |
| 455 | void symbol_put_addr(void *addr); | 454 | void symbol_put_addr(void *addr); |
| 456 | 455 | ||
| 457 | static inline local_t *__module_ref_addr(struct module *mod, int cpu) | ||
| 458 | { | ||
| 459 | #ifdef CONFIG_SMP | ||
| 460 | return (local_t *) (mod->refptr + per_cpu_offset(cpu)); | ||
| 461 | #else | ||
| 462 | return &mod->ref; | ||
| 463 | #endif | ||
| 464 | } | ||
| 465 | |||
| 466 | /* Sometimes we know we already have a refcount, and it's easier not | 456 | /* Sometimes we know we already have a refcount, and it's easier not |
| 467 | to handle the error case (which only happens with rmmod --wait). */ | 457 | to handle the error case (which only happens with rmmod --wait). */ |
| 468 | static inline void __module_get(struct module *module) | 458 | static inline void __module_get(struct module *module) |
| 469 | { | 459 | { |
| 470 | if (module) { | 460 | if (module) { |
| 471 | unsigned int cpu = get_cpu(); | 461 | preempt_disable(); |
| 472 | local_inc(__module_ref_addr(module, cpu)); | 462 | __this_cpu_inc(module->refptr->count); |
| 473 | trace_module_get(module, _THIS_IP_, | 463 | trace_module_get(module, _THIS_IP_, |
| 474 | local_read(__module_ref_addr(module, cpu))); | 464 | __this_cpu_read(module->refptr->count)); |
| 475 | put_cpu(); | 465 | preempt_enable(); |
| 476 | } | 466 | } |
| 477 | } | 467 | } |
| 478 | 468 | ||
| @@ -481,15 +471,17 @@ static inline int try_module_get(struct module *module) | |||
| 481 | int ret = 1; | 471 | int ret = 1; |
| 482 | 472 | ||
| 483 | if (module) { | 473 | if (module) { |
| 484 | unsigned int cpu = get_cpu(); | 474 | preempt_disable(); |
| 475 | |||
| 485 | if (likely(module_is_live(module))) { | 476 | if (likely(module_is_live(module))) { |
| 486 | local_inc(__module_ref_addr(module, cpu)); | 477 | __this_cpu_inc(module->refptr->count); |
| 487 | trace_module_get(module, _THIS_IP_, | 478 | trace_module_get(module, _THIS_IP_, |
| 488 | local_read(__module_ref_addr(module, cpu))); | 479 | __this_cpu_read(module->refptr->count)); |
| 489 | } | 480 | } |
| 490 | else | 481 | else |
| 491 | ret = 0; | 482 | ret = 0; |
| 492 | put_cpu(); | 483 | |
| 484 | preempt_enable(); | ||
| 493 | } | 485 | } |
| 494 | return ret; | 486 | return ret; |
| 495 | } | 487 | } |
diff --git a/include/linux/mount.h b/include/linux/mount.h index 5d5275364867..4bd05474d11d 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
| @@ -34,7 +34,18 @@ struct mnt_namespace; | |||
| 34 | 34 | ||
| 35 | #define MNT_SHARED 0x1000 /* if the vfsmount is a shared mount */ | 35 | #define MNT_SHARED 0x1000 /* if the vfsmount is a shared mount */ |
| 36 | #define MNT_UNBINDABLE 0x2000 /* if the vfsmount is a unbindable mount */ | 36 | #define MNT_UNBINDABLE 0x2000 /* if the vfsmount is a unbindable mount */ |
| 37 | #define MNT_PNODE_MASK 0x3000 /* propagation flag mask */ | 37 | /* |
| 38 | * MNT_SHARED_MASK is the set of flags that should be cleared when a | ||
| 39 | * mount becomes shared. Currently, this is only the flag that says a | ||
| 40 | * mount cannot be bind mounted, since this is how we create a mount | ||
| 41 | * that shares events with another mount. If you add a new MNT_* | ||
| 42 | * flag, consider how it interacts with shared mounts. | ||
| 43 | */ | ||
| 44 | #define MNT_SHARED_MASK (MNT_UNBINDABLE) | ||
| 45 | #define MNT_PROPAGATION_MASK (MNT_SHARED | MNT_UNBINDABLE) | ||
| 46 | |||
| 47 | |||
| 48 | #define MNT_INTERNAL 0x4000 | ||
| 38 | 49 | ||
| 39 | struct vfsmount { | 50 | struct vfsmount { |
| 40 | struct list_head mnt_hash; | 51 | struct list_head mnt_hash; |
| @@ -66,7 +77,7 @@ struct vfsmount { | |||
| 66 | int mnt_pinned; | 77 | int mnt_pinned; |
| 67 | int mnt_ghosts; | 78 | int mnt_ghosts; |
| 68 | #ifdef CONFIG_SMP | 79 | #ifdef CONFIG_SMP |
| 69 | int *mnt_writers; | 80 | int __percpu *mnt_writers; |
| 70 | #else | 81 | #else |
| 71 | int mnt_writers; | 82 | int mnt_writers; |
| 72 | #endif | 83 | #endif |
| @@ -123,7 +134,6 @@ extern int do_add_mount(struct vfsmount *newmnt, struct path *path, | |||
| 123 | 134 | ||
| 124 | extern void mark_mounts_for_expiry(struct list_head *mounts); | 135 | extern void mark_mounts_for_expiry(struct list_head *mounts); |
| 125 | 136 | ||
| 126 | extern spinlock_t vfsmount_lock; | ||
| 127 | extern dev_t name_to_dev_t(char *name); | 137 | extern dev_t name_to_dev_t(char *name); |
| 128 | 138 | ||
| 129 | #endif /* _LINUX_MOUNT_H */ | 139 | #endif /* _LINUX_MOUNT_H */ |
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index ce38f1caa5e1..34066e65fdeb 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #define MSDOS_DPB_BITS 4 /* log2(MSDOS_DPB) */ | 15 | #define MSDOS_DPB_BITS 4 /* log2(MSDOS_DPB) */ |
| 16 | #define MSDOS_DPS (SECTOR_SIZE / sizeof(struct msdos_dir_entry)) | 16 | #define MSDOS_DPS (SECTOR_SIZE / sizeof(struct msdos_dir_entry)) |
| 17 | #define MSDOS_DPS_BITS 4 /* log2(MSDOS_DPS) */ | 17 | #define MSDOS_DPS_BITS 4 /* log2(MSDOS_DPS) */ |
| 18 | #define MSDOS_LONGNAME 256 /* maximum name length */ | ||
| 18 | #define CF_LE_W(v) le16_to_cpu(v) | 19 | #define CF_LE_W(v) le16_to_cpu(v) |
| 19 | #define CF_LE_L(v) le32_to_cpu(v) | 20 | #define CF_LE_L(v) le32_to_cpu(v) |
| 20 | #define CT_LE_W(v) cpu_to_le16(v) | 21 | #define CT_LE_W(v) cpu_to_le16(v) |
| @@ -47,8 +48,8 @@ | |||
| 47 | #define DELETED_FLAG 0xe5 /* marks file as deleted when in name[0] */ | 48 | #define DELETED_FLAG 0xe5 /* marks file as deleted when in name[0] */ |
| 48 | #define IS_FREE(n) (!*(n) || *(n) == DELETED_FLAG) | 49 | #define IS_FREE(n) (!*(n) || *(n) == DELETED_FLAG) |
| 49 | 50 | ||
| 51 | #define FAT_LFN_LEN 255 /* maximum long name length */ | ||
| 50 | #define MSDOS_NAME 11 /* maximum name length */ | 52 | #define MSDOS_NAME 11 /* maximum name length */ |
| 51 | #define MSDOS_LONGNAME 256 /* maximum name length */ | ||
| 52 | #define MSDOS_SLOTS 21 /* max # of slots for short and long names */ | 53 | #define MSDOS_SLOTS 21 /* max # of slots for short and long names */ |
| 53 | #define MSDOS_DOT ". " /* ".", padded to MSDOS_NAME chars */ | 54 | #define MSDOS_DOT ". " /* ".", padded to MSDOS_NAME chars */ |
| 54 | #define MSDOS_DOTDOT ".. " /* "..", padded to MSDOS_NAME chars */ | 55 | #define MSDOS_DOTDOT ".. " /* "..", padded to MSDOS_NAME chars */ |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index c79a88be7c33..fa8b47637997 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -2059,12 +2059,12 @@ static inline void skb_bond_set_mac_by_master(struct sk_buff *skb, | |||
| 2059 | * duplicates except for 802.3ad ETH_P_SLOW, alb non-mcast/bcast, and | 2059 | * duplicates except for 802.3ad ETH_P_SLOW, alb non-mcast/bcast, and |
| 2060 | * ARP on active-backup slaves with arp_validate enabled. | 2060 | * ARP on active-backup slaves with arp_validate enabled. |
| 2061 | */ | 2061 | */ |
| 2062 | static inline int skb_bond_should_drop(struct sk_buff *skb) | 2062 | static inline int skb_bond_should_drop(struct sk_buff *skb, |
| 2063 | struct net_device *master) | ||
| 2063 | { | 2064 | { |
| 2064 | struct net_device *dev = skb->dev; | ||
| 2065 | struct net_device *master = dev->master; | ||
| 2066 | |||
| 2067 | if (master) { | 2065 | if (master) { |
| 2066 | struct net_device *dev = skb->dev; | ||
| 2067 | |||
| 2068 | if (master->priv_flags & IFF_MASTER_ARPMON) | 2068 | if (master->priv_flags & IFF_MASTER_ARPMON) |
| 2069 | dev->last_rx = jiffies; | 2069 | dev->last_rx = jiffies; |
| 2070 | 2070 | ||
diff --git a/include/linux/netfilter/nfnetlink.h b/include/linux/netfilter/nfnetlink.h index 53923868c9bd..361d6b5630ee 100644 --- a/include/linux/netfilter/nfnetlink.h +++ b/include/linux/netfilter/nfnetlink.h | |||
| @@ -76,7 +76,7 @@ extern int nfnetlink_subsys_unregister(const struct nfnetlink_subsystem *n); | |||
| 76 | extern int nfnetlink_has_listeners(struct net *net, unsigned int group); | 76 | extern int nfnetlink_has_listeners(struct net *net, unsigned int group); |
| 77 | extern int nfnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, unsigned group, | 77 | extern int nfnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, unsigned group, |
| 78 | int echo, gfp_t flags); | 78 | int echo, gfp_t flags); |
| 79 | extern void nfnetlink_set_err(struct net *net, u32 pid, u32 group, int error); | 79 | extern int nfnetlink_set_err(struct net *net, u32 pid, u32 group, int error); |
| 80 | extern int nfnetlink_unicast(struct sk_buff *skb, struct net *net, u_int32_t pid, int flags); | 80 | extern int nfnetlink_unicast(struct sk_buff *skb, struct net *net, u_int32_t pid, int flags); |
| 81 | 81 | ||
| 82 | extern void nfnl_lock(void); | 82 | extern void nfnl_lock(void); |
diff --git a/include/linux/netfilter_ipv6.h b/include/linux/netfilter_ipv6.h index d654873aa25a..1f7e300094cd 100644 --- a/include/linux/netfilter_ipv6.h +++ b/include/linux/netfilter_ipv6.h | |||
| @@ -59,6 +59,7 @@ | |||
| 59 | enum nf_ip6_hook_priorities { | 59 | enum nf_ip6_hook_priorities { |
| 60 | NF_IP6_PRI_FIRST = INT_MIN, | 60 | NF_IP6_PRI_FIRST = INT_MIN, |
| 61 | NF_IP6_PRI_CONNTRACK_DEFRAG = -400, | 61 | NF_IP6_PRI_CONNTRACK_DEFRAG = -400, |
| 62 | NF_IP6_PRI_RAW = -300, | ||
| 62 | NF_IP6_PRI_SELINUX_FIRST = -225, | 63 | NF_IP6_PRI_SELINUX_FIRST = -225, |
| 63 | NF_IP6_PRI_CONNTRACK = -200, | 64 | NF_IP6_PRI_CONNTRACK = -200, |
| 64 | NF_IP6_PRI_MANGLE = -150, | 65 | NF_IP6_PRI_MANGLE = -150, |
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index fde27c017326..6eaca5e1e8ca 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
| @@ -188,7 +188,7 @@ extern int netlink_has_listeners(struct sock *sk, unsigned int group); | |||
| 188 | extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock); | 188 | extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock); |
| 189 | extern int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 pid, | 189 | extern int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 pid, |
| 190 | __u32 group, gfp_t allocation); | 190 | __u32 group, gfp_t allocation); |
| 191 | extern void netlink_set_err(struct sock *ssk, __u32 pid, __u32 group, int code); | 191 | extern int netlink_set_err(struct sock *ssk, __u32 pid, __u32 group, int code); |
| 192 | extern int netlink_register_notifier(struct notifier_block *nb); | 192 | extern int netlink_register_notifier(struct notifier_block *nb); |
| 193 | extern int netlink_unregister_notifier(struct notifier_block *nb); | 193 | extern int netlink_unregister_notifier(struct notifier_block *nb); |
| 194 | 194 | ||
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index d09db1bc9083..1a0b85aa151e 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
| @@ -33,9 +33,6 @@ | |||
| 33 | #define FLUSH_STABLE 4 /* commit to stable storage */ | 33 | #define FLUSH_STABLE 4 /* commit to stable storage */ |
| 34 | #define FLUSH_LOWPRI 8 /* low priority background flush */ | 34 | #define FLUSH_LOWPRI 8 /* low priority background flush */ |
| 35 | #define FLUSH_HIGHPRI 16 /* high priority memory reclaim flush */ | 35 | #define FLUSH_HIGHPRI 16 /* high priority memory reclaim flush */ |
| 36 | #define FLUSH_NOCOMMIT 32 /* Don't send the NFSv3/v4 COMMIT */ | ||
| 37 | #define FLUSH_INVALIDATE 64 /* Invalidate the page cache */ | ||
| 38 | #define FLUSH_NOWRITEPAGE 128 /* Don't call writepage() */ | ||
| 39 | 36 | ||
| 40 | #ifdef __KERNEL__ | 37 | #ifdef __KERNEL__ |
| 41 | 38 | ||
| @@ -166,6 +163,7 @@ struct nfs_inode { | |||
| 166 | struct radix_tree_root nfs_page_tree; | 163 | struct radix_tree_root nfs_page_tree; |
| 167 | 164 | ||
| 168 | unsigned long npages; | 165 | unsigned long npages; |
| 166 | unsigned long ncommit; | ||
| 169 | 167 | ||
| 170 | /* Open contexts for shared mmap writes */ | 168 | /* Open contexts for shared mmap writes */ |
| 171 | struct list_head open_files; | 169 | struct list_head open_files; |
| @@ -349,7 +347,6 @@ extern int nfs_attribute_timeout(struct inode *inode); | |||
| 349 | extern int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode); | 347 | extern int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode); |
| 350 | extern int __nfs_revalidate_inode(struct nfs_server *, struct inode *); | 348 | extern int __nfs_revalidate_inode(struct nfs_server *, struct inode *); |
| 351 | extern int nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping); | 349 | extern int nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping); |
| 352 | extern int nfs_revalidate_mapping_nolock(struct inode *inode, struct address_space *mapping); | ||
| 353 | extern int nfs_setattr(struct dentry *, struct iattr *); | 350 | extern int nfs_setattr(struct dentry *, struct iattr *); |
| 354 | extern void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr); | 351 | extern void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr); |
| 355 | extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx); | 352 | extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx); |
| @@ -477,21 +474,12 @@ extern int nfs_writeback_done(struct rpc_task *, struct nfs_write_data *); | |||
| 477 | * Try to write back everything synchronously (but check the | 474 | * Try to write back everything synchronously (but check the |
| 478 | * return value!) | 475 | * return value!) |
| 479 | */ | 476 | */ |
| 480 | extern long nfs_sync_mapping_wait(struct address_space *, struct writeback_control *, int); | ||
| 481 | extern int nfs_wb_all(struct inode *inode); | 477 | extern int nfs_wb_all(struct inode *inode); |
| 482 | extern int nfs_wb_nocommit(struct inode *inode); | ||
| 483 | extern int nfs_wb_page(struct inode *inode, struct page* page); | 478 | extern int nfs_wb_page(struct inode *inode, struct page* page); |
| 484 | extern int nfs_wb_page_cancel(struct inode *inode, struct page* page); | 479 | extern int nfs_wb_page_cancel(struct inode *inode, struct page* page); |
| 485 | #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) | 480 | #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) |
| 486 | extern int nfs_commit_inode(struct inode *, int); | ||
| 487 | extern struct nfs_write_data *nfs_commitdata_alloc(void); | 481 | extern struct nfs_write_data *nfs_commitdata_alloc(void); |
| 488 | extern void nfs_commit_free(struct nfs_write_data *wdata); | 482 | extern void nfs_commit_free(struct nfs_write_data *wdata); |
| 489 | #else | ||
| 490 | static inline int | ||
| 491 | nfs_commit_inode(struct inode *inode, int how) | ||
| 492 | { | ||
| 493 | return 0; | ||
| 494 | } | ||
| 495 | #endif | 483 | #endif |
| 496 | 484 | ||
| 497 | static inline int | 485 | static inline int |
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index 34fc6be5bfcf..717a5e54eb1d 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
| @@ -105,7 +105,7 @@ struct nfs_server { | |||
| 105 | struct rpc_clnt * client; /* RPC client handle */ | 105 | struct rpc_clnt * client; /* RPC client handle */ |
| 106 | struct rpc_clnt * client_acl; /* ACL RPC client handle */ | 106 | struct rpc_clnt * client_acl; /* ACL RPC client handle */ |
| 107 | struct nlm_host *nlm_host; /* NLM client handle */ | 107 | struct nlm_host *nlm_host; /* NLM client handle */ |
| 108 | struct nfs_iostats * io_stats; /* I/O statistics */ | 108 | struct nfs_iostats __percpu *io_stats; /* I/O statistics */ |
| 109 | struct backing_dev_info backing_dev_info; | 109 | struct backing_dev_info backing_dev_info; |
| 110 | atomic_long_t writeback; /* number of writeback pages */ | 110 | atomic_long_t writeback; /* number of writeback pages */ |
| 111 | int flags; /* various flags */ | 111 | int flags; /* various flags */ |
| @@ -193,6 +193,8 @@ struct nfs4_slot_table { | |||
| 193 | int max_slots; /* # slots in table */ | 193 | int max_slots; /* # slots in table */ |
| 194 | int highest_used_slotid; /* sent to server on each SEQ. | 194 | int highest_used_slotid; /* sent to server on each SEQ. |
| 195 | * op for dynamic resizing */ | 195 | * op for dynamic resizing */ |
| 196 | int target_max_slots; /* Set by CB_RECALL_SLOT as | ||
| 197 | * the new max_slots */ | ||
| 196 | }; | 198 | }; |
| 197 | 199 | ||
| 198 | static inline int slot_idx(struct nfs4_slot_table *tbl, struct nfs4_slot *sp) | 200 | static inline int slot_idx(struct nfs4_slot_table *tbl, struct nfs4_slot *sp) |
diff --git a/include/linux/nilfs2_fs.h b/include/linux/nilfs2_fs.h index 3fe02cf8b65a..640702e97457 100644 --- a/include/linux/nilfs2_fs.h +++ b/include/linux/nilfs2_fs.h | |||
| @@ -153,6 +153,7 @@ struct nilfs_super_root { | |||
| 153 | semantics also for data */ | 153 | semantics also for data */ |
| 154 | #define NILFS_MOUNT_NORECOVERY 0x4000 /* Disable write access during | 154 | #define NILFS_MOUNT_NORECOVERY 0x4000 /* Disable write access during |
| 155 | mount-time recovery */ | 155 | mount-time recovery */ |
| 156 | #define NILFS_MOUNT_DISCARD 0x8000 /* Issue DISCARD requests */ | ||
| 156 | 157 | ||
| 157 | 158 | ||
| 158 | /** | 159 | /** |
diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h index 454997cccbd8..dba35e413371 100644 --- a/include/linux/nodemask.h +++ b/include/linux/nodemask.h | |||
| @@ -69,8 +69,6 @@ | |||
| 69 | * int node_online(node) Is some node online? | 69 | * int node_online(node) Is some node online? |
| 70 | * int node_possible(node) Is some node possible? | 70 | * int node_possible(node) Is some node possible? |
| 71 | * | 71 | * |
| 72 | * int any_online_node(mask) First online node in mask | ||
| 73 | * | ||
| 74 | * node_set_online(node) set bit 'node' in node_online_map | 72 | * node_set_online(node) set bit 'node' in node_online_map |
| 75 | * node_set_offline(node) clear bit 'node' in node_online_map | 73 | * node_set_offline(node) clear bit 'node' in node_online_map |
| 76 | * | 74 | * |
| @@ -467,15 +465,6 @@ static inline int num_node_state(enum node_states state) | |||
| 467 | #define node_online_map node_states[N_ONLINE] | 465 | #define node_online_map node_states[N_ONLINE] |
| 468 | #define node_possible_map node_states[N_POSSIBLE] | 466 | #define node_possible_map node_states[N_POSSIBLE] |
| 469 | 467 | ||
| 470 | #define any_online_node(mask) \ | ||
| 471 | ({ \ | ||
| 472 | int node; \ | ||
| 473 | for_each_node_mask(node, (mask)) \ | ||
| 474 | if (node_online(node)) \ | ||
| 475 | break; \ | ||
| 476 | node; \ | ||
| 477 | }) | ||
| 478 | |||
| 479 | #define num_online_nodes() num_node_state(N_ONLINE) | 468 | #define num_online_nodes() num_node_state(N_ONLINE) |
| 480 | #define num_possible_nodes() num_node_state(N_POSSIBLE) | 469 | #define num_possible_nodes() num_node_state(N_POSSIBLE) |
| 481 | #define node_online(node) node_state((node), N_ONLINE) | 470 | #define node_online(node) node_state((node), N_ONLINE) |
| @@ -494,7 +483,7 @@ static inline int num_node_state(enum node_states state) | |||
| 494 | type *name = kmalloc(sizeof(*name), gfp_flags) | 483 | type *name = kmalloc(sizeof(*name), gfp_flags) |
| 495 | #define NODEMASK_FREE(m) kfree(m) | 484 | #define NODEMASK_FREE(m) kfree(m) |
| 496 | #else | 485 | #else |
| 497 | #define NODEMASK_ALLOC(type, name, gfp_flags) type _name, *name = &_name | 486 | #define NODEMASK_ALLOC(type, name, gfp_flags) type _##name, *name = &_##name |
| 498 | #define NODEMASK_FREE(m) do {} while (0) | 487 | #define NODEMASK_FREE(m) do {} while (0) |
| 499 | #endif | 488 | #endif |
| 500 | 489 | ||
diff --git a/include/linux/of.h b/include/linux/of.h index f6d9cbc39c9c..a367e19bb3af 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
| @@ -127,7 +127,7 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size) | |||
| 127 | 127 | ||
| 128 | /* Default string compare functions, Allow arch asm/prom.h to override */ | 128 | /* Default string compare functions, Allow arch asm/prom.h to override */ |
| 129 | #if !defined(of_compat_cmp) | 129 | #if !defined(of_compat_cmp) |
| 130 | #define of_compat_cmp(s1, s2, l) strncasecmp((s1), (s2), (l)) | 130 | #define of_compat_cmp(s1, s2, l) strcasecmp((s1), (s2)) |
| 131 | #define of_prop_cmp(s1, s2) strcmp((s1), (s2)) | 131 | #define of_prop_cmp(s1, s2) strcmp((s1), (s2)) |
| 132 | #define of_node_cmp(s1, s2) strcasecmp((s1), (s2)) | 132 | #define of_node_cmp(s1, s2) strcasecmp((s1), (s2)) |
| 133 | #endif | 133 | #endif |
diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h index b0e4eb126236..30b08136fdf3 100644 --- a/include/linux/page_cgroup.h +++ b/include/linux/page_cgroup.h | |||
| @@ -118,6 +118,8 @@ static inline void __init page_cgroup_init_flatmem(void) | |||
| 118 | #include <linux/swap.h> | 118 | #include <linux/swap.h> |
| 119 | 119 | ||
| 120 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP | 120 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP |
| 121 | extern unsigned short swap_cgroup_cmpxchg(swp_entry_t ent, | ||
| 122 | unsigned short old, unsigned short new); | ||
| 121 | extern unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id); | 123 | extern unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id); |
| 122 | extern unsigned short lookup_swap_cgroup(swp_entry_t ent); | 124 | extern unsigned short lookup_swap_cgroup(swp_entry_t ent); |
| 123 | extern int swap_cgroup_swapon(int type, unsigned long max_pages); | 125 | extern int swap_cgroup_swapon(int type, unsigned long max_pages); |
diff --git a/include/linux/pci-dma.h b/include/linux/pci-dma.h new file mode 100644 index 000000000000..549a041f9c08 --- /dev/null +++ b/include/linux/pci-dma.h | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | #ifndef _LINUX_PCI_DMA_H | ||
| 2 | #define _LINUX_PCI_DMA_H | ||
| 3 | |||
| 4 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) DEFINE_DMA_UNMAP_ADDR(ADDR_NAME); | ||
| 5 | #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) DEFINE_DMA_UNMAP_LEN(LEN_NAME); | ||
| 6 | #define pci_unmap_addr dma_unmap_addr | ||
| 7 | #define pci_unmap_addr_set dma_unmap_addr_set | ||
| 8 | #define pci_unmap_len dma_unmap_len | ||
| 9 | #define pci_unmap_len_set dma_unmap_len_set | ||
| 10 | |||
| 11 | #endif | ||
diff --git a/include/linux/pci.h b/include/linux/pci.h index ec95ebe629f1..a788fa12ff31 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -678,6 +678,8 @@ enum pci_lost_interrupt_reason pci_lost_interrupt(struct pci_dev *dev); | |||
| 678 | int pci_find_capability(struct pci_dev *dev, int cap); | 678 | int pci_find_capability(struct pci_dev *dev, int cap); |
| 679 | int pci_find_next_capability(struct pci_dev *dev, u8 pos, int cap); | 679 | int pci_find_next_capability(struct pci_dev *dev, u8 pos, int cap); |
| 680 | int pci_find_ext_capability(struct pci_dev *dev, int cap); | 680 | int pci_find_ext_capability(struct pci_dev *dev, int cap); |
| 681 | int pci_bus_find_ext_capability(struct pci_bus *bus, unsigned int devfn, | ||
| 682 | int cap); | ||
| 681 | int pci_find_ht_capability(struct pci_dev *dev, int ht_cap); | 683 | int pci_find_ht_capability(struct pci_dev *dev, int ht_cap); |
| 682 | int pci_find_next_ht_capability(struct pci_dev *dev, int pos, int ht_cap); | 684 | int pci_find_next_ht_capability(struct pci_dev *dev, int pos, int ht_cap); |
| 683 | struct pci_bus *pci_find_next_bus(const struct pci_bus *from); | 685 | struct pci_bus *pci_find_next_bus(const struct pci_bus *from); |
| @@ -767,8 +769,6 @@ int pci_try_set_mwi(struct pci_dev *dev); | |||
| 767 | void pci_clear_mwi(struct pci_dev *dev); | 769 | void pci_clear_mwi(struct pci_dev *dev); |
| 768 | void pci_intx(struct pci_dev *dev, int enable); | 770 | void pci_intx(struct pci_dev *dev, int enable); |
| 769 | void pci_msi_off(struct pci_dev *dev); | 771 | void pci_msi_off(struct pci_dev *dev); |
| 770 | int pci_set_dma_mask(struct pci_dev *dev, u64 mask); | ||
| 771 | int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask); | ||
| 772 | int pci_set_dma_max_seg_size(struct pci_dev *dev, unsigned int size); | 772 | int pci_set_dma_max_seg_size(struct pci_dev *dev, unsigned int size); |
| 773 | int pci_set_dma_seg_boundary(struct pci_dev *dev, unsigned long mask); | 773 | int pci_set_dma_seg_boundary(struct pci_dev *dev, unsigned long mask); |
| 774 | int pcix_get_max_mmrbc(struct pci_dev *dev); | 774 | int pcix_get_max_mmrbc(struct pci_dev *dev); |
| @@ -902,6 +902,7 @@ int pci_set_vga_state(struct pci_dev *pdev, bool decode, | |||
| 902 | unsigned int command_bits, bool change_bridge); | 902 | unsigned int command_bits, bool change_bridge); |
| 903 | /* kmem_cache style wrapper around pci_alloc_consistent() */ | 903 | /* kmem_cache style wrapper around pci_alloc_consistent() */ |
| 904 | 904 | ||
| 905 | #include <linux/pci-dma.h> | ||
| 905 | #include <linux/dmapool.h> | 906 | #include <linux/dmapool.h> |
| 906 | 907 | ||
| 907 | #define pci_pool dma_pool | 908 | #define pci_pool dma_pool |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 0be824320580..9f688d243b86 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
| @@ -770,7 +770,6 @@ | |||
| 770 | #define PCI_VENDOR_ID_TI 0x104c | 770 | #define PCI_VENDOR_ID_TI 0x104c |
| 771 | #define PCI_DEVICE_ID_TI_TVP4020 0x3d07 | 771 | #define PCI_DEVICE_ID_TI_TVP4020 0x3d07 |
| 772 | #define PCI_DEVICE_ID_TI_4450 0x8011 | 772 | #define PCI_DEVICE_ID_TI_4450 0x8011 |
| 773 | #define PCI_DEVICE_ID_TI_TSB43AB22 0x8023 | ||
| 774 | #define PCI_DEVICE_ID_TI_XX21_XX11 0x8031 | 773 | #define PCI_DEVICE_ID_TI_XX21_XX11 0x8031 |
| 775 | #define PCI_DEVICE_ID_TI_XX21_XX11_FM 0x8033 | 774 | #define PCI_DEVICE_ID_TI_XX21_XX11_FM 0x8033 |
| 776 | #define PCI_DEVICE_ID_TI_XX21_XX11_SD 0x8034 | 775 | #define PCI_DEVICE_ID_TI_XX21_XX11_SD 0x8034 |
| @@ -2333,6 +2332,8 @@ | |||
| 2333 | #define PCI_VENDOR_ID_KORENIX 0x1982 | 2332 | #define PCI_VENDOR_ID_KORENIX 0x1982 |
| 2334 | #define PCI_DEVICE_ID_KORENIX_JETCARDF0 0x1600 | 2333 | #define PCI_DEVICE_ID_KORENIX_JETCARDF0 0x1600 |
| 2335 | #define PCI_DEVICE_ID_KORENIX_JETCARDF1 0x16ff | 2334 | #define PCI_DEVICE_ID_KORENIX_JETCARDF1 0x16ff |
| 2335 | #define PCI_DEVICE_ID_KORENIX_JETCARDF2 0x1700 | ||
| 2336 | #define PCI_DEVICE_ID_KORENIX_JETCARDF3 0x17ff | ||
| 2336 | 2337 | ||
| 2337 | #define PCI_VENDOR_ID_QMI 0x1a32 | 2338 | #define PCI_VENDOR_ID_QMI 0x1a32 |
| 2338 | 2339 | ||
| @@ -2697,6 +2698,7 @@ | |||
| 2697 | #define PCI_DEVICE_ID_NETMOS_9835 0x9835 | 2698 | #define PCI_DEVICE_ID_NETMOS_9835 0x9835 |
| 2698 | #define PCI_DEVICE_ID_NETMOS_9845 0x9845 | 2699 | #define PCI_DEVICE_ID_NETMOS_9845 0x9845 |
| 2699 | #define PCI_DEVICE_ID_NETMOS_9855 0x9855 | 2700 | #define PCI_DEVICE_ID_NETMOS_9855 0x9855 |
| 2701 | #define PCI_DEVICE_ID_NETMOS_9865 0x9865 | ||
| 2700 | #define PCI_DEVICE_ID_NETMOS_9901 0x9901 | 2702 | #define PCI_DEVICE_ID_NETMOS_9901 0x9901 |
| 2701 | 2703 | ||
| 2702 | #define PCI_VENDOR_ID_3COM_2 0xa727 | 2704 | #define PCI_VENDOR_ID_3COM_2 0xa727 |
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h index 9f2ad0aa3c39..c8f302991b66 100644 --- a/include/linux/pci_regs.h +++ b/include/linux/pci_regs.h | |||
| @@ -507,6 +507,7 @@ | |||
| 507 | #define PCI_EXT_CAP_ID_VC 2 | 507 | #define PCI_EXT_CAP_ID_VC 2 |
| 508 | #define PCI_EXT_CAP_ID_DSN 3 | 508 | #define PCI_EXT_CAP_ID_DSN 3 |
| 509 | #define PCI_EXT_CAP_ID_PWR 4 | 509 | #define PCI_EXT_CAP_ID_PWR 4 |
| 510 | #define PCI_EXT_CAP_ID_VNDR 11 | ||
| 510 | #define PCI_EXT_CAP_ID_ACS 13 | 511 | #define PCI_EXT_CAP_ID_ACS 13 |
| 511 | #define PCI_EXT_CAP_ID_ARI 14 | 512 | #define PCI_EXT_CAP_ID_ARI 14 |
| 512 | #define PCI_EXT_CAP_ID_ATS 15 | 513 | #define PCI_EXT_CAP_ID_ATS 15 |
diff --git a/include/linux/percpu-defs.h b/include/linux/percpu-defs.h index 5a5d6ce4bd55..68567c0b3a5d 100644 --- a/include/linux/percpu-defs.h +++ b/include/linux/percpu-defs.h | |||
| @@ -2,12 +2,6 @@ | |||
| 2 | #define _LINUX_PERCPU_DEFS_H | 2 | #define _LINUX_PERCPU_DEFS_H |
| 3 | 3 | ||
| 4 | /* | 4 | /* |
| 5 | * Determine the real variable name from the name visible in the | ||
| 6 | * kernel sources. | ||
| 7 | */ | ||
| 8 | #define per_cpu_var(var) per_cpu__##var | ||
| 9 | |||
| 10 | /* | ||
| 11 | * Base implementations of per-CPU variable declarations and definitions, where | 5 | * Base implementations of per-CPU variable declarations and definitions, where |
| 12 | * the section in which the variable is to be placed is provided by the | 6 | * the section in which the variable is to be placed is provided by the |
| 13 | * 'sec' argument. This may be used to affect the parameters governing the | 7 | * 'sec' argument. This may be used to affect the parameters governing the |
| @@ -18,13 +12,23 @@ | |||
| 18 | * that section. | 12 | * that section. |
| 19 | */ | 13 | */ |
| 20 | #define __PCPU_ATTRS(sec) \ | 14 | #define __PCPU_ATTRS(sec) \ |
| 21 | __attribute__((section(PER_CPU_BASE_SECTION sec))) \ | 15 | __percpu __attribute__((section(PER_CPU_BASE_SECTION sec))) \ |
| 22 | PER_CPU_ATTRIBUTES | 16 | PER_CPU_ATTRIBUTES |
| 23 | 17 | ||
| 24 | #define __PCPU_DUMMY_ATTRS \ | 18 | #define __PCPU_DUMMY_ATTRS \ |
| 25 | __attribute__((section(".discard"), unused)) | 19 | __attribute__((section(".discard"), unused)) |
| 26 | 20 | ||
| 27 | /* | 21 | /* |
| 22 | * Macro which verifies @ptr is a percpu pointer without evaluating | ||
| 23 | * @ptr. This is to be used in percpu accessors to verify that the | ||
| 24 | * input parameter is a percpu pointer. | ||
| 25 | */ | ||
| 26 | #define __verify_pcpu_ptr(ptr) do { \ | ||
| 27 | const void __percpu *__vpp_verify = (typeof(ptr))NULL; \ | ||
| 28 | (void)__vpp_verify; \ | ||
| 29 | } while (0) | ||
| 30 | |||
| 31 | /* | ||
| 28 | * s390 and alpha modules require percpu variables to be defined as | 32 | * s390 and alpha modules require percpu variables to be defined as |
| 29 | * weak to force the compiler to generate GOT based external | 33 | * weak to force the compiler to generate GOT based external |
| 30 | * references for them. This is necessary because percpu sections | 34 | * references for them. This is necessary because percpu sections |
| @@ -56,24 +60,24 @@ | |||
| 56 | */ | 60 | */ |
| 57 | #define DECLARE_PER_CPU_SECTION(type, name, sec) \ | 61 | #define DECLARE_PER_CPU_SECTION(type, name, sec) \ |
| 58 | extern __PCPU_DUMMY_ATTRS char __pcpu_scope_##name; \ | 62 | extern __PCPU_DUMMY_ATTRS char __pcpu_scope_##name; \ |
| 59 | extern __PCPU_ATTRS(sec) __typeof__(type) per_cpu__##name | 63 | extern __PCPU_ATTRS(sec) __typeof__(type) name |
| 60 | 64 | ||
| 61 | #define DEFINE_PER_CPU_SECTION(type, name, sec) \ | 65 | #define DEFINE_PER_CPU_SECTION(type, name, sec) \ |
| 62 | __PCPU_DUMMY_ATTRS char __pcpu_scope_##name; \ | 66 | __PCPU_DUMMY_ATTRS char __pcpu_scope_##name; \ |
| 63 | extern __PCPU_DUMMY_ATTRS char __pcpu_unique_##name; \ | 67 | extern __PCPU_DUMMY_ATTRS char __pcpu_unique_##name; \ |
| 64 | __PCPU_DUMMY_ATTRS char __pcpu_unique_##name; \ | 68 | __PCPU_DUMMY_ATTRS char __pcpu_unique_##name; \ |
| 65 | __PCPU_ATTRS(sec) PER_CPU_DEF_ATTRIBUTES __weak \ | 69 | __PCPU_ATTRS(sec) PER_CPU_DEF_ATTRIBUTES __weak \ |
| 66 | __typeof__(type) per_cpu__##name | 70 | __typeof__(type) name |
| 67 | #else | 71 | #else |
| 68 | /* | 72 | /* |
| 69 | * Normal declaration and definition macros. | 73 | * Normal declaration and definition macros. |
| 70 | */ | 74 | */ |
| 71 | #define DECLARE_PER_CPU_SECTION(type, name, sec) \ | 75 | #define DECLARE_PER_CPU_SECTION(type, name, sec) \ |
| 72 | extern __PCPU_ATTRS(sec) __typeof__(type) per_cpu__##name | 76 | extern __PCPU_ATTRS(sec) __typeof__(type) name |
| 73 | 77 | ||
| 74 | #define DEFINE_PER_CPU_SECTION(type, name, sec) \ | 78 | #define DEFINE_PER_CPU_SECTION(type, name, sec) \ |
| 75 | __PCPU_ATTRS(sec) PER_CPU_DEF_ATTRIBUTES \ | 79 | __PCPU_ATTRS(sec) PER_CPU_DEF_ATTRIBUTES \ |
| 76 | __typeof__(type) per_cpu__##name | 80 | __typeof__(type) name |
| 77 | #endif | 81 | #endif |
| 78 | 82 | ||
| 79 | /* | 83 | /* |
| @@ -135,10 +139,16 @@ | |||
| 135 | __aligned(PAGE_SIZE) | 139 | __aligned(PAGE_SIZE) |
| 136 | 140 | ||
| 137 | /* | 141 | /* |
| 138 | * Intermodule exports for per-CPU variables. | 142 | * Intermodule exports for per-CPU variables. sparse forgets about |
| 143 | * address space across EXPORT_SYMBOL(), change EXPORT_SYMBOL() to | ||
| 144 | * noop if __CHECKER__. | ||
| 139 | */ | 145 | */ |
| 140 | #define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var) | 146 | #ifndef __CHECKER__ |
| 141 | #define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var) | 147 | #define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(var) |
| 142 | 148 | #define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(var) | |
| 149 | #else | ||
| 150 | #define EXPORT_PER_CPU_SYMBOL(var) | ||
| 151 | #define EXPORT_PER_CPU_SYMBOL_GPL(var) | ||
| 152 | #endif | ||
| 143 | 153 | ||
| 144 | #endif /* _LINUX_PERCPU_DEFS_H */ | 154 | #endif /* _LINUX_PERCPU_DEFS_H */ |
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index cf5efbcf716c..a93e5bfdccb8 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
| @@ -27,10 +27,17 @@ | |||
| 27 | * we force a syntax error here if it isn't. | 27 | * we force a syntax error here if it isn't. |
| 28 | */ | 28 | */ |
| 29 | #define get_cpu_var(var) (*({ \ | 29 | #define get_cpu_var(var) (*({ \ |
| 30 | extern int simple_identifier_##var(void); \ | ||
| 31 | preempt_disable(); \ | 30 | preempt_disable(); \ |
| 32 | &__get_cpu_var(var); })) | 31 | &__get_cpu_var(var); })) |
| 33 | #define put_cpu_var(var) preempt_enable() | 32 | |
| 33 | /* | ||
| 34 | * The weird & is necessary because sparse considers (void)(var) to be | ||
| 35 | * a direct dereference of percpu variable (var). | ||
| 36 | */ | ||
| 37 | #define put_cpu_var(var) do { \ | ||
| 38 | (void)&(var); \ | ||
| 39 | preempt_enable(); \ | ||
| 40 | } while (0) | ||
| 34 | 41 | ||
| 35 | #ifdef CONFIG_SMP | 42 | #ifdef CONFIG_SMP |
| 36 | 43 | ||
| @@ -127,9 +134,9 @@ extern int __init pcpu_page_first_chunk(size_t reserved_size, | |||
| 127 | */ | 134 | */ |
| 128 | #define per_cpu_ptr(ptr, cpu) SHIFT_PERCPU_PTR((ptr), per_cpu_offset((cpu))) | 135 | #define per_cpu_ptr(ptr, cpu) SHIFT_PERCPU_PTR((ptr), per_cpu_offset((cpu))) |
| 129 | 136 | ||
| 130 | extern void *__alloc_reserved_percpu(size_t size, size_t align); | 137 | extern void __percpu *__alloc_reserved_percpu(size_t size, size_t align); |
| 131 | extern void *__alloc_percpu(size_t size, size_t align); | 138 | extern void __percpu *__alloc_percpu(size_t size, size_t align); |
| 132 | extern void free_percpu(void *__pdata); | 139 | extern void free_percpu(void __percpu *__pdata); |
| 133 | extern phys_addr_t per_cpu_ptr_to_phys(void *addr); | 140 | extern phys_addr_t per_cpu_ptr_to_phys(void *addr); |
| 134 | 141 | ||
| 135 | #ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA | 142 | #ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA |
| @@ -140,7 +147,7 @@ extern void __init setup_per_cpu_areas(void); | |||
| 140 | 147 | ||
| 141 | #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); }) | 148 | #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); }) |
| 142 | 149 | ||
| 143 | static inline void *__alloc_percpu(size_t size, size_t align) | 150 | static inline void __percpu *__alloc_percpu(size_t size, size_t align) |
| 144 | { | 151 | { |
| 145 | /* | 152 | /* |
| 146 | * Can't easily make larger alignment work with kmalloc. WARN | 153 | * Can't easily make larger alignment work with kmalloc. WARN |
| @@ -151,7 +158,7 @@ static inline void *__alloc_percpu(size_t size, size_t align) | |||
| 151 | return kzalloc(size, GFP_KERNEL); | 158 | return kzalloc(size, GFP_KERNEL); |
| 152 | } | 159 | } |
| 153 | 160 | ||
| 154 | static inline void free_percpu(void *p) | 161 | static inline void free_percpu(void __percpu *p) |
| 155 | { | 162 | { |
| 156 | kfree(p); | 163 | kfree(p); |
| 157 | } | 164 | } |
| @@ -171,7 +178,7 @@ static inline void *pcpu_lpage_remapped(void *kaddr) | |||
| 171 | #endif /* CONFIG_SMP */ | 178 | #endif /* CONFIG_SMP */ |
| 172 | 179 | ||
| 173 | #define alloc_percpu(type) \ | 180 | #define alloc_percpu(type) \ |
| 174 | (typeof(type) *)__alloc_percpu(sizeof(type), __alignof__(type)) | 181 | (typeof(type) __percpu *)__alloc_percpu(sizeof(type), __alignof__(type)) |
| 175 | 182 | ||
| 176 | /* | 183 | /* |
| 177 | * Optional methods for optimized non-lvalue per-cpu variable access. | 184 | * Optional methods for optimized non-lvalue per-cpu variable access. |
| @@ -188,17 +195,19 @@ static inline void *pcpu_lpage_remapped(void *kaddr) | |||
| 188 | #ifndef percpu_read | 195 | #ifndef percpu_read |
| 189 | # define percpu_read(var) \ | 196 | # define percpu_read(var) \ |
| 190 | ({ \ | 197 | ({ \ |
| 191 | typeof(per_cpu_var(var)) __tmp_var__; \ | 198 | typeof(var) *pr_ptr__ = &(var); \ |
| 192 | __tmp_var__ = get_cpu_var(var); \ | 199 | typeof(var) pr_ret__; \ |
| 193 | put_cpu_var(var); \ | 200 | pr_ret__ = get_cpu_var(*pr_ptr__); \ |
| 194 | __tmp_var__; \ | 201 | put_cpu_var(*pr_ptr__); \ |
| 202 | pr_ret__; \ | ||
| 195 | }) | 203 | }) |
| 196 | #endif | 204 | #endif |
| 197 | 205 | ||
| 198 | #define __percpu_generic_to_op(var, val, op) \ | 206 | #define __percpu_generic_to_op(var, val, op) \ |
| 199 | do { \ | 207 | do { \ |
| 200 | get_cpu_var(var) op val; \ | 208 | typeof(var) *pgto_ptr__ = &(var); \ |
| 201 | put_cpu_var(var); \ | 209 | get_cpu_var(*pgto_ptr__) op val; \ |
| 210 | put_cpu_var(*pgto_ptr__); \ | ||
| 202 | } while (0) | 211 | } while (0) |
| 203 | 212 | ||
| 204 | #ifndef percpu_write | 213 | #ifndef percpu_write |
| @@ -234,6 +243,7 @@ extern void __bad_size_call_parameter(void); | |||
| 234 | 243 | ||
| 235 | #define __pcpu_size_call_return(stem, variable) \ | 244 | #define __pcpu_size_call_return(stem, variable) \ |
| 236 | ({ typeof(variable) pscr_ret__; \ | 245 | ({ typeof(variable) pscr_ret__; \ |
| 246 | __verify_pcpu_ptr(&(variable)); \ | ||
| 237 | switch(sizeof(variable)) { \ | 247 | switch(sizeof(variable)) { \ |
| 238 | case 1: pscr_ret__ = stem##1(variable);break; \ | 248 | case 1: pscr_ret__ = stem##1(variable);break; \ |
| 239 | case 2: pscr_ret__ = stem##2(variable);break; \ | 249 | case 2: pscr_ret__ = stem##2(variable);break; \ |
| @@ -247,6 +257,7 @@ extern void __bad_size_call_parameter(void); | |||
| 247 | 257 | ||
| 248 | #define __pcpu_size_call(stem, variable, ...) \ | 258 | #define __pcpu_size_call(stem, variable, ...) \ |
| 249 | do { \ | 259 | do { \ |
| 260 | __verify_pcpu_ptr(&(variable)); \ | ||
| 250 | switch(sizeof(variable)) { \ | 261 | switch(sizeof(variable)) { \ |
| 251 | case 1: stem##1(variable, __VA_ARGS__);break; \ | 262 | case 1: stem##1(variable, __VA_ARGS__);break; \ |
| 252 | case 2: stem##2(variable, __VA_ARGS__);break; \ | 263 | case 2: stem##2(variable, __VA_ARGS__);break; \ |
| @@ -259,8 +270,7 @@ do { \ | |||
| 259 | 270 | ||
| 260 | /* | 271 | /* |
| 261 | * Optimized manipulation for memory allocated through the per cpu | 272 | * Optimized manipulation for memory allocated through the per cpu |
| 262 | * allocator or for addresses of per cpu variables (can be determined | 273 | * allocator or for addresses of per cpu variables. |
| 263 | * using per_cpu_var(xx). | ||
| 264 | * | 274 | * |
| 265 | * These operation guarantee exclusivity of access for other operations | 275 | * These operation guarantee exclusivity of access for other operations |
| 266 | * on the *same* processor. The assumption is that per cpu data is only | 276 | * on the *same* processor. The assumption is that per cpu data is only |
| @@ -311,7 +321,7 @@ do { \ | |||
| 311 | #define _this_cpu_generic_to_op(pcp, val, op) \ | 321 | #define _this_cpu_generic_to_op(pcp, val, op) \ |
| 312 | do { \ | 322 | do { \ |
| 313 | preempt_disable(); \ | 323 | preempt_disable(); \ |
| 314 | *__this_cpu_ptr(&pcp) op val; \ | 324 | *__this_cpu_ptr(&(pcp)) op val; \ |
| 315 | preempt_enable(); \ | 325 | preempt_enable(); \ |
| 316 | } while (0) | 326 | } while (0) |
| 317 | 327 | ||
diff --git a/include/linux/percpu_counter.h b/include/linux/percpu_counter.h index 794662b2be5d..c88d67b59394 100644 --- a/include/linux/percpu_counter.h +++ b/include/linux/percpu_counter.h | |||
| @@ -21,7 +21,7 @@ struct percpu_counter { | |||
| 21 | #ifdef CONFIG_HOTPLUG_CPU | 21 | #ifdef CONFIG_HOTPLUG_CPU |
| 22 | struct list_head list; /* All percpu_counters are on a list */ | 22 | struct list_head list; /* All percpu_counters are on a list */ |
| 23 | #endif | 23 | #endif |
| 24 | s32 *counters; | 24 | s32 __percpu *counters; |
| 25 | }; | 25 | }; |
| 26 | 26 | ||
| 27 | extern int percpu_counter_batch; | 27 | extern int percpu_counter_batch; |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 7b18b4fd5df7..95477038a72a 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
| @@ -452,6 +452,8 @@ enum perf_callchain_context { | |||
| 452 | #include <linux/fs.h> | 452 | #include <linux/fs.h> |
| 453 | #include <linux/pid_namespace.h> | 453 | #include <linux/pid_namespace.h> |
| 454 | #include <linux/workqueue.h> | 454 | #include <linux/workqueue.h> |
| 455 | #include <linux/ftrace.h> | ||
| 456 | #include <linux/cpu.h> | ||
| 455 | #include <asm/atomic.h> | 457 | #include <asm/atomic.h> |
| 456 | 458 | ||
| 457 | #define PERF_MAX_STACK_DEPTH 255 | 459 | #define PERF_MAX_STACK_DEPTH 255 |
| @@ -487,9 +489,8 @@ struct hw_perf_event { | |||
| 487 | struct hrtimer hrtimer; | 489 | struct hrtimer hrtimer; |
| 488 | }; | 490 | }; |
| 489 | #ifdef CONFIG_HAVE_HW_BREAKPOINT | 491 | #ifdef CONFIG_HAVE_HW_BREAKPOINT |
| 490 | union { /* breakpoint */ | 492 | /* breakpoint */ |
| 491 | struct arch_hw_breakpoint info; | 493 | struct arch_hw_breakpoint info; |
| 492 | }; | ||
| 493 | #endif | 494 | #endif |
| 494 | }; | 495 | }; |
| 495 | atomic64_t prev_count; | 496 | atomic64_t prev_count; |
| @@ -802,6 +803,13 @@ struct perf_sample_data { | |||
| 802 | struct perf_raw_record *raw; | 803 | struct perf_raw_record *raw; |
| 803 | }; | 804 | }; |
| 804 | 805 | ||
| 806 | static inline | ||
| 807 | void perf_sample_data_init(struct perf_sample_data *data, u64 addr) | ||
| 808 | { | ||
| 809 | data->addr = addr; | ||
| 810 | data->raw = NULL; | ||
| 811 | } | ||
| 812 | |||
| 805 | extern void perf_output_sample(struct perf_output_handle *handle, | 813 | extern void perf_output_sample(struct perf_output_handle *handle, |
| 806 | struct perf_event_header *header, | 814 | struct perf_event_header *header, |
| 807 | struct perf_sample_data *data, | 815 | struct perf_sample_data *data, |
| @@ -841,6 +849,44 @@ perf_sw_event(u32 event_id, u64 nr, int nmi, struct pt_regs *regs, u64 addr) | |||
| 841 | __perf_sw_event(event_id, nr, nmi, regs, addr); | 849 | __perf_sw_event(event_id, nr, nmi, regs, addr); |
| 842 | } | 850 | } |
| 843 | 851 | ||
| 852 | extern void | ||
| 853 | perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int skip); | ||
| 854 | |||
| 855 | /* | ||
| 856 | * Take a snapshot of the regs. Skip ip and frame pointer to | ||
| 857 | * the nth caller. We only need a few of the regs: | ||
| 858 | * - ip for PERF_SAMPLE_IP | ||
| 859 | * - cs for user_mode() tests | ||
| 860 | * - bp for callchains | ||
| 861 | * - eflags, for future purposes, just in case | ||
| 862 | */ | ||
| 863 | static inline void perf_fetch_caller_regs(struct pt_regs *regs, int skip) | ||
| 864 | { | ||
| 865 | unsigned long ip; | ||
| 866 | |||
| 867 | memset(regs, 0, sizeof(*regs)); | ||
| 868 | |||
| 869 | switch (skip) { | ||
| 870 | case 1 : | ||
| 871 | ip = CALLER_ADDR0; | ||
| 872 | break; | ||
| 873 | case 2 : | ||
| 874 | ip = CALLER_ADDR1; | ||
| 875 | break; | ||
| 876 | case 3 : | ||
| 877 | ip = CALLER_ADDR2; | ||
| 878 | break; | ||
| 879 | case 4: | ||
| 880 | ip = CALLER_ADDR3; | ||
| 881 | break; | ||
| 882 | /* No need to support further for now */ | ||
| 883 | default: | ||
| 884 | ip = 0; | ||
| 885 | } | ||
| 886 | |||
| 887 | return perf_arch_fetch_caller_regs(regs, ip, skip); | ||
| 888 | } | ||
| 889 | |||
| 844 | extern void __perf_event_mmap(struct vm_area_struct *vma); | 890 | extern void __perf_event_mmap(struct vm_area_struct *vma); |
| 845 | 891 | ||
| 846 | static inline void perf_event_mmap(struct vm_area_struct *vma) | 892 | static inline void perf_event_mmap(struct vm_area_struct *vma) |
| @@ -858,8 +904,24 @@ extern int sysctl_perf_event_paranoid; | |||
| 858 | extern int sysctl_perf_event_mlock; | 904 | extern int sysctl_perf_event_mlock; |
| 859 | extern int sysctl_perf_event_sample_rate; | 905 | extern int sysctl_perf_event_sample_rate; |
| 860 | 906 | ||
| 907 | static inline bool perf_paranoid_tracepoint_raw(void) | ||
| 908 | { | ||
| 909 | return sysctl_perf_event_paranoid > -1; | ||
| 910 | } | ||
| 911 | |||
| 912 | static inline bool perf_paranoid_cpu(void) | ||
| 913 | { | ||
| 914 | return sysctl_perf_event_paranoid > 0; | ||
| 915 | } | ||
| 916 | |||
| 917 | static inline bool perf_paranoid_kernel(void) | ||
| 918 | { | ||
| 919 | return sysctl_perf_event_paranoid > 1; | ||
| 920 | } | ||
| 921 | |||
| 861 | extern void perf_event_init(void); | 922 | extern void perf_event_init(void); |
| 862 | extern void perf_tp_event(int event_id, u64 addr, u64 count, void *record, int entry_size); | 923 | extern void perf_tp_event(int event_id, u64 addr, u64 count, void *record, |
| 924 | int entry_size, struct pt_regs *regs); | ||
| 863 | extern void perf_bp_event(struct perf_event *event, void *data); | 925 | extern void perf_bp_event(struct perf_event *event, void *data); |
| 864 | 926 | ||
| 865 | #ifndef perf_misc_flags | 927 | #ifndef perf_misc_flags |
| @@ -915,5 +977,21 @@ static inline void perf_event_disable(struct perf_event *event) { } | |||
| 915 | #define perf_output_put(handle, x) \ | 977 | #define perf_output_put(handle, x) \ |
| 916 | perf_output_copy((handle), &(x), sizeof(x)) | 978 | perf_output_copy((handle), &(x), sizeof(x)) |
| 917 | 979 | ||
| 980 | /* | ||
| 981 | * This has to have a higher priority than migration_notifier in sched.c. | ||
| 982 | */ | ||
| 983 | #define perf_cpu_notifier(fn) \ | ||
| 984 | do { \ | ||
| 985 | static struct notifier_block fn##_nb __cpuinitdata = \ | ||
| 986 | { .notifier_call = fn, .priority = 20 }; \ | ||
| 987 | fn(&fn##_nb, (unsigned long)CPU_UP_PREPARE, \ | ||
| 988 | (void *)(unsigned long)smp_processor_id()); \ | ||
| 989 | fn(&fn##_nb, (unsigned long)CPU_STARTING, \ | ||
| 990 | (void *)(unsigned long)smp_processor_id()); \ | ||
| 991 | fn(&fn##_nb, (unsigned long)CPU_ONLINE, \ | ||
| 992 | (void *)(unsigned long)smp_processor_id()); \ | ||
| 993 | register_cpu_notifier(&fn##_nb); \ | ||
| 994 | } while (0) | ||
| 995 | |||
| 918 | #endif /* __KERNEL__ */ | 996 | #endif /* __KERNEL__ */ |
| 919 | #endif /* _LINUX_PERF_EVENT_H */ | 997 | #endif /* _LINUX_PERF_EVENT_H */ |
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index 71ff887ca44e..212da17d06af 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h | |||
| @@ -21,7 +21,7 @@ struct platform_device { | |||
| 21 | u32 num_resources; | 21 | u32 num_resources; |
| 22 | struct resource * resource; | 22 | struct resource * resource; |
| 23 | 23 | ||
| 24 | struct platform_device_id *id_entry; | 24 | const struct platform_device_id *id_entry; |
| 25 | 25 | ||
| 26 | /* arch specific additions */ | 26 | /* arch specific additions */ |
| 27 | struct pdev_archdata archdata; | 27 | struct pdev_archdata archdata; |
| @@ -62,7 +62,7 @@ struct platform_driver { | |||
| 62 | int (*suspend)(struct platform_device *, pm_message_t state); | 62 | int (*suspend)(struct platform_device *, pm_message_t state); |
| 63 | int (*resume)(struct platform_device *); | 63 | int (*resume)(struct platform_device *); |
| 64 | struct device_driver driver; | 64 | struct device_driver driver; |
| 65 | struct platform_device_id *id_table; | 65 | const struct platform_device_id *id_table; |
| 66 | }; | 66 | }; |
| 67 | 67 | ||
| 68 | extern int platform_driver_register(struct platform_driver *); | 68 | extern int platform_driver_register(struct platform_driver *); |
| @@ -77,6 +77,11 @@ extern int platform_driver_probe(struct platform_driver *driver, | |||
| 77 | #define platform_get_drvdata(_dev) dev_get_drvdata(&(_dev)->dev) | 77 | #define platform_get_drvdata(_dev) dev_get_drvdata(&(_dev)->dev) |
| 78 | #define platform_set_drvdata(_dev,data) dev_set_drvdata(&(_dev)->dev, (data)) | 78 | #define platform_set_drvdata(_dev,data) dev_set_drvdata(&(_dev)->dev, (data)) |
| 79 | 79 | ||
| 80 | extern struct platform_device *platform_create_bundle(struct platform_driver *driver, | ||
| 81 | int (*probe)(struct platform_device *), | ||
| 82 | struct resource *res, unsigned int n_res, | ||
| 83 | const void *data, size_t size); | ||
| 84 | |||
| 80 | /* early platform driver interface */ | 85 | /* early platform driver interface */ |
| 81 | struct early_platform_driver { | 86 | struct early_platform_driver { |
| 82 | const char *class_str; | 87 | const char *class_str; |
diff --git a/include/linux/pm.h b/include/linux/pm.h index e80df06ad22a..8e258c727971 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
| @@ -215,20 +215,59 @@ struct dev_pm_ops { | |||
| 215 | int (*runtime_idle)(struct device *dev); | 215 | int (*runtime_idle)(struct device *dev); |
| 216 | }; | 216 | }; |
| 217 | 217 | ||
| 218 | #ifdef CONFIG_PM_SLEEP | ||
| 219 | #define SET_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \ | ||
| 220 | .suspend = suspend_fn, \ | ||
| 221 | .resume = resume_fn, \ | ||
| 222 | .freeze = suspend_fn, \ | ||
| 223 | .thaw = resume_fn, \ | ||
| 224 | .poweroff = suspend_fn, \ | ||
| 225 | .restore = resume_fn, | ||
| 226 | #else | ||
| 227 | #define SET_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) | ||
| 228 | #endif | ||
| 229 | |||
| 230 | #ifdef CONFIG_PM_RUNTIME | ||
| 231 | #define SET_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \ | ||
| 232 | .runtime_suspend = suspend_fn, \ | ||
| 233 | .runtime_resume = resume_fn, \ | ||
| 234 | .runtime_idle = idle_fn, | ||
| 235 | #else | ||
| 236 | #define SET_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) | ||
| 237 | #endif | ||
| 238 | |||
| 218 | /* | 239 | /* |
| 219 | * Use this if you want to use the same suspend and resume callbacks for suspend | 240 | * Use this if you want to use the same suspend and resume callbacks for suspend |
| 220 | * to RAM and hibernation. | 241 | * to RAM and hibernation. |
| 221 | */ | 242 | */ |
| 222 | #define SIMPLE_DEV_PM_OPS(name, suspend_fn, resume_fn) \ | 243 | #define SIMPLE_DEV_PM_OPS(name, suspend_fn, resume_fn) \ |
| 223 | const struct dev_pm_ops name = { \ | 244 | const struct dev_pm_ops name = { \ |
| 224 | .suspend = suspend_fn, \ | 245 | SET_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \ |
| 225 | .resume = resume_fn, \ | 246 | } |
| 226 | .freeze = suspend_fn, \ | 247 | |
| 227 | .thaw = resume_fn, \ | 248 | /* |
| 228 | .poweroff = suspend_fn, \ | 249 | * Use this for defining a set of PM operations to be used in all situations |
| 229 | .restore = resume_fn, \ | 250 | * (sustem suspend, hibernation or runtime PM). |
| 251 | */ | ||
| 252 | #define UNIVERSAL_DEV_PM_OPS(name, suspend_fn, resume_fn, idle_fn) \ | ||
| 253 | const struct dev_pm_ops name = { \ | ||
| 254 | SET_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \ | ||
| 255 | SET_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \ | ||
| 230 | } | 256 | } |
| 231 | 257 | ||
| 258 | /* | ||
| 259 | * Use this for subsystems (bus types, device types, device classes) that don't | ||
| 260 | * need any special suspend/resume handling in addition to invoking the PM | ||
| 261 | * callbacks provided by device drivers supporting both the system sleep PM and | ||
| 262 | * runtime PM, make the pm member point to generic_subsys_pm_ops. | ||
| 263 | */ | ||
| 264 | #ifdef CONFIG_PM_OPS | ||
| 265 | extern struct dev_pm_ops generic_subsys_pm_ops; | ||
| 266 | #define GENERIC_SUBSYS_PM_OPS (&generic_subsys_pm_ops) | ||
| 267 | #else | ||
| 268 | #define GENERIC_SUBSYS_PM_OPS NULL | ||
| 269 | #endif | ||
| 270 | |||
| 232 | /** | 271 | /** |
| 233 | * PM_EVENT_ messages | 272 | * PM_EVENT_ messages |
| 234 | * | 273 | * |
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h index 7d773aac5314..b776db737244 100644 --- a/include/linux/pm_runtime.h +++ b/include/linux/pm_runtime.h | |||
| @@ -62,6 +62,11 @@ static inline void device_set_run_wake(struct device *dev, bool enable) | |||
| 62 | dev->power.run_wake = enable; | 62 | dev->power.run_wake = enable; |
| 63 | } | 63 | } |
| 64 | 64 | ||
| 65 | static inline bool pm_runtime_suspended(struct device *dev) | ||
| 66 | { | ||
| 67 | return dev->power.runtime_status == RPM_SUSPENDED; | ||
| 68 | } | ||
| 69 | |||
| 65 | #else /* !CONFIG_PM_RUNTIME */ | 70 | #else /* !CONFIG_PM_RUNTIME */ |
| 66 | 71 | ||
| 67 | static inline int pm_runtime_idle(struct device *dev) { return -ENOSYS; } | 72 | static inline int pm_runtime_idle(struct device *dev) { return -ENOSYS; } |
| @@ -89,6 +94,7 @@ static inline void pm_runtime_get_noresume(struct device *dev) {} | |||
| 89 | static inline void pm_runtime_put_noidle(struct device *dev) {} | 94 | static inline void pm_runtime_put_noidle(struct device *dev) {} |
| 90 | static inline bool device_run_wake(struct device *dev) { return false; } | 95 | static inline bool device_run_wake(struct device *dev) { return false; } |
| 91 | static inline void device_set_run_wake(struct device *dev, bool enable) {} | 96 | static inline void device_set_run_wake(struct device *dev, bool enable) {} |
| 97 | static inline bool pm_runtime_suspended(struct device *dev) { return false; } | ||
| 92 | 98 | ||
| 93 | #endif /* !CONFIG_PM_RUNTIME */ | 99 | #endif /* !CONFIG_PM_RUNTIME */ |
| 94 | 100 | ||
diff --git a/include/linux/poll.h b/include/linux/poll.h index 6673743946f7..600cc1fde64d 100644 --- a/include/linux/poll.h +++ b/include/linux/poll.h | |||
| @@ -10,8 +10,10 @@ | |||
| 10 | #include <linux/wait.h> | 10 | #include <linux/wait.h> |
| 11 | #include <linux/string.h> | 11 | #include <linux/string.h> |
| 12 | #include <linux/fs.h> | 12 | #include <linux/fs.h> |
| 13 | #include <linux/sysctl.h> | ||
| 13 | #include <asm/uaccess.h> | 14 | #include <asm/uaccess.h> |
| 14 | 15 | ||
| 16 | extern struct ctl_table epoll_table[]; /* for sysctl */ | ||
| 15 | /* ~832 bytes of stack space used max in sys_select/sys_poll before allocating | 17 | /* ~832 bytes of stack space used max in sys_select/sys_poll before allocating |
| 16 | additional memory. */ | 18 | additional memory. */ |
| 17 | #define MAX_STACK_ALLOC 832 | 19 | #define MAX_STACK_ALLOC 832 |
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index b5d096d3a9be..ebd2b8fb00d0 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h | |||
| @@ -82,6 +82,7 @@ enum power_supply_property { | |||
| 82 | POWER_SUPPLY_PROP_PRESENT, | 82 | POWER_SUPPLY_PROP_PRESENT, |
| 83 | POWER_SUPPLY_PROP_ONLINE, | 83 | POWER_SUPPLY_PROP_ONLINE, |
| 84 | POWER_SUPPLY_PROP_TECHNOLOGY, | 84 | POWER_SUPPLY_PROP_TECHNOLOGY, |
| 85 | POWER_SUPPLY_PROP_CYCLE_COUNT, | ||
| 85 | POWER_SUPPLY_PROP_VOLTAGE_MAX, | 86 | POWER_SUPPLY_PROP_VOLTAGE_MAX, |
| 86 | POWER_SUPPLY_PROP_VOLTAGE_MIN, | 87 | POWER_SUPPLY_PROP_VOLTAGE_MIN, |
| 87 | POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN, | 88 | POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN, |
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index c5eab89da51e..e1fb60729979 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
| @@ -264,6 +264,9 @@ static inline void user_enable_single_step(struct task_struct *task) | |||
| 264 | static inline void user_disable_single_step(struct task_struct *task) | 264 | static inline void user_disable_single_step(struct task_struct *task) |
| 265 | { | 265 | { |
| 266 | } | 266 | } |
| 267 | #else | ||
| 268 | extern void user_enable_single_step(struct task_struct *); | ||
| 269 | extern void user_disable_single_step(struct task_struct *); | ||
| 267 | #endif /* arch_has_single_step */ | 270 | #endif /* arch_has_single_step */ |
| 268 | 271 | ||
| 269 | #ifndef arch_has_block_step | 272 | #ifndef arch_has_block_step |
| @@ -291,6 +294,8 @@ static inline void user_enable_block_step(struct task_struct *task) | |||
| 291 | { | 294 | { |
| 292 | BUG(); /* This can never be called. */ | 295 | BUG(); /* This can never be called. */ |
| 293 | } | 296 | } |
| 297 | #else | ||
| 298 | extern void user_enable_block_step(struct task_struct *); | ||
| 294 | #endif /* arch_has_block_step */ | 299 | #endif /* arch_has_block_step */ |
| 295 | 300 | ||
| 296 | #ifdef ARCH_HAS_USER_SINGLE_STEP_INFO | 301 | #ifdef ARCH_HAS_USER_SINGLE_STEP_INFO |
diff --git a/include/linux/quota.h b/include/linux/quota.h index a6861f117480..b462916b2a0a 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h | |||
| @@ -279,9 +279,6 @@ struct dquot { | |||
| 279 | struct mem_dqblk dq_dqb; /* Diskquota usage */ | 279 | struct mem_dqblk dq_dqb; /* Diskquota usage */ |
| 280 | }; | 280 | }; |
| 281 | 281 | ||
| 282 | #define QUOTA_OK 0 | ||
| 283 | #define NO_QUOTA 1 | ||
| 284 | |||
| 285 | /* Operations which must be implemented by each quota format */ | 282 | /* Operations which must be implemented by each quota format */ |
| 286 | struct quota_format_ops { | 283 | struct quota_format_ops { |
| 287 | int (*check_quota_file)(struct super_block *sb, int type); /* Detect whether file is in our format */ | 284 | int (*check_quota_file)(struct super_block *sb, int type); /* Detect whether file is in our format */ |
| @@ -295,13 +292,6 @@ struct quota_format_ops { | |||
| 295 | 292 | ||
| 296 | /* Operations working with dquots */ | 293 | /* Operations working with dquots */ |
| 297 | struct dquot_operations { | 294 | struct dquot_operations { |
| 298 | int (*initialize) (struct inode *, int); | ||
| 299 | int (*drop) (struct inode *); | ||
| 300 | int (*alloc_space) (struct inode *, qsize_t, int); | ||
| 301 | int (*alloc_inode) (const struct inode *, qsize_t); | ||
| 302 | int (*free_space) (struct inode *, qsize_t); | ||
| 303 | int (*free_inode) (const struct inode *, qsize_t); | ||
| 304 | int (*transfer) (struct inode *, struct iattr *); | ||
| 305 | int (*write_dquot) (struct dquot *); /* Ordinary dquot write */ | 295 | int (*write_dquot) (struct dquot *); /* Ordinary dquot write */ |
| 306 | struct dquot *(*alloc_dquot)(struct super_block *, int); /* Allocate memory for new dquot */ | 296 | struct dquot *(*alloc_dquot)(struct super_block *, int); /* Allocate memory for new dquot */ |
| 307 | void (*destroy_dquot)(struct dquot *); /* Free memory for dquot */ | 297 | void (*destroy_dquot)(struct dquot *); /* Free memory for dquot */ |
| @@ -309,12 +299,6 @@ struct dquot_operations { | |||
| 309 | int (*release_dquot) (struct dquot *); /* Quota is going to be deleted from disk */ | 299 | int (*release_dquot) (struct dquot *); /* Quota is going to be deleted from disk */ |
| 310 | int (*mark_dirty) (struct dquot *); /* Dquot is marked dirty */ | 300 | int (*mark_dirty) (struct dquot *); /* Dquot is marked dirty */ |
| 311 | int (*write_info) (struct super_block *, int); /* Write of quota "superblock" */ | 301 | int (*write_info) (struct super_block *, int); /* Write of quota "superblock" */ |
| 312 | /* reserve quota for delayed block allocation */ | ||
| 313 | int (*reserve_space) (struct inode *, qsize_t, int); | ||
| 314 | /* claim reserved quota for delayed alloc */ | ||
| 315 | int (*claim_space) (struct inode *, qsize_t); | ||
| 316 | /* release rsved quota for delayed alloc */ | ||
| 317 | void (*release_rsv) (struct inode *, qsize_t); | ||
| 318 | /* get reserved quota for delayed alloc, value returned is managed by | 302 | /* get reserved quota for delayed alloc, value returned is managed by |
| 319 | * quota code only */ | 303 | * quota code only */ |
| 320 | qsize_t *(*get_reserved_space) (struct inode *); | 304 | qsize_t *(*get_reserved_space) (struct inode *); |
| @@ -324,7 +308,7 @@ struct dquot_operations { | |||
| 324 | struct quotactl_ops { | 308 | struct quotactl_ops { |
| 325 | int (*quota_on)(struct super_block *, int, int, char *, int); | 309 | int (*quota_on)(struct super_block *, int, int, char *, int); |
| 326 | int (*quota_off)(struct super_block *, int, int); | 310 | int (*quota_off)(struct super_block *, int, int); |
| 327 | int (*quota_sync)(struct super_block *, int); | 311 | int (*quota_sync)(struct super_block *, int, int); |
| 328 | int (*get_info)(struct super_block *, int, struct if_dqinfo *); | 312 | int (*get_info)(struct super_block *, int, struct if_dqinfo *); |
| 329 | int (*set_info)(struct super_block *, int, struct if_dqinfo *); | 313 | int (*set_info)(struct super_block *, int, struct if_dqinfo *); |
| 330 | int (*get_dqblk)(struct super_block *, int, qid_t, struct if_dqblk *); | 314 | int (*get_dqblk)(struct super_block *, int, qid_t, struct if_dqblk *); |
| @@ -357,26 +341,25 @@ enum { | |||
| 357 | #define DQUOT_STATE_FLAGS (DQUOT_USAGE_ENABLED | DQUOT_LIMITS_ENABLED | \ | 341 | #define DQUOT_STATE_FLAGS (DQUOT_USAGE_ENABLED | DQUOT_LIMITS_ENABLED | \ |
| 358 | DQUOT_SUSPENDED) | 342 | DQUOT_SUSPENDED) |
| 359 | /* Other quota flags */ | 343 | /* Other quota flags */ |
| 360 | #define DQUOT_QUOTA_SYS_FILE (1 << 6) /* Quota file is a special | 344 | #define DQUOT_STATE_LAST (_DQUOT_STATE_FLAGS * MAXQUOTAS) |
| 345 | #define DQUOT_QUOTA_SYS_FILE (1 << DQUOT_STATE_LAST) | ||
| 346 | /* Quota file is a special | ||
| 361 | * system file and user cannot | 347 | * system file and user cannot |
| 362 | * touch it. Filesystem is | 348 | * touch it. Filesystem is |
| 363 | * responsible for setting | 349 | * responsible for setting |
| 364 | * S_NOQUOTA, S_NOATIME flags | 350 | * S_NOQUOTA, S_NOATIME flags |
| 365 | */ | 351 | */ |
| 366 | #define DQUOT_NEGATIVE_USAGE (1 << 7) /* Allow negative quota usage */ | 352 | #define DQUOT_NEGATIVE_USAGE (1 << (DQUOT_STATE_LAST + 1)) |
| 353 | /* Allow negative quota usage */ | ||
| 367 | 354 | ||
| 368 | static inline unsigned int dquot_state_flag(unsigned int flags, int type) | 355 | static inline unsigned int dquot_state_flag(unsigned int flags, int type) |
| 369 | { | 356 | { |
| 370 | if (type == USRQUOTA) | 357 | return flags << _DQUOT_STATE_FLAGS * type; |
| 371 | return flags; | ||
| 372 | return flags << _DQUOT_STATE_FLAGS; | ||
| 373 | } | 358 | } |
| 374 | 359 | ||
| 375 | static inline unsigned int dquot_generic_flag(unsigned int flags, int type) | 360 | static inline unsigned int dquot_generic_flag(unsigned int flags, int type) |
| 376 | { | 361 | { |
| 377 | if (type == USRQUOTA) | 362 | return (flags >> _DQUOT_STATE_FLAGS * type) & DQUOT_STATE_FLAGS; |
| 378 | return flags; | ||
| 379 | return flags >> _DQUOT_STATE_FLAGS; | ||
| 380 | } | 363 | } |
| 381 | 364 | ||
| 382 | #ifdef CONFIG_QUOTA_NETLINK_INTERFACE | 365 | #ifdef CONFIG_QUOTA_NETLINK_INTERFACE |
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index 3ebb23153640..e6fa7acce290 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h | |||
| @@ -19,15 +19,12 @@ static inline struct quota_info *sb_dqopt(struct super_block *sb) | |||
| 19 | /* | 19 | /* |
| 20 | * declaration of quota_function calls in kernel. | 20 | * declaration of quota_function calls in kernel. |
| 21 | */ | 21 | */ |
| 22 | void sync_quota_sb(struct super_block *sb, int type); | 22 | void inode_add_rsv_space(struct inode *inode, qsize_t number); |
| 23 | static inline void writeout_quota_sb(struct super_block *sb, int type) | 23 | void inode_claim_rsv_space(struct inode *inode, qsize_t number); |
| 24 | { | 24 | void inode_sub_rsv_space(struct inode *inode, qsize_t number); |
| 25 | if (sb->s_qcop->quota_sync) | ||
| 26 | sb->s_qcop->quota_sync(sb, type); | ||
| 27 | } | ||
| 28 | 25 | ||
| 29 | int dquot_initialize(struct inode *inode, int type); | 26 | void dquot_initialize(struct inode *inode); |
| 30 | int dquot_drop(struct inode *inode); | 27 | void dquot_drop(struct inode *inode); |
| 31 | struct dquot *dqget(struct super_block *sb, unsigned int id, int type); | 28 | struct dquot *dqget(struct super_block *sb, unsigned int id, int type); |
| 32 | void dqput(struct dquot *dquot); | 29 | void dqput(struct dquot *dquot); |
| 33 | int dquot_scan_active(struct super_block *sb, | 30 | int dquot_scan_active(struct super_block *sb, |
| @@ -36,24 +33,23 @@ int dquot_scan_active(struct super_block *sb, | |||
| 36 | struct dquot *dquot_alloc(struct super_block *sb, int type); | 33 | struct dquot *dquot_alloc(struct super_block *sb, int type); |
| 37 | void dquot_destroy(struct dquot *dquot); | 34 | void dquot_destroy(struct dquot *dquot); |
| 38 | 35 | ||
| 39 | int dquot_alloc_space(struct inode *inode, qsize_t number, int prealloc); | 36 | int __dquot_alloc_space(struct inode *inode, qsize_t number, |
| 40 | int dquot_alloc_inode(const struct inode *inode, qsize_t number); | 37 | int warn, int reserve); |
| 38 | void __dquot_free_space(struct inode *inode, qsize_t number, int reserve); | ||
| 41 | 39 | ||
| 42 | int dquot_reserve_space(struct inode *inode, qsize_t number, int prealloc); | 40 | int dquot_alloc_inode(const struct inode *inode); |
| 43 | int dquot_claim_space(struct inode *inode, qsize_t number); | ||
| 44 | void dquot_release_reserved_space(struct inode *inode, qsize_t number); | ||
| 45 | qsize_t dquot_get_reserved_space(struct inode *inode); | ||
| 46 | 41 | ||
| 47 | int dquot_free_space(struct inode *inode, qsize_t number); | 42 | int dquot_claim_space_nodirty(struct inode *inode, qsize_t number); |
| 48 | int dquot_free_inode(const struct inode *inode, qsize_t number); | 43 | void dquot_free_inode(const struct inode *inode); |
| 49 | 44 | ||
| 50 | int dquot_transfer(struct inode *inode, struct iattr *iattr); | ||
| 51 | int dquot_commit(struct dquot *dquot); | 45 | int dquot_commit(struct dquot *dquot); |
| 52 | int dquot_acquire(struct dquot *dquot); | 46 | int dquot_acquire(struct dquot *dquot); |
| 53 | int dquot_release(struct dquot *dquot); | 47 | int dquot_release(struct dquot *dquot); |
| 54 | int dquot_commit_info(struct super_block *sb, int type); | 48 | int dquot_commit_info(struct super_block *sb, int type); |
| 55 | int dquot_mark_dquot_dirty(struct dquot *dquot); | 49 | int dquot_mark_dquot_dirty(struct dquot *dquot); |
| 56 | 50 | ||
| 51 | int dquot_file_open(struct inode *inode, struct file *file); | ||
| 52 | |||
| 57 | int vfs_quota_on(struct super_block *sb, int type, int format_id, | 53 | int vfs_quota_on(struct super_block *sb, int type, int format_id, |
| 58 | char *path, int remount); | 54 | char *path, int remount); |
| 59 | int vfs_quota_enable(struct inode *inode, int type, int format_id, | 55 | int vfs_quota_enable(struct inode *inode, int type, int format_id, |
| @@ -64,14 +60,13 @@ int vfs_quota_on_mount(struct super_block *sb, char *qf_name, | |||
| 64 | int format_id, int type); | 60 | int format_id, int type); |
| 65 | int vfs_quota_off(struct super_block *sb, int type, int remount); | 61 | int vfs_quota_off(struct super_block *sb, int type, int remount); |
| 66 | int vfs_quota_disable(struct super_block *sb, int type, unsigned int flags); | 62 | int vfs_quota_disable(struct super_block *sb, int type, unsigned int flags); |
| 67 | int vfs_quota_sync(struct super_block *sb, int type); | 63 | int vfs_quota_sync(struct super_block *sb, int type, int wait); |
| 68 | int vfs_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); | 64 | int vfs_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); |
| 69 | int vfs_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); | 65 | int vfs_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); |
| 70 | int vfs_get_dqblk(struct super_block *sb, int type, qid_t id, struct if_dqblk *di); | 66 | int vfs_get_dqblk(struct super_block *sb, int type, qid_t id, struct if_dqblk *di); |
| 71 | int vfs_set_dqblk(struct super_block *sb, int type, qid_t id, struct if_dqblk *di); | 67 | int vfs_set_dqblk(struct super_block *sb, int type, qid_t id, struct if_dqblk *di); |
| 72 | 68 | ||
| 73 | void vfs_dq_drop(struct inode *inode); | 69 | int dquot_transfer(struct inode *inode, struct iattr *iattr); |
| 74 | int vfs_dq_transfer(struct inode *inode, struct iattr *iattr); | ||
| 75 | int vfs_dq_quota_on_remount(struct super_block *sb); | 70 | int vfs_dq_quota_on_remount(struct super_block *sb); |
| 76 | 71 | ||
| 77 | static inline struct mem_dqinfo *sb_dqinfo(struct super_block *sb, int type) | 72 | static inline struct mem_dqinfo *sb_dqinfo(struct super_block *sb, int type) |
| @@ -83,53 +78,56 @@ static inline struct mem_dqinfo *sb_dqinfo(struct super_block *sb, int type) | |||
| 83 | * Functions for checking status of quota | 78 | * Functions for checking status of quota |
| 84 | */ | 79 | */ |
| 85 | 80 | ||
| 86 | static inline int sb_has_quota_usage_enabled(struct super_block *sb, int type) | 81 | static inline bool sb_has_quota_usage_enabled(struct super_block *sb, int type) |
| 87 | { | 82 | { |
| 88 | return sb_dqopt(sb)->flags & | 83 | return sb_dqopt(sb)->flags & |
| 89 | dquot_state_flag(DQUOT_USAGE_ENABLED, type); | 84 | dquot_state_flag(DQUOT_USAGE_ENABLED, type); |
| 90 | } | 85 | } |
| 91 | 86 | ||
| 92 | static inline int sb_has_quota_limits_enabled(struct super_block *sb, int type) | 87 | static inline bool sb_has_quota_limits_enabled(struct super_block *sb, int type) |
| 93 | { | 88 | { |
| 94 | return sb_dqopt(sb)->flags & | 89 | return sb_dqopt(sb)->flags & |
| 95 | dquot_state_flag(DQUOT_LIMITS_ENABLED, type); | 90 | dquot_state_flag(DQUOT_LIMITS_ENABLED, type); |
| 96 | } | 91 | } |
| 97 | 92 | ||
| 98 | static inline int sb_has_quota_suspended(struct super_block *sb, int type) | 93 | static inline bool sb_has_quota_suspended(struct super_block *sb, int type) |
| 99 | { | 94 | { |
| 100 | return sb_dqopt(sb)->flags & | 95 | return sb_dqopt(sb)->flags & |
| 101 | dquot_state_flag(DQUOT_SUSPENDED, type); | 96 | dquot_state_flag(DQUOT_SUSPENDED, type); |
| 102 | } | 97 | } |
| 103 | 98 | ||
| 104 | static inline int sb_any_quota_suspended(struct super_block *sb) | 99 | static inline unsigned sb_any_quota_suspended(struct super_block *sb) |
| 105 | { | 100 | { |
| 106 | return sb_has_quota_suspended(sb, USRQUOTA) || | 101 | unsigned type, tmsk = 0; |
| 107 | sb_has_quota_suspended(sb, GRPQUOTA); | 102 | for (type = 0; type < MAXQUOTAS; type++) |
| 103 | tmsk |= sb_has_quota_suspended(sb, type) << type; | ||
| 104 | return tmsk; | ||
| 108 | } | 105 | } |
| 109 | 106 | ||
| 110 | /* Does kernel know about any quota information for given sb + type? */ | 107 | /* Does kernel know about any quota information for given sb + type? */ |
| 111 | static inline int sb_has_quota_loaded(struct super_block *sb, int type) | 108 | static inline bool sb_has_quota_loaded(struct super_block *sb, int type) |
| 112 | { | 109 | { |
| 113 | /* Currently if anything is on, then quota usage is on as well */ | 110 | /* Currently if anything is on, then quota usage is on as well */ |
| 114 | return sb_has_quota_usage_enabled(sb, type); | 111 | return sb_has_quota_usage_enabled(sb, type); |
| 115 | } | 112 | } |
| 116 | 113 | ||
| 117 | static inline int sb_any_quota_loaded(struct super_block *sb) | 114 | static inline unsigned sb_any_quota_loaded(struct super_block *sb) |
| 118 | { | 115 | { |
| 119 | return sb_has_quota_loaded(sb, USRQUOTA) || | 116 | unsigned type, tmsk = 0; |
| 120 | sb_has_quota_loaded(sb, GRPQUOTA); | 117 | for (type = 0; type < MAXQUOTAS; type++) |
| 118 | tmsk |= sb_has_quota_loaded(sb, type) << type; | ||
| 119 | return tmsk; | ||
| 121 | } | 120 | } |
| 122 | 121 | ||
| 123 | static inline int sb_has_quota_active(struct super_block *sb, int type) | 122 | static inline bool sb_has_quota_active(struct super_block *sb, int type) |
| 124 | { | 123 | { |
| 125 | return sb_has_quota_loaded(sb, type) && | 124 | return sb_has_quota_loaded(sb, type) && |
| 126 | !sb_has_quota_suspended(sb, type); | 125 | !sb_has_quota_suspended(sb, type); |
| 127 | } | 126 | } |
| 128 | 127 | ||
| 129 | static inline int sb_any_quota_active(struct super_block *sb) | 128 | static inline unsigned sb_any_quota_active(struct super_block *sb) |
| 130 | { | 129 | { |
| 131 | return sb_has_quota_active(sb, USRQUOTA) || | 130 | return sb_any_quota_loaded(sb) & ~sb_any_quota_suspended(sb); |
| 132 | sb_has_quota_active(sb, GRPQUOTA); | ||
| 133 | } | 131 | } |
| 134 | 132 | ||
| 135 | /* | 133 | /* |
| @@ -141,122 +139,6 @@ extern const struct quotactl_ops vfs_quotactl_ops; | |||
| 141 | #define sb_dquot_ops (&dquot_operations) | 139 | #define sb_dquot_ops (&dquot_operations) |
| 142 | #define sb_quotactl_ops (&vfs_quotactl_ops) | 140 | #define sb_quotactl_ops (&vfs_quotactl_ops) |
| 143 | 141 | ||
| 144 | /* It is better to call this function outside of any transaction as it might | ||
| 145 | * need a lot of space in journal for dquot structure allocation. */ | ||
| 146 | static inline void vfs_dq_init(struct inode *inode) | ||
| 147 | { | ||
| 148 | BUG_ON(!inode->i_sb); | ||
| 149 | if (sb_any_quota_active(inode->i_sb) && !IS_NOQUOTA(inode)) | ||
| 150 | inode->i_sb->dq_op->initialize(inode, -1); | ||
| 151 | } | ||
| 152 | |||
| 153 | /* The following allocation/freeing/transfer functions *must* be called inside | ||
| 154 | * a transaction (deadlocks possible otherwise) */ | ||
| 155 | static inline int vfs_dq_prealloc_space_nodirty(struct inode *inode, qsize_t nr) | ||
| 156 | { | ||
| 157 | if (sb_any_quota_active(inode->i_sb)) { | ||
| 158 | /* Used space is updated in alloc_space() */ | ||
| 159 | if (inode->i_sb->dq_op->alloc_space(inode, nr, 1) == NO_QUOTA) | ||
| 160 | return 1; | ||
| 161 | } | ||
| 162 | else | ||
| 163 | inode_add_bytes(inode, nr); | ||
| 164 | return 0; | ||
| 165 | } | ||
| 166 | |||
| 167 | static inline int vfs_dq_prealloc_space(struct inode *inode, qsize_t nr) | ||
| 168 | { | ||
| 169 | int ret; | ||
| 170 | if (!(ret = vfs_dq_prealloc_space_nodirty(inode, nr))) | ||
| 171 | mark_inode_dirty(inode); | ||
| 172 | return ret; | ||
| 173 | } | ||
| 174 | |||
| 175 | static inline int vfs_dq_alloc_space_nodirty(struct inode *inode, qsize_t nr) | ||
| 176 | { | ||
| 177 | if (sb_any_quota_active(inode->i_sb)) { | ||
| 178 | /* Used space is updated in alloc_space() */ | ||
| 179 | if (inode->i_sb->dq_op->alloc_space(inode, nr, 0) == NO_QUOTA) | ||
| 180 | return 1; | ||
| 181 | } | ||
| 182 | else | ||
| 183 | inode_add_bytes(inode, nr); | ||
| 184 | return 0; | ||
| 185 | } | ||
| 186 | |||
| 187 | static inline int vfs_dq_alloc_space(struct inode *inode, qsize_t nr) | ||
| 188 | { | ||
| 189 | int ret; | ||
| 190 | if (!(ret = vfs_dq_alloc_space_nodirty(inode, nr))) | ||
| 191 | mark_inode_dirty(inode); | ||
| 192 | return ret; | ||
| 193 | } | ||
| 194 | |||
| 195 | static inline int vfs_dq_reserve_space(struct inode *inode, qsize_t nr) | ||
| 196 | { | ||
| 197 | if (sb_any_quota_active(inode->i_sb)) { | ||
| 198 | /* Used space is updated in alloc_space() */ | ||
| 199 | if (inode->i_sb->dq_op->reserve_space(inode, nr, 0) == NO_QUOTA) | ||
| 200 | return 1; | ||
| 201 | } | ||
| 202 | return 0; | ||
| 203 | } | ||
| 204 | |||
| 205 | static inline int vfs_dq_alloc_inode(struct inode *inode) | ||
| 206 | { | ||
| 207 | if (sb_any_quota_active(inode->i_sb)) { | ||
| 208 | vfs_dq_init(inode); | ||
| 209 | if (inode->i_sb->dq_op->alloc_inode(inode, 1) == NO_QUOTA) | ||
| 210 | return 1; | ||
| 211 | } | ||
| 212 | return 0; | ||
| 213 | } | ||
| 214 | |||
| 215 | /* | ||
| 216 | * Convert in-memory reserved quotas to real consumed quotas | ||
| 217 | */ | ||
| 218 | static inline int vfs_dq_claim_space(struct inode *inode, qsize_t nr) | ||
| 219 | { | ||
| 220 | if (sb_any_quota_active(inode->i_sb)) { | ||
| 221 | if (inode->i_sb->dq_op->claim_space(inode, nr) == NO_QUOTA) | ||
| 222 | return 1; | ||
| 223 | } else | ||
| 224 | inode_add_bytes(inode, nr); | ||
| 225 | |||
| 226 | mark_inode_dirty(inode); | ||
| 227 | return 0; | ||
| 228 | } | ||
| 229 | |||
| 230 | /* | ||
| 231 | * Release reserved (in-memory) quotas | ||
| 232 | */ | ||
| 233 | static inline | ||
| 234 | void vfs_dq_release_reservation_space(struct inode *inode, qsize_t nr) | ||
| 235 | { | ||
| 236 | if (sb_any_quota_active(inode->i_sb)) | ||
| 237 | inode->i_sb->dq_op->release_rsv(inode, nr); | ||
| 238 | } | ||
| 239 | |||
| 240 | static inline void vfs_dq_free_space_nodirty(struct inode *inode, qsize_t nr) | ||
| 241 | { | ||
| 242 | if (sb_any_quota_active(inode->i_sb)) | ||
| 243 | inode->i_sb->dq_op->free_space(inode, nr); | ||
| 244 | else | ||
| 245 | inode_sub_bytes(inode, nr); | ||
| 246 | } | ||
| 247 | |||
| 248 | static inline void vfs_dq_free_space(struct inode *inode, qsize_t nr) | ||
| 249 | { | ||
| 250 | vfs_dq_free_space_nodirty(inode, nr); | ||
| 251 | mark_inode_dirty(inode); | ||
| 252 | } | ||
| 253 | |||
| 254 | static inline void vfs_dq_free_inode(struct inode *inode) | ||
| 255 | { | ||
| 256 | if (sb_any_quota_active(inode->i_sb)) | ||
| 257 | inode->i_sb->dq_op->free_inode(inode, 1); | ||
| 258 | } | ||
| 259 | |||
| 260 | /* Cannot be called inside a transaction */ | 142 | /* Cannot be called inside a transaction */ |
| 261 | static inline int vfs_dq_off(struct super_block *sb, int remount) | 143 | static inline int vfs_dq_off(struct super_block *sb, int remount) |
| 262 | { | 144 | { |
| @@ -316,28 +198,20 @@ static inline int sb_any_quota_active(struct super_block *sb) | |||
| 316 | #define sb_dquot_ops (NULL) | 198 | #define sb_dquot_ops (NULL) |
| 317 | #define sb_quotactl_ops (NULL) | 199 | #define sb_quotactl_ops (NULL) |
| 318 | 200 | ||
| 319 | static inline void vfs_dq_init(struct inode *inode) | 201 | static inline void dquot_initialize(struct inode *inode) |
| 320 | { | 202 | { |
| 321 | } | 203 | } |
| 322 | 204 | ||
| 323 | static inline void vfs_dq_drop(struct inode *inode) | 205 | static inline void dquot_drop(struct inode *inode) |
| 324 | { | 206 | { |
| 325 | } | 207 | } |
| 326 | 208 | ||
| 327 | static inline int vfs_dq_alloc_inode(struct inode *inode) | 209 | static inline int dquot_alloc_inode(const struct inode *inode) |
| 328 | { | 210 | { |
| 329 | return 0; | 211 | return 0; |
| 330 | } | 212 | } |
| 331 | 213 | ||
| 332 | static inline void vfs_dq_free_inode(struct inode *inode) | 214 | static inline void dquot_free_inode(const struct inode *inode) |
| 333 | { | ||
| 334 | } | ||
| 335 | |||
| 336 | static inline void sync_quota_sb(struct super_block *sb, int type) | ||
| 337 | { | ||
| 338 | } | ||
| 339 | |||
| 340 | static inline void writeout_quota_sb(struct super_block *sb, int type) | ||
| 341 | { | 215 | { |
| 342 | } | 216 | } |
| 343 | 217 | ||
| @@ -351,110 +225,116 @@ static inline int vfs_dq_quota_on_remount(struct super_block *sb) | |||
| 351 | return 0; | 225 | return 0; |
| 352 | } | 226 | } |
| 353 | 227 | ||
| 354 | static inline int vfs_dq_transfer(struct inode *inode, struct iattr *iattr) | 228 | static inline int dquot_transfer(struct inode *inode, struct iattr *iattr) |
| 355 | { | 229 | { |
| 356 | return 0; | 230 | return 0; |
| 357 | } | 231 | } |
| 358 | 232 | ||
| 359 | static inline int vfs_dq_prealloc_space_nodirty(struct inode *inode, qsize_t nr) | 233 | static inline int __dquot_alloc_space(struct inode *inode, qsize_t number, |
| 234 | int warn, int reserve) | ||
| 360 | { | 235 | { |
| 361 | inode_add_bytes(inode, nr); | 236 | if (!reserve) |
| 237 | inode_add_bytes(inode, number); | ||
| 362 | return 0; | 238 | return 0; |
| 363 | } | 239 | } |
| 364 | 240 | ||
| 365 | static inline int vfs_dq_prealloc_space(struct inode *inode, qsize_t nr) | 241 | static inline void __dquot_free_space(struct inode *inode, qsize_t number, |
| 242 | int reserve) | ||
| 366 | { | 243 | { |
| 367 | vfs_dq_prealloc_space_nodirty(inode, nr); | 244 | if (!reserve) |
| 368 | mark_inode_dirty(inode); | 245 | inode_sub_bytes(inode, number); |
| 369 | return 0; | ||
| 370 | } | 246 | } |
| 371 | 247 | ||
| 372 | static inline int vfs_dq_alloc_space_nodirty(struct inode *inode, qsize_t nr) | 248 | static inline int dquot_claim_space_nodirty(struct inode *inode, qsize_t number) |
| 373 | { | 249 | { |
| 374 | inode_add_bytes(inode, nr); | 250 | inode_add_bytes(inode, number); |
| 375 | return 0; | 251 | return 0; |
| 376 | } | 252 | } |
| 377 | 253 | ||
| 378 | static inline int vfs_dq_alloc_space(struct inode *inode, qsize_t nr) | 254 | #define dquot_file_open generic_file_open |
| 255 | |||
| 256 | #endif /* CONFIG_QUOTA */ | ||
| 257 | |||
| 258 | static inline int dquot_alloc_space_nodirty(struct inode *inode, qsize_t nr) | ||
| 379 | { | 259 | { |
| 380 | vfs_dq_alloc_space_nodirty(inode, nr); | 260 | return __dquot_alloc_space(inode, nr, 1, 0); |
| 381 | mark_inode_dirty(inode); | ||
| 382 | return 0; | ||
| 383 | } | 261 | } |
| 384 | 262 | ||
| 385 | static inline int vfs_dq_reserve_space(struct inode *inode, qsize_t nr) | 263 | static inline int dquot_alloc_space(struct inode *inode, qsize_t nr) |
| 386 | { | 264 | { |
| 387 | return 0; | 265 | int ret; |
| 266 | |||
| 267 | ret = dquot_alloc_space_nodirty(inode, nr); | ||
| 268 | if (!ret) | ||
| 269 | mark_inode_dirty(inode); | ||
| 270 | return ret; | ||
| 388 | } | 271 | } |
| 389 | 272 | ||
| 390 | static inline int vfs_dq_claim_space(struct inode *inode, qsize_t nr) | 273 | static inline int dquot_alloc_block_nodirty(struct inode *inode, qsize_t nr) |
| 391 | { | 274 | { |
| 392 | return vfs_dq_alloc_space(inode, nr); | 275 | return dquot_alloc_space_nodirty(inode, nr << inode->i_blkbits); |
| 393 | } | 276 | } |
| 394 | 277 | ||
| 395 | static inline | 278 | static inline int dquot_alloc_block(struct inode *inode, qsize_t nr) |
| 396 | int vfs_dq_release_reservation_space(struct inode *inode, qsize_t nr) | ||
| 397 | { | 279 | { |
| 398 | return 0; | 280 | return dquot_alloc_space(inode, nr << inode->i_blkbits); |
| 399 | } | 281 | } |
| 400 | 282 | ||
| 401 | static inline void vfs_dq_free_space_nodirty(struct inode *inode, qsize_t nr) | 283 | static inline int dquot_prealloc_block_nodirty(struct inode *inode, qsize_t nr) |
| 402 | { | 284 | { |
| 403 | inode_sub_bytes(inode, nr); | 285 | return __dquot_alloc_space(inode, nr << inode->i_blkbits, 0, 0); |
| 404 | } | 286 | } |
| 405 | 287 | ||
| 406 | static inline void vfs_dq_free_space(struct inode *inode, qsize_t nr) | 288 | static inline int dquot_prealloc_block(struct inode *inode, qsize_t nr) |
| 407 | { | 289 | { |
| 408 | vfs_dq_free_space_nodirty(inode, nr); | 290 | int ret; |
| 409 | mark_inode_dirty(inode); | ||
| 410 | } | ||
| 411 | |||
| 412 | #endif /* CONFIG_QUOTA */ | ||
| 413 | 291 | ||
| 414 | static inline int vfs_dq_prealloc_block_nodirty(struct inode *inode, qsize_t nr) | 292 | ret = dquot_prealloc_block_nodirty(inode, nr); |
| 415 | { | 293 | if (!ret) |
| 416 | return vfs_dq_prealloc_space_nodirty(inode, nr << inode->i_blkbits); | 294 | mark_inode_dirty(inode); |
| 295 | return ret; | ||
| 417 | } | 296 | } |
| 418 | 297 | ||
| 419 | static inline int vfs_dq_prealloc_block(struct inode *inode, qsize_t nr) | 298 | static inline int dquot_reserve_block(struct inode *inode, qsize_t nr) |
| 420 | { | 299 | { |
| 421 | return vfs_dq_prealloc_space(inode, nr << inode->i_blkbits); | 300 | return __dquot_alloc_space(inode, nr << inode->i_blkbits, 1, 1); |
| 422 | } | 301 | } |
| 423 | 302 | ||
| 424 | static inline int vfs_dq_alloc_block_nodirty(struct inode *inode, qsize_t nr) | 303 | static inline int dquot_claim_block(struct inode *inode, qsize_t nr) |
| 425 | { | 304 | { |
| 426 | return vfs_dq_alloc_space_nodirty(inode, nr << inode->i_blkbits); | 305 | int ret; |
| 427 | } | ||
| 428 | 306 | ||
| 429 | static inline int vfs_dq_alloc_block(struct inode *inode, qsize_t nr) | 307 | ret = dquot_claim_space_nodirty(inode, nr << inode->i_blkbits); |
| 430 | { | 308 | if (!ret) |
| 431 | return vfs_dq_alloc_space(inode, nr << inode->i_blkbits); | 309 | mark_inode_dirty(inode); |
| 310 | return ret; | ||
| 432 | } | 311 | } |
| 433 | 312 | ||
| 434 | static inline int vfs_dq_reserve_block(struct inode *inode, qsize_t nr) | 313 | static inline void dquot_free_space_nodirty(struct inode *inode, qsize_t nr) |
| 435 | { | 314 | { |
| 436 | return vfs_dq_reserve_space(inode, nr << inode->i_blkbits); | 315 | __dquot_free_space(inode, nr, 0); |
| 437 | } | 316 | } |
| 438 | 317 | ||
| 439 | static inline int vfs_dq_claim_block(struct inode *inode, qsize_t nr) | 318 | static inline void dquot_free_space(struct inode *inode, qsize_t nr) |
| 440 | { | 319 | { |
| 441 | return vfs_dq_claim_space(inode, nr << inode->i_blkbits); | 320 | dquot_free_space_nodirty(inode, nr); |
| 321 | mark_inode_dirty(inode); | ||
| 442 | } | 322 | } |
| 443 | 323 | ||
| 444 | static inline | 324 | static inline void dquot_free_block_nodirty(struct inode *inode, qsize_t nr) |
| 445 | void vfs_dq_release_reservation_block(struct inode *inode, qsize_t nr) | ||
| 446 | { | 325 | { |
| 447 | vfs_dq_release_reservation_space(inode, nr << inode->i_blkbits); | 326 | dquot_free_space_nodirty(inode, nr << inode->i_blkbits); |
| 448 | } | 327 | } |
| 449 | 328 | ||
| 450 | static inline void vfs_dq_free_block_nodirty(struct inode *inode, qsize_t nr) | 329 | static inline void dquot_free_block(struct inode *inode, qsize_t nr) |
| 451 | { | 330 | { |
| 452 | vfs_dq_free_space_nodirty(inode, nr << inode->i_blkbits); | 331 | dquot_free_space(inode, nr << inode->i_blkbits); |
| 453 | } | 332 | } |
| 454 | 333 | ||
| 455 | static inline void vfs_dq_free_block(struct inode *inode, qsize_t nr) | 334 | static inline void dquot_release_reservation_block(struct inode *inode, |
| 335 | qsize_t nr) | ||
| 456 | { | 336 | { |
| 457 | vfs_dq_free_space(inode, nr << inode->i_blkbits); | 337 | __dquot_free_space(inode, nr << inode->i_blkbits, 1); |
| 458 | } | 338 | } |
| 459 | 339 | ||
| 460 | #endif /* _LINUX_QUOTAOPS_ */ | 340 | #endif /* _LINUX_QUOTAOPS_ */ |
diff --git a/include/linux/range.h b/include/linux/range.h new file mode 100644 index 000000000000..bd184a5db791 --- /dev/null +++ b/include/linux/range.h | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | #ifndef _LINUX_RANGE_H | ||
| 2 | #define _LINUX_RANGE_H | ||
| 3 | |||
| 4 | struct range { | ||
| 5 | u64 start; | ||
| 6 | u64 end; | ||
| 7 | }; | ||
| 8 | |||
| 9 | int add_range(struct range *range, int az, int nr_range, | ||
| 10 | u64 start, u64 end); | ||
| 11 | |||
| 12 | |||
| 13 | int add_range_with_merge(struct range *range, int az, int nr_range, | ||
| 14 | u64 start, u64 end); | ||
| 15 | |||
| 16 | void subtract_range(struct range *range, int az, u64 start, u64 end); | ||
| 17 | |||
| 18 | int clean_sort_range(struct range *range, int az); | ||
| 19 | |||
| 20 | void sort_range(struct range *range, int nr_range); | ||
| 21 | |||
| 22 | #define MAX_RESOURCE ((resource_size_t)~0) | ||
| 23 | static inline resource_size_t cap_resource(u64 val) | ||
| 24 | { | ||
| 25 | if (val > MAX_RESOURCE) | ||
| 26 | return MAX_RESOURCE; | ||
| 27 | |||
| 28 | return val; | ||
| 29 | } | ||
| 30 | #endif | ||
diff --git a/include/linux/rbtree.h b/include/linux/rbtree.h index 9c295411d01f..5210a5c60877 100644 --- a/include/linux/rbtree.h +++ b/include/linux/rbtree.h | |||
| @@ -25,10 +25,10 @@ | |||
| 25 | 25 | ||
| 26 | Some example of insert and search follows here. The search is a plain | 26 | Some example of insert and search follows here. The search is a plain |
| 27 | normal search over an ordered tree. The insert instead must be implemented | 27 | normal search over an ordered tree. The insert instead must be implemented |
| 28 | int two steps: as first thing the code must insert the element in | 28 | in two steps: First, the code must insert the element in order as a red leaf |
| 29 | order as a red leaf in the tree, then the support library function | 29 | in the tree, and then the support library function rb_insert_color() must |
| 30 | rb_insert_color() must be called. Such function will do the | 30 | be called. Such function will do the not trivial work to rebalance the |
| 31 | not trivial work to rebalance the rbtree if necessary. | 31 | rbtree, if necessary. |
| 32 | 32 | ||
| 33 | ----------------------------------------------------------------------- | 33 | ----------------------------------------------------------------------- |
| 34 | static inline struct page * rb_search_page_cache(struct inode * inode, | 34 | static inline struct page * rb_search_page_cache(struct inode * inode, |
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index c84373626336..872a98e13d6a 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
| @@ -41,6 +41,10 @@ | |||
| 41 | #include <linux/lockdep.h> | 41 | #include <linux/lockdep.h> |
| 42 | #include <linux/completion.h> | 42 | #include <linux/completion.h> |
| 43 | 43 | ||
| 44 | #ifdef CONFIG_RCU_TORTURE_TEST | ||
| 45 | extern int rcutorture_runnable; /* for sysctl */ | ||
| 46 | #endif /* #ifdef CONFIG_RCU_TORTURE_TEST */ | ||
| 47 | |||
| 44 | /** | 48 | /** |
| 45 | * struct rcu_head - callback structure for use with RCU | 49 | * struct rcu_head - callback structure for use with RCU |
| 46 | * @next: next update requests in a list | 50 | * @next: next update requests in a list |
| @@ -97,6 +101,11 @@ extern struct lockdep_map rcu_sched_lock_map; | |||
| 97 | # define rcu_read_release_sched() \ | 101 | # define rcu_read_release_sched() \ |
| 98 | lock_release(&rcu_sched_lock_map, 1, _THIS_IP_) | 102 | lock_release(&rcu_sched_lock_map, 1, _THIS_IP_) |
| 99 | 103 | ||
| 104 | static inline int debug_lockdep_rcu_enabled(void) | ||
| 105 | { | ||
| 106 | return likely(rcu_scheduler_active && debug_locks); | ||
| 107 | } | ||
| 108 | |||
| 100 | /** | 109 | /** |
| 101 | * rcu_read_lock_held - might we be in RCU read-side critical section? | 110 | * rcu_read_lock_held - might we be in RCU read-side critical section? |
| 102 | * | 111 | * |
| @@ -104,28 +113,21 @@ extern struct lockdep_map rcu_sched_lock_map; | |||
| 104 | * an RCU read-side critical section. In absence of CONFIG_PROVE_LOCKING, | 113 | * an RCU read-side critical section. In absence of CONFIG_PROVE_LOCKING, |
| 105 | * this assumes we are in an RCU read-side critical section unless it can | 114 | * this assumes we are in an RCU read-side critical section unless it can |
| 106 | * prove otherwise. | 115 | * prove otherwise. |
| 116 | * | ||
| 117 | * Check rcu_scheduler_active to prevent false positives during boot. | ||
| 107 | */ | 118 | */ |
| 108 | static inline int rcu_read_lock_held(void) | 119 | static inline int rcu_read_lock_held(void) |
| 109 | { | 120 | { |
| 110 | if (debug_locks) | 121 | if (!debug_lockdep_rcu_enabled()) |
| 111 | return lock_is_held(&rcu_lock_map); | 122 | return 1; |
| 112 | return 1; | 123 | return lock_is_held(&rcu_lock_map); |
| 113 | } | 124 | } |
| 114 | 125 | ||
| 115 | /** | 126 | /* |
| 116 | * rcu_read_lock_bh_held - might we be in RCU-bh read-side critical section? | 127 | * rcu_read_lock_bh_held() is defined out of line to avoid #include-file |
| 117 | * | 128 | * hell. |
| 118 | * If CONFIG_PROVE_LOCKING is selected and enabled, returns nonzero iff in | ||
| 119 | * an RCU-bh read-side critical section. In absence of CONFIG_PROVE_LOCKING, | ||
| 120 | * this assumes we are in an RCU-bh read-side critical section unless it can | ||
| 121 | * prove otherwise. | ||
| 122 | */ | 129 | */ |
| 123 | static inline int rcu_read_lock_bh_held(void) | 130 | extern int rcu_read_lock_bh_held(void); |
| 124 | { | ||
| 125 | if (debug_locks) | ||
| 126 | return lock_is_held(&rcu_bh_lock_map); | ||
| 127 | return 1; | ||
| 128 | } | ||
| 129 | 131 | ||
| 130 | /** | 132 | /** |
| 131 | * rcu_read_lock_sched_held - might we be in RCU-sched read-side critical section? | 133 | * rcu_read_lock_sched_held - might we be in RCU-sched read-side critical section? |
| @@ -135,15 +137,26 @@ static inline int rcu_read_lock_bh_held(void) | |||
| 135 | * this assumes we are in an RCU-sched read-side critical section unless it | 137 | * this assumes we are in an RCU-sched read-side critical section unless it |
| 136 | * can prove otherwise. Note that disabling of preemption (including | 138 | * can prove otherwise. Note that disabling of preemption (including |
| 137 | * disabling irqs) counts as an RCU-sched read-side critical section. | 139 | * disabling irqs) counts as an RCU-sched read-side critical section. |
| 140 | * | ||
| 141 | * Check rcu_scheduler_active to prevent false positives during boot. | ||
| 138 | */ | 142 | */ |
| 143 | #ifdef CONFIG_PREEMPT | ||
| 139 | static inline int rcu_read_lock_sched_held(void) | 144 | static inline int rcu_read_lock_sched_held(void) |
| 140 | { | 145 | { |
| 141 | int lockdep_opinion = 0; | 146 | int lockdep_opinion = 0; |
| 142 | 147 | ||
| 148 | if (!debug_lockdep_rcu_enabled()) | ||
| 149 | return 1; | ||
| 143 | if (debug_locks) | 150 | if (debug_locks) |
| 144 | lockdep_opinion = lock_is_held(&rcu_sched_lock_map); | 151 | lockdep_opinion = lock_is_held(&rcu_sched_lock_map); |
| 145 | return lockdep_opinion || preempt_count() != 0 || !rcu_scheduler_active; | 152 | return lockdep_opinion || preempt_count() != 0 || irqs_disabled(); |
| 146 | } | 153 | } |
| 154 | #else /* #ifdef CONFIG_PREEMPT */ | ||
| 155 | static inline int rcu_read_lock_sched_held(void) | ||
| 156 | { | ||
| 157 | return 1; | ||
| 158 | } | ||
| 159 | #endif /* #else #ifdef CONFIG_PREEMPT */ | ||
| 147 | 160 | ||
| 148 | #else /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */ | 161 | #else /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */ |
| 149 | 162 | ||
| @@ -164,10 +177,17 @@ static inline int rcu_read_lock_bh_held(void) | |||
| 164 | return 1; | 177 | return 1; |
| 165 | } | 178 | } |
| 166 | 179 | ||
| 180 | #ifdef CONFIG_PREEMPT | ||
| 181 | static inline int rcu_read_lock_sched_held(void) | ||
| 182 | { | ||
| 183 | return !rcu_scheduler_active || preempt_count() != 0 || irqs_disabled(); | ||
| 184 | } | ||
| 185 | #else /* #ifdef CONFIG_PREEMPT */ | ||
| 167 | static inline int rcu_read_lock_sched_held(void) | 186 | static inline int rcu_read_lock_sched_held(void) |
| 168 | { | 187 | { |
| 169 | return preempt_count() != 0 || !rcu_scheduler_active; | 188 | return 1; |
| 170 | } | 189 | } |
| 190 | #endif /* #else #ifdef CONFIG_PREEMPT */ | ||
| 171 | 191 | ||
| 172 | #endif /* #else #ifdef CONFIG_DEBUG_LOCK_ALLOC */ | 192 | #endif /* #else #ifdef CONFIG_DEBUG_LOCK_ALLOC */ |
| 173 | 193 | ||
| @@ -184,7 +204,7 @@ static inline int rcu_read_lock_sched_held(void) | |||
| 184 | */ | 204 | */ |
| 185 | #define rcu_dereference_check(p, c) \ | 205 | #define rcu_dereference_check(p, c) \ |
| 186 | ({ \ | 206 | ({ \ |
| 187 | if (debug_locks && !(c)) \ | 207 | if (debug_lockdep_rcu_enabled() && !(c)) \ |
| 188 | lockdep_rcu_dereference(__FILE__, __LINE__); \ | 208 | lockdep_rcu_dereference(__FILE__, __LINE__); \ |
| 189 | rcu_dereference_raw(p); \ | 209 | rcu_dereference_raw(p); \ |
| 190 | }) | 210 | }) |
diff --git a/include/linux/reboot.h b/include/linux/reboot.h index 988e55fe649b..3005d5a7fce5 100644 --- a/include/linux/reboot.h +++ b/include/linux/reboot.h | |||
| @@ -64,6 +64,7 @@ extern void kernel_restart(char *cmd); | |||
| 64 | extern void kernel_halt(void); | 64 | extern void kernel_halt(void); |
| 65 | extern void kernel_power_off(void); | 65 | extern void kernel_power_off(void); |
| 66 | 66 | ||
| 67 | extern int C_A_D; /* for sysctl */ | ||
| 67 | void ctrl_alt_del(void); | 68 | void ctrl_alt_del(void); |
| 68 | 69 | ||
| 69 | #define POWEROFF_CMD_PATH_LEN 256 | 70 | #define POWEROFF_CMD_PATH_LEN 256 |
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index 030d92255c7a..28c9fd020d39 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h | |||
| @@ -89,8 +89,9 @@ | |||
| 89 | * REGULATION_OUT Regulator output is out of regulation. | 89 | * REGULATION_OUT Regulator output is out of regulation. |
| 90 | * FAIL Regulator output has failed. | 90 | * FAIL Regulator output has failed. |
| 91 | * OVER_TEMP Regulator over temp. | 91 | * OVER_TEMP Regulator over temp. |
| 92 | * FORCE_DISABLE Regulator shut down by software. | 92 | * FORCE_DISABLE Regulator forcibly shut down by software. |
| 93 | * VOLTAGE_CHANGE Regulator voltage changed. | 93 | * VOLTAGE_CHANGE Regulator voltage changed. |
| 94 | * DISABLE Regulator was disabled. | ||
| 94 | * | 95 | * |
| 95 | * NOTE: These events can be OR'ed together when passed into handler. | 96 | * NOTE: These events can be OR'ed together when passed into handler. |
| 96 | */ | 97 | */ |
| @@ -102,6 +103,7 @@ | |||
| 102 | #define REGULATOR_EVENT_OVER_TEMP 0x10 | 103 | #define REGULATOR_EVENT_OVER_TEMP 0x10 |
| 103 | #define REGULATOR_EVENT_FORCE_DISABLE 0x20 | 104 | #define REGULATOR_EVENT_FORCE_DISABLE 0x20 |
| 104 | #define REGULATOR_EVENT_VOLTAGE_CHANGE 0x40 | 105 | #define REGULATOR_EVENT_VOLTAGE_CHANGE 0x40 |
| 106 | #define REGULATOR_EVENT_DISABLE 0x80 | ||
| 105 | 107 | ||
| 106 | struct regulator; | 108 | struct regulator; |
| 107 | 109 | ||
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index 31f2055eae28..592cd7c642c2 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h | |||
| @@ -58,6 +58,9 @@ enum regulator_status { | |||
| 58 | * @get_optimum_mode: Get the most efficient operating mode for the regulator | 58 | * @get_optimum_mode: Get the most efficient operating mode for the regulator |
| 59 | * when running with the specified parameters. | 59 | * when running with the specified parameters. |
| 60 | * | 60 | * |
| 61 | * @enable_time: Time taken for the regulator voltage output voltage to | ||
| 62 | * stabalise after being enabled, in microseconds. | ||
| 63 | * | ||
| 61 | * @set_suspend_voltage: Set the voltage for the regulator when the system | 64 | * @set_suspend_voltage: Set the voltage for the regulator when the system |
| 62 | * is suspended. | 65 | * is suspended. |
| 63 | * @set_suspend_enable: Mark the regulator as enabled when the system is | 66 | * @set_suspend_enable: Mark the regulator as enabled when the system is |
| @@ -93,6 +96,9 @@ struct regulator_ops { | |||
| 93 | int (*set_mode) (struct regulator_dev *, unsigned int mode); | 96 | int (*set_mode) (struct regulator_dev *, unsigned int mode); |
| 94 | unsigned int (*get_mode) (struct regulator_dev *); | 97 | unsigned int (*get_mode) (struct regulator_dev *); |
| 95 | 98 | ||
| 99 | /* Time taken to enable the regulator */ | ||
| 100 | int (*enable_time) (struct regulator_dev *); | ||
| 101 | |||
| 96 | /* report regulator status ... most other accessors report | 102 | /* report regulator status ... most other accessors report |
| 97 | * control inputs, this reports results of combining inputs | 103 | * control inputs, this reports results of combining inputs |
| 98 | * from Linux (and other sources) with the actual load. | 104 | * from Linux (and other sources) with the actual load. |
diff --git a/include/linux/regulator/fixed.h b/include/linux/regulator/fixed.h index e94a4a1c7c8a..ffd7d508e726 100644 --- a/include/linux/regulator/fixed.h +++ b/include/linux/regulator/fixed.h | |||
| @@ -25,6 +25,7 @@ struct regulator_init_data; | |||
| 25 | * @microvolts: Output voltage of regulator | 25 | * @microvolts: Output voltage of regulator |
| 26 | * @gpio: GPIO to use for enable control | 26 | * @gpio: GPIO to use for enable control |
| 27 | * set to -EINVAL if not used | 27 | * set to -EINVAL if not used |
| 28 | * @startup_delay: Start-up time in microseconds | ||
| 28 | * @enable_high: Polarity of enable GPIO | 29 | * @enable_high: Polarity of enable GPIO |
| 29 | * 1 = Active high, 0 = Active low | 30 | * 1 = Active high, 0 = Active low |
| 30 | * @enabled_at_boot: Whether regulator has been enabled at | 31 | * @enabled_at_boot: Whether regulator has been enabled at |
| @@ -41,6 +42,7 @@ struct fixed_voltage_config { | |||
| 41 | const char *supply_name; | 42 | const char *supply_name; |
| 42 | int microvolts; | 43 | int microvolts; |
| 43 | int gpio; | 44 | int gpio; |
| 45 | unsigned startup_delay; | ||
| 44 | unsigned enable_high:1; | 46 | unsigned enable_high:1; |
| 45 | unsigned enabled_at_boot:1; | 47 | unsigned enabled_at_boot:1; |
| 46 | struct regulator_init_data *init_data; | 48 | struct regulator_init_data *init_data; |
diff --git a/include/linux/regulator/max8649.h b/include/linux/regulator/max8649.h new file mode 100644 index 000000000000..417d14ecd5cb --- /dev/null +++ b/include/linux/regulator/max8649.h | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | /* | ||
| 2 | * Interface of Maxim max8649 | ||
| 3 | * | ||
| 4 | * Copyright (C) 2009-2010 Marvell International Ltd. | ||
| 5 | * Haojian Zhuang <haojian.zhuang@marvell.com> | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License version 2 as | ||
| 9 | * published by the Free Software Foundation. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef __LINUX_REGULATOR_MAX8649_H | ||
| 13 | #define __LINUX_REGULATOR_MAX8649_H | ||
| 14 | |||
| 15 | #include <linux/regulator/machine.h> | ||
| 16 | |||
| 17 | enum { | ||
| 18 | MAX8649_EXTCLK_26MHZ = 0, | ||
| 19 | MAX8649_EXTCLK_13MHZ, | ||
| 20 | MAX8649_EXTCLK_19MHZ, /* 19.2MHz */ | ||
| 21 | }; | ||
| 22 | |||
| 23 | enum { | ||
| 24 | MAX8649_RAMP_32MV = 0, | ||
| 25 | MAX8649_RAMP_16MV, | ||
| 26 | MAX8649_RAMP_8MV, | ||
| 27 | MAX8649_RAMP_4MV, | ||
| 28 | MAX8649_RAMP_2MV, | ||
| 29 | MAX8649_RAMP_1MV, | ||
| 30 | MAX8649_RAMP_0_5MV, | ||
| 31 | MAX8649_RAMP_0_25MV, | ||
| 32 | }; | ||
| 33 | |||
| 34 | struct max8649_platform_data { | ||
| 35 | struct regulator_init_data *regulator; | ||
| 36 | |||
| 37 | unsigned mode:2; /* bit[1:0] = VID1,VID0 */ | ||
| 38 | unsigned extclk_freq:2; | ||
| 39 | unsigned extclk:1; | ||
| 40 | unsigned ramp_timing:3; | ||
| 41 | unsigned ramp_down:1; | ||
| 42 | }; | ||
| 43 | |||
| 44 | #endif /* __LINUX_REGULATOR_MAX8649_H */ | ||
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index 1ba3cf6edfbb..3b603f474186 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
| @@ -2034,7 +2034,7 @@ void reiserfs_read_locked_inode(struct inode *inode, | |||
| 2034 | int reiserfs_find_actor(struct inode *inode, void *p); | 2034 | int reiserfs_find_actor(struct inode *inode, void *p); |
| 2035 | int reiserfs_init_locked_inode(struct inode *inode, void *p); | 2035 | int reiserfs_init_locked_inode(struct inode *inode, void *p); |
| 2036 | void reiserfs_delete_inode(struct inode *inode); | 2036 | void reiserfs_delete_inode(struct inode *inode); |
| 2037 | int reiserfs_write_inode(struct inode *inode, int); | 2037 | int reiserfs_write_inode(struct inode *inode, struct writeback_control *wbc); |
| 2038 | int reiserfs_get_block(struct inode *inode, sector_t block, | 2038 | int reiserfs_get_block(struct inode *inode, sector_t block, |
| 2039 | struct buffer_head *bh_result, int create); | 2039 | struct buffer_head *bh_result, int create); |
| 2040 | struct dentry *reiserfs_fh_to_dentry(struct super_block *sb, struct fid *fid, | 2040 | struct dentry *reiserfs_fh_to_dentry(struct super_block *sb, struct fid *fid, |
diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h index 99928dce37ea..7fa02b4af838 100644 --- a/include/linux/reiserfs_xattr.h +++ b/include/linux/reiserfs_xattr.h | |||
| @@ -70,6 +70,11 @@ int reiserfs_security_write(struct reiserfs_transaction_handle *th, | |||
| 70 | void reiserfs_security_free(struct reiserfs_security_handle *sec); | 70 | void reiserfs_security_free(struct reiserfs_security_handle *sec); |
| 71 | #endif | 71 | #endif |
| 72 | 72 | ||
| 73 | static inline int reiserfs_xattrs_initialized(struct super_block *sb) | ||
| 74 | { | ||
| 75 | return REISERFS_SB(sb)->priv_root != NULL; | ||
| 76 | } | ||
| 77 | |||
| 73 | #define xattr_size(size) ((size) + sizeof(struct reiserfs_xattr_header)) | 78 | #define xattr_size(size) ((size) + sizeof(struct reiserfs_xattr_header)) |
| 74 | static inline loff_t reiserfs_xattr_nblocks(struct inode *inode, loff_t size) | 79 | static inline loff_t reiserfs_xattr_nblocks(struct inode *inode, loff_t size) |
| 75 | { | 80 | { |
diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h index 97059d08a626..4f82326eb294 100644 --- a/include/linux/rfkill.h +++ b/include/linux/rfkill.h | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | /** | 29 | /** |
| 30 | * enum rfkill_type - type of rfkill switch. | 30 | * enum rfkill_type - type of rfkill switch. |
| 31 | * | 31 | * |
| 32 | * @RFKILL_TYPE_ALL: toggles all switches (userspace only) | 32 | * @RFKILL_TYPE_ALL: toggles all switches (requests only - not a switch type) |
| 33 | * @RFKILL_TYPE_WLAN: switch is on a 802.11 wireless network device. | 33 | * @RFKILL_TYPE_WLAN: switch is on a 802.11 wireless network device. |
| 34 | * @RFKILL_TYPE_BLUETOOTH: switch is on a bluetooth device. | 34 | * @RFKILL_TYPE_BLUETOOTH: switch is on a bluetooth device. |
| 35 | * @RFKILL_TYPE_UWB: switch is on a ultra wideband device. | 35 | * @RFKILL_TYPE_UWB: switch is on a ultra wideband device. |
diff --git a/include/linux/rmap.h b/include/linux/rmap.h index b019ae64e2ab..d25bd224d370 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h | |||
| @@ -37,7 +37,27 @@ struct anon_vma { | |||
| 37 | * is serialized by a system wide lock only visible to | 37 | * is serialized by a system wide lock only visible to |
| 38 | * mm_take_all_locks() (mm_all_locks_mutex). | 38 | * mm_take_all_locks() (mm_all_locks_mutex). |
| 39 | */ | 39 | */ |
| 40 | struct list_head head; /* List of private "related" vmas */ | 40 | struct list_head head; /* Chain of private "related" vmas */ |
| 41 | }; | ||
| 42 | |||
| 43 | /* | ||
| 44 | * The copy-on-write semantics of fork mean that an anon_vma | ||
| 45 | * can become associated with multiple processes. Furthermore, | ||
| 46 | * each child process will have its own anon_vma, where new | ||
| 47 | * pages for that process are instantiated. | ||
| 48 | * | ||
| 49 | * This structure allows us to find the anon_vmas associated | ||
| 50 | * with a VMA, or the VMAs associated with an anon_vma. | ||
| 51 | * The "same_vma" list contains the anon_vma_chains linking | ||
| 52 | * all the anon_vmas associated with this VMA. | ||
| 53 | * The "same_anon_vma" list contains the anon_vma_chains | ||
| 54 | * which link all the VMAs associated with this anon_vma. | ||
| 55 | */ | ||
| 56 | struct anon_vma_chain { | ||
| 57 | struct vm_area_struct *vma; | ||
| 58 | struct anon_vma *anon_vma; | ||
| 59 | struct list_head same_vma; /* locked by mmap_sem & page_table_lock */ | ||
| 60 | struct list_head same_anon_vma; /* locked by anon_vma->lock */ | ||
| 41 | }; | 61 | }; |
| 42 | 62 | ||
| 43 | #ifdef CONFIG_MMU | 63 | #ifdef CONFIG_MMU |
| @@ -89,15 +109,23 @@ static inline void anon_vma_unlock(struct vm_area_struct *vma) | |||
| 89 | */ | 109 | */ |
| 90 | void anon_vma_init(void); /* create anon_vma_cachep */ | 110 | void anon_vma_init(void); /* create anon_vma_cachep */ |
| 91 | int anon_vma_prepare(struct vm_area_struct *); | 111 | int anon_vma_prepare(struct vm_area_struct *); |
| 92 | void __anon_vma_merge(struct vm_area_struct *, struct vm_area_struct *); | 112 | void unlink_anon_vmas(struct vm_area_struct *); |
| 93 | void anon_vma_unlink(struct vm_area_struct *); | 113 | int anon_vma_clone(struct vm_area_struct *, struct vm_area_struct *); |
| 94 | void anon_vma_link(struct vm_area_struct *); | 114 | int anon_vma_fork(struct vm_area_struct *, struct vm_area_struct *); |
| 95 | void __anon_vma_link(struct vm_area_struct *); | 115 | void __anon_vma_link(struct vm_area_struct *); |
| 96 | void anon_vma_free(struct anon_vma *); | 116 | void anon_vma_free(struct anon_vma *); |
| 97 | 117 | ||
| 118 | static inline void anon_vma_merge(struct vm_area_struct *vma, | ||
| 119 | struct vm_area_struct *next) | ||
| 120 | { | ||
| 121 | VM_BUG_ON(vma->anon_vma != next->anon_vma); | ||
| 122 | unlink_anon_vmas(next); | ||
| 123 | } | ||
| 124 | |||
| 98 | /* | 125 | /* |
| 99 | * rmap interfaces called when adding or removing pte of page | 126 | * rmap interfaces called when adding or removing pte of page |
| 100 | */ | 127 | */ |
| 128 | void page_move_anon_rmap(struct page *, struct vm_area_struct *, unsigned long); | ||
| 101 | void page_add_anon_rmap(struct page *, struct vm_area_struct *, unsigned long); | 129 | void page_add_anon_rmap(struct page *, struct vm_area_struct *, unsigned long); |
| 102 | void page_add_new_anon_rmap(struct page *, struct vm_area_struct *, unsigned long); | 130 | void page_add_new_anon_rmap(struct page *, struct vm_area_struct *, unsigned long); |
| 103 | void page_add_file_rmap(struct page *); | 131 | void page_add_file_rmap(struct page *); |
| @@ -181,7 +209,7 @@ static inline int page_referenced(struct page *page, int is_locked, | |||
| 181 | unsigned long *vm_flags) | 209 | unsigned long *vm_flags) |
| 182 | { | 210 | { |
| 183 | *vm_flags = 0; | 211 | *vm_flags = 0; |
| 184 | return TestClearPageReferenced(page); | 212 | return 0; |
| 185 | } | 213 | } |
| 186 | 214 | ||
| 187 | #define try_to_unmap(page, refs) SWAP_FAIL | 215 | #define try_to_unmap(page, refs) SWAP_FAIL |
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 60f88a7fb13d..14dbc83ded20 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
| @@ -238,6 +238,12 @@ static inline bool is_leap_year(unsigned int year) | |||
| 238 | return (!(year % 4) && (year % 100)) || !(year % 400); | 238 | return (!(year % 4) && (year % 100)) || !(year % 400); |
| 239 | } | 239 | } |
| 240 | 240 | ||
| 241 | #ifdef CONFIG_RTC_HCTOSYS | ||
| 242 | extern int rtc_hctosys_ret; | ||
| 243 | #else | ||
| 244 | #define rtc_hctosys_ret -ENODEV | ||
| 245 | #endif | ||
| 246 | |||
| 241 | #endif /* __KERNEL__ */ | 247 | #endif /* __KERNEL__ */ |
| 242 | 248 | ||
| 243 | #endif /* _LINUX_RTC_H_ */ | 249 | #endif /* _LINUX_RTC_H_ */ |
diff --git a/include/linux/rtmutex.h b/include/linux/rtmutex.h index 281d8fd775e8..8d522ffeda33 100644 --- a/include/linux/rtmutex.h +++ b/include/linux/rtmutex.h | |||
| @@ -16,6 +16,8 @@ | |||
| 16 | #include <linux/plist.h> | 16 | #include <linux/plist.h> |
| 17 | #include <linux/spinlock_types.h> | 17 | #include <linux/spinlock_types.h> |
| 18 | 18 | ||
| 19 | extern int max_lock_depth; /* for sysctl */ | ||
| 20 | |||
| 19 | /** | 21 | /** |
| 20 | * The rt_mutex structure | 22 | * The rt_mutex structure |
| 21 | * | 23 | * |
diff --git a/include/linux/rwlock.h b/include/linux/rwlock.h index 71e0b00b6f2c..bc2994ed66e1 100644 --- a/include/linux/rwlock.h +++ b/include/linux/rwlock.h | |||
| @@ -29,25 +29,25 @@ do { \ | |||
| 29 | #endif | 29 | #endif |
| 30 | 30 | ||
| 31 | #ifdef CONFIG_DEBUG_SPINLOCK | 31 | #ifdef CONFIG_DEBUG_SPINLOCK |
| 32 | extern void do_raw_read_lock(rwlock_t *lock); | 32 | extern void do_raw_read_lock(rwlock_t *lock) __acquires(lock); |
| 33 | #define do_raw_read_lock_flags(lock, flags) do_raw_read_lock(lock) | 33 | #define do_raw_read_lock_flags(lock, flags) do_raw_read_lock(lock) |
| 34 | extern int do_raw_read_trylock(rwlock_t *lock); | 34 | extern int do_raw_read_trylock(rwlock_t *lock); |
| 35 | extern void do_raw_read_unlock(rwlock_t *lock); | 35 | extern void do_raw_read_unlock(rwlock_t *lock) __releases(lock); |
| 36 | extern void do_raw_write_lock(rwlock_t *lock); | 36 | extern void do_raw_write_lock(rwlock_t *lock) __acquires(lock); |
| 37 | #define do_raw_write_lock_flags(lock, flags) do_raw_write_lock(lock) | 37 | #define do_raw_write_lock_flags(lock, flags) do_raw_write_lock(lock) |
| 38 | extern int do_raw_write_trylock(rwlock_t *lock); | 38 | extern int do_raw_write_trylock(rwlock_t *lock); |
| 39 | extern void do_raw_write_unlock(rwlock_t *lock); | 39 | extern void do_raw_write_unlock(rwlock_t *lock) __releases(lock); |
| 40 | #else | 40 | #else |
| 41 | # define do_raw_read_lock(rwlock) arch_read_lock(&(rwlock)->raw_lock) | 41 | # define do_raw_read_lock(rwlock) do {__acquire(lock); arch_read_lock(&(rwlock)->raw_lock); } while (0) |
| 42 | # define do_raw_read_lock_flags(lock, flags) \ | 42 | # define do_raw_read_lock_flags(lock, flags) \ |
| 43 | arch_read_lock_flags(&(lock)->raw_lock, *(flags)) | 43 | do {__acquire(lock); arch_read_lock_flags(&(lock)->raw_lock, *(flags)); } while (0) |
| 44 | # define do_raw_read_trylock(rwlock) arch_read_trylock(&(rwlock)->raw_lock) | 44 | # define do_raw_read_trylock(rwlock) arch_read_trylock(&(rwlock)->raw_lock) |
| 45 | # define do_raw_read_unlock(rwlock) arch_read_unlock(&(rwlock)->raw_lock) | 45 | # define do_raw_read_unlock(rwlock) do {arch_read_unlock(&(rwlock)->raw_lock); __release(lock); } while (0) |
| 46 | # define do_raw_write_lock(rwlock) arch_write_lock(&(rwlock)->raw_lock) | 46 | # define do_raw_write_lock(rwlock) do {__acquire(lock); arch_write_lock(&(rwlock)->raw_lock); } while (0) |
| 47 | # define do_raw_write_lock_flags(lock, flags) \ | 47 | # define do_raw_write_lock_flags(lock, flags) \ |
| 48 | arch_write_lock_flags(&(lock)->raw_lock, *(flags)) | 48 | do {__acquire(lock); arch_write_lock_flags(&(lock)->raw_lock, *(flags)); } while (0) |
| 49 | # define do_raw_write_trylock(rwlock) arch_write_trylock(&(rwlock)->raw_lock) | 49 | # define do_raw_write_trylock(rwlock) arch_write_trylock(&(rwlock)->raw_lock) |
| 50 | # define do_raw_write_unlock(rwlock) arch_write_unlock(&(rwlock)->raw_lock) | 50 | # define do_raw_write_unlock(rwlock) do {arch_write_unlock(&(rwlock)->raw_lock); __release(lock); } while (0) |
| 51 | #endif | 51 | #endif |
| 52 | 52 | ||
| 53 | #define read_can_lock(rwlock) arch_read_can_lock(&(rwlock)->raw_lock) | 53 | #define read_can_lock(rwlock) arch_read_can_lock(&(rwlock)->raw_lock) |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 4b1753f7e48e..dad7f668ebf7 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -258,6 +258,10 @@ extern spinlock_t mmlist_lock; | |||
| 258 | 258 | ||
| 259 | struct task_struct; | 259 | struct task_struct; |
| 260 | 260 | ||
| 261 | #ifdef CONFIG_PROVE_RCU | ||
| 262 | extern int lockdep_tasklist_lock_is_held(void); | ||
| 263 | #endif /* #ifdef CONFIG_PROVE_RCU */ | ||
| 264 | |||
| 261 | extern void sched_init(void); | 265 | extern void sched_init(void); |
| 262 | extern void sched_init_smp(void); | 266 | extern void sched_init_smp(void); |
| 263 | extern asmlinkage void schedule_tail(struct task_struct *prev); | 267 | extern asmlinkage void schedule_tail(struct task_struct *prev); |
| @@ -396,60 +400,6 @@ extern void arch_unmap_area_topdown(struct mm_struct *, unsigned long); | |||
| 396 | static inline void arch_pick_mmap_layout(struct mm_struct *mm) {} | 400 | static inline void arch_pick_mmap_layout(struct mm_struct *mm) {} |
| 397 | #endif | 401 | #endif |
| 398 | 402 | ||
| 399 | #if USE_SPLIT_PTLOCKS | ||
| 400 | /* | ||
| 401 | * The mm counters are not protected by its page_table_lock, | ||
| 402 | * so must be incremented atomically. | ||
| 403 | */ | ||
| 404 | #define set_mm_counter(mm, member, value) atomic_long_set(&(mm)->_##member, value) | ||
| 405 | #define get_mm_counter(mm, member) ((unsigned long)atomic_long_read(&(mm)->_##member)) | ||
| 406 | #define add_mm_counter(mm, member, value) atomic_long_add(value, &(mm)->_##member) | ||
| 407 | #define inc_mm_counter(mm, member) atomic_long_inc(&(mm)->_##member) | ||
| 408 | #define dec_mm_counter(mm, member) atomic_long_dec(&(mm)->_##member) | ||
| 409 | |||
| 410 | #else /* !USE_SPLIT_PTLOCKS */ | ||
| 411 | /* | ||
| 412 | * The mm counters are protected by its page_table_lock, | ||
| 413 | * so can be incremented directly. | ||
| 414 | */ | ||
| 415 | #define set_mm_counter(mm, member, value) (mm)->_##member = (value) | ||
| 416 | #define get_mm_counter(mm, member) ((mm)->_##member) | ||
| 417 | #define add_mm_counter(mm, member, value) (mm)->_##member += (value) | ||
| 418 | #define inc_mm_counter(mm, member) (mm)->_##member++ | ||
| 419 | #define dec_mm_counter(mm, member) (mm)->_##member-- | ||
| 420 | |||
| 421 | #endif /* !USE_SPLIT_PTLOCKS */ | ||
| 422 | |||
| 423 | #define get_mm_rss(mm) \ | ||
| 424 | (get_mm_counter(mm, file_rss) + get_mm_counter(mm, anon_rss)) | ||
| 425 | #define update_hiwater_rss(mm) do { \ | ||
| 426 | unsigned long _rss = get_mm_rss(mm); \ | ||
| 427 | if ((mm)->hiwater_rss < _rss) \ | ||
| 428 | (mm)->hiwater_rss = _rss; \ | ||
| 429 | } while (0) | ||
| 430 | #define update_hiwater_vm(mm) do { \ | ||
| 431 | if ((mm)->hiwater_vm < (mm)->total_vm) \ | ||
| 432 | (mm)->hiwater_vm = (mm)->total_vm; \ | ||
| 433 | } while (0) | ||
| 434 | |||
| 435 | static inline unsigned long get_mm_hiwater_rss(struct mm_struct *mm) | ||
| 436 | { | ||
| 437 | return max(mm->hiwater_rss, get_mm_rss(mm)); | ||
| 438 | } | ||
| 439 | |||
| 440 | static inline void setmax_mm_hiwater_rss(unsigned long *maxrss, | ||
| 441 | struct mm_struct *mm) | ||
| 442 | { | ||
| 443 | unsigned long hiwater_rss = get_mm_hiwater_rss(mm); | ||
| 444 | |||
| 445 | if (*maxrss < hiwater_rss) | ||
| 446 | *maxrss = hiwater_rss; | ||
| 447 | } | ||
| 448 | |||
| 449 | static inline unsigned long get_mm_hiwater_vm(struct mm_struct *mm) | ||
| 450 | { | ||
| 451 | return max(mm->hiwater_vm, mm->total_vm); | ||
| 452 | } | ||
| 453 | 403 | ||
| 454 | extern void set_dumpable(struct mm_struct *mm, int value); | 404 | extern void set_dumpable(struct mm_struct *mm, int value); |
| 455 | extern int get_dumpable(struct mm_struct *mm); | 405 | extern int get_dumpable(struct mm_struct *mm); |
| @@ -1274,7 +1224,9 @@ struct task_struct { | |||
| 1274 | struct plist_node pushable_tasks; | 1224 | struct plist_node pushable_tasks; |
| 1275 | 1225 | ||
| 1276 | struct mm_struct *mm, *active_mm; | 1226 | struct mm_struct *mm, *active_mm; |
| 1277 | 1227 | #if defined(SPLIT_RSS_COUNTING) | |
| 1228 | struct task_rss_stat rss_stat; | ||
| 1229 | #endif | ||
| 1278 | /* task state */ | 1230 | /* task state */ |
| 1279 | int exit_state; | 1231 | int exit_state; |
| 1280 | int exit_code, exit_signal; | 1232 | int exit_code, exit_signal; |
| @@ -1525,7 +1477,7 @@ struct task_struct { | |||
| 1525 | 1477 | ||
| 1526 | struct list_head *scm_work_list; | 1478 | struct list_head *scm_work_list; |
| 1527 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER | 1479 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER |
| 1528 | /* Index of current stored adress in ret_stack */ | 1480 | /* Index of current stored address in ret_stack */ |
| 1529 | int curr_ret_stack; | 1481 | int curr_ret_stack; |
| 1530 | /* Stack of return addresses for return function tracing */ | 1482 | /* Stack of return addresses for return function tracing */ |
| 1531 | struct ftrace_ret_stack *ret_stack; | 1483 | struct ftrace_ret_stack *ret_stack; |
| @@ -2443,9 +2395,7 @@ void thread_group_cputimer(struct task_struct *tsk, struct task_cputime *times); | |||
| 2443 | 2395 | ||
| 2444 | static inline void thread_group_cputime_init(struct signal_struct *sig) | 2396 | static inline void thread_group_cputime_init(struct signal_struct *sig) |
| 2445 | { | 2397 | { |
| 2446 | sig->cputimer.cputime = INIT_CPUTIME; | ||
| 2447 | spin_lock_init(&sig->cputimer.lock); | 2398 | spin_lock_init(&sig->cputimer.lock); |
| 2448 | sig->cputimer.running = 0; | ||
| 2449 | } | 2399 | } |
| 2450 | 2400 | ||
| 2451 | static inline void thread_group_cputime_free(struct signal_struct *sig) | 2401 | static inline void thread_group_cputime_free(struct signal_struct *sig) |
diff --git a/include/linux/security.h b/include/linux/security.h index 2c627d361c02..233d20b52c1b 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
| @@ -76,7 +76,7 @@ extern int cap_task_prctl(int option, unsigned long arg2, unsigned long arg3, | |||
| 76 | extern int cap_task_setscheduler(struct task_struct *p, int policy, struct sched_param *lp); | 76 | extern int cap_task_setscheduler(struct task_struct *p, int policy, struct sched_param *lp); |
| 77 | extern int cap_task_setioprio(struct task_struct *p, int ioprio); | 77 | extern int cap_task_setioprio(struct task_struct *p, int ioprio); |
| 78 | extern int cap_task_setnice(struct task_struct *p, int nice); | 78 | extern int cap_task_setnice(struct task_struct *p, int nice); |
| 79 | extern int cap_syslog(int type); | 79 | extern int cap_syslog(int type, bool from_file); |
| 80 | extern int cap_vm_enough_memory(struct mm_struct *mm, long pages); | 80 | extern int cap_vm_enough_memory(struct mm_struct *mm, long pages); |
| 81 | 81 | ||
| 82 | struct msghdr; | 82 | struct msghdr; |
| @@ -95,6 +95,8 @@ struct seq_file; | |||
| 95 | extern int cap_netlink_send(struct sock *sk, struct sk_buff *skb); | 95 | extern int cap_netlink_send(struct sock *sk, struct sk_buff *skb); |
| 96 | extern int cap_netlink_recv(struct sk_buff *skb, int cap); | 96 | extern int cap_netlink_recv(struct sk_buff *skb, int cap); |
| 97 | 97 | ||
| 98 | void reset_security_ops(void); | ||
| 99 | |||
| 98 | #ifdef CONFIG_MMU | 100 | #ifdef CONFIG_MMU |
| 99 | extern unsigned long mmap_min_addr; | 101 | extern unsigned long mmap_min_addr; |
| 100 | extern unsigned long dac_mmap_min_addr; | 102 | extern unsigned long dac_mmap_min_addr; |
| @@ -985,6 +987,7 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
| 985 | * Check permissions on incoming network packets. This hook is distinct | 987 | * Check permissions on incoming network packets. This hook is distinct |
| 986 | * from Netfilter's IP input hooks since it is the first time that the | 988 | * from Netfilter's IP input hooks since it is the first time that the |
| 987 | * incoming sk_buff @skb has been associated with a particular socket, @sk. | 989 | * incoming sk_buff @skb has been associated with a particular socket, @sk. |
| 990 | * Must not sleep inside this hook because some callers hold spinlocks. | ||
| 988 | * @sk contains the sock (not socket) associated with the incoming sk_buff. | 991 | * @sk contains the sock (not socket) associated with the incoming sk_buff. |
| 989 | * @skb contains the incoming network data. | 992 | * @skb contains the incoming network data. |
| 990 | * @socket_getpeersec_stream: | 993 | * @socket_getpeersec_stream: |
| @@ -1348,6 +1351,7 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
| 1348 | * logging to the console. | 1351 | * logging to the console. |
| 1349 | * See the syslog(2) manual page for an explanation of the @type values. | 1352 | * See the syslog(2) manual page for an explanation of the @type values. |
| 1350 | * @type contains the type of action. | 1353 | * @type contains the type of action. |
| 1354 | * @from_file indicates the context of action (if it came from /proc). | ||
| 1351 | * Return 0 if permission is granted. | 1355 | * Return 0 if permission is granted. |
| 1352 | * @settime: | 1356 | * @settime: |
| 1353 | * Check permission to change the system time. | 1357 | * Check permission to change the system time. |
| @@ -1462,7 +1466,7 @@ struct security_operations { | |||
| 1462 | int (*sysctl) (struct ctl_table *table, int op); | 1466 | int (*sysctl) (struct ctl_table *table, int op); |
| 1463 | int (*quotactl) (int cmds, int type, int id, struct super_block *sb); | 1467 | int (*quotactl) (int cmds, int type, int id, struct super_block *sb); |
| 1464 | int (*quota_on) (struct dentry *dentry); | 1468 | int (*quota_on) (struct dentry *dentry); |
| 1465 | int (*syslog) (int type); | 1469 | int (*syslog) (int type, bool from_file); |
| 1466 | int (*settime) (struct timespec *ts, struct timezone *tz); | 1470 | int (*settime) (struct timespec *ts, struct timezone *tz); |
| 1467 | int (*vm_enough_memory) (struct mm_struct *mm, long pages); | 1471 | int (*vm_enough_memory) (struct mm_struct *mm, long pages); |
| 1468 | 1472 | ||
| @@ -1761,7 +1765,7 @@ int security_acct(struct file *file); | |||
| 1761 | int security_sysctl(struct ctl_table *table, int op); | 1765 | int security_sysctl(struct ctl_table *table, int op); |
| 1762 | int security_quotactl(int cmds, int type, int id, struct super_block *sb); | 1766 | int security_quotactl(int cmds, int type, int id, struct super_block *sb); |
| 1763 | int security_quota_on(struct dentry *dentry); | 1767 | int security_quota_on(struct dentry *dentry); |
| 1764 | int security_syslog(int type); | 1768 | int security_syslog(int type, bool from_file); |
| 1765 | int security_settime(struct timespec *ts, struct timezone *tz); | 1769 | int security_settime(struct timespec *ts, struct timezone *tz); |
| 1766 | int security_vm_enough_memory(long pages); | 1770 | int security_vm_enough_memory(long pages); |
| 1767 | int security_vm_enough_memory_mm(struct mm_struct *mm, long pages); | 1771 | int security_vm_enough_memory_mm(struct mm_struct *mm, long pages); |
| @@ -2007,9 +2011,9 @@ static inline int security_quota_on(struct dentry *dentry) | |||
| 2007 | return 0; | 2011 | return 0; |
| 2008 | } | 2012 | } |
| 2009 | 2013 | ||
| 2010 | static inline int security_syslog(int type) | 2014 | static inline int security_syslog(int type, bool from_file) |
| 2011 | { | 2015 | { |
| 2012 | return cap_syslog(type); | 2016 | return cap_syslog(type, from_file); |
| 2013 | } | 2017 | } |
| 2014 | 2018 | ||
| 2015 | static inline int security_settime(struct timespec *ts, struct timezone *tz) | 2019 | static inline int security_settime(struct timespec *ts, struct timezone *tz) |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 8c3dd36fe91a..78dd1e7120a9 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
| @@ -491,9 +491,13 @@ uart_handle_dcd_change(struct uart_port *uport, unsigned int status) | |||
| 491 | { | 491 | { |
| 492 | struct uart_state *state = uport->state; | 492 | struct uart_state *state = uport->state; |
| 493 | struct tty_port *port = &state->port; | 493 | struct tty_port *port = &state->port; |
| 494 | struct tty_ldisc *ld = tty_ldisc_ref(port->tty); | ||
| 495 | struct timespec ts; | ||
| 494 | 496 | ||
| 495 | uport->icount.dcd++; | 497 | if (ld && ld->ops->dcd_change) |
| 498 | getnstimeofday(&ts); | ||
| 496 | 499 | ||
| 500 | uport->icount.dcd++; | ||
| 497 | #ifdef CONFIG_HARD_PPS | 501 | #ifdef CONFIG_HARD_PPS |
| 498 | if ((uport->flags & UPF_HARDPPS_CD) && status) | 502 | if ((uport->flags & UPF_HARDPPS_CD) && status) |
| 499 | hardpps(); | 503 | hardpps(); |
| @@ -505,6 +509,11 @@ uart_handle_dcd_change(struct uart_port *uport, unsigned int status) | |||
| 505 | else if (port->tty) | 509 | else if (port->tty) |
| 506 | tty_hangup(port->tty); | 510 | tty_hangup(port->tty); |
| 507 | } | 511 | } |
| 512 | |||
| 513 | if (ld && ld->ops->dcd_change) | ||
| 514 | ld->ops->dcd_change(port->tty, status, &ts); | ||
| 515 | if (ld) | ||
| 516 | tty_ldisc_deref(ld); | ||
| 508 | } | 517 | } |
| 509 | 518 | ||
| 510 | /** | 519 | /** |
diff --git a/include/linux/serial_sci.h b/include/linux/serial_sci.h index 1c297ddc9d5a..193d4bfe42ff 100644 --- a/include/linux/serial_sci.h +++ b/include/linux/serial_sci.h | |||
| @@ -2,6 +2,9 @@ | |||
| 2 | #define __LINUX_SERIAL_SCI_H | 2 | #define __LINUX_SERIAL_SCI_H |
| 3 | 3 | ||
| 4 | #include <linux/serial_core.h> | 4 | #include <linux/serial_core.h> |
| 5 | #ifdef CONFIG_SERIAL_SH_SCI_DMA | ||
| 6 | #include <asm/dmaengine.h> | ||
| 7 | #endif | ||
| 5 | 8 | ||
| 6 | /* | 9 | /* |
| 7 | * Generic header for SuperH SCI(F) (used by sh/sh64/h8300 and related parts) | 10 | * Generic header for SuperH SCI(F) (used by sh/sh64/h8300 and related parts) |
| @@ -16,6 +19,8 @@ enum { | |||
| 16 | SCIx_NR_IRQS, | 19 | SCIx_NR_IRQS, |
| 17 | }; | 20 | }; |
| 18 | 21 | ||
| 22 | struct device; | ||
| 23 | |||
| 19 | /* | 24 | /* |
| 20 | * Platform device specific platform_data struct | 25 | * Platform device specific platform_data struct |
| 21 | */ | 26 | */ |
| @@ -26,6 +31,11 @@ struct plat_sci_port { | |||
| 26 | unsigned int type; /* SCI / SCIF / IRDA */ | 31 | unsigned int type; /* SCI / SCIF / IRDA */ |
| 27 | upf_t flags; /* UPF_* flags */ | 32 | upf_t flags; /* UPF_* flags */ |
| 28 | char *clk; /* clock string */ | 33 | char *clk; /* clock string */ |
| 34 | struct device *dma_dev; | ||
| 35 | #ifdef CONFIG_SERIAL_SH_SCI_DMA | ||
| 36 | enum sh_dmae_slave_chan_id dma_slave_tx; | ||
| 37 | enum sh_dmae_slave_chan_id dma_slave_rx; | ||
| 38 | #endif | ||
| 29 | }; | 39 | }; |
| 30 | 40 | ||
| 31 | #endif /* __LINUX_SERIAL_SCI_H */ | 41 | #endif /* __LINUX_SERIAL_SCI_H */ |
diff --git a/include/linux/signal.h b/include/linux/signal.h index ab9272cc270c..fcd2b14b1932 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
| @@ -7,6 +7,8 @@ | |||
| 7 | #ifdef __KERNEL__ | 7 | #ifdef __KERNEL__ |
| 8 | #include <linux/list.h> | 8 | #include <linux/list.h> |
| 9 | 9 | ||
| 10 | /* for sysctl */ | ||
| 11 | extern int print_fatal_signals; | ||
| 10 | /* | 12 | /* |
| 11 | * Real Time signals may be queued. | 13 | * Real Time signals may be queued. |
| 12 | */ | 14 | */ |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 03f816a9b659..124f90cd5a38 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -190,9 +190,6 @@ struct skb_shared_info { | |||
| 190 | atomic_t dataref; | 190 | atomic_t dataref; |
| 191 | unsigned short nr_frags; | 191 | unsigned short nr_frags; |
| 192 | unsigned short gso_size; | 192 | unsigned short gso_size; |
| 193 | #ifdef CONFIG_HAS_DMA | ||
| 194 | dma_addr_t dma_head; | ||
| 195 | #endif | ||
| 196 | /* Warning: this field is not always filled in (UFO)! */ | 193 | /* Warning: this field is not always filled in (UFO)! */ |
| 197 | unsigned short gso_segs; | 194 | unsigned short gso_segs; |
| 198 | unsigned short gso_type; | 195 | unsigned short gso_type; |
| @@ -201,9 +198,6 @@ struct skb_shared_info { | |||
| 201 | struct sk_buff *frag_list; | 198 | struct sk_buff *frag_list; |
| 202 | struct skb_shared_hwtstamps hwtstamps; | 199 | struct skb_shared_hwtstamps hwtstamps; |
| 203 | skb_frag_t frags[MAX_SKB_FRAGS]; | 200 | skb_frag_t frags[MAX_SKB_FRAGS]; |
| 204 | #ifdef CONFIG_HAS_DMA | ||
| 205 | dma_addr_t dma_maps[MAX_SKB_FRAGS]; | ||
| 206 | #endif | ||
| 207 | /* Intermediate layers must ensure that destructor_arg | 201 | /* Intermediate layers must ensure that destructor_arg |
| 208 | * remains valid until skb destructor */ | 202 | * remains valid until skb destructor */ |
| 209 | void * destructor_arg; | 203 | void * destructor_arg; |
diff --git a/include/linux/slab.h b/include/linux/slab.h index 2da8372519f5..488446289cab 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
| @@ -70,6 +70,11 @@ | |||
| 70 | #else | 70 | #else |
| 71 | # define SLAB_NOTRACK 0x00000000UL | 71 | # define SLAB_NOTRACK 0x00000000UL |
| 72 | #endif | 72 | #endif |
| 73 | #ifdef CONFIG_FAILSLAB | ||
| 74 | # define SLAB_FAILSLAB 0x02000000UL /* Fault injection mark */ | ||
| 75 | #else | ||
| 76 | # define SLAB_FAILSLAB 0x00000000UL | ||
| 77 | #endif | ||
| 73 | 78 | ||
| 74 | /* The following flags affect the page allocator grouping pages by mobility */ | 79 | /* The following flags affect the page allocator grouping pages by mobility */ |
| 75 | #define SLAB_RECLAIM_ACCOUNT 0x00020000UL /* Objects are reclaimable */ | 80 | #define SLAB_RECLAIM_ACCOUNT 0x00020000UL /* Objects are reclaimable */ |
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index 1e14beb23f9b..0249d4175bac 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
| @@ -38,8 +38,6 @@ struct kmem_cache_cpu { | |||
| 38 | void **freelist; /* Pointer to first free per cpu object */ | 38 | void **freelist; /* Pointer to first free per cpu object */ |
| 39 | struct page *page; /* The slab from which we are allocating */ | 39 | struct page *page; /* The slab from which we are allocating */ |
| 40 | int node; /* The node of the page (or -1 for debug) */ | 40 | int node; /* The node of the page (or -1 for debug) */ |
| 41 | unsigned int offset; /* Freepointer offset (in word units) */ | ||
| 42 | unsigned int objsize; /* Size of an object (from kmem_cache) */ | ||
| 43 | #ifdef CONFIG_SLUB_STATS | 41 | #ifdef CONFIG_SLUB_STATS |
| 44 | unsigned stat[NR_SLUB_STAT_ITEMS]; | 42 | unsigned stat[NR_SLUB_STAT_ITEMS]; |
| 45 | #endif | 43 | #endif |
| @@ -69,6 +67,7 @@ struct kmem_cache_order_objects { | |||
| 69 | * Slab cache management. | 67 | * Slab cache management. |
| 70 | */ | 68 | */ |
| 71 | struct kmem_cache { | 69 | struct kmem_cache { |
| 70 | struct kmem_cache_cpu *cpu_slab; | ||
| 72 | /* Used for retriving partial slabs etc */ | 71 | /* Used for retriving partial slabs etc */ |
| 73 | unsigned long flags; | 72 | unsigned long flags; |
| 74 | int size; /* The size of an object including meta data */ | 73 | int size; /* The size of an object including meta data */ |
| @@ -104,11 +103,6 @@ struct kmem_cache { | |||
| 104 | int remote_node_defrag_ratio; | 103 | int remote_node_defrag_ratio; |
| 105 | struct kmem_cache_node *node[MAX_NUMNODES]; | 104 | struct kmem_cache_node *node[MAX_NUMNODES]; |
| 106 | #endif | 105 | #endif |
| 107 | #ifdef CONFIG_SMP | ||
| 108 | struct kmem_cache_cpu *cpu_slab[NR_CPUS]; | ||
| 109 | #else | ||
| 110 | struct kmem_cache_cpu cpu_slab; | ||
| 111 | #endif | ||
| 112 | }; | 106 | }; |
| 113 | 107 | ||
| 114 | /* | 108 | /* |
| @@ -135,11 +129,21 @@ struct kmem_cache { | |||
| 135 | 129 | ||
| 136 | #define SLUB_PAGE_SHIFT (PAGE_SHIFT + 2) | 130 | #define SLUB_PAGE_SHIFT (PAGE_SHIFT + 2) |
| 137 | 131 | ||
| 132 | #ifdef CONFIG_ZONE_DMA | ||
| 133 | #define SLUB_DMA __GFP_DMA | ||
| 134 | /* Reserve extra caches for potential DMA use */ | ||
| 135 | #define KMALLOC_CACHES (2 * SLUB_PAGE_SHIFT - 6) | ||
| 136 | #else | ||
| 137 | /* Disable DMA functionality */ | ||
| 138 | #define SLUB_DMA (__force gfp_t)0 | ||
| 139 | #define KMALLOC_CACHES SLUB_PAGE_SHIFT | ||
| 140 | #endif | ||
| 141 | |||
| 138 | /* | 142 | /* |
| 139 | * We keep the general caches in an array of slab caches that are used for | 143 | * We keep the general caches in an array of slab caches that are used for |
| 140 | * 2^x bytes of allocations. | 144 | * 2^x bytes of allocations. |
| 141 | */ | 145 | */ |
| 142 | extern struct kmem_cache kmalloc_caches[SLUB_PAGE_SHIFT]; | 146 | extern struct kmem_cache kmalloc_caches[KMALLOC_CACHES]; |
| 143 | 147 | ||
| 144 | /* | 148 | /* |
| 145 | * Sorry that the following has to be that ugly but some versions of GCC | 149 | * Sorry that the following has to be that ugly but some versions of GCC |
| @@ -207,13 +211,6 @@ static __always_inline struct kmem_cache *kmalloc_slab(size_t size) | |||
| 207 | return &kmalloc_caches[index]; | 211 | return &kmalloc_caches[index]; |
| 208 | } | 212 | } |
| 209 | 213 | ||
| 210 | #ifdef CONFIG_ZONE_DMA | ||
| 211 | #define SLUB_DMA __GFP_DMA | ||
| 212 | #else | ||
| 213 | /* Disable DMA functionality */ | ||
| 214 | #define SLUB_DMA (__force gfp_t)0 | ||
| 215 | #endif | ||
| 216 | |||
| 217 | void *kmem_cache_alloc(struct kmem_cache *, gfp_t); | 214 | void *kmem_cache_alloc(struct kmem_cache *, gfp_t); |
| 218 | void *__kmalloc(size_t size, gfp_t flags); | 215 | void *__kmalloc(size_t size, gfp_t flags); |
| 219 | 216 | ||
diff --git a/include/linux/smp.h b/include/linux/smp.h index 7a0570e6a596..cfa2d20e35f1 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h | |||
| @@ -154,7 +154,7 @@ smp_call_function_any(const struct cpumask *mask, void (*func)(void *info), | |||
| 154 | /* | 154 | /* |
| 155 | * smp_processor_id(): get the current CPU ID. | 155 | * smp_processor_id(): get the current CPU ID. |
| 156 | * | 156 | * |
| 157 | * if DEBUG_PREEMPT is enabled the we check whether it is | 157 | * if DEBUG_PREEMPT is enabled then we check whether it is |
| 158 | * used in a preemption-safe way. (smp_processor_id() is safe | 158 | * used in a preemption-safe way. (smp_processor_id() is safe |
| 159 | * if it's used in a preemption-off critical section, or in | 159 | * if it's used in a preemption-off critical section, or in |
| 160 | * a thread that is bound to the current CPU.) | 160 | * a thread that is bound to the current CPU.) |
diff --git a/include/linux/snmp.h b/include/linux/snmp.h index e28f5a0182e8..4435d1084755 100644 --- a/include/linux/snmp.h +++ b/include/linux/snmp.h | |||
| @@ -225,6 +225,8 @@ enum | |||
| 225 | LINUX_MIB_SACKSHIFTED, | 225 | LINUX_MIB_SACKSHIFTED, |
| 226 | LINUX_MIB_SACKMERGED, | 226 | LINUX_MIB_SACKMERGED, |
| 227 | LINUX_MIB_SACKSHIFTFALLBACK, | 227 | LINUX_MIB_SACKSHIFTFALLBACK, |
| 228 | LINUX_MIB_TCPBACKLOGDROP, | ||
| 229 | LINUX_MIB_TCPMINTTLDROP, /* RFC 5082 */ | ||
| 228 | __LINUX_MIB_MAX | 230 | __LINUX_MIB_MAX |
| 229 | }; | 231 | }; |
| 230 | 232 | ||
diff --git a/include/linux/socket.h b/include/linux/socket.h index 7b3aae2052a6..354cc5617f8b 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
| @@ -255,6 +255,7 @@ struct ucred { | |||
| 255 | #define MSG_ERRQUEUE 0x2000 /* Fetch message from error queue */ | 255 | #define MSG_ERRQUEUE 0x2000 /* Fetch message from error queue */ |
| 256 | #define MSG_NOSIGNAL 0x4000 /* Do not generate SIGPIPE */ | 256 | #define MSG_NOSIGNAL 0x4000 /* Do not generate SIGPIPE */ |
| 257 | #define MSG_MORE 0x8000 /* Sender will send more */ | 257 | #define MSG_MORE 0x8000 /* Sender will send more */ |
| 258 | #define MSG_WAITFORONE 0x10000 /* recvmmsg(): block until 1+ packets avail */ | ||
| 258 | 259 | ||
| 259 | #define MSG_EOF MSG_FIN | 260 | #define MSG_EOF MSG_FIN |
| 260 | 261 | ||
diff --git a/include/linux/spi/ads7846.h b/include/linux/spi/ads7846.h index 51948eb6927a..b4ae570d3c98 100644 --- a/include/linux/spi/ads7846.h +++ b/include/linux/spi/ads7846.h | |||
| @@ -12,7 +12,7 @@ enum ads7846_filter { | |||
| 12 | }; | 12 | }; |
| 13 | 13 | ||
| 14 | struct ads7846_platform_data { | 14 | struct ads7846_platform_data { |
| 15 | u16 model; /* 7843, 7845, 7846. */ | 15 | u16 model; /* 7843, 7845, 7846, 7873. */ |
| 16 | u16 vref_delay_usecs; /* 0 for external vref; etc */ | 16 | u16 vref_delay_usecs; /* 0 for external vref; etc */ |
| 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 |
| @@ -53,5 +53,6 @@ struct ads7846_platform_data { | |||
| 53 | int (*filter) (void *filter_data, int data_idx, int *val); | 53 | int (*filter) (void *filter_data, int data_idx, int *val); |
| 54 | void (*filter_cleanup)(void *filter_data); | 54 | void (*filter_cleanup)(void *filter_data); |
| 55 | void (*wait_for_sync)(void); | 55 | void (*wait_for_sync)(void); |
| 56 | bool wakeup; | ||
| 56 | }; | 57 | }; |
| 57 | 58 | ||
diff --git a/include/linux/spi/l4f00242t03.h b/include/linux/spi/l4f00242t03.h new file mode 100644 index 000000000000..aee1dbda4edc --- /dev/null +++ b/include/linux/spi/l4f00242t03.h | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | /* | ||
| 2 | * l4f00242t03.h -- Platform glue for Epson L4F00242T03 LCD | ||
| 3 | * | ||
| 4 | * Copyright (c) 2009 Alberto Panizzo <maramaopercheseimorto@gmail.com> | ||
| 5 | * Based on Marek Vasut work in lms283gf05.h | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License version 2 as | ||
| 9 | * published by the Free Software Foundation. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 19 | */ | ||
| 20 | |||
| 21 | #ifndef _INCLUDE_LINUX_SPI_L4F00242T03_H_ | ||
| 22 | #define _INCLUDE_LINUX_SPI_L4F00242T03_H_ | ||
| 23 | |||
| 24 | struct l4f00242t03_pdata { | ||
| 25 | unsigned int reset_gpio; | ||
| 26 | unsigned int data_enable_gpio; | ||
| 27 | const char *io_supply; /* will be set to 1.8 V */ | ||
| 28 | const char *core_supply; /* will be set to 2.8 V */ | ||
| 29 | }; | ||
| 30 | |||
| 31 | #endif /* _INCLUDE_LINUX_SPI_L4F00242T03_H_ */ | ||
diff --git a/include/linux/spi/max7301.h b/include/linux/spi/max7301.h index 6dfd83f19b4b..34af0a3477bf 100644 --- a/include/linux/spi/max7301.h +++ b/include/linux/spi/max7301.h | |||
| @@ -1,9 +1,27 @@ | |||
| 1 | #ifndef LINUX_SPI_MAX7301_H | 1 | #ifndef LINUX_SPI_MAX7301_H |
| 2 | #define LINUX_SPI_MAX7301_H | 2 | #define LINUX_SPI_MAX7301_H |
| 3 | 3 | ||
| 4 | #include <linux/gpio.h> | ||
| 5 | |||
| 6 | /* | ||
| 7 | * Some registers must be read back to modify. | ||
| 8 | * To save time we cache them here in memory | ||
| 9 | */ | ||
| 10 | struct max7301 { | ||
| 11 | struct mutex lock; | ||
| 12 | u8 port_config[8]; /* field 0 is unused */ | ||
| 13 | u32 out_level; /* cached output levels */ | ||
| 14 | struct gpio_chip chip; | ||
| 15 | struct device *dev; | ||
| 16 | int (*write)(struct device *dev, unsigned int reg, unsigned int val); | ||
| 17 | int (*read)(struct device *dev, unsigned int reg); | ||
| 18 | }; | ||
| 19 | |||
| 4 | struct max7301_platform_data { | 20 | struct max7301_platform_data { |
| 5 | /* number assigned to the first GPIO */ | 21 | /* number assigned to the first GPIO */ |
| 6 | unsigned base; | 22 | unsigned base; |
| 7 | }; | 23 | }; |
| 8 | 24 | ||
| 25 | extern int __max730x_remove(struct device *dev); | ||
| 26 | extern int __max730x_probe(struct max7301 *ts); | ||
| 9 | #endif | 27 | #endif |
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index 86088213334a..89fac6a3f78b 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
| @@ -128,19 +128,21 @@ static inline void smp_mb__after_lock(void) { smp_mb(); } | |||
| 128 | #define raw_spin_unlock_wait(lock) arch_spin_unlock_wait(&(lock)->raw_lock) | 128 | #define raw_spin_unlock_wait(lock) arch_spin_unlock_wait(&(lock)->raw_lock) |
| 129 | 129 | ||
| 130 | #ifdef CONFIG_DEBUG_SPINLOCK | 130 | #ifdef CONFIG_DEBUG_SPINLOCK |
| 131 | extern void do_raw_spin_lock(raw_spinlock_t *lock); | 131 | extern void do_raw_spin_lock(raw_spinlock_t *lock) __acquires(lock); |
| 132 | #define do_raw_spin_lock_flags(lock, flags) do_raw_spin_lock(lock) | 132 | #define do_raw_spin_lock_flags(lock, flags) do_raw_spin_lock(lock) |
| 133 | extern int do_raw_spin_trylock(raw_spinlock_t *lock); | 133 | extern int do_raw_spin_trylock(raw_spinlock_t *lock); |
| 134 | extern void do_raw_spin_unlock(raw_spinlock_t *lock); | 134 | extern void do_raw_spin_unlock(raw_spinlock_t *lock) __releases(lock); |
| 135 | #else | 135 | #else |
| 136 | static inline void do_raw_spin_lock(raw_spinlock_t *lock) | 136 | static inline void do_raw_spin_lock(raw_spinlock_t *lock) __acquires(lock) |
| 137 | { | 137 | { |
| 138 | __acquire(lock); | ||
| 138 | arch_spin_lock(&lock->raw_lock); | 139 | arch_spin_lock(&lock->raw_lock); |
| 139 | } | 140 | } |
| 140 | 141 | ||
| 141 | static inline void | 142 | static inline void |
| 142 | do_raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long *flags) | 143 | do_raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long *flags) __acquires(lock) |
| 143 | { | 144 | { |
| 145 | __acquire(lock); | ||
| 144 | arch_spin_lock_flags(&lock->raw_lock, *flags); | 146 | arch_spin_lock_flags(&lock->raw_lock, *flags); |
| 145 | } | 147 | } |
| 146 | 148 | ||
| @@ -149,9 +151,10 @@ static inline int do_raw_spin_trylock(raw_spinlock_t *lock) | |||
| 149 | return arch_spin_trylock(&(lock)->raw_lock); | 151 | return arch_spin_trylock(&(lock)->raw_lock); |
| 150 | } | 152 | } |
| 151 | 153 | ||
| 152 | static inline void do_raw_spin_unlock(raw_spinlock_t *lock) | 154 | static inline void do_raw_spin_unlock(raw_spinlock_t *lock) __releases(lock) |
| 153 | { | 155 | { |
| 154 | arch_spin_unlock(&lock->raw_lock); | 156 | arch_spin_unlock(&lock->raw_lock); |
| 157 | __release(lock); | ||
| 155 | } | 158 | } |
| 156 | #endif | 159 | #endif |
| 157 | 160 | ||
diff --git a/include/linux/srcu.h b/include/linux/srcu.h index 3084f80909cd..4d5ecb222af9 100644 --- a/include/linux/srcu.h +++ b/include/linux/srcu.h | |||
| @@ -33,7 +33,7 @@ struct srcu_struct_array { | |||
| 33 | 33 | ||
| 34 | struct srcu_struct { | 34 | struct srcu_struct { |
| 35 | int completed; | 35 | int completed; |
| 36 | struct srcu_struct_array *per_cpu_ref; | 36 | struct srcu_struct_array __percpu *per_cpu_ref; |
| 37 | struct mutex mutex; | 37 | struct mutex mutex; |
| 38 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 38 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
| 39 | struct lockdep_map dep_map; | 39 | struct lockdep_map dep_map; |
diff --git a/include/linux/sunrpc/bc_xprt.h b/include/linux/sunrpc/bc_xprt.h index 6508f0dc0eff..7c91260c44a9 100644 --- a/include/linux/sunrpc/bc_xprt.h +++ b/include/linux/sunrpc/bc_xprt.h | |||
| @@ -36,14 +36,32 @@ struct rpc_rqst *xprt_alloc_bc_request(struct rpc_xprt *xprt); | |||
| 36 | void xprt_free_bc_request(struct rpc_rqst *req); | 36 | void xprt_free_bc_request(struct rpc_rqst *req); |
| 37 | int xprt_setup_backchannel(struct rpc_xprt *, unsigned int min_reqs); | 37 | int xprt_setup_backchannel(struct rpc_xprt *, unsigned int min_reqs); |
| 38 | void xprt_destroy_backchannel(struct rpc_xprt *, int max_reqs); | 38 | void xprt_destroy_backchannel(struct rpc_xprt *, int max_reqs); |
| 39 | void bc_release_request(struct rpc_task *); | ||
| 40 | int bc_send(struct rpc_rqst *req); | 39 | int bc_send(struct rpc_rqst *req); |
| 40 | |||
| 41 | /* | ||
| 42 | * Determine if a shared backchannel is in use | ||
| 43 | */ | ||
| 44 | static inline int svc_is_backchannel(const struct svc_rqst *rqstp) | ||
| 45 | { | ||
| 46 | if (rqstp->rq_server->bc_xprt) | ||
| 47 | return 1; | ||
| 48 | return 0; | ||
| 49 | } | ||
| 41 | #else /* CONFIG_NFS_V4_1 */ | 50 | #else /* CONFIG_NFS_V4_1 */ |
| 42 | static inline int xprt_setup_backchannel(struct rpc_xprt *xprt, | 51 | static inline int xprt_setup_backchannel(struct rpc_xprt *xprt, |
| 43 | unsigned int min_reqs) | 52 | unsigned int min_reqs) |
| 44 | { | 53 | { |
| 45 | return 0; | 54 | return 0; |
| 46 | } | 55 | } |
| 56 | |||
| 57 | static inline int svc_is_backchannel(const struct svc_rqst *rqstp) | ||
| 58 | { | ||
| 59 | return 0; | ||
| 60 | } | ||
| 61 | |||
| 62 | static inline void xprt_free_bc_request(struct rpc_rqst *req) | ||
| 63 | { | ||
| 64 | } | ||
| 47 | #endif /* CONFIG_NFS_V4_1 */ | 65 | #endif /* CONFIG_NFS_V4_1 */ |
| 48 | #endif /* _LINUX_SUNRPC_BC_XPRT_H */ | 66 | #endif /* _LINUX_SUNRPC_BC_XPRT_H */ |
| 49 | 67 | ||
diff --git a/include/linux/swap.h b/include/linux/swap.h index a2602a8207a6..1f59d9340c4d 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
| @@ -355,6 +355,7 @@ static inline void disable_swap_token(void) | |||
| 355 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | 355 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR |
| 356 | extern void | 356 | extern void |
| 357 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout); | 357 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout); |
| 358 | extern int mem_cgroup_count_swap_user(swp_entry_t ent, struct page **pagep); | ||
| 358 | #else | 359 | #else |
| 359 | static inline void | 360 | static inline void |
| 360 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout) | 361 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout) |
| @@ -485,6 +486,14 @@ mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent) | |||
| 485 | { | 486 | { |
| 486 | } | 487 | } |
| 487 | 488 | ||
| 489 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | ||
| 490 | static inline int | ||
| 491 | mem_cgroup_count_swap_user(swp_entry_t ent, struct page **pagep) | ||
| 492 | { | ||
| 493 | return 0; | ||
| 494 | } | ||
| 495 | #endif | ||
| 496 | |||
| 488 | #endif /* CONFIG_SWAP */ | 497 | #endif /* CONFIG_SWAP */ |
| 489 | #endif /* __KERNEL__*/ | 498 | #endif /* __KERNEL__*/ |
| 490 | #endif /* _LINUX_SWAP_H */ | 499 | #endif /* _LINUX_SWAP_H */ |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 8126f239edf0..057929b0a651 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
| @@ -23,6 +23,7 @@ struct kexec_segment; | |||
| 23 | struct linux_dirent; | 23 | struct linux_dirent; |
| 24 | struct linux_dirent64; | 24 | struct linux_dirent64; |
| 25 | struct list_head; | 25 | struct list_head; |
| 26 | struct mmap_arg_struct; | ||
| 26 | struct msgbuf; | 27 | struct msgbuf; |
| 27 | struct msghdr; | 28 | struct msghdr; |
| 28 | struct mmsghdr; | 29 | struct mmsghdr; |
| @@ -30,10 +31,13 @@ struct msqid_ds; | |||
| 30 | struct new_utsname; | 31 | struct new_utsname; |
| 31 | struct nfsctl_arg; | 32 | struct nfsctl_arg; |
| 32 | struct __old_kernel_stat; | 33 | struct __old_kernel_stat; |
| 34 | struct oldold_utsname; | ||
| 35 | struct old_utsname; | ||
| 33 | struct pollfd; | 36 | struct pollfd; |
| 34 | struct rlimit; | 37 | struct rlimit; |
| 35 | struct rusage; | 38 | struct rusage; |
| 36 | struct sched_param; | 39 | struct sched_param; |
| 40 | struct sel_arg_struct; | ||
| 37 | struct semaphore; | 41 | struct semaphore; |
| 38 | struct sembuf; | 42 | struct sembuf; |
| 39 | struct shmid_ds; | 43 | struct shmid_ds; |
| @@ -101,18 +105,18 @@ struct perf_event_attr; | |||
| 101 | 105 | ||
| 102 | #ifdef CONFIG_PERF_EVENTS | 106 | #ifdef CONFIG_PERF_EVENTS |
| 103 | 107 | ||
| 104 | #define TRACE_SYS_ENTER_PROFILE_INIT(sname) \ | 108 | #define TRACE_SYS_ENTER_PERF_INIT(sname) \ |
| 105 | .profile_enable = prof_sysenter_enable, \ | 109 | .perf_event_enable = perf_sysenter_enable, \ |
| 106 | .profile_disable = prof_sysenter_disable, | 110 | .perf_event_disable = perf_sysenter_disable, |
| 107 | 111 | ||
| 108 | #define TRACE_SYS_EXIT_PROFILE_INIT(sname) \ | 112 | #define TRACE_SYS_EXIT_PERF_INIT(sname) \ |
| 109 | .profile_enable = prof_sysexit_enable, \ | 113 | .perf_event_enable = perf_sysexit_enable, \ |
| 110 | .profile_disable = prof_sysexit_disable, | 114 | .perf_event_disable = perf_sysexit_disable, |
| 111 | #else | 115 | #else |
| 112 | #define TRACE_SYS_ENTER_PROFILE(sname) | 116 | #define TRACE_SYS_ENTER_PERF(sname) |
| 113 | #define TRACE_SYS_ENTER_PROFILE_INIT(sname) | 117 | #define TRACE_SYS_ENTER_PERF_INIT(sname) |
| 114 | #define TRACE_SYS_EXIT_PROFILE(sname) | 118 | #define TRACE_SYS_EXIT_PERF(sname) |
| 115 | #define TRACE_SYS_EXIT_PROFILE_INIT(sname) | 119 | #define TRACE_SYS_EXIT_PERF_INIT(sname) |
| 116 | #endif /* CONFIG_PERF_EVENTS */ | 120 | #endif /* CONFIG_PERF_EVENTS */ |
| 117 | 121 | ||
| 118 | #ifdef CONFIG_FTRACE_SYSCALLS | 122 | #ifdef CONFIG_FTRACE_SYSCALLS |
| @@ -149,7 +153,7 @@ struct perf_event_attr; | |||
| 149 | .regfunc = reg_event_syscall_enter, \ | 153 | .regfunc = reg_event_syscall_enter, \ |
| 150 | .unregfunc = unreg_event_syscall_enter, \ | 154 | .unregfunc = unreg_event_syscall_enter, \ |
| 151 | .data = (void *)&__syscall_meta_##sname,\ | 155 | .data = (void *)&__syscall_meta_##sname,\ |
| 152 | TRACE_SYS_ENTER_PROFILE_INIT(sname) \ | 156 | TRACE_SYS_ENTER_PERF_INIT(sname) \ |
| 153 | } | 157 | } |
| 154 | 158 | ||
| 155 | #define SYSCALL_TRACE_EXIT_EVENT(sname) \ | 159 | #define SYSCALL_TRACE_EXIT_EVENT(sname) \ |
| @@ -171,7 +175,7 @@ struct perf_event_attr; | |||
| 171 | .regfunc = reg_event_syscall_exit, \ | 175 | .regfunc = reg_event_syscall_exit, \ |
| 172 | .unregfunc = unreg_event_syscall_exit, \ | 176 | .unregfunc = unreg_event_syscall_exit, \ |
| 173 | .data = (void *)&__syscall_meta_##sname,\ | 177 | .data = (void *)&__syscall_meta_##sname,\ |
| 174 | TRACE_SYS_EXIT_PROFILE_INIT(sname) \ | 178 | TRACE_SYS_EXIT_PERF_INIT(sname) \ |
| 175 | } | 179 | } |
| 176 | 180 | ||
| 177 | #define SYSCALL_METADATA(sname, nb) \ | 181 | #define SYSCALL_METADATA(sname, nb) \ |
| @@ -638,6 +642,7 @@ asmlinkage long sys_poll(struct pollfd __user *ufds, unsigned int nfds, | |||
| 638 | long timeout); | 642 | long timeout); |
| 639 | asmlinkage long sys_select(int n, fd_set __user *inp, fd_set __user *outp, | 643 | asmlinkage long sys_select(int n, fd_set __user *inp, fd_set __user *outp, |
| 640 | fd_set __user *exp, struct timeval __user *tvp); | 644 | fd_set __user *exp, struct timeval __user *tvp); |
| 645 | asmlinkage long sys_old_select(struct sel_arg_struct __user *arg); | ||
| 641 | asmlinkage long sys_epoll_create(int size); | 646 | asmlinkage long sys_epoll_create(int size); |
| 642 | asmlinkage long sys_epoll_create1(int flags); | 647 | asmlinkage long sys_epoll_create1(int flags); |
| 643 | asmlinkage long sys_epoll_ctl(int epfd, int op, int fd, | 648 | asmlinkage long sys_epoll_ctl(int epfd, int op, int fd, |
| @@ -652,6 +657,8 @@ asmlinkage long sys_gethostname(char __user *name, int len); | |||
| 652 | asmlinkage long sys_sethostname(char __user *name, int len); | 657 | asmlinkage long sys_sethostname(char __user *name, int len); |
| 653 | asmlinkage long sys_setdomainname(char __user *name, int len); | 658 | asmlinkage long sys_setdomainname(char __user *name, int len); |
| 654 | asmlinkage long sys_newuname(struct new_utsname __user *name); | 659 | asmlinkage long sys_newuname(struct new_utsname __user *name); |
| 660 | asmlinkage long sys_uname(struct old_utsname __user *); | ||
| 661 | asmlinkage long sys_olduname(struct oldold_utsname __user *); | ||
| 655 | 662 | ||
| 656 | asmlinkage long sys_getrlimit(unsigned int resource, | 663 | asmlinkage long sys_getrlimit(unsigned int resource, |
| 657 | struct rlimit __user *rlim); | 664 | struct rlimit __user *rlim); |
| @@ -681,6 +688,8 @@ asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg); | |||
| 681 | asmlinkage long sys_shmget(key_t key, size_t size, int flag); | 688 | asmlinkage long sys_shmget(key_t key, size_t size, int flag); |
| 682 | asmlinkage long sys_shmdt(char __user *shmaddr); | 689 | asmlinkage long sys_shmdt(char __user *shmaddr); |
| 683 | asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf); | 690 | asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf); |
| 691 | asmlinkage long sys_ipc(unsigned int call, int first, unsigned long second, | ||
| 692 | unsigned long third, void __user *ptr, long fifth); | ||
| 684 | 693 | ||
| 685 | asmlinkage long sys_mq_open(const char __user *name, int oflag, mode_t mode, struct mq_attr __user *attr); | 694 | asmlinkage long sys_mq_open(const char __user *name, int oflag, mode_t mode, struct mq_attr __user *attr); |
| 686 | asmlinkage long sys_mq_unlink(const char __user *name); | 695 | asmlinkage long sys_mq_unlink(const char __user *name); |
| @@ -836,4 +845,6 @@ asmlinkage long sys_perf_event_open( | |||
| 836 | asmlinkage long sys_mmap_pgoff(unsigned long addr, unsigned long len, | 845 | asmlinkage long sys_mmap_pgoff(unsigned long addr, unsigned long len, |
| 837 | unsigned long prot, unsigned long flags, | 846 | unsigned long prot, unsigned long flags, |
| 838 | unsigned long fd, unsigned long pgoff); | 847 | unsigned long fd, unsigned long pgoff); |
| 848 | asmlinkage long sys_old_mmap(struct mmap_arg_struct __user *arg); | ||
| 849 | |||
| 839 | #endif | 850 | #endif |
diff --git a/include/linux/sysdev.h b/include/linux/sysdev.h index f395bb3fa2f2..1154c29f4101 100644 --- a/include/linux/sysdev.h +++ b/include/linux/sysdev.h | |||
| @@ -27,10 +27,12 @@ | |||
| 27 | 27 | ||
| 28 | 28 | ||
| 29 | struct sys_device; | 29 | struct sys_device; |
| 30 | struct sysdev_class_attribute; | ||
| 30 | 31 | ||
| 31 | struct sysdev_class { | 32 | struct sysdev_class { |
| 32 | const char *name; | 33 | const char *name; |
| 33 | struct list_head drivers; | 34 | struct list_head drivers; |
| 35 | struct sysdev_class_attribute **attrs; | ||
| 34 | 36 | ||
| 35 | /* Default operations for these types of devices */ | 37 | /* Default operations for these types of devices */ |
| 36 | int (*shutdown)(struct sys_device *); | 38 | int (*shutdown)(struct sys_device *); |
| @@ -41,8 +43,10 @@ struct sysdev_class { | |||
| 41 | 43 | ||
| 42 | struct sysdev_class_attribute { | 44 | struct sysdev_class_attribute { |
| 43 | struct attribute attr; | 45 | struct attribute attr; |
| 44 | ssize_t (*show)(struct sysdev_class *, char *); | 46 | ssize_t (*show)(struct sysdev_class *, struct sysdev_class_attribute *, |
| 45 | ssize_t (*store)(struct sysdev_class *, const char *, size_t); | 47 | char *); |
| 48 | ssize_t (*store)(struct sysdev_class *, struct sysdev_class_attribute *, | ||
| 49 | const char *, size_t); | ||
| 46 | }; | 50 | }; |
| 47 | 51 | ||
| 48 | #define _SYSDEV_CLASS_ATTR(_name,_mode,_show,_store) \ | 52 | #define _SYSDEV_CLASS_ATTR(_name,_mode,_show,_store) \ |
| @@ -119,6 +123,19 @@ struct sysdev_attribute { | |||
| 119 | extern int sysdev_create_file(struct sys_device *, struct sysdev_attribute *); | 123 | extern int sysdev_create_file(struct sys_device *, struct sysdev_attribute *); |
| 120 | extern void sysdev_remove_file(struct sys_device *, struct sysdev_attribute *); | 124 | extern void sysdev_remove_file(struct sys_device *, struct sysdev_attribute *); |
| 121 | 125 | ||
| 126 | /* Create/remove NULL terminated attribute list */ | ||
| 127 | static inline int | ||
| 128 | sysdev_create_files(struct sys_device *d, struct sysdev_attribute **a) | ||
| 129 | { | ||
| 130 | return sysfs_create_files(&d->kobj, (const struct attribute **)a); | ||
| 131 | } | ||
| 132 | |||
| 133 | static inline void | ||
| 134 | sysdev_remove_files(struct sys_device *d, struct sysdev_attribute **a) | ||
| 135 | { | ||
| 136 | return sysfs_remove_files(&d->kobj, (const struct attribute **)a); | ||
| 137 | } | ||
| 138 | |||
| 122 | struct sysdev_ext_attribute { | 139 | struct sysdev_ext_attribute { |
| 123 | struct sysdev_attribute attr; | 140 | struct sysdev_attribute attr; |
| 124 | void *var; | 141 | void *var; |
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index cfa83083a2d4..f0496b3d1811 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #include <linux/compiler.h> | 15 | #include <linux/compiler.h> |
| 16 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
| 17 | #include <linux/list.h> | 17 | #include <linux/list.h> |
| 18 | #include <linux/lockdep.h> | ||
| 18 | #include <asm/atomic.h> | 19 | #include <asm/atomic.h> |
| 19 | 20 | ||
| 20 | struct kobject; | 21 | struct kobject; |
| @@ -29,8 +30,33 @@ struct attribute { | |||
| 29 | const char *name; | 30 | const char *name; |
| 30 | struct module *owner; | 31 | struct module *owner; |
| 31 | mode_t mode; | 32 | mode_t mode; |
| 33 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
| 34 | struct lock_class_key *key; | ||
| 35 | struct lock_class_key skey; | ||
| 36 | #endif | ||
| 32 | }; | 37 | }; |
| 33 | 38 | ||
| 39 | /** | ||
| 40 | * sysfs_attr_init - initialize a dynamically allocated sysfs attribute | ||
| 41 | * @attr: struct attribute to initialize | ||
| 42 | * | ||
| 43 | * Initialize a dynamically allocated struct attribute so we can | ||
| 44 | * make lockdep happy. This is a new requirement for attributes | ||
| 45 | * and initially this is only needed when lockdep is enabled. | ||
| 46 | * Lockdep gives a nice error when your attribute is added to | ||
| 47 | * sysfs if you don't have this. | ||
| 48 | */ | ||
| 49 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
| 50 | #define sysfs_attr_init(attr) \ | ||
| 51 | do { \ | ||
| 52 | static struct lock_class_key __key; \ | ||
| 53 | \ | ||
| 54 | (attr)->key = &__key; \ | ||
| 55 | } while(0) | ||
| 56 | #else | ||
| 57 | #define sysfs_attr_init(attr) do {} while(0) | ||
| 58 | #endif | ||
| 59 | |||
| 34 | struct attribute_group { | 60 | struct attribute_group { |
| 35 | const char *name; | 61 | const char *name; |
| 36 | mode_t (*is_visible)(struct kobject *, | 62 | mode_t (*is_visible)(struct kobject *, |
| @@ -74,6 +100,18 @@ struct bin_attribute { | |||
| 74 | struct vm_area_struct *vma); | 100 | struct vm_area_struct *vma); |
| 75 | }; | 101 | }; |
| 76 | 102 | ||
| 103 | /** | ||
| 104 | * sysfs_bin_attr_init - initialize a dynamically allocated bin_attribute | ||
| 105 | * @attr: struct bin_attribute to initialize | ||
| 106 | * | ||
| 107 | * Initialize a dynamically allocated struct bin_attribute so we | ||
| 108 | * can make lockdep happy. This is a new requirement for | ||
| 109 | * attributes and initially this is only needed when lockdep is | ||
| 110 | * enabled. Lockdep gives a nice error when your attribute is | ||
| 111 | * added to sysfs if you don't have this. | ||
| 112 | */ | ||
| 113 | #define sysfs_bin_attr_init(bin_attr) sysfs_attr_init(&(bin_attr)->attr) | ||
| 114 | |||
| 77 | struct sysfs_ops { | 115 | struct sysfs_ops { |
| 78 | ssize_t (*show)(struct kobject *, struct attribute *,char *); | 116 | ssize_t (*show)(struct kobject *, struct attribute *,char *); |
| 79 | ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t); | 117 | ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t); |
| @@ -94,9 +132,12 @@ int __must_check sysfs_move_dir(struct kobject *kobj, | |||
| 94 | 132 | ||
| 95 | int __must_check sysfs_create_file(struct kobject *kobj, | 133 | int __must_check sysfs_create_file(struct kobject *kobj, |
| 96 | const struct attribute *attr); | 134 | const struct attribute *attr); |
| 135 | int __must_check sysfs_create_files(struct kobject *kobj, | ||
| 136 | const struct attribute **attr); | ||
| 97 | int __must_check sysfs_chmod_file(struct kobject *kobj, struct attribute *attr, | 137 | int __must_check sysfs_chmod_file(struct kobject *kobj, struct attribute *attr, |
| 98 | mode_t mode); | 138 | mode_t mode); |
| 99 | void sysfs_remove_file(struct kobject *kobj, const struct attribute *attr); | 139 | void sysfs_remove_file(struct kobject *kobj, const struct attribute *attr); |
| 140 | void sysfs_remove_files(struct kobject *kobj, const struct attribute **attr); | ||
| 100 | 141 | ||
| 101 | int __must_check sysfs_create_bin_file(struct kobject *kobj, | 142 | int __must_check sysfs_create_bin_file(struct kobject *kobj, |
| 102 | const struct bin_attribute *attr); | 143 | const struct bin_attribute *attr); |
| @@ -110,6 +151,9 @@ int __must_check sysfs_create_link_nowarn(struct kobject *kobj, | |||
| 110 | const char *name); | 151 | const char *name); |
| 111 | void sysfs_remove_link(struct kobject *kobj, const char *name); | 152 | void sysfs_remove_link(struct kobject *kobj, const char *name); |
| 112 | 153 | ||
| 154 | int sysfs_rename_link(struct kobject *kobj, struct kobject *target, | ||
| 155 | const char *old_name, const char *new_name); | ||
| 156 | |||
| 113 | int __must_check sysfs_create_group(struct kobject *kobj, | 157 | int __must_check sysfs_create_group(struct kobject *kobj, |
| 114 | const struct attribute_group *grp); | 158 | const struct attribute_group *grp); |
| 115 | int sysfs_update_group(struct kobject *kobj, | 159 | int sysfs_update_group(struct kobject *kobj, |
| @@ -164,6 +208,12 @@ static inline int sysfs_create_file(struct kobject *kobj, | |||
| 164 | return 0; | 208 | return 0; |
| 165 | } | 209 | } |
| 166 | 210 | ||
| 211 | static inline int sysfs_create_files(struct kobject *kobj, | ||
| 212 | const struct attribute **attr) | ||
| 213 | { | ||
| 214 | return 0; | ||
| 215 | } | ||
| 216 | |||
| 167 | static inline int sysfs_chmod_file(struct kobject *kobj, | 217 | static inline int sysfs_chmod_file(struct kobject *kobj, |
| 168 | struct attribute *attr, mode_t mode) | 218 | struct attribute *attr, mode_t mode) |
| 169 | { | 219 | { |
| @@ -175,6 +225,11 @@ static inline void sysfs_remove_file(struct kobject *kobj, | |||
| 175 | { | 225 | { |
| 176 | } | 226 | } |
| 177 | 227 | ||
| 228 | static inline void sysfs_remove_files(struct kobject *kobj, | ||
| 229 | const struct attribute **attr) | ||
| 230 | { | ||
| 231 | } | ||
| 232 | |||
| 178 | static inline int sysfs_create_bin_file(struct kobject *kobj, | 233 | static inline int sysfs_create_bin_file(struct kobject *kobj, |
| 179 | const struct bin_attribute *attr) | 234 | const struct bin_attribute *attr) |
| 180 | { | 235 | { |
| @@ -203,6 +258,12 @@ static inline void sysfs_remove_link(struct kobject *kobj, const char *name) | |||
| 203 | { | 258 | { |
| 204 | } | 259 | } |
| 205 | 260 | ||
| 261 | static inline int sysfs_rename_link(struct kobject *k, struct kobject *t, | ||
| 262 | const char *old_name, const char *new_name) | ||
| 263 | { | ||
| 264 | return 0; | ||
| 265 | } | ||
| 266 | |||
| 206 | static inline int sysfs_create_group(struct kobject *kobj, | 267 | static inline int sysfs_create_group(struct kobject *kobj, |
| 207 | const struct attribute_group *grp) | 268 | const struct attribute_group *grp) |
| 208 | { | 269 | { |
diff --git a/include/linux/syslog.h b/include/linux/syslog.h new file mode 100644 index 000000000000..38911391a139 --- /dev/null +++ b/include/linux/syslog.h | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | /* Syslog internals | ||
| 2 | * | ||
| 3 | * Copyright 2010 Canonical, Ltd. | ||
| 4 | * Author: Kees Cook <kees.cook@canonical.com> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2, or (at your option) | ||
| 9 | * any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; see the file COPYING. If not, write to | ||
| 18 | * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 19 | */ | ||
| 20 | |||
| 21 | #ifndef _LINUX_SYSLOG_H | ||
| 22 | #define _LINUX_SYSLOG_H | ||
| 23 | |||
| 24 | /* Close the log. Currently a NOP. */ | ||
| 25 | #define SYSLOG_ACTION_CLOSE 0 | ||
| 26 | /* Open the log. Currently a NOP. */ | ||
| 27 | #define SYSLOG_ACTION_OPEN 1 | ||
| 28 | /* Read from the log. */ | ||
| 29 | #define SYSLOG_ACTION_READ 2 | ||
| 30 | /* Read all messages remaining in the ring buffer. */ | ||
| 31 | #define SYSLOG_ACTION_READ_ALL 3 | ||
| 32 | /* Read and clear all messages remaining in the ring buffer */ | ||
| 33 | #define SYSLOG_ACTION_READ_CLEAR 4 | ||
| 34 | /* Clear ring buffer. */ | ||
| 35 | #define SYSLOG_ACTION_CLEAR 5 | ||
| 36 | /* Disable printk's to console */ | ||
| 37 | #define SYSLOG_ACTION_CONSOLE_OFF 6 | ||
| 38 | /* Enable printk's to console */ | ||
| 39 | #define SYSLOG_ACTION_CONSOLE_ON 7 | ||
| 40 | /* Set level of messages printed to console */ | ||
| 41 | #define SYSLOG_ACTION_CONSOLE_LEVEL 8 | ||
| 42 | /* Return number of unread characters in the log buffer */ | ||
| 43 | #define SYSLOG_ACTION_SIZE_UNREAD 9 | ||
| 44 | /* Return size of the log buffer */ | ||
| 45 | #define SYSLOG_ACTION_SIZE_BUFFER 10 | ||
| 46 | |||
| 47 | #define SYSLOG_FROM_CALL 0 | ||
| 48 | #define SYSLOG_FROM_FILE 1 | ||
| 49 | |||
| 50 | int do_syslog(int type, char __user *buf, int count, bool from_file); | ||
| 51 | |||
| 52 | #endif /* _LINUX_SYSLOG_H */ | ||
diff --git a/include/linux/taskstats_kern.h b/include/linux/taskstats_kern.h index 3398f4553269..b6523c1427ce 100644 --- a/include/linux/taskstats_kern.h +++ b/include/linux/taskstats_kern.h | |||
| @@ -14,11 +14,6 @@ | |||
| 14 | extern struct kmem_cache *taskstats_cache; | 14 | extern struct kmem_cache *taskstats_cache; |
| 15 | extern struct mutex taskstats_exit_mutex; | 15 | extern struct mutex taskstats_exit_mutex; |
| 16 | 16 | ||
| 17 | static inline void taskstats_tgid_init(struct signal_struct *sig) | ||
| 18 | { | ||
| 19 | sig->stats = NULL; | ||
| 20 | } | ||
| 21 | |||
| 22 | static inline void taskstats_tgid_free(struct signal_struct *sig) | 17 | static inline void taskstats_tgid_free(struct signal_struct *sig) |
| 23 | { | 18 | { |
| 24 | if (sig->stats) | 19 | if (sig->stats) |
| @@ -30,8 +25,6 @@ extern void taskstats_init_early(void); | |||
| 30 | #else | 25 | #else |
| 31 | static inline void taskstats_exit(struct task_struct *tsk, int group_dead) | 26 | static inline void taskstats_exit(struct task_struct *tsk, int group_dead) |
| 32 | {} | 27 | {} |
| 33 | static inline void taskstats_tgid_init(struct signal_struct *sig) | ||
| 34 | {} | ||
| 35 | static inline void taskstats_tgid_free(struct signal_struct *sig) | 28 | static inline void taskstats_tgid_free(struct signal_struct *sig) |
| 36 | {} | 29 | {} |
| 37 | static inline void taskstats_init_early(void) | 30 | static inline void taskstats_init_early(void) |
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index f59604ed0ec6..78b4bd3be496 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h | |||
| @@ -49,7 +49,7 @@ struct tracepoint { | |||
| 49 | void **it_func; \ | 49 | void **it_func; \ |
| 50 | \ | 50 | \ |
| 51 | rcu_read_lock_sched_notrace(); \ | 51 | rcu_read_lock_sched_notrace(); \ |
| 52 | it_func = rcu_dereference((tp)->funcs); \ | 52 | it_func = rcu_dereference_sched((tp)->funcs); \ |
| 53 | if (it_func) { \ | 53 | if (it_func) { \ |
| 54 | do { \ | 54 | do { \ |
| 55 | ((void(*)(proto))(*it_func))(args); \ | 55 | ((void(*)(proto))(*it_func))(args); \ |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 6abfcf5b5887..4409967db0c4 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
| @@ -68,6 +68,17 @@ struct tty_buffer { | |||
| 68 | unsigned long data[0]; | 68 | unsigned long data[0]; |
| 69 | }; | 69 | }; |
| 70 | 70 | ||
| 71 | /* | ||
| 72 | * We default to dicing tty buffer allocations to this many characters | ||
| 73 | * in order to avoid multiple page allocations. We know the size of | ||
| 74 | * tty_buffer itself but it must also be taken into account that the | ||
| 75 | * the buffer is 256 byte aligned. See tty_buffer_find for the allocation | ||
| 76 | * logic this must match | ||
| 77 | */ | ||
| 78 | |||
| 79 | #define TTY_BUFFER_PAGE (((PAGE_SIZE - sizeof(struct tty_buffer)) / 2) & ~0xFF) | ||
| 80 | |||
| 81 | |||
| 71 | struct tty_bufhead { | 82 | struct tty_bufhead { |
| 72 | struct delayed_work work; | 83 | struct delayed_work work; |
| 73 | spinlock_t lock; | 84 | spinlock_t lock; |
| @@ -213,6 +224,7 @@ struct tty_port { | |||
| 213 | wait_queue_head_t close_wait; /* Close waiters */ | 224 | wait_queue_head_t close_wait; /* Close waiters */ |
| 214 | wait_queue_head_t delta_msr_wait; /* Modem status change */ | 225 | wait_queue_head_t delta_msr_wait; /* Modem status change */ |
| 215 | unsigned long flags; /* TTY flags ASY_*/ | 226 | unsigned long flags; /* TTY flags ASY_*/ |
| 227 | unsigned char console:1; /* port is a console */ | ||
| 216 | struct mutex mutex; /* Locking */ | 228 | struct mutex mutex; /* Locking */ |
| 217 | struct mutex buf_mutex; /* Buffer alloc lock */ | 229 | struct mutex buf_mutex; /* Buffer alloc lock */ |
| 218 | unsigned char *xmit_buf; /* Optional buffer */ | 230 | unsigned char *xmit_buf; /* Optional buffer */ |
| @@ -504,6 +516,7 @@ extern void tty_ldisc_enable(struct tty_struct *tty); | |||
| 504 | 516 | ||
| 505 | /* n_tty.c */ | 517 | /* n_tty.c */ |
| 506 | extern struct tty_ldisc_ops tty_ldisc_N_TTY; | 518 | extern struct tty_ldisc_ops tty_ldisc_N_TTY; |
| 519 | extern void n_tty_inherit_ops(struct tty_ldisc_ops *ops); | ||
| 507 | 520 | ||
| 508 | /* tty_audit.c */ | 521 | /* tty_audit.c */ |
| 509 | #ifdef CONFIG_AUDIT | 522 | #ifdef CONFIG_AUDIT |
diff --git a/include/linux/tty_flip.h b/include/linux/tty_flip.h index eb677cf56106..9239d033a0a3 100644 --- a/include/linux/tty_flip.h +++ b/include/linux/tty_flip.h | |||
| @@ -2,8 +2,8 @@ | |||
| 2 | #define _LINUX_TTY_FLIP_H | 2 | #define _LINUX_TTY_FLIP_H |
| 3 | 3 | ||
| 4 | extern int tty_buffer_request_room(struct tty_struct *tty, size_t size); | 4 | extern int tty_buffer_request_room(struct tty_struct *tty, size_t size); |
| 5 | extern int tty_insert_flip_string(struct tty_struct *tty, const unsigned char *chars, size_t size); | ||
| 6 | extern int tty_insert_flip_string_flags(struct tty_struct *tty, const unsigned char *chars, const char *flags, size_t size); | 5 | extern int tty_insert_flip_string_flags(struct tty_struct *tty, const unsigned char *chars, const char *flags, size_t size); |
| 6 | extern int tty_insert_flip_string_fixed_flag(struct tty_struct *tty, const unsigned char *chars, char flag, size_t size); | ||
| 7 | extern int tty_prepare_flip_string(struct tty_struct *tty, unsigned char **chars, size_t size); | 7 | extern int tty_prepare_flip_string(struct tty_struct *tty, unsigned char **chars, size_t size); |
| 8 | extern int tty_prepare_flip_string_flags(struct tty_struct *tty, unsigned char **chars, char **flags, size_t size); | 8 | extern int tty_prepare_flip_string_flags(struct tty_struct *tty, unsigned char **chars, char **flags, size_t size); |
| 9 | void tty_schedule_flip(struct tty_struct *tty); | 9 | void tty_schedule_flip(struct tty_struct *tty); |
| @@ -20,4 +20,9 @@ static inline int tty_insert_flip_char(struct tty_struct *tty, | |||
| 20 | return tty_insert_flip_string_flags(tty, &ch, &flag, 1); | 20 | return tty_insert_flip_string_flags(tty, &ch, &flag, 1); |
| 21 | } | 21 | } |
| 22 | 22 | ||
| 23 | static inline int tty_insert_flip_string(struct tty_struct *tty, const unsigned char *chars, size_t size) | ||
| 24 | { | ||
| 25 | return tty_insert_flip_string_fixed_flag(tty, chars, TTY_NORMAL, size); | ||
| 26 | } | ||
| 27 | |||
| 23 | #endif /* _LINUX_TTY_FLIP_H */ | 28 | #endif /* _LINUX_TTY_FLIP_H */ |
diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h index 0c4ee9b88f85..526d66f066a3 100644 --- a/include/linux/tty_ldisc.h +++ b/include/linux/tty_ldisc.h | |||
| @@ -99,6 +99,12 @@ | |||
| 99 | * cease I/O to the tty driver. Can sleep. The driver should | 99 | * cease I/O to the tty driver. Can sleep. The driver should |
| 100 | * seek to perform this action quickly but should wait until | 100 | * seek to perform this action quickly but should wait until |
| 101 | * any pending driver I/O is completed. | 101 | * any pending driver I/O is completed. |
| 102 | * | ||
| 103 | * void (*dcd_change)(struct tty_struct *tty, unsigned int status, | ||
| 104 | * struct timespec *ts) | ||
| 105 | * | ||
| 106 | * Tells the discipline that the DCD pin has changed its status and | ||
| 107 | * the relative timestamp. Pointer ts can be NULL. | ||
| 102 | */ | 108 | */ |
| 103 | 109 | ||
| 104 | #include <linux/fs.h> | 110 | #include <linux/fs.h> |
| @@ -136,6 +142,8 @@ struct tty_ldisc_ops { | |||
| 136 | void (*receive_buf)(struct tty_struct *, const unsigned char *cp, | 142 | void (*receive_buf)(struct tty_struct *, const unsigned char *cp, |
| 137 | char *fp, int count); | 143 | char *fp, int count); |
| 138 | void (*write_wakeup)(struct tty_struct *); | 144 | void (*write_wakeup)(struct tty_struct *); |
| 145 | void (*dcd_change)(struct tty_struct *, unsigned int, | ||
| 146 | struct timespec *); | ||
| 139 | 147 | ||
| 140 | struct module *owner; | 148 | struct module *owner; |
| 141 | 149 | ||
diff --git a/include/linux/usb.h b/include/linux/usb.h index 332eaea61021..ce1323c4e47c 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
| @@ -122,7 +122,6 @@ enum usb_interface_condition { | |||
| 122 | * number from the USB core by calling usb_register_dev(). | 122 | * number from the USB core by calling usb_register_dev(). |
| 123 | * @condition: binding state of the interface: not bound, binding | 123 | * @condition: binding state of the interface: not bound, binding |
| 124 | * (in probe()), bound to a driver, or unbinding (in disconnect()) | 124 | * (in probe()), bound to a driver, or unbinding (in disconnect()) |
| 125 | * @is_active: flag set when the interface is bound and not suspended. | ||
| 126 | * @sysfs_files_created: sysfs attributes exist | 125 | * @sysfs_files_created: sysfs attributes exist |
| 127 | * @ep_devs_created: endpoint child pseudo-devices exist | 126 | * @ep_devs_created: endpoint child pseudo-devices exist |
| 128 | * @unregistering: flag set when the interface is being unregistered | 127 | * @unregistering: flag set when the interface is being unregistered |
| @@ -135,8 +134,7 @@ enum usb_interface_condition { | |||
| 135 | * @dev: driver model's view of this device | 134 | * @dev: driver model's view of this device |
| 136 | * @usb_dev: if an interface is bound to the USB major, this will point | 135 | * @usb_dev: if an interface is bound to the USB major, this will point |
| 137 | * to the sysfs representation for that device. | 136 | * to the sysfs representation for that device. |
| 138 | * @pm_usage_cnt: PM usage counter for this interface; autosuspend is not | 137 | * @pm_usage_cnt: PM usage counter for this interface |
| 139 | * allowed unless the counter is 0. | ||
| 140 | * @reset_ws: Used for scheduling resets from atomic context. | 138 | * @reset_ws: Used for scheduling resets from atomic context. |
| 141 | * @reset_running: set to 1 if the interface is currently running a | 139 | * @reset_running: set to 1 if the interface is currently running a |
| 142 | * queued reset so that usb_cancel_queued_reset() doesn't try to | 140 | * queued reset so that usb_cancel_queued_reset() doesn't try to |
| @@ -184,7 +182,6 @@ struct usb_interface { | |||
| 184 | int minor; /* minor number this interface is | 182 | int minor; /* minor number this interface is |
| 185 | * bound to */ | 183 | * bound to */ |
| 186 | enum usb_interface_condition condition; /* state of binding */ | 184 | enum usb_interface_condition condition; /* state of binding */ |
| 187 | unsigned is_active:1; /* the interface is not suspended */ | ||
| 188 | unsigned sysfs_files_created:1; /* the sysfs attributes exist */ | 185 | unsigned sysfs_files_created:1; /* the sysfs attributes exist */ |
| 189 | unsigned ep_devs_created:1; /* endpoint "devices" exist */ | 186 | unsigned ep_devs_created:1; /* endpoint "devices" exist */ |
| 190 | unsigned unregistering:1; /* unregistration is in progress */ | 187 | unsigned unregistering:1; /* unregistration is in progress */ |
| @@ -401,7 +398,6 @@ struct usb_tt; | |||
| 401 | * @portnum: parent port number (origin 1) | 398 | * @portnum: parent port number (origin 1) |
| 402 | * @level: number of USB hub ancestors | 399 | * @level: number of USB hub ancestors |
| 403 | * @can_submit: URBs may be submitted | 400 | * @can_submit: URBs may be submitted |
| 404 | * @discon_suspended: disconnected while suspended | ||
| 405 | * @persist_enabled: USB_PERSIST enabled for this device | 401 | * @persist_enabled: USB_PERSIST enabled for this device |
| 406 | * @have_langid: whether string_langid is valid | 402 | * @have_langid: whether string_langid is valid |
| 407 | * @authorized: policy has said we can use it; | 403 | * @authorized: policy has said we can use it; |
| @@ -421,20 +417,15 @@ struct usb_tt; | |||
| 421 | * @usbfs_dentry: usbfs dentry entry for the device | 417 | * @usbfs_dentry: usbfs dentry entry for the device |
| 422 | * @maxchild: number of ports if hub | 418 | * @maxchild: number of ports if hub |
| 423 | * @children: child devices - USB devices that are attached to this hub | 419 | * @children: child devices - USB devices that are attached to this hub |
| 424 | * @pm_usage_cnt: usage counter for autosuspend | ||
| 425 | * @quirks: quirks of the whole device | 420 | * @quirks: quirks of the whole device |
| 426 | * @urbnum: number of URBs submitted for the whole device | 421 | * @urbnum: number of URBs submitted for the whole device |
| 427 | * @active_duration: total time device is not suspended | 422 | * @active_duration: total time device is not suspended |
| 428 | * @autosuspend: for delayed autosuspends | ||
| 429 | * @autoresume: for autoresumes requested while in_interrupt | ||
| 430 | * @pm_mutex: protects PM operations | ||
| 431 | * @last_busy: time of last use | 423 | * @last_busy: time of last use |
| 432 | * @autosuspend_delay: in jiffies | 424 | * @autosuspend_delay: in jiffies |
| 433 | * @connect_time: time device was first connected | 425 | * @connect_time: time device was first connected |
| 434 | * @do_remote_wakeup: remote wakeup should be enabled | 426 | * @do_remote_wakeup: remote wakeup should be enabled |
| 435 | * @reset_resume: needs reset instead of resume | 427 | * @reset_resume: needs reset instead of resume |
| 436 | * @autosuspend_disabled: autosuspend disabled by the user | 428 | * @autosuspend_disabled: autosuspend disabled by the user |
| 437 | * @skip_sys_resume: skip the next system resume | ||
| 438 | * @wusb_dev: if this is a Wireless USB device, link to the WUSB | 429 | * @wusb_dev: if this is a Wireless USB device, link to the WUSB |
| 439 | * specific data for the device. | 430 | * specific data for the device. |
| 440 | * @slot_id: Slot ID assigned by xHCI | 431 | * @slot_id: Slot ID assigned by xHCI |
| @@ -475,7 +466,6 @@ struct usb_device { | |||
| 475 | u8 level; | 466 | u8 level; |
| 476 | 467 | ||
| 477 | unsigned can_submit:1; | 468 | unsigned can_submit:1; |
| 478 | unsigned discon_suspended:1; | ||
| 479 | unsigned persist_enabled:1; | 469 | unsigned persist_enabled:1; |
| 480 | unsigned have_langid:1; | 470 | unsigned have_langid:1; |
| 481 | unsigned authorized:1; | 471 | unsigned authorized:1; |
| @@ -499,17 +489,12 @@ struct usb_device { | |||
| 499 | int maxchild; | 489 | int maxchild; |
| 500 | struct usb_device *children[USB_MAXCHILDREN]; | 490 | struct usb_device *children[USB_MAXCHILDREN]; |
| 501 | 491 | ||
| 502 | int pm_usage_cnt; | ||
| 503 | u32 quirks; | 492 | u32 quirks; |
| 504 | atomic_t urbnum; | 493 | atomic_t urbnum; |
| 505 | 494 | ||
| 506 | unsigned long active_duration; | 495 | unsigned long active_duration; |
| 507 | 496 | ||
| 508 | #ifdef CONFIG_PM | 497 | #ifdef CONFIG_PM |
| 509 | struct delayed_work autosuspend; | ||
| 510 | struct work_struct autoresume; | ||
| 511 | struct mutex pm_mutex; | ||
| 512 | |||
| 513 | unsigned long last_busy; | 498 | unsigned long last_busy; |
| 514 | int autosuspend_delay; | 499 | int autosuspend_delay; |
| 515 | unsigned long connect_time; | 500 | unsigned long connect_time; |
| @@ -517,7 +502,6 @@ struct usb_device { | |||
| 517 | unsigned do_remote_wakeup:1; | 502 | unsigned do_remote_wakeup:1; |
| 518 | unsigned reset_resume:1; | 503 | unsigned reset_resume:1; |
| 519 | unsigned autosuspend_disabled:1; | 504 | unsigned autosuspend_disabled:1; |
| 520 | unsigned skip_sys_resume:1; | ||
| 521 | #endif | 505 | #endif |
| 522 | struct wusb_dev *wusb_dev; | 506 | struct wusb_dev *wusb_dev; |
| 523 | int slot_id; | 507 | int slot_id; |
| @@ -528,9 +512,9 @@ extern struct usb_device *usb_get_dev(struct usb_device *dev); | |||
| 528 | extern void usb_put_dev(struct usb_device *dev); | 512 | extern void usb_put_dev(struct usb_device *dev); |
| 529 | 513 | ||
| 530 | /* USB device locking */ | 514 | /* USB device locking */ |
| 531 | #define usb_lock_device(udev) down(&(udev)->dev.sem) | 515 | #define usb_lock_device(udev) device_lock(&(udev)->dev) |
| 532 | #define usb_unlock_device(udev) up(&(udev)->dev.sem) | 516 | #define usb_unlock_device(udev) device_unlock(&(udev)->dev) |
| 533 | #define usb_trylock_device(udev) down_trylock(&(udev)->dev.sem) | 517 | #define usb_trylock_device(udev) device_trylock(&(udev)->dev) |
| 534 | extern int usb_lock_device_for_reset(struct usb_device *udev, | 518 | extern int usb_lock_device_for_reset(struct usb_device *udev, |
| 535 | const struct usb_interface *iface); | 519 | const struct usb_interface *iface); |
| 536 | 520 | ||
| @@ -542,21 +526,15 @@ extern struct usb_device *usb_find_device(u16 vendor_id, u16 product_id); | |||
| 542 | 526 | ||
| 543 | /* USB autosuspend and autoresume */ | 527 | /* USB autosuspend and autoresume */ |
| 544 | #ifdef CONFIG_USB_SUSPEND | 528 | #ifdef CONFIG_USB_SUSPEND |
| 529 | extern int usb_enable_autosuspend(struct usb_device *udev); | ||
| 530 | extern int usb_disable_autosuspend(struct usb_device *udev); | ||
| 531 | |||
| 545 | extern int usb_autopm_get_interface(struct usb_interface *intf); | 532 | extern int usb_autopm_get_interface(struct usb_interface *intf); |
| 546 | extern void usb_autopm_put_interface(struct usb_interface *intf); | 533 | extern void usb_autopm_put_interface(struct usb_interface *intf); |
| 547 | extern int usb_autopm_get_interface_async(struct usb_interface *intf); | 534 | extern int usb_autopm_get_interface_async(struct usb_interface *intf); |
| 548 | extern void usb_autopm_put_interface_async(struct usb_interface *intf); | 535 | extern void usb_autopm_put_interface_async(struct usb_interface *intf); |
| 549 | 536 | extern void usb_autopm_get_interface_no_resume(struct usb_interface *intf); | |
| 550 | static inline void usb_autopm_get_interface_no_resume( | 537 | extern void usb_autopm_put_interface_no_suspend(struct usb_interface *intf); |
| 551 | struct usb_interface *intf) | ||
| 552 | { | ||
| 553 | atomic_inc(&intf->pm_usage_cnt); | ||
| 554 | } | ||
| 555 | static inline void usb_autopm_put_interface_no_suspend( | ||
| 556 | struct usb_interface *intf) | ||
| 557 | { | ||
| 558 | atomic_dec(&intf->pm_usage_cnt); | ||
| 559 | } | ||
| 560 | 538 | ||
| 561 | static inline void usb_mark_last_busy(struct usb_device *udev) | 539 | static inline void usb_mark_last_busy(struct usb_device *udev) |
| 562 | { | 540 | { |
| @@ -565,6 +543,11 @@ static inline void usb_mark_last_busy(struct usb_device *udev) | |||
| 565 | 543 | ||
| 566 | #else | 544 | #else |
| 567 | 545 | ||
| 546 | static inline int usb_enable_autosuspend(struct usb_device *udev) | ||
| 547 | { return 0; } | ||
| 548 | static inline int usb_disable_autosuspend(struct usb_device *udev) | ||
| 549 | { return 0; } | ||
| 550 | |||
| 568 | static inline int usb_autopm_get_interface(struct usb_interface *intf) | 551 | static inline int usb_autopm_get_interface(struct usb_interface *intf) |
| 569 | { return 0; } | 552 | { return 0; } |
| 570 | static inline int usb_autopm_get_interface_async(struct usb_interface *intf) | 553 | static inline int usb_autopm_get_interface_async(struct usb_interface *intf) |
| @@ -1072,7 +1055,8 @@ typedef void (*usb_complete_t)(struct urb *); | |||
| 1072 | * @number_of_packets: Lists the number of ISO transfer buffers. | 1055 | * @number_of_packets: Lists the number of ISO transfer buffers. |
| 1073 | * @interval: Specifies the polling interval for interrupt or isochronous | 1056 | * @interval: Specifies the polling interval for interrupt or isochronous |
| 1074 | * transfers. The units are frames (milliseconds) for full and low | 1057 | * transfers. The units are frames (milliseconds) for full and low |
| 1075 | * speed devices, and microframes (1/8 millisecond) for highspeed ones. | 1058 | * speed devices, and microframes (1/8 millisecond) for highspeed |
| 1059 | * and SuperSpeed devices. | ||
| 1076 | * @error_count: Returns the number of ISO transfers that reported errors. | 1060 | * @error_count: Returns the number of ISO transfers that reported errors. |
| 1077 | * @context: For use in completion functions. This normally points to | 1061 | * @context: For use in completion functions. This normally points to |
| 1078 | * request-specific driver context. | 1062 | * request-specific driver context. |
| @@ -1303,9 +1287,16 @@ static inline void usb_fill_bulk_urb(struct urb *urb, | |||
| 1303 | * | 1287 | * |
| 1304 | * Initializes a interrupt urb with the proper information needed to submit | 1288 | * Initializes a interrupt urb with the proper information needed to submit |
| 1305 | * it to a device. | 1289 | * it to a device. |
| 1306 | * Note that high speed interrupt endpoints use a logarithmic encoding of | 1290 | * |
| 1307 | * the endpoint interval, and express polling intervals in microframes | 1291 | * Note that High Speed and SuperSpeed interrupt endpoints use a logarithmic |
| 1308 | * (eight per millisecond) rather than in frames (one per millisecond). | 1292 | * encoding of the endpoint interval, and express polling intervals in |
| 1293 | * microframes (eight per millisecond) rather than in frames (one per | ||
| 1294 | * millisecond). | ||
| 1295 | * | ||
| 1296 | * Wireless USB also uses the logarithmic encoding, but specifies it in units of | ||
| 1297 | * 128us instead of 125us. For Wireless USB devices, the interval is passed | ||
| 1298 | * through to the host controller, rather than being translated into microframe | ||
| 1299 | * units. | ||
| 1309 | */ | 1300 | */ |
| 1310 | static inline void usb_fill_int_urb(struct urb *urb, | 1301 | static inline void usb_fill_int_urb(struct urb *urb, |
| 1311 | struct usb_device *dev, | 1302 | struct usb_device *dev, |
| @@ -1322,7 +1313,7 @@ static inline void usb_fill_int_urb(struct urb *urb, | |||
| 1322 | urb->transfer_buffer_length = buffer_length; | 1313 | urb->transfer_buffer_length = buffer_length; |
| 1323 | urb->complete = complete_fn; | 1314 | urb->complete = complete_fn; |
| 1324 | urb->context = context; | 1315 | urb->context = context; |
| 1325 | if (dev->speed == USB_SPEED_HIGH) | 1316 | if (dev->speed == USB_SPEED_HIGH || dev->speed == USB_SPEED_SUPER) |
| 1326 | urb->interval = 1 << (interval - 1); | 1317 | urb->interval = 1 << (interval - 1); |
| 1327 | else | 1318 | else |
| 1328 | urb->interval = interval; | 1319 | urb->interval = interval; |
| @@ -1583,14 +1574,18 @@ extern void usb_register_notify(struct notifier_block *nb); | |||
| 1583 | extern void usb_unregister_notify(struct notifier_block *nb); | 1574 | extern void usb_unregister_notify(struct notifier_block *nb); |
| 1584 | 1575 | ||
| 1585 | #ifdef DEBUG | 1576 | #ifdef DEBUG |
| 1586 | #define dbg(format, arg...) printk(KERN_DEBUG "%s: " format "\n" , \ | 1577 | #define dbg(format, arg...) \ |
| 1587 | __FILE__ , ## arg) | 1578 | printk(KERN_DEBUG "%s: " format "\n", __FILE__, ##arg) |
| 1588 | #else | 1579 | #else |
| 1589 | #define dbg(format, arg...) do {} while (0) | 1580 | #define dbg(format, arg...) \ |
| 1581 | do { \ | ||
| 1582 | if (0) \ | ||
| 1583 | printk(KERN_DEBUG "%s: " format "\n", __FILE__, ##arg); \ | ||
| 1584 | } while (0) | ||
| 1590 | #endif | 1585 | #endif |
| 1591 | 1586 | ||
| 1592 | #define err(format, arg...) printk(KERN_ERR KBUILD_MODNAME ": " \ | 1587 | #define err(format, arg...) \ |
| 1593 | format "\n" , ## arg) | 1588 | printk(KERN_ERR KBUILD_MODNAME ": " format "\n", ##arg) |
| 1594 | 1589 | ||
| 1595 | /* debugfs stuff */ | 1590 | /* debugfs stuff */ |
| 1596 | extern struct dentry *usb_debug_root; | 1591 | extern struct dentry *usb_debug_root; |
diff --git a/include/linux/usb/Kbuild b/include/linux/usb/Kbuild index 54c446309a2a..29fd73b0bffc 100644 --- a/include/linux/usb/Kbuild +++ b/include/linux/usb/Kbuild | |||
| @@ -5,4 +5,3 @@ header-y += gadgetfs.h | |||
| 5 | header-y += midi.h | 5 | header-y += midi.h |
| 6 | header-y += g_printer.h | 6 | header-y += g_printer.h |
| 7 | header-y += tmc.h | 7 | header-y += tmc.h |
| 8 | header-y += vstusb.h | ||
diff --git a/include/linux/usb/atmel_usba_udc.h b/include/linux/usb/atmel_usba_udc.h index 6311fa2d9f82..baf41c8616e9 100644 --- a/include/linux/usb/atmel_usba_udc.h +++ b/include/linux/usb/atmel_usba_udc.h | |||
| @@ -15,6 +15,7 @@ struct usba_ep_data { | |||
| 15 | 15 | ||
| 16 | struct usba_platform_data { | 16 | struct usba_platform_data { |
| 17 | int vbus_pin; | 17 | int vbus_pin; |
| 18 | int vbus_pin_inverted; | ||
| 18 | int num_ep; | 19 | int num_ep; |
| 19 | struct usba_ep_data ep[0]; | 20 | struct usba_ep_data ep[0]; |
| 20 | }; | 21 | }; |
diff --git a/include/linux/usb/audio.h b/include/linux/usb/audio.h index 6bb293684eb8..4d3e450e2b03 100644 --- a/include/linux/usb/audio.h +++ b/include/linux/usb/audio.h | |||
| @@ -269,8 +269,8 @@ struct uac_format_type_i_ext_descriptor { | |||
| 269 | __u8 bLength; | 269 | __u8 bLength; |
| 270 | __u8 bDescriptorType; | 270 | __u8 bDescriptorType; |
| 271 | __u8 bDescriptorSubtype; | 271 | __u8 bDescriptorSubtype; |
| 272 | __u8 bSubslotSize; | ||
| 273 | __u8 bFormatType; | 272 | __u8 bFormatType; |
| 273 | __u8 bSubslotSize; | ||
| 274 | __u8 bBitResolution; | 274 | __u8 bBitResolution; |
| 275 | __u8 bHeaderLength; | 275 | __u8 bHeaderLength; |
| 276 | __u8 bControlSize; | 276 | __u8 bControlSize; |
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h index 94012e649d86..e58369ff8168 100644 --- a/include/linux/usb/ch9.h +++ b/include/linux/usb/ch9.h | |||
| @@ -775,7 +775,7 @@ enum usb_device_speed { | |||
| 775 | USB_SPEED_UNKNOWN = 0, /* enumerating */ | 775 | USB_SPEED_UNKNOWN = 0, /* enumerating */ |
| 776 | USB_SPEED_LOW, USB_SPEED_FULL, /* usb 1.1 */ | 776 | USB_SPEED_LOW, USB_SPEED_FULL, /* usb 1.1 */ |
| 777 | USB_SPEED_HIGH, /* usb 2.0 */ | 777 | USB_SPEED_HIGH, /* usb 2.0 */ |
| 778 | USB_SPEED_VARIABLE, /* wireless (usb 2.5) */ | 778 | USB_SPEED_WIRELESS, /* wireless (usb 2.5) */ |
| 779 | USB_SPEED_SUPER, /* usb 3.0 */ | 779 | USB_SPEED_SUPER, /* usb 3.0 */ |
| 780 | }; | 780 | }; |
| 781 | 781 | ||
diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h index 5dc2f227a0f1..7acef0234c0e 100644 --- a/include/linux/usb/musb.h +++ b/include/linux/usb/musb.h | |||
| @@ -30,26 +30,26 @@ struct musb_hdrc_eps_bits { | |||
| 30 | struct musb_hdrc_config { | 30 | struct musb_hdrc_config { |
| 31 | /* MUSB configuration-specific details */ | 31 | /* MUSB configuration-specific details */ |
| 32 | unsigned multipoint:1; /* multipoint device */ | 32 | unsigned multipoint:1; /* multipoint device */ |
| 33 | unsigned dyn_fifo:1; /* supports dynamic fifo sizing */ | 33 | unsigned dyn_fifo:1 __deprecated; /* supports dynamic fifo sizing */ |
| 34 | unsigned soft_con:1; /* soft connect required */ | 34 | unsigned soft_con:1 __deprecated; /* soft connect required */ |
| 35 | unsigned utm_16:1; /* utm data witdh is 16 bits */ | 35 | unsigned utm_16:1 __deprecated; /* utm data witdh is 16 bits */ |
| 36 | unsigned big_endian:1; /* true if CPU uses big-endian */ | 36 | unsigned big_endian:1; /* true if CPU uses big-endian */ |
| 37 | unsigned mult_bulk_tx:1; /* Tx ep required for multbulk pkts */ | 37 | unsigned mult_bulk_tx:1; /* Tx ep required for multbulk pkts */ |
| 38 | unsigned mult_bulk_rx:1; /* Rx ep required for multbulk pkts */ | 38 | unsigned mult_bulk_rx:1; /* Rx ep required for multbulk pkts */ |
| 39 | unsigned high_iso_tx:1; /* Tx ep required for HB iso */ | 39 | unsigned high_iso_tx:1; /* Tx ep required for HB iso */ |
| 40 | unsigned high_iso_rx:1; /* Rx ep required for HD iso */ | 40 | unsigned high_iso_rx:1; /* Rx ep required for HD iso */ |
| 41 | unsigned dma:1; /* supports DMA */ | 41 | unsigned dma:1 __deprecated; /* supports DMA */ |
| 42 | unsigned vendor_req:1; /* vendor registers required */ | 42 | unsigned vendor_req:1 __deprecated; /* vendor registers required */ |
| 43 | 43 | ||
| 44 | u8 num_eps; /* number of endpoints _with_ ep0 */ | 44 | u8 num_eps; /* number of endpoints _with_ ep0 */ |
| 45 | u8 dma_channels; /* number of dma channels */ | 45 | u8 dma_channels __deprecated; /* number of dma channels */ |
| 46 | u8 dyn_fifo_size; /* dynamic size in bytes */ | 46 | u8 dyn_fifo_size; /* dynamic size in bytes */ |
| 47 | u8 vendor_ctrl; /* vendor control reg width */ | 47 | u8 vendor_ctrl __deprecated; /* vendor control reg width */ |
| 48 | u8 vendor_stat; /* vendor status reg witdh */ | 48 | u8 vendor_stat __deprecated; /* vendor status reg witdh */ |
| 49 | u8 dma_req_chan; /* bitmask for required dma channels */ | 49 | u8 dma_req_chan __deprecated; /* bitmask for required dma channels */ |
| 50 | u8 ram_bits; /* ram address size */ | 50 | u8 ram_bits; /* ram address size */ |
| 51 | 51 | ||
| 52 | struct musb_hdrc_eps_bits *eps_bits; | 52 | struct musb_hdrc_eps_bits *eps_bits __deprecated; |
| 53 | #ifdef CONFIG_BLACKFIN | 53 | #ifdef CONFIG_BLACKFIN |
| 54 | /* A GPIO controlling VRSEL in Blackfin */ | 54 | /* A GPIO controlling VRSEL in Blackfin */ |
| 55 | unsigned int gpio_vrsel; | 55 | unsigned int gpio_vrsel; |
| @@ -76,6 +76,9 @@ struct musb_hdrc_platform_data { | |||
| 76 | /* (HOST or OTG) msec/2 after VBUS on till power good */ | 76 | /* (HOST or OTG) msec/2 after VBUS on till power good */ |
| 77 | u8 potpgt; | 77 | u8 potpgt; |
| 78 | 78 | ||
| 79 | /* (HOST or OTG) program PHY for external Vbus */ | ||
| 80 | unsigned extvbus:1; | ||
| 81 | |||
| 79 | /* Power the device on or off */ | 82 | /* Power the device on or off */ |
| 80 | int (*set_power)(int state); | 83 | int (*set_power)(int state); |
| 81 | 84 | ||
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h index fef0972c8146..f8302d036a76 100644 --- a/include/linux/usb/otg.h +++ b/include/linux/usb/otg.h | |||
| @@ -9,6 +9,8 @@ | |||
| 9 | #ifndef __LINUX_USB_OTG_H | 9 | #ifndef __LINUX_USB_OTG_H |
| 10 | #define __LINUX_USB_OTG_H | 10 | #define __LINUX_USB_OTG_H |
| 11 | 11 | ||
| 12 | #include <linux/notifier.h> | ||
| 13 | |||
| 12 | /* OTG defines lots of enumeration states before device reset */ | 14 | /* OTG defines lots of enumeration states before device reset */ |
| 13 | enum usb_otg_state { | 15 | enum usb_otg_state { |
| 14 | OTG_STATE_UNDEFINED = 0, | 16 | OTG_STATE_UNDEFINED = 0, |
| @@ -33,6 +35,14 @@ enum usb_otg_state { | |||
| 33 | OTG_STATE_A_VBUS_ERR, | 35 | OTG_STATE_A_VBUS_ERR, |
| 34 | }; | 36 | }; |
| 35 | 37 | ||
| 38 | enum usb_xceiv_events { | ||
| 39 | USB_EVENT_NONE, /* no events or cable disconnected */ | ||
| 40 | USB_EVENT_VBUS, /* vbus valid event */ | ||
| 41 | USB_EVENT_ID, /* id was grounded */ | ||
| 42 | USB_EVENT_CHARGER, /* usb dedicated charger */ | ||
| 43 | USB_EVENT_ENUMERATED, /* gadget driver enumerated */ | ||
| 44 | }; | ||
| 45 | |||
| 36 | #define USB_OTG_PULLUP_ID (1 << 0) | 46 | #define USB_OTG_PULLUP_ID (1 << 0) |
| 37 | #define USB_OTG_PULLDOWN_DP (1 << 1) | 47 | #define USB_OTG_PULLDOWN_DP (1 << 1) |
| 38 | #define USB_OTG_PULLDOWN_DM (1 << 2) | 48 | #define USB_OTG_PULLDOWN_DM (1 << 2) |
| @@ -70,6 +80,9 @@ struct otg_transceiver { | |||
| 70 | struct otg_io_access_ops *io_ops; | 80 | struct otg_io_access_ops *io_ops; |
| 71 | void __iomem *io_priv; | 81 | void __iomem *io_priv; |
| 72 | 82 | ||
| 83 | /* for notification of usb_xceiv_events */ | ||
| 84 | struct blocking_notifier_head notifier; | ||
| 85 | |||
| 73 | /* to pass extra port status to the root hub */ | 86 | /* to pass extra port status to the root hub */ |
| 74 | u16 port_status; | 87 | u16 port_status; |
| 75 | u16 port_change; | 88 | u16 port_change; |
| @@ -213,6 +226,18 @@ otg_start_srp(struct otg_transceiver *otg) | |||
| 213 | return otg->start_srp(otg); | 226 | return otg->start_srp(otg); |
| 214 | } | 227 | } |
| 215 | 228 | ||
| 229 | /* notifiers */ | ||
| 230 | static inline int | ||
| 231 | otg_register_notifier(struct otg_transceiver *otg, struct notifier_block *nb) | ||
| 232 | { | ||
| 233 | return blocking_notifier_chain_register(&otg->notifier, nb); | ||
| 234 | } | ||
| 235 | |||
| 236 | static inline void | ||
| 237 | otg_unregister_notifier(struct otg_transceiver *otg, struct notifier_block *nb) | ||
| 238 | { | ||
| 239 | blocking_notifier_chain_unregister(&otg->notifier, nb); | ||
| 240 | } | ||
| 216 | 241 | ||
| 217 | /* for OTG controller drivers (and maybe other stuff) */ | 242 | /* for OTG controller drivers (and maybe other stuff) */ |
| 218 | extern int usb_bus_start_enum(struct usb_bus *bus, unsigned port_num); | 243 | extern int usb_bus_start_enum(struct usb_bus *bus, unsigned port_num); |
diff --git a/include/linux/usb/quirks.h b/include/linux/usb/quirks.h index 2526f3bbd273..0a555dd131fc 100644 --- a/include/linux/usb/quirks.h +++ b/include/linux/usb/quirks.h | |||
| @@ -19,4 +19,7 @@ | |||
| 19 | /* device can't handle its Configuration or Interface strings */ | 19 | /* device can't handle its Configuration or Interface strings */ |
| 20 | #define USB_QUIRK_CONFIG_INTF_STRINGS 0x00000008 | 20 | #define USB_QUIRK_CONFIG_INTF_STRINGS 0x00000008 |
| 21 | 21 | ||
| 22 | /*device will morph if reset, don't use reset for handling errors */ | ||
| 23 | #define USB_QUIRK_RESET_MORPHS 0x00000010 | ||
| 24 | |||
| 22 | #endif /* __LINUX_USB_QUIRKS_H */ | 25 | #endif /* __LINUX_USB_QUIRKS_H */ |
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 1819396ed501..0a458b861933 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
| @@ -351,14 +351,11 @@ static inline void usb_serial_debug_data(int debug, | |||
| 351 | 351 | ||
| 352 | /* Use our own dbg macro */ | 352 | /* Use our own dbg macro */ |
| 353 | #undef dbg | 353 | #undef dbg |
| 354 | #define dbg(format, arg...) \ | 354 | #define dbg(format, arg...) \ |
| 355 | do { \ | 355 | do { \ |
| 356 | if (debug) \ | 356 | if (debug) \ |
| 357 | printk(KERN_DEBUG "%s: " format "\n" , __FILE__ , \ | 357 | printk(KERN_DEBUG "%s: " format "\n", __FILE__, ##arg); \ |
| 358 | ## arg); \ | 358 | } while (0) |
| 359 | } while (0) | ||
| 360 | |||
| 361 | |||
| 362 | 359 | ||
| 363 | #endif /* __LINUX_USB_SERIAL_H */ | 360 | #endif /* __LINUX_USB_SERIAL_H */ |
| 364 | 361 | ||
diff --git a/include/linux/usb/vstusb.h b/include/linux/usb/vstusb.h deleted file mode 100644 index 1cfac67191ff..000000000000 --- a/include/linux/usb/vstusb.h +++ /dev/null | |||
| @@ -1,71 +0,0 @@ | |||
| 1 | /***************************************************************************** | ||
| 2 | * File: drivers/usb/misc/vstusb.h | ||
| 3 | * | ||
| 4 | * Purpose: Support for the bulk USB Vernier Spectrophotometers | ||
| 5 | * | ||
| 6 | * Author: EQware Engineering, Inc. | ||
| 7 | * Oregon City, OR, USA 97045 | ||
| 8 | * | ||
| 9 | * Copyright: 2007, 2008 | ||
| 10 | * Vernier Software & Technology | ||
| 11 | * Beaverton, OR, USA 97005 | ||
| 12 | * | ||
| 13 | * Web: www.vernier.com | ||
| 14 | * | ||
| 15 | * This program is free software; you can redistribute it and/or modify | ||
| 16 | * it under the terms of the GNU General Public License version 2 as | ||
| 17 | * published by the Free Software Foundation. | ||
| 18 | * | ||
| 19 | *****************************************************************************/ | ||
| 20 | /***************************************************************************** | ||
| 21 | * | ||
| 22 | * The vstusb module is a standard usb 'client' driver running on top of the | ||
| 23 | * standard usb host controller stack. | ||
| 24 | * | ||
| 25 | * In general, vstusb supports standard bulk usb pipes. It supports multiple | ||
| 26 | * devices and multiple pipes per device. | ||
| 27 | * | ||
| 28 | * The vstusb driver supports two interfaces: | ||
| 29 | * 1 - ioctl SEND_PIPE/RECV_PIPE - a general bulk write/read msg | ||
| 30 | * interface to any pipe with timeout support; | ||
| 31 | * 2 - standard read/write with ioctl config - offers standard read/write | ||
| 32 | * interface with ioctl configured pipes and timeouts. | ||
| 33 | * | ||
| 34 | * Both interfaces can be signal from other process and will abort its i/o | ||
| 35 | * operation. | ||
| 36 | * | ||
| 37 | * A timeout of 0 means NO timeout. The user can still terminate the read via | ||
| 38 | * signal. | ||
| 39 | * | ||
| 40 | * If using multiple threads with this driver, the user should ensure that | ||
| 41 | * any reads, writes, or ioctls are complete before closing the device. | ||
| 42 | * Changing read/write timeouts or pipes takes effect on next read/write. | ||
| 43 | * | ||
| 44 | *****************************************************************************/ | ||
| 45 | |||
| 46 | struct vstusb_args { | ||
| 47 | union { | ||
| 48 | /* this struct is used for IOCTL_VSTUSB_SEND_PIPE, * | ||
| 49 | * IOCTL_VSTUSB_RECV_PIPE, and read()/write() fops */ | ||
| 50 | struct { | ||
| 51 | void __user *buffer; | ||
| 52 | size_t count; | ||
| 53 | unsigned int timeout_ms; | ||
| 54 | int pipe; | ||
| 55 | }; | ||
| 56 | |||
| 57 | /* this one is used for IOCTL_VSTUSB_CONFIG_RW */ | ||
| 58 | struct { | ||
| 59 | int rd_pipe; | ||
| 60 | int rd_timeout_ms; | ||
| 61 | int wr_pipe; | ||
| 62 | int wr_timeout_ms; | ||
| 63 | }; | ||
| 64 | }; | ||
| 65 | }; | ||
| 66 | |||
| 67 | #define VST_IOC_MAGIC 'L' | ||
| 68 | #define VST_IOC_FIRST 0x20 | ||
| 69 | #define IOCTL_VSTUSB_SEND_PIPE _IO(VST_IOC_MAGIC, VST_IOC_FIRST) | ||
| 70 | #define IOCTL_VSTUSB_RECV_PIPE _IO(VST_IOC_MAGIC, VST_IOC_FIRST + 1) | ||
| 71 | #define IOCTL_VSTUSB_CONFIG_RW _IO(VST_IOC_MAGIC, VST_IOC_FIRST + 2) | ||
diff --git a/include/linux/vga_switcheroo.h b/include/linux/vga_switcheroo.h new file mode 100644 index 000000000000..ae9ab13b963d --- /dev/null +++ b/include/linux/vga_switcheroo.h | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2010 Red Hat Inc. | ||
| 3 | * Author : Dave Airlie <airlied@redhat.com> | ||
| 4 | * | ||
| 5 | * Licensed under GPLv2 | ||
| 6 | * | ||
| 7 | * vga_switcheroo.h - Support for laptop with dual GPU using one set of outputs | ||
| 8 | */ | ||
| 9 | |||
| 10 | #include <linux/fb.h> | ||
| 11 | |||
| 12 | enum vga_switcheroo_state { | ||
| 13 | VGA_SWITCHEROO_OFF, | ||
| 14 | VGA_SWITCHEROO_ON, | ||
| 15 | }; | ||
| 16 | |||
| 17 | enum vga_switcheroo_client_id { | ||
| 18 | VGA_SWITCHEROO_IGD, | ||
| 19 | VGA_SWITCHEROO_DIS, | ||
| 20 | VGA_SWITCHEROO_MAX_CLIENTS, | ||
| 21 | }; | ||
| 22 | |||
| 23 | struct vga_switcheroo_handler { | ||
| 24 | int (*switchto)(enum vga_switcheroo_client_id id); | ||
| 25 | int (*power_state)(enum vga_switcheroo_client_id id, | ||
| 26 | enum vga_switcheroo_state state); | ||
| 27 | int (*init)(void); | ||
| 28 | int (*get_client_id)(struct pci_dev *pdev); | ||
| 29 | }; | ||
| 30 | |||
| 31 | |||
| 32 | #if defined(CONFIG_VGA_SWITCHEROO) | ||
| 33 | void vga_switcheroo_unregister_client(struct pci_dev *dev); | ||
| 34 | int vga_switcheroo_register_client(struct pci_dev *dev, | ||
| 35 | void (*set_gpu_state)(struct pci_dev *dev, enum vga_switcheroo_state), | ||
| 36 | bool (*can_switch)(struct pci_dev *dev)); | ||
| 37 | |||
| 38 | void vga_switcheroo_client_fb_set(struct pci_dev *dev, | ||
| 39 | struct fb_info *info); | ||
| 40 | |||
| 41 | int vga_switcheroo_register_handler(struct vga_switcheroo_handler *handler); | ||
| 42 | void vga_switcheroo_unregister_handler(void); | ||
| 43 | |||
| 44 | int vga_switcheroo_process_delayed_switch(void); | ||
| 45 | |||
| 46 | #else | ||
| 47 | |||
| 48 | static inline void vga_switcheroo_unregister_client(struct pci_dev *dev) {} | ||
| 49 | static inline int vga_switcheroo_register_client(struct pci_dev *dev, | ||
| 50 | void (*set_gpu_state)(struct pci_dev *dev, enum vga_switcheroo_state), | ||
| 51 | bool (*can_switch)(struct pci_dev *dev)) { return 0; } | ||
| 52 | static inline void vga_switcheroo_client_fb_set(struct pci_dev *dev, struct fb_info *info) {} | ||
| 53 | static inline int vga_switcheroo_register_handler(struct vga_switcheroo_handler *handler) { return 0; } | ||
| 54 | static inline void vga_switcheroo_unregister_handler(void) {} | ||
| 55 | static inline int vga_switcheroo_process_delayed_switch(void) { return 0; } | ||
| 56 | |||
| 57 | #endif | ||
diff --git a/include/linux/virtio.h b/include/linux/virtio.h index f508c651e53d..40d1709bdbf4 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h | |||
| @@ -98,6 +98,7 @@ struct virtio_device { | |||
| 98 | void *priv; | 98 | void *priv; |
| 99 | }; | 99 | }; |
| 100 | 100 | ||
| 101 | #define dev_to_virtio(dev) container_of(dev, struct virtio_device, dev) | ||
| 101 | int register_virtio_device(struct virtio_device *dev); | 102 | int register_virtio_device(struct virtio_device *dev); |
| 102 | void unregister_virtio_device(struct virtio_device *dev); | 103 | void unregister_virtio_device(struct virtio_device *dev); |
| 103 | 104 | ||
diff --git a/include/linux/virtio_9p.h b/include/linux/virtio_9p.h index 095e10d148b4..5cf11765146b 100644 --- a/include/linux/virtio_9p.h +++ b/include/linux/virtio_9p.h | |||
| @@ -5,7 +5,16 @@ | |||
| 5 | #include <linux/virtio_ids.h> | 5 | #include <linux/virtio_ids.h> |
| 6 | #include <linux/virtio_config.h> | 6 | #include <linux/virtio_config.h> |
| 7 | 7 | ||
| 8 | /* Maximum number of virtio channels per partition (1 for now) */ | 8 | /* The feature bitmap for virtio 9P */ |
| 9 | #define MAX_9P_CHAN 1 | 9 | |
| 10 | /* The mount point is specified in a config variable */ | ||
| 11 | #define VIRTIO_9P_MOUNT_TAG 0 | ||
| 12 | |||
| 13 | struct virtio_9p_config { | ||
| 14 | /* length of the tag name */ | ||
| 15 | __u16 tag_len; | ||
| 16 | /* non-NULL terminated tag name */ | ||
| 17 | __u8 tag[0]; | ||
| 18 | } __attribute__((packed)); | ||
| 10 | 19 | ||
| 11 | #endif /* _LINUX_VIRTIO_9P_H */ | 20 | #endif /* _LINUX_VIRTIO_9P_H */ |
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index ee03bba9c5df..117f0dd8ad03 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h | |||
| @@ -78,22 +78,22 @@ DECLARE_PER_CPU(struct vm_event_state, vm_event_states); | |||
| 78 | 78 | ||
| 79 | static inline void __count_vm_event(enum vm_event_item item) | 79 | static inline void __count_vm_event(enum vm_event_item item) |
| 80 | { | 80 | { |
| 81 | __this_cpu_inc(per_cpu_var(vm_event_states).event[item]); | 81 | __this_cpu_inc(vm_event_states.event[item]); |
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | static inline void count_vm_event(enum vm_event_item item) | 84 | static inline void count_vm_event(enum vm_event_item item) |
| 85 | { | 85 | { |
| 86 | this_cpu_inc(per_cpu_var(vm_event_states).event[item]); | 86 | this_cpu_inc(vm_event_states.event[item]); |
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | static inline void __count_vm_events(enum vm_event_item item, long delta) | 89 | static inline void __count_vm_events(enum vm_event_item item, long delta) |
| 90 | { | 90 | { |
| 91 | __this_cpu_add(per_cpu_var(vm_event_states).event[item], delta); | 91 | __this_cpu_add(vm_event_states.event[item], delta); |
| 92 | } | 92 | } |
| 93 | 93 | ||
| 94 | static inline void count_vm_events(enum vm_event_item item, long delta) | 94 | static inline void count_vm_events(enum vm_event_item item, long delta) |
| 95 | { | 95 | { |
| 96 | this_cpu_add(per_cpu_var(vm_event_states).event[item], delta); | 96 | this_cpu_add(vm_event_states.event[item], delta); |
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | extern void all_vm_events(unsigned long *); | 99 | extern void all_vm_events(unsigned long *); |
diff --git a/include/math-emu/op-common.h b/include/math-emu/op-common.h index f456534dcaf9..fd882261225e 100644 --- a/include/math-emu/op-common.h +++ b/include/math-emu/op-common.h | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | _FP_FRAC_DECL_##wc(X) | 29 | _FP_FRAC_DECL_##wc(X) |
| 30 | 30 | ||
| 31 | /* | 31 | /* |
| 32 | * Finish truely unpacking a native fp value by classifying the kind | 32 | * Finish truly unpacking a native fp value by classifying the kind |
| 33 | * of fp value and normalizing both the exponent and the fraction. | 33 | * of fp value and normalizing both the exponent and the fraction. |
| 34 | */ | 34 | */ |
| 35 | 35 | ||
diff --git a/include/media/davinci/vpfe_capture.h b/include/media/davinci/vpfe_capture.h index d863e5e8426d..4314a5f6a087 100644 --- a/include/media/davinci/vpfe_capture.h +++ b/include/media/davinci/vpfe_capture.h | |||
| @@ -165,7 +165,7 @@ struct vpfe_device { | |||
| 165 | u8 started; | 165 | u8 started; |
| 166 | /* | 166 | /* |
| 167 | * offset where second field starts from the starting of the | 167 | * offset where second field starts from the starting of the |
| 168 | * buffer for field seperated YCbCr formats | 168 | * buffer for field separated YCbCr formats |
| 169 | */ | 169 | */ |
| 170 | u32 field_off; | 170 | u32 field_off; |
| 171 | }; | 171 | }; |
diff --git a/include/net/9p/client.h b/include/net/9p/client.h index fb00b329f0d3..f076dfa75ae8 100644 --- a/include/net/9p/client.h +++ b/include/net/9p/client.h | |||
| @@ -29,6 +29,19 @@ | |||
| 29 | /* Number of requests per row */ | 29 | /* Number of requests per row */ |
| 30 | #define P9_ROW_MAXTAG 255 | 30 | #define P9_ROW_MAXTAG 255 |
| 31 | 31 | ||
| 32 | /** enum p9_proto_versions - 9P protocol versions | ||
| 33 | * @p9_proto_legacy: 9P Legacy mode, pre-9P2000.u | ||
| 34 | * @p9_proto_2000u: 9P2000.u extension | ||
| 35 | * @p9_proto_2000L: 9P2000.L extension | ||
| 36 | */ | ||
| 37 | |||
| 38 | enum p9_proto_versions{ | ||
| 39 | p9_proto_legacy = 0, | ||
| 40 | p9_proto_2000u = 1, | ||
| 41 | p9_proto_2000L = 2, | ||
| 42 | }; | ||
| 43 | |||
| 44 | |||
| 32 | /** | 45 | /** |
| 33 | * enum p9_trans_status - different states of underlying transports | 46 | * enum p9_trans_status - different states of underlying transports |
| 34 | * @Connected: transport is connected and healthy | 47 | * @Connected: transport is connected and healthy |
| @@ -111,6 +124,7 @@ struct p9_req_t { | |||
| 111 | * @lock: protect @fidlist | 124 | * @lock: protect @fidlist |
| 112 | * @msize: maximum data size negotiated by protocol | 125 | * @msize: maximum data size negotiated by protocol |
| 113 | * @dotu: extension flags negotiated by protocol | 126 | * @dotu: extension flags negotiated by protocol |
| 127 | * @proto_version: 9P protocol version to use | ||
| 114 | * @trans_mod: module API instantiated with this client | 128 | * @trans_mod: module API instantiated with this client |
| 115 | * @trans: tranport instance state and API | 129 | * @trans: tranport instance state and API |
| 116 | * @conn: connection state information used by trans_fd | 130 | * @conn: connection state information used by trans_fd |
| @@ -137,7 +151,7 @@ struct p9_req_t { | |||
| 137 | struct p9_client { | 151 | struct p9_client { |
| 138 | spinlock_t lock; /* protect client structure */ | 152 | spinlock_t lock; /* protect client structure */ |
| 139 | int msize; | 153 | int msize; |
| 140 | unsigned char dotu; | 154 | unsigned char proto_version; |
| 141 | struct p9_trans_module *trans_mod; | 155 | struct p9_trans_module *trans_mod; |
| 142 | enum p9_trans_status status; | 156 | enum p9_trans_status status; |
| 143 | void *trans; | 157 | void *trans; |
| @@ -209,5 +223,7 @@ int p9_parse_header(struct p9_fcall *, int32_t *, int8_t *, int16_t *, int); | |||
| 209 | int p9stat_read(char *, int, struct p9_wstat *, int); | 223 | int p9stat_read(char *, int, struct p9_wstat *, int); |
| 210 | void p9stat_free(struct p9_wstat *); | 224 | void p9stat_free(struct p9_wstat *); |
| 211 | 225 | ||
| 226 | int p9_is_proto_dotu(struct p9_client *clnt); | ||
| 227 | int p9_is_proto_dotl(struct p9_client *clnt); | ||
| 212 | 228 | ||
| 213 | #endif /* NET_9P_CLIENT_H */ | 229 | #endif /* NET_9P_CLIENT_H */ |
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index 04a6908e38d2..ff77e8f882f1 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h | |||
| @@ -176,6 +176,6 @@ extern void hci_sock_cleanup(void); | |||
| 176 | extern int bt_sysfs_init(void); | 176 | extern int bt_sysfs_init(void); |
| 177 | extern void bt_sysfs_cleanup(void); | 177 | extern void bt_sysfs_cleanup(void); |
| 178 | 178 | ||
| 179 | extern struct class *bt_class; | 179 | extern struct dentry *bt_debugfs; |
| 180 | 180 | ||
| 181 | #endif /* __BLUETOOTH_H */ | 181 | #endif /* __BLUETOOTH_H */ |
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index 4a808de7c0f6..68f67836e146 100644 --- a/include/net/ip6_route.h +++ b/include/net/ip6_route.h | |||
| @@ -37,6 +37,24 @@ struct route_info { | |||
| 37 | #define RT6_LOOKUP_F_SRCPREF_PUBLIC 0x00000010 | 37 | #define RT6_LOOKUP_F_SRCPREF_PUBLIC 0x00000010 |
| 38 | #define RT6_LOOKUP_F_SRCPREF_COA 0x00000020 | 38 | #define RT6_LOOKUP_F_SRCPREF_COA 0x00000020 |
| 39 | 39 | ||
| 40 | /* | ||
| 41 | * rt6_srcprefs2flags() and rt6_flags2srcprefs() translate | ||
| 42 | * between IPV6_ADDR_PREFERENCES socket option values | ||
| 43 | * IPV6_PREFER_SRC_TMP = 0x1 | ||
| 44 | * IPV6_PREFER_SRC_PUBLIC = 0x2 | ||
| 45 | * IPV6_PREFER_SRC_COA = 0x4 | ||
| 46 | * and above RT6_LOOKUP_F_SRCPREF_xxx flags. | ||
| 47 | */ | ||
| 48 | static inline int rt6_srcprefs2flags(unsigned int srcprefs) | ||
| 49 | { | ||
| 50 | /* No need to bitmask because srcprefs have only 3 bits. */ | ||
| 51 | return srcprefs << 3; | ||
| 52 | } | ||
| 53 | |||
| 54 | static inline unsigned int rt6_flags2srcprefs(int flags) | ||
| 55 | { | ||
| 56 | return (flags >> 3) & 7; | ||
| 57 | } | ||
| 40 | 58 | ||
| 41 | extern void ip6_route_input(struct sk_buff *skb); | 59 | extern void ip6_route_input(struct sk_buff *skb); |
| 42 | 60 | ||
diff --git a/include/net/ip6_tunnel.h b/include/net/ip6_tunnel.h index 83b4e008b16d..fbf9d1cda27b 100644 --- a/include/net/ip6_tunnel.h +++ b/include/net/ip6_tunnel.h | |||
| @@ -15,7 +15,6 @@ | |||
| 15 | struct ip6_tnl { | 15 | struct ip6_tnl { |
| 16 | struct ip6_tnl *next; /* next tunnel in list */ | 16 | struct ip6_tnl *next; /* next tunnel in list */ |
| 17 | struct net_device *dev; /* virtual device associated with tunnel */ | 17 | struct net_device *dev; /* virtual device associated with tunnel */ |
| 18 | int recursion; /* depth of hard_start_xmit recursion */ | ||
| 19 | struct ip6_tnl_parm parms; /* tunnel configuration parameters */ | 18 | struct ip6_tnl_parm parms; /* tunnel configuration parameters */ |
| 20 | struct flowi fl; /* flowi template for xmit */ | 19 | struct flowi fl; /* flowi template for xmit */ |
| 21 | struct dst_entry *dst_cache; /* cached dst */ | 20 | struct dst_entry *dst_cache; /* cached dst */ |
diff --git a/include/net/irda/irttp.h b/include/net/irda/irttp.h index 0788c23d2828..11aee7a2972a 100644 --- a/include/net/irda/irttp.h +++ b/include/net/irda/irttp.h | |||
| @@ -97,7 +97,7 @@ | |||
| 97 | #define TTP_MAX_SDU_SIZE 0x01 | 97 | #define TTP_MAX_SDU_SIZE 0x01 |
| 98 | 98 | ||
| 99 | /* | 99 | /* |
| 100 | * This structure contains all data assosiated with one instance of a TTP | 100 | * This structure contains all data associated with one instance of a TTP |
| 101 | * connection. | 101 | * connection. |
| 102 | */ | 102 | */ |
| 103 | struct tsap_cb { | 103 | struct tsap_cb { |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 80eb7cc42ce9..45d7d44d7cbe 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
| @@ -2426,7 +2426,8 @@ struct rate_control_ops { | |||
| 2426 | struct ieee80211_sta *sta, void *priv_sta); | 2426 | struct ieee80211_sta *sta, void *priv_sta); |
| 2427 | void (*rate_update)(void *priv, struct ieee80211_supported_band *sband, | 2427 | void (*rate_update)(void *priv, struct ieee80211_supported_band *sband, |
| 2428 | struct ieee80211_sta *sta, | 2428 | struct ieee80211_sta *sta, |
| 2429 | void *priv_sta, u32 changed); | 2429 | void *priv_sta, u32 changed, |
| 2430 | enum nl80211_channel_type oper_chan_type); | ||
| 2430 | void (*free_sta)(void *priv, struct ieee80211_sta *sta, | 2431 | void (*free_sta)(void *priv, struct ieee80211_sta *sta, |
| 2431 | void *priv_sta); | 2432 | void *priv_sta); |
| 2432 | 2433 | ||
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index 82b7be4db89a..bd10a7908993 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
| @@ -100,14 +100,9 @@ struct net { | |||
| 100 | extern struct net init_net; | 100 | extern struct net init_net; |
| 101 | 101 | ||
| 102 | #ifdef CONFIG_NET | 102 | #ifdef CONFIG_NET |
| 103 | #define INIT_NET_NS(net_ns) .net_ns = &init_net, | ||
| 104 | |||
| 105 | extern struct net *copy_net_ns(unsigned long flags, struct net *net_ns); | 103 | extern struct net *copy_net_ns(unsigned long flags, struct net *net_ns); |
| 106 | 104 | ||
| 107 | #else /* CONFIG_NET */ | 105 | #else /* CONFIG_NET */ |
| 108 | |||
| 109 | #define INIT_NET_NS(net_ns) | ||
| 110 | |||
| 111 | static inline struct net *copy_net_ns(unsigned long flags, struct net *net_ns) | 106 | static inline struct net *copy_net_ns(unsigned long flags, struct net *net_ns) |
| 112 | { | 107 | { |
| 113 | /* There is nothing to copy so this is a noop */ | 108 | /* There is nothing to copy so this is a noop */ |
diff --git a/include/net/netlink.h b/include/net/netlink.h index f82e463c875a..4fc05b58503e 100644 --- a/include/net/netlink.h +++ b/include/net/netlink.h | |||
| @@ -945,7 +945,11 @@ static inline u64 nla_get_u64(const struct nlattr *nla) | |||
| 945 | */ | 945 | */ |
| 946 | static inline __be64 nla_get_be64(const struct nlattr *nla) | 946 | static inline __be64 nla_get_be64(const struct nlattr *nla) |
| 947 | { | 947 | { |
| 948 | return *(__be64 *) nla_data(nla); | 948 | __be64 tmp; |
| 949 | |||
| 950 | nla_memcpy(&tmp, nla, sizeof(tmp)); | ||
| 951 | |||
| 952 | return tmp; | ||
| 949 | } | 953 | } |
| 950 | 954 | ||
| 951 | /** | 955 | /** |
diff --git a/include/net/sock.h b/include/net/sock.h index 6cb1676e409a..092b0551e77f 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
| @@ -253,6 +253,8 @@ struct sock { | |||
| 253 | struct { | 253 | struct { |
| 254 | struct sk_buff *head; | 254 | struct sk_buff *head; |
| 255 | struct sk_buff *tail; | 255 | struct sk_buff *tail; |
| 256 | int len; | ||
| 257 | int limit; | ||
| 256 | } sk_backlog; | 258 | } sk_backlog; |
| 257 | wait_queue_head_t *sk_sleep; | 259 | wait_queue_head_t *sk_sleep; |
| 258 | struct dst_entry *sk_dst_cache; | 260 | struct dst_entry *sk_dst_cache; |
| @@ -589,8 +591,8 @@ static inline int sk_stream_memory_free(struct sock *sk) | |||
| 589 | return sk->sk_wmem_queued < sk->sk_sndbuf; | 591 | return sk->sk_wmem_queued < sk->sk_sndbuf; |
| 590 | } | 592 | } |
| 591 | 593 | ||
| 592 | /* The per-socket spinlock must be held here. */ | 594 | /* OOB backlog add */ |
| 593 | static inline void sk_add_backlog(struct sock *sk, struct sk_buff *skb) | 595 | static inline void __sk_add_backlog(struct sock *sk, struct sk_buff *skb) |
| 594 | { | 596 | { |
| 595 | if (!sk->sk_backlog.tail) { | 597 | if (!sk->sk_backlog.tail) { |
| 596 | sk->sk_backlog.head = sk->sk_backlog.tail = skb; | 598 | sk->sk_backlog.head = sk->sk_backlog.tail = skb; |
| @@ -601,6 +603,17 @@ static inline void sk_add_backlog(struct sock *sk, struct sk_buff *skb) | |||
| 601 | skb->next = NULL; | 603 | skb->next = NULL; |
| 602 | } | 604 | } |
| 603 | 605 | ||
| 606 | /* The per-socket spinlock must be held here. */ | ||
| 607 | static inline __must_check int sk_add_backlog(struct sock *sk, struct sk_buff *skb) | ||
| 608 | { | ||
| 609 | if (sk->sk_backlog.len >= max(sk->sk_backlog.limit, sk->sk_rcvbuf << 1)) | ||
| 610 | return -ENOBUFS; | ||
| 611 | |||
| 612 | __sk_add_backlog(sk, skb); | ||
| 613 | sk->sk_backlog.len += skb->truesize; | ||
| 614 | return 0; | ||
| 615 | } | ||
| 616 | |||
| 604 | static inline int sk_backlog_rcv(struct sock *sk, struct sk_buff *skb) | 617 | static inline int sk_backlog_rcv(struct sock *sk, struct sk_buff *skb) |
| 605 | { | 618 | { |
| 606 | return sk->sk_backlog_rcv(sk, skb); | 619 | return sk->sk_backlog_rcv(sk, skb); |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 56f0aec40ed6..75be5a28815d 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
| @@ -939,7 +939,7 @@ static inline int tcp_prequeue(struct sock *sk, struct sk_buff *skb) | |||
| 939 | 939 | ||
| 940 | tp->ucopy.memory = 0; | 940 | tp->ucopy.memory = 0; |
| 941 | } else if (skb_queue_len(&tp->ucopy.prequeue) == 1) { | 941 | } else if (skb_queue_len(&tp->ucopy.prequeue) == 1) { |
| 942 | wake_up_interruptible_poll(sk->sk_sleep, | 942 | wake_up_interruptible_sync_poll(sk->sk_sleep, |
| 943 | POLLIN | POLLRDNORM | POLLRDBAND); | 943 | POLLIN | POLLRDNORM | POLLRDBAND); |
| 944 | if (!inet_csk_ack_scheduled(sk)) | 944 | if (!inet_csk_ack_scheduled(sk)) |
| 945 | inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK, | 945 | inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK, |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index a7df3275b860..d74e080ba6c9 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
| @@ -275,7 +275,8 @@ struct xfrm_policy_afinfo { | |||
| 275 | struct dst_entry *dst, | 275 | struct dst_entry *dst, |
| 276 | int nfheader_len); | 276 | int nfheader_len); |
| 277 | int (*fill_dst)(struct xfrm_dst *xdst, | 277 | int (*fill_dst)(struct xfrm_dst *xdst, |
| 278 | struct net_device *dev); | 278 | struct net_device *dev, |
| 279 | struct flowi *fl); | ||
| 279 | }; | 280 | }; |
| 280 | 281 | ||
| 281 | extern int xfrm_policy_register_afinfo(struct xfrm_policy_afinfo *afinfo); | 282 | extern int xfrm_policy_register_afinfo(struct xfrm_policy_afinfo *afinfo); |
diff --git a/include/pcmcia/ss.h b/include/pcmcia/ss.h index 32896a773910..2e488b60bc76 100644 --- a/include/pcmcia/ss.h +++ b/include/pcmcia/ss.h | |||
| @@ -277,12 +277,6 @@ extern struct pccard_resource_ops pccard_nonstatic_ops; | |||
| 277 | #endif | 277 | #endif |
| 278 | 278 | ||
| 279 | 279 | ||
| 280 | /* socket drivers are expected to use these callbacks in their .drv struct */ | ||
| 281 | extern int pcmcia_socket_dev_suspend(struct device *dev); | ||
| 282 | extern void pcmcia_socket_dev_early_resume(struct device *dev); | ||
| 283 | extern void pcmcia_socket_dev_late_resume(struct device *dev); | ||
| 284 | extern int pcmcia_socket_dev_resume(struct device *dev); | ||
| 285 | |||
| 286 | /* socket drivers use this callback in their IRQ handler */ | 280 | /* socket drivers use this callback in their IRQ handler */ |
| 287 | extern void pcmcia_parse_events(struct pcmcia_socket *socket, | 281 | extern void pcmcia_parse_events(struct pcmcia_socket *socket, |
| 288 | unsigned int events); | 282 | unsigned int events); |
diff --git a/include/rdma/ib_pack.h b/include/rdma/ib_pack.h index d7fc45c4eba9..cbb50f4da3dd 100644 --- a/include/rdma/ib_pack.h +++ b/include/rdma/ib_pack.h | |||
| @@ -232,6 +232,7 @@ void ib_unpack(const struct ib_field *desc, | |||
| 232 | 232 | ||
| 233 | void ib_ud_header_init(int payload_bytes, | 233 | void ib_ud_header_init(int payload_bytes, |
| 234 | int grh_present, | 234 | int grh_present, |
| 235 | int immediate_present, | ||
| 235 | struct ib_ud_header *header); | 236 | struct ib_ud_header *header); |
| 236 | 237 | ||
| 237 | int ib_ud_header_pack(struct ib_ud_header *header, | 238 | int ib_ud_header_pack(struct ib_ud_header *header, |
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 09509edb1c5f..a585e0f92bc3 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h | |||
| @@ -984,9 +984,9 @@ struct ib_device { | |||
| 984 | struct list_head event_handler_list; | 984 | struct list_head event_handler_list; |
| 985 | spinlock_t event_handler_lock; | 985 | spinlock_t event_handler_lock; |
| 986 | 986 | ||
| 987 | spinlock_t client_data_lock; | ||
| 987 | struct list_head core_list; | 988 | struct list_head core_list; |
| 988 | struct list_head client_data_list; | 989 | struct list_head client_data_list; |
| 989 | spinlock_t client_data_lock; | ||
| 990 | 990 | ||
| 991 | struct ib_cache cache; | 991 | struct ib_cache cache; |
| 992 | int *pkey_tbl_len; | 992 | int *pkey_tbl_len; |
| @@ -1144,8 +1144,8 @@ struct ib_device { | |||
| 1144 | IB_DEV_UNREGISTERED | 1144 | IB_DEV_UNREGISTERED |
| 1145 | } reg_state; | 1145 | } reg_state; |
| 1146 | 1146 | ||
| 1147 | u64 uverbs_cmd_mask; | ||
| 1148 | int uverbs_abi_ver; | 1147 | int uverbs_abi_ver; |
| 1148 | u64 uverbs_cmd_mask; | ||
| 1149 | 1149 | ||
| 1150 | char node_desc[64]; | 1150 | char node_desc[64]; |
| 1151 | __be64 node_guid; | 1151 | __be64 node_guid; |
diff --git a/include/rdma/rdma_cm.h b/include/rdma/rdma_cm.h index c6b2962315b3..4fae90304648 100644 --- a/include/rdma/rdma_cm.h +++ b/include/rdma/rdma_cm.h | |||
| @@ -67,7 +67,6 @@ enum rdma_port_space { | |||
| 67 | RDMA_PS_IPOIB = 0x0002, | 67 | RDMA_PS_IPOIB = 0x0002, |
| 68 | RDMA_PS_TCP = 0x0106, | 68 | RDMA_PS_TCP = 0x0106, |
| 69 | RDMA_PS_UDP = 0x0111, | 69 | RDMA_PS_UDP = 0x0111, |
| 70 | RDMA_PS_SCTP = 0x0183 | ||
| 71 | }; | 70 | }; |
| 72 | 71 | ||
| 73 | struct rdma_addr { | 72 | struct rdma_addr { |
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h index ff92b46f5153..ae5196aae1a5 100644 --- a/include/scsi/libiscsi.h +++ b/include/scsi/libiscsi.h | |||
| @@ -338,7 +338,8 @@ struct iscsi_host { | |||
| 338 | extern int iscsi_change_queue_depth(struct scsi_device *sdev, int depth, | 338 | extern int iscsi_change_queue_depth(struct scsi_device *sdev, int depth, |
| 339 | int reason); | 339 | int reason); |
| 340 | extern int iscsi_eh_abort(struct scsi_cmnd *sc); | 340 | extern int iscsi_eh_abort(struct scsi_cmnd *sc); |
| 341 | extern int iscsi_eh_target_reset(struct scsi_cmnd *sc); | 341 | extern int iscsi_eh_recover_target(struct scsi_cmnd *sc); |
| 342 | extern int iscsi_eh_session_reset(struct scsi_cmnd *sc); | ||
| 342 | extern int iscsi_eh_device_reset(struct scsi_cmnd *sc); | 343 | extern int iscsi_eh_device_reset(struct scsi_cmnd *sc); |
| 343 | extern int iscsi_queuecommand(struct scsi_cmnd *sc, | 344 | extern int iscsi_queuecommand(struct scsi_cmnd *sc, |
| 344 | void (*done)(struct scsi_cmnd *)); | 345 | void (*done)(struct scsi_cmnd *)); |
diff --git a/include/scsi/sg.h b/include/scsi/sg.h index 934ae389671d..a9f3c6fc3f57 100644 --- a/include/scsi/sg.h +++ b/include/scsi/sg.h | |||
| @@ -70,6 +70,9 @@ Major new features in SG 3.x driver (cf SG 2.x drivers) | |||
| 70 | (for the lk 2.2 series). | 70 | (for the lk 2.2 series). |
| 71 | */ | 71 | */ |
| 72 | 72 | ||
| 73 | #ifdef __KERNEL__ | ||
| 74 | extern int sg_big_buff; /* for sysctl */ | ||
| 75 | #endif | ||
| 73 | 76 | ||
| 74 | /* New interface introduced in the 3.x SG drivers follows */ | 77 | /* New interface introduced in the 3.x SG drivers follows */ |
| 75 | 78 | ||
diff --git a/include/sound/asound.h b/include/sound/asound.h index 1f57bb92eb5a..098595500632 100644 --- a/include/sound/asound.h +++ b/include/sound/asound.h | |||
| @@ -544,7 +544,7 @@ struct snd_rawmidi_status { | |||
| 544 | * Timer section - /dev/snd/timer | 544 | * Timer section - /dev/snd/timer |
| 545 | */ | 545 | */ |
| 546 | 546 | ||
| 547 | #define SNDRV_TIMER_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 5) | 547 | #define SNDRV_TIMER_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 6) |
| 548 | 548 | ||
| 549 | enum { | 549 | enum { |
| 550 | SNDRV_TIMER_CLASS_NONE = -1, | 550 | SNDRV_TIMER_CLASS_NONE = -1, |
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h index d0b6cd3afb2f..2aa6aa3e8f61 100644 --- a/include/trace/events/ext4.h +++ b/include/trace/events/ext4.h | |||
| @@ -874,6 +874,107 @@ TRACE_EVENT(ext4_forget, | |||
| 874 | __entry->mode, __entry->is_metadata, __entry->block) | 874 | __entry->mode, __entry->is_metadata, __entry->block) |
| 875 | ); | 875 | ); |
| 876 | 876 | ||
| 877 | TRACE_EVENT(ext4_da_update_reserve_space, | ||
| 878 | TP_PROTO(struct inode *inode, int used_blocks), | ||
| 879 | |||
| 880 | TP_ARGS(inode, used_blocks), | ||
| 881 | |||
| 882 | TP_STRUCT__entry( | ||
| 883 | __field( dev_t, dev ) | ||
| 884 | __field( ino_t, ino ) | ||
| 885 | __field( umode_t, mode ) | ||
| 886 | __field( __u64, i_blocks ) | ||
| 887 | __field( int, used_blocks ) | ||
| 888 | __field( int, reserved_data_blocks ) | ||
| 889 | __field( int, reserved_meta_blocks ) | ||
| 890 | __field( int, allocated_meta_blocks ) | ||
| 891 | ), | ||
| 892 | |||
| 893 | TP_fast_assign( | ||
| 894 | __entry->dev = inode->i_sb->s_dev; | ||
| 895 | __entry->ino = inode->i_ino; | ||
| 896 | __entry->mode = inode->i_mode; | ||
| 897 | __entry->i_blocks = inode->i_blocks; | ||
| 898 | __entry->used_blocks = used_blocks; | ||
| 899 | __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks; | ||
| 900 | __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; | ||
| 901 | __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks; | ||
| 902 | ), | ||
| 903 | |||
| 904 | TP_printk("dev %s ino %lu mode 0%o i_blocks %llu used_blocks %d reserved_data_blocks %d reserved_meta_blocks %d allocated_meta_blocks %d", | ||
| 905 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, | ||
| 906 | __entry->mode, (unsigned long long) __entry->i_blocks, | ||
| 907 | __entry->used_blocks, __entry->reserved_data_blocks, | ||
| 908 | __entry->reserved_meta_blocks, __entry->allocated_meta_blocks) | ||
| 909 | ); | ||
| 910 | |||
| 911 | TRACE_EVENT(ext4_da_reserve_space, | ||
| 912 | TP_PROTO(struct inode *inode, int md_needed), | ||
| 913 | |||
| 914 | TP_ARGS(inode, md_needed), | ||
| 915 | |||
| 916 | TP_STRUCT__entry( | ||
| 917 | __field( dev_t, dev ) | ||
| 918 | __field( ino_t, ino ) | ||
| 919 | __field( umode_t, mode ) | ||
| 920 | __field( __u64, i_blocks ) | ||
| 921 | __field( int, md_needed ) | ||
| 922 | __field( int, reserved_data_blocks ) | ||
| 923 | __field( int, reserved_meta_blocks ) | ||
| 924 | ), | ||
| 925 | |||
| 926 | TP_fast_assign( | ||
| 927 | __entry->dev = inode->i_sb->s_dev; | ||
| 928 | __entry->ino = inode->i_ino; | ||
| 929 | __entry->mode = inode->i_mode; | ||
| 930 | __entry->i_blocks = inode->i_blocks; | ||
| 931 | __entry->md_needed = md_needed; | ||
| 932 | __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks; | ||
| 933 | __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; | ||
| 934 | ), | ||
| 935 | |||
| 936 | TP_printk("dev %s ino %lu mode 0%o i_blocks %llu md_needed %d reserved_data_blocks %d reserved_meta_blocks %d", | ||
| 937 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, | ||
| 938 | __entry->mode, (unsigned long long) __entry->i_blocks, | ||
| 939 | __entry->md_needed, __entry->reserved_data_blocks, | ||
| 940 | __entry->reserved_meta_blocks) | ||
| 941 | ); | ||
| 942 | |||
| 943 | TRACE_EVENT(ext4_da_release_space, | ||
| 944 | TP_PROTO(struct inode *inode, int freed_blocks), | ||
| 945 | |||
| 946 | TP_ARGS(inode, freed_blocks), | ||
| 947 | |||
| 948 | TP_STRUCT__entry( | ||
| 949 | __field( dev_t, dev ) | ||
| 950 | __field( ino_t, ino ) | ||
| 951 | __field( umode_t, mode ) | ||
| 952 | __field( __u64, i_blocks ) | ||
| 953 | __field( int, freed_blocks ) | ||
| 954 | __field( int, reserved_data_blocks ) | ||
| 955 | __field( int, reserved_meta_blocks ) | ||
| 956 | __field( int, allocated_meta_blocks ) | ||
| 957 | ), | ||
| 958 | |||
| 959 | TP_fast_assign( | ||
| 960 | __entry->dev = inode->i_sb->s_dev; | ||
| 961 | __entry->ino = inode->i_ino; | ||
| 962 | __entry->mode = inode->i_mode; | ||
| 963 | __entry->i_blocks = inode->i_blocks; | ||
| 964 | __entry->freed_blocks = freed_blocks; | ||
| 965 | __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks; | ||
| 966 | __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; | ||
| 967 | __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks; | ||
| 968 | ), | ||
| 969 | |||
| 970 | TP_printk("dev %s ino %lu mode 0%o i_blocks %llu freed_blocks %d reserved_data_blocks %d reserved_meta_blocks %d allocated_meta_blocks %d", | ||
| 971 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, | ||
| 972 | __entry->mode, (unsigned long long) __entry->i_blocks, | ||
| 973 | __entry->freed_blocks, __entry->reserved_data_blocks, | ||
| 974 | __entry->reserved_meta_blocks, __entry->allocated_meta_blocks) | ||
| 975 | ); | ||
| 976 | |||
| 977 | |||
| 877 | #endif /* _TRACE_EXT4_H */ | 978 | #endif /* _TRACE_EXT4_H */ |
| 878 | 979 | ||
| 879 | /* This part must be outside protection */ | 980 | /* This part must be outside protection */ |
diff --git a/include/trace/events/jbd2.h b/include/trace/events/jbd2.h index 96b370a050de..bf16545cc977 100644 --- a/include/trace/events/jbd2.h +++ b/include/trace/events/jbd2.h | |||
| @@ -199,6 +199,34 @@ TRACE_EVENT(jbd2_checkpoint_stats, | |||
| 199 | __entry->forced_to_close, __entry->written, __entry->dropped) | 199 | __entry->forced_to_close, __entry->written, __entry->dropped) |
| 200 | ); | 200 | ); |
| 201 | 201 | ||
| 202 | TRACE_EVENT(jbd2_cleanup_journal_tail, | ||
| 203 | |||
| 204 | TP_PROTO(journal_t *journal, tid_t first_tid, | ||
| 205 | unsigned long block_nr, unsigned long freed), | ||
| 206 | |||
| 207 | TP_ARGS(journal, first_tid, block_nr, freed), | ||
| 208 | |||
| 209 | TP_STRUCT__entry( | ||
| 210 | __field( dev_t, dev ) | ||
| 211 | __field( tid_t, tail_sequence ) | ||
| 212 | __field( tid_t, first_tid ) | ||
| 213 | __field(unsigned long, block_nr ) | ||
| 214 | __field(unsigned long, freed ) | ||
| 215 | ), | ||
| 216 | |||
| 217 | TP_fast_assign( | ||
| 218 | __entry->dev = journal->j_fs_dev->bd_dev; | ||
| 219 | __entry->tail_sequence = journal->j_tail_sequence; | ||
| 220 | __entry->first_tid = first_tid; | ||
| 221 | __entry->block_nr = block_nr; | ||
| 222 | __entry->freed = freed; | ||
| 223 | ), | ||
| 224 | |||
| 225 | TP_printk("dev %s from %u to %u offset %lu freed %lu", | ||
| 226 | jbd2_dev_to_name(__entry->dev), __entry->tail_sequence, | ||
| 227 | __entry->first_tid, __entry->block_nr, __entry->freed) | ||
| 228 | ); | ||
| 229 | |||
| 202 | #endif /* _TRACE_JBD2_H */ | 230 | #endif /* _TRACE_JBD2_H */ |
| 203 | 231 | ||
| 204 | /* This part must be outside protection */ | 232 | /* This part must be outside protection */ |
diff --git a/include/trace/events/kvm.h b/include/trace/events/kvm.h index dbe108455275..b17d49dfc3ef 100644 --- a/include/trace/events/kvm.h +++ b/include/trace/events/kvm.h | |||
| @@ -145,6 +145,47 @@ TRACE_EVENT(kvm_mmio, | |||
| 145 | __entry->len, __entry->gpa, __entry->val) | 145 | __entry->len, __entry->gpa, __entry->val) |
| 146 | ); | 146 | ); |
| 147 | 147 | ||
| 148 | #define kvm_fpu_load_symbol \ | ||
| 149 | {0, "unload"}, \ | ||
| 150 | {1, "load"} | ||
| 151 | |||
| 152 | TRACE_EVENT(kvm_fpu, | ||
| 153 | TP_PROTO(int load), | ||
| 154 | TP_ARGS(load), | ||
| 155 | |||
| 156 | TP_STRUCT__entry( | ||
| 157 | __field( u32, load ) | ||
| 158 | ), | ||
| 159 | |||
| 160 | TP_fast_assign( | ||
| 161 | __entry->load = load; | ||
| 162 | ), | ||
| 163 | |||
| 164 | TP_printk("%s", __print_symbolic(__entry->load, kvm_fpu_load_symbol)) | ||
| 165 | ); | ||
| 166 | |||
| 167 | TRACE_EVENT(kvm_age_page, | ||
| 168 | TP_PROTO(ulong hva, struct kvm_memory_slot *slot, int ref), | ||
| 169 | TP_ARGS(hva, slot, ref), | ||
| 170 | |||
| 171 | TP_STRUCT__entry( | ||
| 172 | __field( u64, hva ) | ||
| 173 | __field( u64, gfn ) | ||
| 174 | __field( u8, referenced ) | ||
| 175 | ), | ||
| 176 | |||
| 177 | TP_fast_assign( | ||
| 178 | __entry->hva = hva; | ||
| 179 | __entry->gfn = | ||
| 180 | slot->base_gfn + ((hva - slot->userspace_addr) >> PAGE_SHIFT); | ||
| 181 | __entry->referenced = ref; | ||
| 182 | ), | ||
| 183 | |||
| 184 | TP_printk("hva %llx gfn %llx %s", | ||
| 185 | __entry->hva, __entry->gfn, | ||
| 186 | __entry->referenced ? "YOUNG" : "OLD") | ||
| 187 | ); | ||
| 188 | |||
| 148 | #endif /* _TRACE_KVM_MAIN_H */ | 189 | #endif /* _TRACE_KVM_MAIN_H */ |
| 149 | 190 | ||
| 150 | /* This part must be outside protection */ | 191 | /* This part must be outside protection */ |
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index 0804cd594803..ea6f9d4a20e9 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h | |||
| @@ -401,18 +401,18 @@ static inline notrace int ftrace_get_offsets_##call( \ | |||
| 401 | #undef DEFINE_EVENT | 401 | #undef DEFINE_EVENT |
| 402 | #define DEFINE_EVENT(template, name, proto, args) \ | 402 | #define DEFINE_EVENT(template, name, proto, args) \ |
| 403 | \ | 403 | \ |
| 404 | static void ftrace_profile_##name(proto); \ | 404 | static void perf_trace_##name(proto); \ |
| 405 | \ | 405 | \ |
| 406 | static notrace int \ | 406 | static notrace int \ |
| 407 | ftrace_profile_enable_##name(struct ftrace_event_call *unused) \ | 407 | perf_trace_enable_##name(struct ftrace_event_call *unused) \ |
| 408 | { \ | 408 | { \ |
| 409 | return register_trace_##name(ftrace_profile_##name); \ | 409 | return register_trace_##name(perf_trace_##name); \ |
| 410 | } \ | 410 | } \ |
| 411 | \ | 411 | \ |
| 412 | static notrace void \ | 412 | static notrace void \ |
| 413 | ftrace_profile_disable_##name(struct ftrace_event_call *unused) \ | 413 | perf_trace_disable_##name(struct ftrace_event_call *unused) \ |
| 414 | { \ | 414 | { \ |
| 415 | unregister_trace_##name(ftrace_profile_##name); \ | 415 | unregister_trace_##name(perf_trace_##name); \ |
| 416 | } | 416 | } |
| 417 | 417 | ||
| 418 | #undef DEFINE_EVENT_PRINT | 418 | #undef DEFINE_EVENT_PRINT |
| @@ -507,12 +507,12 @@ ftrace_profile_disable_##name(struct ftrace_event_call *unused) \ | |||
| 507 | 507 | ||
| 508 | #ifdef CONFIG_PERF_EVENTS | 508 | #ifdef CONFIG_PERF_EVENTS |
| 509 | 509 | ||
| 510 | #define _TRACE_PROFILE_INIT(call) \ | 510 | #define _TRACE_PERF_INIT(call) \ |
| 511 | .profile_enable = ftrace_profile_enable_##call, \ | 511 | .perf_event_enable = perf_trace_enable_##call, \ |
| 512 | .profile_disable = ftrace_profile_disable_##call, | 512 | .perf_event_disable = perf_trace_disable_##call, |
| 513 | 513 | ||
| 514 | #else | 514 | #else |
| 515 | #define _TRACE_PROFILE_INIT(call) | 515 | #define _TRACE_PERF_INIT(call) |
| 516 | #endif /* CONFIG_PERF_EVENTS */ | 516 | #endif /* CONFIG_PERF_EVENTS */ |
| 517 | 517 | ||
| 518 | #undef __entry | 518 | #undef __entry |
| @@ -638,7 +638,7 @@ __attribute__((section("_ftrace_events"))) event_##call = { \ | |||
| 638 | .unregfunc = ftrace_raw_unreg_event_##call, \ | 638 | .unregfunc = ftrace_raw_unreg_event_##call, \ |
| 639 | .print_fmt = print_fmt_##template, \ | 639 | .print_fmt = print_fmt_##template, \ |
| 640 | .define_fields = ftrace_define_fields_##template, \ | 640 | .define_fields = ftrace_define_fields_##template, \ |
| 641 | _TRACE_PROFILE_INIT(call) \ | 641 | _TRACE_PERF_INIT(call) \ |
| 642 | } | 642 | } |
| 643 | 643 | ||
| 644 | #undef DEFINE_EVENT_PRINT | 644 | #undef DEFINE_EVENT_PRINT |
| @@ -657,18 +657,18 @@ __attribute__((section("_ftrace_events"))) event_##call = { \ | |||
| 657 | .unregfunc = ftrace_raw_unreg_event_##call, \ | 657 | .unregfunc = ftrace_raw_unreg_event_##call, \ |
| 658 | .print_fmt = print_fmt_##call, \ | 658 | .print_fmt = print_fmt_##call, \ |
| 659 | .define_fields = ftrace_define_fields_##template, \ | 659 | .define_fields = ftrace_define_fields_##template, \ |
| 660 | _TRACE_PROFILE_INIT(call) \ | 660 | _TRACE_PERF_INIT(call) \ |
| 661 | } | 661 | } |
| 662 | 662 | ||
| 663 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) | 663 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) |
| 664 | 664 | ||
| 665 | /* | 665 | /* |
| 666 | * Define the insertion callback to profile events | 666 | * Define the insertion callback to perf events |
| 667 | * | 667 | * |
| 668 | * The job is very similar to ftrace_raw_event_<call> except that we don't | 668 | * The job is very similar to ftrace_raw_event_<call> except that we don't |
| 669 | * insert in the ring buffer but in a perf counter. | 669 | * insert in the ring buffer but in a perf counter. |
| 670 | * | 670 | * |
| 671 | * static void ftrace_profile_<call>(proto) | 671 | * static void ftrace_perf_<call>(proto) |
| 672 | * { | 672 | * { |
| 673 | * struct ftrace_data_offsets_<call> __maybe_unused __data_offsets; | 673 | * struct ftrace_data_offsets_<call> __maybe_unused __data_offsets; |
| 674 | * struct ftrace_event_call *event_call = &event_<call>; | 674 | * struct ftrace_event_call *event_call = &event_<call>; |
| @@ -699,9 +699,9 @@ __attribute__((section("_ftrace_events"))) event_##call = { \ | |||
| 699 | * __cpu = smp_processor_id(); | 699 | * __cpu = smp_processor_id(); |
| 700 | * | 700 | * |
| 701 | * if (in_nmi()) | 701 | * if (in_nmi()) |
| 702 | * trace_buf = rcu_dereference(perf_trace_buf_nmi); | 702 | * trace_buf = rcu_dereference_sched(perf_trace_buf_nmi); |
| 703 | * else | 703 | * else |
| 704 | * trace_buf = rcu_dereference(perf_trace_buf); | 704 | * trace_buf = rcu_dereference_sched(perf_trace_buf); |
| 705 | * | 705 | * |
| 706 | * if (!trace_buf) | 706 | * if (!trace_buf) |
| 707 | * goto end; | 707 | * goto end; |
| @@ -757,13 +757,14 @@ __attribute__((section("_ftrace_events"))) event_##call = { \ | |||
| 757 | #undef DECLARE_EVENT_CLASS | 757 | #undef DECLARE_EVENT_CLASS |
| 758 | #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ | 758 | #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ |
| 759 | static notrace void \ | 759 | static notrace void \ |
| 760 | ftrace_profile_templ_##call(struct ftrace_event_call *event_call, \ | 760 | perf_trace_templ_##call(struct ftrace_event_call *event_call, \ |
| 761 | proto) \ | 761 | proto) \ |
| 762 | { \ | 762 | { \ |
| 763 | struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\ | 763 | struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\ |
| 764 | struct ftrace_raw_##call *entry; \ | 764 | struct ftrace_raw_##call *entry; \ |
| 765 | u64 __addr = 0, __count = 1; \ | 765 | u64 __addr = 0, __count = 1; \ |
| 766 | unsigned long irq_flags; \ | 766 | unsigned long irq_flags; \ |
| 767 | struct pt_regs *__regs; \ | ||
| 767 | int __entry_size; \ | 768 | int __entry_size; \ |
| 768 | int __data_size; \ | 769 | int __data_size; \ |
| 769 | int rctx; \ | 770 | int rctx; \ |
| @@ -773,10 +774,10 @@ ftrace_profile_templ_##call(struct ftrace_event_call *event_call, \ | |||
| 773 | sizeof(u64)); \ | 774 | sizeof(u64)); \ |
| 774 | __entry_size -= sizeof(u32); \ | 775 | __entry_size -= sizeof(u32); \ |
| 775 | \ | 776 | \ |
| 776 | if (WARN_ONCE(__entry_size > FTRACE_MAX_PROFILE_SIZE, \ | 777 | if (WARN_ONCE(__entry_size > PERF_MAX_TRACE_SIZE, \ |
| 777 | "profile buffer not large enough")) \ | 778 | "profile buffer not large enough")) \ |
| 778 | return; \ | 779 | return; \ |
| 779 | entry = (struct ftrace_raw_##call *)ftrace_perf_buf_prepare( \ | 780 | entry = (struct ftrace_raw_##call *)perf_trace_buf_prepare( \ |
| 780 | __entry_size, event_call->id, &rctx, &irq_flags); \ | 781 | __entry_size, event_call->id, &rctx, &irq_flags); \ |
| 781 | if (!entry) \ | 782 | if (!entry) \ |
| 782 | return; \ | 783 | return; \ |
| @@ -784,17 +785,20 @@ ftrace_profile_templ_##call(struct ftrace_event_call *event_call, \ | |||
| 784 | \ | 785 | \ |
| 785 | { assign; } \ | 786 | { assign; } \ |
| 786 | \ | 787 | \ |
| 787 | ftrace_perf_buf_submit(entry, __entry_size, rctx, __addr, \ | 788 | __regs = &__get_cpu_var(perf_trace_regs); \ |
| 788 | __count, irq_flags); \ | 789 | perf_fetch_caller_regs(__regs, 2); \ |
| 790 | \ | ||
| 791 | perf_trace_buf_submit(entry, __entry_size, rctx, __addr, \ | ||
| 792 | __count, irq_flags, __regs); \ | ||
| 789 | } | 793 | } |
| 790 | 794 | ||
| 791 | #undef DEFINE_EVENT | 795 | #undef DEFINE_EVENT |
| 792 | #define DEFINE_EVENT(template, call, proto, args) \ | 796 | #define DEFINE_EVENT(template, call, proto, args) \ |
| 793 | static notrace void ftrace_profile_##call(proto) \ | 797 | static notrace void perf_trace_##call(proto) \ |
| 794 | { \ | 798 | { \ |
| 795 | struct ftrace_event_call *event_call = &event_##call; \ | 799 | struct ftrace_event_call *event_call = &event_##call; \ |
| 796 | \ | 800 | \ |
| 797 | ftrace_profile_templ_##template(event_call, args); \ | 801 | perf_trace_templ_##template(event_call, args); \ |
| 798 | } | 802 | } |
| 799 | 803 | ||
| 800 | #undef DEFINE_EVENT_PRINT | 804 | #undef DEFINE_EVENT_PRINT |
diff --git a/include/trace/syscall.h b/include/trace/syscall.h index 0387100752f0..e5e5f48dbfb3 100644 --- a/include/trace/syscall.h +++ b/include/trace/syscall.h | |||
| @@ -47,10 +47,10 @@ enum print_line_t print_syscall_exit(struct trace_iterator *iter, int flags); | |||
| 47 | #endif | 47 | #endif |
| 48 | 48 | ||
| 49 | #ifdef CONFIG_PERF_EVENTS | 49 | #ifdef CONFIG_PERF_EVENTS |
| 50 | int prof_sysenter_enable(struct ftrace_event_call *call); | 50 | int perf_sysenter_enable(struct ftrace_event_call *call); |
| 51 | void prof_sysenter_disable(struct ftrace_event_call *call); | 51 | void perf_sysenter_disable(struct ftrace_event_call *call); |
| 52 | int prof_sysexit_enable(struct ftrace_event_call *call); | 52 | int perf_sysexit_enable(struct ftrace_event_call *call); |
| 53 | void prof_sysexit_disable(struct ftrace_event_call *call); | 53 | void perf_sysexit_disable(struct ftrace_event_call *call); |
| 54 | #endif | 54 | #endif |
| 55 | 55 | ||
| 56 | #endif /* _TRACE_SYSCALL_H */ | 56 | #endif /* _TRACE_SYSCALL_H */ |
diff --git a/include/video/broadsheetfb.h b/include/video/broadsheetfb.h index a758534c0272..548d28f4ec67 100644 --- a/include/video/broadsheetfb.h +++ b/include/video/broadsheetfb.h | |||
| @@ -29,11 +29,19 @@ | |||
| 29 | #define BS_CMD_UPD_FULL 0x33 | 29 | #define BS_CMD_UPD_FULL 0x33 |
| 30 | #define BS_CMD_UPD_GDRV_CLR 0x37 | 30 | #define BS_CMD_UPD_GDRV_CLR 0x37 |
| 31 | 31 | ||
| 32 | /* Broadsheet register interface defines */ | ||
| 33 | #define BS_REG_REV 0x00 | ||
| 34 | #define BS_REG_PRC 0x02 | ||
| 35 | |||
| 32 | /* Broadsheet pin interface specific defines */ | 36 | /* Broadsheet pin interface specific defines */ |
| 33 | #define BS_CS 0x01 | 37 | #define BS_CS 0x01 |
| 34 | #define BS_DC 0x02 | 38 | #define BS_DC 0x02 |
| 35 | #define BS_WR 0x03 | 39 | #define BS_WR 0x03 |
| 36 | 40 | ||
| 41 | /* Broadsheet IO interface specific defines */ | ||
| 42 | #define BS_MMIO_CMD 0x01 | ||
| 43 | #define BS_MMIO_DATA 0x02 | ||
| 44 | |||
| 37 | /* struct used by broadsheet. board specific stuff comes from *board */ | 45 | /* struct used by broadsheet. board specific stuff comes from *board */ |
| 38 | struct broadsheetfb_par { | 46 | struct broadsheetfb_par { |
| 39 | struct fb_info *info; | 47 | struct fb_info *info; |
| @@ -41,6 +49,8 @@ struct broadsheetfb_par { | |||
| 41 | void (*write_reg)(struct broadsheetfb_par *, u16 reg, u16 val); | 49 | void (*write_reg)(struct broadsheetfb_par *, u16 reg, u16 val); |
| 42 | u16 (*read_reg)(struct broadsheetfb_par *, u16 reg); | 50 | u16 (*read_reg)(struct broadsheetfb_par *, u16 reg); |
| 43 | wait_queue_head_t waitq; | 51 | wait_queue_head_t waitq; |
| 52 | int panel_index; | ||
| 53 | struct mutex io_lock; | ||
| 44 | }; | 54 | }; |
| 45 | 55 | ||
| 46 | /* board specific routines */ | 56 | /* board specific routines */ |
| @@ -48,12 +58,17 @@ struct broadsheet_board { | |||
| 48 | struct module *owner; | 58 | struct module *owner; |
| 49 | int (*init)(struct broadsheetfb_par *); | 59 | int (*init)(struct broadsheetfb_par *); |
| 50 | int (*wait_for_rdy)(struct broadsheetfb_par *); | 60 | int (*wait_for_rdy)(struct broadsheetfb_par *); |
| 51 | void (*set_ctl)(struct broadsheetfb_par *, unsigned char, u8); | ||
| 52 | void (*set_hdb)(struct broadsheetfb_par *, u16); | ||
| 53 | u16 (*get_hdb)(struct broadsheetfb_par *); | ||
| 54 | void (*cleanup)(struct broadsheetfb_par *); | 61 | void (*cleanup)(struct broadsheetfb_par *); |
| 55 | int (*get_panel_type)(void); | 62 | int (*get_panel_type)(void); |
| 56 | int (*setup_irq)(struct fb_info *); | 63 | int (*setup_irq)(struct fb_info *); |
| 57 | }; | ||
| 58 | 64 | ||
| 65 | /* Functions for boards that use GPIO */ | ||
| 66 | void (*set_ctl)(struct broadsheetfb_par *, unsigned char, u8); | ||
| 67 | void (*set_hdb)(struct broadsheetfb_par *, u16); | ||
| 68 | u16 (*get_hdb)(struct broadsheetfb_par *); | ||
| 69 | |||
| 70 | /* Functions for boards that have specialized MMIO */ | ||
| 71 | void (*mmio_write)(struct broadsheetfb_par *, int type, u16); | ||
| 72 | u16 (*mmio_read)(struct broadsheetfb_par *); | ||
| 73 | }; | ||
| 59 | #endif | 74 | #endif |
