aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/binfmts.h4
-rw-r--r--include/linux/filter.h7
-rw-r--r--include/linux/fsl_devices.h16
-rw-r--r--include/linux/hrtimer.h33
-rw-r--r--include/linux/ide.h2
-rw-r--r--include/linux/kvm.h6
-rw-r--r--include/linux/kvm_host.h30
-rw-r--r--include/linux/leds-regulator.h2
-rw-r--r--include/linux/mfd/wm8994/pdata.h49
-rw-r--r--include/linux/nilfs2_fs.h4
-rw-r--r--include/linux/nmi.h7
-rw-r--r--include/linux/notifier.h3
-rw-r--r--include/linux/posix-clock.h2
-rw-r--r--include/linux/pti.h42
-rw-r--r--include/linux/sched.h35
-rw-r--r--include/linux/serial_core.h6
-rw-r--r--include/linux/serial_reg.h2
-rw-r--r--include/linux/sht15.h18
-rw-r--r--include/linux/skbuff.h8
-rw-r--r--include/linux/slub_def.h8
-rw-r--r--include/linux/thread_info.h2
-rw-r--r--include/linux/timerfd.h3
-rw-r--r--include/linux/tty.h4
-rw-r--r--include/linux/tty_ldisc.h9
-rw-r--r--include/linux/usb.h6
-rw-r--r--include/linux/usb/ch9.h2
-rw-r--r--include/linux/usb/composite.h16
-rw-r--r--include/linux/usb/ehci_def.h15
-rw-r--r--include/linux/usb/gadget.h4
-rw-r--r--include/linux/usb/msm_hsusb.h79
-rw-r--r--include/linux/usb/msm_hsusb_hw.h2
-rw-r--r--include/linux/usb/otg.h6
-rw-r--r--include/linux/usb/renesas_usbhs.h156
-rw-r--r--include/net/caif/caif_layer.h36
-rw-r--r--include/net/genetlink.h2
-rw-r--r--include/net/mac80211.h3
-rw-r--r--include/net/netlink.h2
-rw-r--r--include/sound/ak4641.h26
-rw-r--r--include/sound/control.h1
-rw-r--r--include/sound/max98095.h54
-rw-r--r--include/sound/soc-dapm.h80
-rw-r--r--include/sound/soc.h32
-rw-r--r--include/sound/tea575x-tuner.h26
-rw-r--r--include/sound/tlv320dac33-plat.h2
-rw-r--r--include/sound/tpa6130a2-plat.h2
-rw-r--r--include/sound/wm8915.h55
-rw-r--r--include/sound/wm8962.h22
-rw-r--r--include/video/newport.h2
48 files changed, 784 insertions, 149 deletions
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h
index c3d6512eded1..8845613fd7e3 100644
--- a/include/linux/binfmts.h
+++ b/include/linux/binfmts.h
@@ -60,10 +60,6 @@ struct linux_binprm {
60 unsigned long loader, exec; 60 unsigned long loader, exec;
61}; 61};
62 62
63extern void acct_arg_size(struct linux_binprm *bprm, unsigned long pages);
64extern struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos,
65 int write);
66
67#define BINPRM_FLAGS_ENFORCE_NONDUMP_BIT 0 63#define BINPRM_FLAGS_ENFORCE_NONDUMP_BIT 0
68#define BINPRM_FLAGS_ENFORCE_NONDUMP (1 << BINPRM_FLAGS_ENFORCE_NONDUMP_BIT) 64#define BINPRM_FLAGS_ENFORCE_NONDUMP (1 << BINPRM_FLAGS_ENFORCE_NONDUMP_BIT)
69 65
diff --git a/include/linux/filter.h b/include/linux/filter.h
index 4609b85e559d..9ee3f9fb0b4a 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -131,6 +131,10 @@ struct sock_fprog { /* Required for SO_ATTACH_FILTER. */
131#define SKF_LL_OFF (-0x200000) 131#define SKF_LL_OFF (-0x200000)
132 132
133#ifdef __KERNEL__ 133#ifdef __KERNEL__
134
135struct sk_buff;
136struct sock;
137
134struct sk_filter 138struct sk_filter
135{ 139{
136 atomic_t refcnt; 140 atomic_t refcnt;
@@ -146,9 +150,6 @@ static inline unsigned int sk_filter_len(const struct sk_filter *fp)
146 return fp->len * sizeof(struct sock_filter) + sizeof(*fp); 150 return fp->len * sizeof(struct sock_filter) + sizeof(*fp);
147} 151}
148 152
149struct sk_buff;
150struct sock;
151
152extern int sk_filter(struct sock *sk, struct sk_buff *skb); 153extern int sk_filter(struct sock *sk, struct sk_buff *skb);
153extern unsigned int sk_run_filter(const struct sk_buff *skb, 154extern unsigned int sk_run_filter(const struct sk_buff *skb,
154 const struct sock_filter *filter); 155 const struct sock_filter *filter);
diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h
index 4eb56ed75fbc..fffdf00f87b9 100644
--- a/include/linux/fsl_devices.h
+++ b/include/linux/fsl_devices.h
@@ -72,6 +72,7 @@ struct fsl_usb2_platform_data {
72 void (*exit)(struct platform_device *); 72 void (*exit)(struct platform_device *);
73 void __iomem *regs; /* ioremap'd register base */ 73 void __iomem *regs; /* ioremap'd register base */
74 struct clk *clk; 74 struct clk *clk;
75 unsigned power_budget; /* hcd->power_budget */
75 unsigned big_endian_mmio:1; 76 unsigned big_endian_mmio:1;
76 unsigned big_endian_desc:1; 77 unsigned big_endian_desc:1;
77 unsigned es:1; /* need USBMODE:ES */ 78 unsigned es:1; /* need USBMODE:ES */
@@ -79,6 +80,21 @@ struct fsl_usb2_platform_data {
79 unsigned have_sysif_regs:1; 80 unsigned have_sysif_regs:1;
80 unsigned invert_drvvbus:1; 81 unsigned invert_drvvbus:1;
81 unsigned invert_pwr_fault:1; 82 unsigned invert_pwr_fault:1;
83
84 unsigned suspended:1;
85 unsigned already_suspended:1;
86
87 /* register save area for suspend/resume */
88 u32 pm_command;
89 u32 pm_status;
90 u32 pm_intr_enable;
91 u32 pm_frame_index;
92 u32 pm_segment;
93 u32 pm_frame_list;
94 u32 pm_async_next;
95 u32 pm_configured_flag;
96 u32 pm_portsc;
97 u32 pm_usbgenctrl;
82}; 98};
83 99
84/* Flags in fsl_usb2_mph_platform_data */ 100/* Flags in fsl_usb2_mph_platform_data */
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 62f500c724f9..51932e5acf7c 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -143,19 +143,18 @@ struct hrtimer_sleeper {
143 */ 143 */
144struct hrtimer_clock_base { 144struct hrtimer_clock_base {
145 struct hrtimer_cpu_base *cpu_base; 145 struct hrtimer_cpu_base *cpu_base;
146 clockid_t index; 146 int index;
147 clockid_t clockid;
147 struct timerqueue_head active; 148 struct timerqueue_head active;
148 ktime_t resolution; 149 ktime_t resolution;
149 ktime_t (*get_time)(void); 150 ktime_t (*get_time)(void);
150 ktime_t softirq_time; 151 ktime_t softirq_time;
151#ifdef CONFIG_HIGH_RES_TIMERS
152 ktime_t offset; 152 ktime_t offset;
153#endif
154}; 153};
155 154
156enum hrtimer_base_type { 155enum hrtimer_base_type {
157 HRTIMER_BASE_REALTIME,
158 HRTIMER_BASE_MONOTONIC, 156 HRTIMER_BASE_MONOTONIC,
157 HRTIMER_BASE_REALTIME,
159 HRTIMER_BASE_BOOTTIME, 158 HRTIMER_BASE_BOOTTIME,
160 HRTIMER_MAX_CLOCK_BASES, 159 HRTIMER_MAX_CLOCK_BASES,
161}; 160};
@@ -164,7 +163,7 @@ enum hrtimer_base_type {
164 * struct hrtimer_cpu_base - the per cpu clock bases 163 * struct hrtimer_cpu_base - the per cpu clock bases
165 * @lock: lock protecting the base and associated clock bases 164 * @lock: lock protecting the base and associated clock bases
166 * and timers 165 * and timers
167 * @clock_base: array of clock bases for this cpu 166 * @active_bases: Bitfield to mark bases with active timers
168 * @expires_next: absolute time of the next event which was scheduled 167 * @expires_next: absolute time of the next event which was scheduled
169 * via clock_set_next_event() 168 * via clock_set_next_event()
170 * @hres_active: State of high resolution mode 169 * @hres_active: State of high resolution mode
@@ -173,10 +172,11 @@ enum hrtimer_base_type {
173 * @nr_retries: Total number of hrtimer interrupt retries 172 * @nr_retries: Total number of hrtimer interrupt retries
174 * @nr_hangs: Total number of hrtimer interrupt hangs 173 * @nr_hangs: Total number of hrtimer interrupt hangs
175 * @max_hang_time: Maximum time spent in hrtimer_interrupt 174 * @max_hang_time: Maximum time spent in hrtimer_interrupt
175 * @clock_base: array of clock bases for this cpu
176 */ 176 */
177struct hrtimer_cpu_base { 177struct hrtimer_cpu_base {
178 raw_spinlock_t lock; 178 raw_spinlock_t lock;
179 struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES]; 179 unsigned long active_bases;
180#ifdef CONFIG_HIGH_RES_TIMERS 180#ifdef CONFIG_HIGH_RES_TIMERS
181 ktime_t expires_next; 181 ktime_t expires_next;
182 int hres_active; 182 int hres_active;
@@ -186,6 +186,7 @@ struct hrtimer_cpu_base {
186 unsigned long nr_hangs; 186 unsigned long nr_hangs;
187 ktime_t max_hang_time; 187 ktime_t max_hang_time;
188#endif 188#endif
189 struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES];
189}; 190};
190 191
191static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time) 192static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time)
@@ -256,8 +257,6 @@ static inline ktime_t hrtimer_expires_remaining(const struct hrtimer *timer)
256#ifdef CONFIG_HIGH_RES_TIMERS 257#ifdef CONFIG_HIGH_RES_TIMERS
257struct clock_event_device; 258struct clock_event_device;
258 259
259extern void clock_was_set(void);
260extern void hres_timers_resume(void);
261extern void hrtimer_interrupt(struct clock_event_device *dev); 260extern void hrtimer_interrupt(struct clock_event_device *dev);
262 261
263/* 262/*
@@ -291,16 +290,8 @@ extern void hrtimer_peek_ahead_timers(void);
291# define MONOTONIC_RES_NSEC LOW_RES_NSEC 290# define MONOTONIC_RES_NSEC LOW_RES_NSEC
292# define KTIME_MONOTONIC_RES KTIME_LOW_RES 291# define KTIME_MONOTONIC_RES KTIME_LOW_RES
293 292
294/*
295 * clock_was_set() is a NOP for non- high-resolution systems. The
296 * time-sorted order guarantees that a timer does not expire early and
297 * is expired in the next softirq when the clock was advanced.
298 */
299static inline void clock_was_set(void) { }
300static inline void hrtimer_peek_ahead_timers(void) { } 293static inline void hrtimer_peek_ahead_timers(void) { }
301 294
302static inline void hres_timers_resume(void) { }
303
304/* 295/*
305 * In non high resolution mode the time reference is taken from 296 * In non high resolution mode the time reference is taken from
306 * the base softirq time variable. 297 * the base softirq time variable.
@@ -316,10 +307,18 @@ static inline int hrtimer_is_hres_active(struct hrtimer *timer)
316} 307}
317#endif 308#endif
318 309
310extern void clock_was_set(void);
311#ifdef CONFIG_TIMERFD
312extern void timerfd_clock_was_set(void);
313#else
314static inline void timerfd_clock_was_set(void) { }
315#endif
316extern void hrtimers_resume(void);
317
319extern ktime_t ktime_get(void); 318extern ktime_t ktime_get(void);
320extern ktime_t ktime_get_real(void); 319extern ktime_t ktime_get_real(void);
321extern ktime_t ktime_get_boottime(void); 320extern ktime_t ktime_get_boottime(void);
322 321extern ktime_t ktime_get_monotonic_offset(void);
323 322
324DECLARE_PER_CPU(struct tick_device, tick_cpu_device); 323DECLARE_PER_CPU(struct tick_device, tick_cpu_device);
325 324
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 072fe8c93e6f..42557851b12e 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -18,13 +18,13 @@
18#include <linux/pci.h> 18#include <linux/pci.h>
19#include <linux/completion.h> 19#include <linux/completion.h>
20#include <linux/pm.h> 20#include <linux/pm.h>
21#include <linux/mutex.h>
21#ifdef CONFIG_BLK_DEV_IDEACPI 22#ifdef CONFIG_BLK_DEV_IDEACPI
22#include <acpi/acpi.h> 23#include <acpi/acpi.h>
23#endif 24#endif
24#include <asm/byteorder.h> 25#include <asm/byteorder.h>
25#include <asm/system.h> 26#include <asm/system.h>
26#include <asm/io.h> 27#include <asm/io.h>
27#include <asm/mutex.h>
28 28
29/* for request_sense */ 29/* for request_sense */
30#include <linux/cdrom.h> 30#include <linux/cdrom.h>
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index ea2dc1a2e13d..55ef181521ff 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -541,6 +541,9 @@ struct kvm_ppc_pvinfo {
541#define KVM_CAP_PPC_GET_PVINFO 57 541#define KVM_CAP_PPC_GET_PVINFO 57
542#define KVM_CAP_PPC_IRQ_LEVEL 58 542#define KVM_CAP_PPC_IRQ_LEVEL 58
543#define KVM_CAP_ASYNC_PF 59 543#define KVM_CAP_ASYNC_PF 59
544#define KVM_CAP_TSC_CONTROL 60
545#define KVM_CAP_GET_TSC_KHZ 61
546#define KVM_CAP_PPC_BOOKE_SREGS 62
544 547
545#ifdef KVM_CAP_IRQ_ROUTING 548#ifdef KVM_CAP_IRQ_ROUTING
546 549
@@ -677,6 +680,9 @@ struct kvm_clock_data {
677#define KVM_SET_PIT2 _IOW(KVMIO, 0xa0, struct kvm_pit_state2) 680#define KVM_SET_PIT2 _IOW(KVMIO, 0xa0, struct kvm_pit_state2)
678/* Available with KVM_CAP_PPC_GET_PVINFO */ 681/* Available with KVM_CAP_PPC_GET_PVINFO */
679#define KVM_PPC_GET_PVINFO _IOW(KVMIO, 0xa1, struct kvm_ppc_pvinfo) 682#define KVM_PPC_GET_PVINFO _IOW(KVMIO, 0xa1, struct kvm_ppc_pvinfo)
683/* Available with KVM_CAP_TSC_CONTROL */
684#define KVM_SET_TSC_KHZ _IO(KVMIO, 0xa2)
685#define KVM_GET_TSC_KHZ _IO(KVMIO, 0xa3)
680 686
681/* 687/*
682 * ioctls for vcpu fds 688 * ioctls for vcpu fds
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index ab428552af8e..b9c3299c6a55 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -27,6 +27,10 @@
27 27
28#include <asm/kvm_host.h> 28#include <asm/kvm_host.h>
29 29
30#ifndef KVM_MMIO_SIZE
31#define KVM_MMIO_SIZE 8
32#endif
33
30/* 34/*
31 * vcpu->requests bit members 35 * vcpu->requests bit members
32 */ 36 */
@@ -43,7 +47,6 @@
43#define KVM_REQ_DEACTIVATE_FPU 10 47#define KVM_REQ_DEACTIVATE_FPU 10
44#define KVM_REQ_EVENT 11 48#define KVM_REQ_EVENT 11
45#define KVM_REQ_APF_HALT 12 49#define KVM_REQ_APF_HALT 12
46#define KVM_REQ_NMI 13
47 50
48#define KVM_USERSPACE_IRQ_SOURCE_ID 0 51#define KVM_USERSPACE_IRQ_SOURCE_ID 0
49 52
@@ -133,7 +136,8 @@ struct kvm_vcpu {
133 int mmio_read_completed; 136 int mmio_read_completed;
134 int mmio_is_write; 137 int mmio_is_write;
135 int mmio_size; 138 int mmio_size;
136 unsigned char mmio_data[8]; 139 int mmio_index;
140 unsigned char mmio_data[KVM_MMIO_SIZE];
137 gpa_t mmio_phys_addr; 141 gpa_t mmio_phys_addr;
138#endif 142#endif
139 143
@@ -292,9 +296,10 @@ static inline struct kvm_vcpu *kvm_get_vcpu(struct kvm *kvm, int i)
292} 296}
293 297
294#define kvm_for_each_vcpu(idx, vcpup, kvm) \ 298#define kvm_for_each_vcpu(idx, vcpup, kvm) \
295 for (idx = 0, vcpup = kvm_get_vcpu(kvm, idx); \ 299 for (idx = 0; \
296 idx < atomic_read(&kvm->online_vcpus) && vcpup; \ 300 idx < atomic_read(&kvm->online_vcpus) && \
297 vcpup = kvm_get_vcpu(kvm, ++idx)) 301 (vcpup = kvm_get_vcpu(kvm, idx)) != NULL; \
302 idx++)
298 303
299int kvm_vcpu_init(struct kvm_vcpu *vcpu, struct kvm *kvm, unsigned id); 304int kvm_vcpu_init(struct kvm_vcpu *vcpu, struct kvm *kvm, unsigned id);
300void kvm_vcpu_uninit(struct kvm_vcpu *vcpu); 305void kvm_vcpu_uninit(struct kvm_vcpu *vcpu);
@@ -365,7 +370,6 @@ pfn_t gfn_to_pfn_prot(struct kvm *kvm, gfn_t gfn, bool write_fault,
365 bool *writable); 370 bool *writable);
366pfn_t gfn_to_pfn_memslot(struct kvm *kvm, 371pfn_t gfn_to_pfn_memslot(struct kvm *kvm,
367 struct kvm_memory_slot *slot, gfn_t gfn); 372 struct kvm_memory_slot *slot, gfn_t gfn);
368int memslot_id(struct kvm *kvm, gfn_t gfn);
369void kvm_release_pfn_dirty(pfn_t); 373void kvm_release_pfn_dirty(pfn_t);
370void kvm_release_pfn_clean(pfn_t pfn); 374void kvm_release_pfn_clean(pfn_t pfn);
371void kvm_set_pfn_dirty(pfn_t pfn); 375void kvm_set_pfn_dirty(pfn_t pfn);
@@ -587,8 +591,17 @@ static inline int kvm_deassign_device(struct kvm *kvm,
587 591
588static inline void kvm_guest_enter(void) 592static inline void kvm_guest_enter(void)
589{ 593{
594 BUG_ON(preemptible());
590 account_system_vtime(current); 595 account_system_vtime(current);
591 current->flags |= PF_VCPU; 596 current->flags |= PF_VCPU;
597 /* KVM does not hold any references to rcu protected data when it
598 * switches CPU into a guest mode. In fact switching to a guest mode
599 * is very similar to exiting to userspase from rcu point of view. In
600 * addition CPU may stay in a guest mode for quite a long time (up to
601 * one time slice). Lets treat guest mode as quiescent state, just like
602 * we do with user-mode execution.
603 */
604 rcu_virt_note_context_switch(smp_processor_id());
592} 605}
593 606
594static inline void kvm_guest_exit(void) 607static inline void kvm_guest_exit(void)
@@ -597,6 +610,11 @@ static inline void kvm_guest_exit(void)
597 current->flags &= ~PF_VCPU; 610 current->flags &= ~PF_VCPU;
598} 611}
599 612
613static inline int memslot_id(struct kvm *kvm, gfn_t gfn)
614{
615 return gfn_to_memslot(kvm, gfn)->id;
616}
617
600static inline unsigned long gfn_to_hva_memslot(struct kvm_memory_slot *slot, 618static inline unsigned long gfn_to_hva_memslot(struct kvm_memory_slot *slot,
601 gfn_t gfn) 619 gfn_t gfn)
602{ 620{
diff --git a/include/linux/leds-regulator.h b/include/linux/leds-regulator.h
index 5a8eb389aab8..e2337a8c90b0 100644
--- a/include/linux/leds-regulator.h
+++ b/include/linux/leds-regulator.h
@@ -16,7 +16,7 @@
16 * Use "vled" as supply id when declaring the regulator consumer: 16 * Use "vled" as supply id when declaring the regulator consumer:
17 * 17 *
18 * static struct regulator_consumer_supply pcap_regulator_VVIB_consumers [] = { 18 * static struct regulator_consumer_supply pcap_regulator_VVIB_consumers [] = {
19 * { .dev_name = "leds-regulator.0", supply = "vled" }, 19 * { .dev_name = "leds-regulator.0", .supply = "vled" },
20 * }; 20 * };
21 * 21 *
22 * If you have several regulator driven LEDs, you can append a numerical id to 22 * If you have several regulator driven LEDs, you can append a numerical id to
diff --git a/include/linux/mfd/wm8994/pdata.h b/include/linux/mfd/wm8994/pdata.h
index 466b1c777aff..d12f8d635a81 100644
--- a/include/linux/mfd/wm8994/pdata.h
+++ b/include/linux/mfd/wm8994/pdata.h
@@ -32,6 +32,10 @@ struct wm8994_ldo_pdata {
32#define WM8994_EQ_REGS 20 32#define WM8994_EQ_REGS 20
33#define WM8958_MBC_CUTOFF_REGS 20 33#define WM8958_MBC_CUTOFF_REGS 20
34#define WM8958_MBC_COEFF_REGS 48 34#define WM8958_MBC_COEFF_REGS 48
35#define WM8958_MBC_COMBINED_REGS 56
36#define WM8958_VSS_HPF_REGS 2
37#define WM8958_VSS_REGS 148
38#define WM8958_ENH_EQ_REGS 32
35 39
36/** 40/**
37 * DRC configurations are specified with a label and a set of register 41 * DRC configurations are specified with a label and a set of register
@@ -71,6 +75,42 @@ struct wm8958_mbc_cfg {
71 const char *name; 75 const char *name;
72 u16 cutoff_regs[WM8958_MBC_CUTOFF_REGS]; 76 u16 cutoff_regs[WM8958_MBC_CUTOFF_REGS];
73 u16 coeff_regs[WM8958_MBC_COEFF_REGS]; 77 u16 coeff_regs[WM8958_MBC_COEFF_REGS];
78
79 /* Coefficient layout when using MBC+VSS firmware */
80 u16 combined_regs[WM8958_MBC_COMBINED_REGS];
81};
82
83/**
84 * VSS HPF configurations are specified with a label and two values to
85 * write. Configurations are expected to be generated using the
86 * multiband compressor configuration panel in WISCE - see
87 * http://www.wolfsonmicro.com/wisce/
88 */
89struct wm8958_vss_hpf_cfg {
90 const char *name;
91 u16 regs[WM8958_VSS_HPF_REGS];
92};
93
94/**
95 * VSS configurations are specified with a label and array of values
96 * to write. Configurations are expected to be generated using the
97 * multiband compressor configuration panel in WISCE - see
98 * http://www.wolfsonmicro.com/wisce/
99 */
100struct wm8958_vss_cfg {
101 const char *name;
102 u16 regs[WM8958_VSS_REGS];
103};
104
105/**
106 * Enhanced EQ configurations are specified with a label and array of
107 * values to write. Configurations are expected to be generated using
108 * the multiband compressor configuration panel in WISCE - see
109 * http://www.wolfsonmicro.com/wisce/
110 */
111struct wm8958_enh_eq_cfg {
112 const char *name;
113 u16 regs[WM8958_ENH_EQ_REGS];
74}; 114};
75 115
76struct wm8994_pdata { 116struct wm8994_pdata {
@@ -95,6 +135,15 @@ struct wm8994_pdata {
95 int num_mbc_cfgs; 135 int num_mbc_cfgs;
96 struct wm8958_mbc_cfg *mbc_cfgs; 136 struct wm8958_mbc_cfg *mbc_cfgs;
97 137
138 int num_vss_cfgs;
139 struct wm8958_vss_cfg *vss_cfgs;
140
141 int num_vss_hpf_cfgs;
142 struct wm8958_vss_hpf_cfg *vss_hpf_cfgs;
143
144 int num_enh_eq_cfgs;
145 struct wm8958_enh_eq_cfg *enh_eq_cfgs;
146
98 /* LINEOUT can be differential or single ended */ 147 /* LINEOUT can be differential or single ended */
99 unsigned int lineout1_diff:1; 148 unsigned int lineout1_diff:1;
100 unsigned int lineout2_diff:1; 149 unsigned int lineout2_diff:1;
diff --git a/include/linux/nilfs2_fs.h b/include/linux/nilfs2_fs.h
index 8768c469e93e..7454ad7451b4 100644
--- a/include/linux/nilfs2_fs.h
+++ b/include/linux/nilfs2_fs.h
@@ -107,7 +107,7 @@ struct nilfs_super_root {
107#define NILFS_SR_DAT_OFFSET(inode_size) NILFS_SR_MDT_OFFSET(inode_size, 0) 107#define NILFS_SR_DAT_OFFSET(inode_size) NILFS_SR_MDT_OFFSET(inode_size, 0)
108#define NILFS_SR_CPFILE_OFFSET(inode_size) NILFS_SR_MDT_OFFSET(inode_size, 1) 108#define NILFS_SR_CPFILE_OFFSET(inode_size) NILFS_SR_MDT_OFFSET(inode_size, 1)
109#define NILFS_SR_SUFILE_OFFSET(inode_size) NILFS_SR_MDT_OFFSET(inode_size, 2) 109#define NILFS_SR_SUFILE_OFFSET(inode_size) NILFS_SR_MDT_OFFSET(inode_size, 2)
110#define NILFS_SR_BYTES (sizeof(struct nilfs_super_root)) 110#define NILFS_SR_BYTES(inode_size) NILFS_SR_MDT_OFFSET(inode_size, 3)
111 111
112/* 112/*
113 * Maximal mount counts 113 * Maximal mount counts
@@ -845,5 +845,7 @@ struct nilfs_bdesc {
845 _IOR(NILFS_IOCTL_IDENT, 0x8A, __u64) 845 _IOR(NILFS_IOCTL_IDENT, 0x8A, __u64)
846#define NILFS_IOCTL_RESIZE \ 846#define NILFS_IOCTL_RESIZE \
847 _IOW(NILFS_IOCTL_IDENT, 0x8B, __u64) 847 _IOW(NILFS_IOCTL_IDENT, 0x8B, __u64)
848#define NILFS_IOCTL_SET_ALLOC_RANGE \
849 _IOW(NILFS_IOCTL_IDENT, 0x8C, __u64[2])
848 850
849#endif /* _LINUX_NILFS_FS_H */ 851#endif /* _LINUX_NILFS_FS_H */
diff --git a/include/linux/nmi.h b/include/linux/nmi.h
index c536f8545f74..2d304efc89df 100644
--- a/include/linux/nmi.h
+++ b/include/linux/nmi.h
@@ -45,11 +45,12 @@ static inline bool trigger_all_cpu_backtrace(void)
45 45
46#ifdef CONFIG_LOCKUP_DETECTOR 46#ifdef CONFIG_LOCKUP_DETECTOR
47int hw_nmi_is_cpu_stuck(struct pt_regs *); 47int hw_nmi_is_cpu_stuck(struct pt_regs *);
48u64 hw_nmi_get_sample_period(void); 48u64 hw_nmi_get_sample_period(int watchdog_thresh);
49extern int watchdog_enabled; 49extern int watchdog_enabled;
50extern int watchdog_thresh;
50struct ctl_table; 51struct ctl_table;
51extern int proc_dowatchdog_enabled(struct ctl_table *, int , 52extern int proc_dowatchdog(struct ctl_table *, int ,
52 void __user *, size_t *, loff_t *); 53 void __user *, size_t *, loff_t *);
53#endif 54#endif
54 55
55#endif 56#endif
diff --git a/include/linux/notifier.h b/include/linux/notifier.h
index 621dfa16acc0..c0688b0168b3 100644
--- a/include/linux/notifier.h
+++ b/include/linux/notifier.h
@@ -209,8 +209,9 @@ static inline int notifier_to_errno(int ret)
209#define NETDEV_POST_TYPE_CHANGE 0x000F 209#define NETDEV_POST_TYPE_CHANGE 0x000F
210#define NETDEV_POST_INIT 0x0010 210#define NETDEV_POST_INIT 0x0010
211#define NETDEV_UNREGISTER_BATCH 0x0011 211#define NETDEV_UNREGISTER_BATCH 0x0011
212#define NETDEV_BONDING_DESLAVE 0x0012 212#define NETDEV_RELEASE 0x0012
213#define NETDEV_NOTIFY_PEERS 0x0013 213#define NETDEV_NOTIFY_PEERS 0x0013
214#define NETDEV_JOIN 0x0014
214 215
215#define SYS_DOWN 0x0001 /* Notify of system down */ 216#define SYS_DOWN 0x0001 /* Notify of system down */
216#define SYS_RESTART SYS_DOWN 217#define SYS_RESTART SYS_DOWN
diff --git a/include/linux/posix-clock.h b/include/linux/posix-clock.h
index 7f1183dcd119..34c4498b800f 100644
--- a/include/linux/posix-clock.h
+++ b/include/linux/posix-clock.h
@@ -45,7 +45,7 @@ struct posix_clock;
45 * @timer_create: Create a new timer 45 * @timer_create: Create a new timer
46 * @timer_delete: Remove a previously created timer 46 * @timer_delete: Remove a previously created timer
47 * @timer_gettime: Get remaining time and interval of a timer 47 * @timer_gettime: Get remaining time and interval of a timer
48 * @timer_setttime: Set a timer's initial expiration and interval 48 * @timer_settime: Set a timer's initial expiration and interval
49 * @fasync: Optional character device fasync method 49 * @fasync: Optional character device fasync method
50 * @mmap: Optional character device mmap method 50 * @mmap: Optional character device mmap method
51 * @open: Optional character device open method 51 * @open: Optional character device open method
diff --git a/include/linux/pti.h b/include/linux/pti.h
new file mode 100644
index 000000000000..81af667bb2d5
--- /dev/null
+++ b/include/linux/pti.h
@@ -0,0 +1,42 @@
1/*
2 * Copyright (C) Intel 2011
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14 *
15 * The PTI (Parallel Trace Interface) driver directs trace data routed from
16 * various parts in the system out through the Intel Penwell PTI port and
17 * out of the mobile device for analysis with a debugging tool
18 * (Lauterbach, Fido). This is part of a solution for the MIPI P1149.7,
19 * compact JTAG, standard.
20 *
21 * This header file will allow other parts of the OS to use the
22 * interface to write out it's contents for debugging a mobile system.
23 */
24
25#ifndef PTI_H_
26#define PTI_H_
27
28/* offset for last dword of any PTI message. Part of MIPI P1149.7 */
29#define PTI_LASTDWORD_DTS 0x30
30
31/* basic structure used as a write address to the PTI HW */
32struct pti_masterchannel {
33 u8 master;
34 u8 channel;
35};
36
37/* the following functions are defined in misc/pti.c */
38void pti_writedata(struct pti_masterchannel *mc, u8 *buf, int count);
39struct pti_masterchannel *pti_request_masterchannel(u8 type);
40void pti_release_masterchannel(struct pti_masterchannel *mc);
41
42#endif /*PTI_H_*/
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 885c4f242ad7..aaf71e08222c 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -315,7 +315,6 @@ extern int proc_dowatchdog_thresh(struct ctl_table *table, int write,
315 void __user *buffer, 315 void __user *buffer,
316 size_t *lenp, loff_t *ppos); 316 size_t *lenp, loff_t *ppos);
317extern unsigned int softlockup_panic; 317extern unsigned int softlockup_panic;
318extern int softlockup_thresh;
319void lockup_detector_init(void); 318void lockup_detector_init(void);
320#else 319#else
321static inline void touch_softlockup_watchdog(void) 320static inline void touch_softlockup_watchdog(void)
@@ -787,17 +786,39 @@ enum cpu_idle_type {
787}; 786};
788 787
789/* 788/*
790 * sched-domains (multiprocessor balancing) declarations: 789 * Increase resolution of nice-level calculations for 64-bit architectures.
790 * The extra resolution improves shares distribution and load balancing of
791 * low-weight task groups (eg. nice +19 on an autogroup), deeper taskgroup
792 * hierarchies, especially on larger systems. This is not a user-visible change
793 * and does not change the user-interface for setting shares/weights.
794 *
795 * We increase resolution only if we have enough bits to allow this increased
796 * resolution (i.e. BITS_PER_LONG > 32). The costs for increasing resolution
797 * when BITS_PER_LONG <= 32 are pretty high and the returns do not justify the
798 * increased costs.
791 */ 799 */
800#if BITS_PER_LONG > 32
801# define SCHED_LOAD_RESOLUTION 10
802# define scale_load(w) ((w) << SCHED_LOAD_RESOLUTION)
803# define scale_load_down(w) ((w) >> SCHED_LOAD_RESOLUTION)
804#else
805# define SCHED_LOAD_RESOLUTION 0
806# define scale_load(w) (w)
807# define scale_load_down(w) (w)
808#endif
792 809
793/* 810#define SCHED_LOAD_SHIFT (10 + SCHED_LOAD_RESOLUTION)
794 * Increase resolution of nice-level calculations:
795 */
796#define SCHED_LOAD_SHIFT 10
797#define SCHED_LOAD_SCALE (1L << SCHED_LOAD_SHIFT) 811#define SCHED_LOAD_SCALE (1L << SCHED_LOAD_SHIFT)
798 812
799#define SCHED_LOAD_SCALE_FUZZ SCHED_LOAD_SCALE 813/*
814 * Increase resolution of cpu_power calculations
815 */
816#define SCHED_POWER_SHIFT 10
817#define SCHED_POWER_SCALE (1L << SCHED_POWER_SHIFT)
800 818
819/*
820 * sched-domains (multiprocessor balancing) declarations:
821 */
801#ifdef CONFIG_SMP 822#ifdef CONFIG_SMP
802#define SD_LOAD_BALANCE 0x0001 /* Do load balancing on this domain. */ 823#define SD_LOAD_BALANCE 0x0001 /* Do load balancing on this domain. */
803#define SD_BALANCE_NEWIDLE 0x0002 /* Balance when about to become idle */ 824#define SD_BALANCE_NEWIDLE 0x0002 /* Balance when about to become idle */
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index 758c5b0c6fd3..a5c31146a337 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -45,7 +45,8 @@
45#define PORT_OCTEON 17 /* Cavium OCTEON internal UART */ 45#define PORT_OCTEON 17 /* Cavium OCTEON internal UART */
46#define PORT_AR7 18 /* Texas Instruments AR7 internal UART */ 46#define PORT_AR7 18 /* Texas Instruments AR7 internal UART */
47#define PORT_U6_16550A 19 /* ST-Ericsson U6xxx internal UART */ 47#define PORT_U6_16550A 19 /* ST-Ericsson U6xxx internal UART */
48#define PORT_MAX_8250 19 /* max port ID */ 48#define PORT_TEGRA 20 /* NVIDIA Tegra internal UART */
49#define PORT_MAX_8250 20 /* max port ID */
49 50
50/* 51/*
51 * ARM specific type numbers. These are not currently guaranteed 52 * ARM specific type numbers. These are not currently guaranteed
@@ -202,6 +203,9 @@
202/* VIA VT8500 SoC */ 203/* VIA VT8500 SoC */
203#define PORT_VT8500 97 204#define PORT_VT8500 97
204 205
206/* Xilinx PSS UART */
207#define PORT_XUARTPS 98
208
205#ifdef __KERNEL__ 209#ifdef __KERNEL__
206 210
207#include <linux/compiler.h> 211#include <linux/compiler.h>
diff --git a/include/linux/serial_reg.h b/include/linux/serial_reg.h
index 3ecb71a9e505..c75bda37c18e 100644
--- a/include/linux/serial_reg.h
+++ b/include/linux/serial_reg.h
@@ -57,6 +57,7 @@
57 * ST16C654: 8 16 56 60 8 16 32 56 PORT_16654 57 * ST16C654: 8 16 56 60 8 16 32 56 PORT_16654
58 * TI16C750: 1 16 32 56 xx xx xx xx PORT_16750 58 * TI16C750: 1 16 32 56 xx xx xx xx PORT_16750
59 * TI16C752: 8 16 56 60 8 16 32 56 59 * TI16C752: 8 16 56 60 8 16 32 56
60 * Tegra: 1 4 8 14 16 8 4 1 PORT_TEGRA
60 */ 61 */
61#define UART_FCR_R_TRIG_00 0x00 62#define UART_FCR_R_TRIG_00 0x00
62#define UART_FCR_R_TRIG_01 0x40 63#define UART_FCR_R_TRIG_01 0x40
@@ -118,6 +119,7 @@
118#define UART_MCR_DTR 0x01 /* DTR complement */ 119#define UART_MCR_DTR 0x01 /* DTR complement */
119 120
120#define UART_LSR 5 /* In: Line Status Register */ 121#define UART_LSR 5 /* In: Line Status Register */
122#define UART_LSR_FIFOE 0x80 /* Fifo error */
121#define UART_LSR_TEMT 0x40 /* Transmitter empty */ 123#define UART_LSR_TEMT 0x40 /* Transmitter empty */
122#define UART_LSR_THRE 0x20 /* Transmit-hold-register empty */ 124#define UART_LSR_THRE 0x20 /* Transmit-hold-register empty */
123#define UART_LSR_BI 0x10 /* Break interrupt indicator */ 125#define UART_LSR_BI 0x10 /* Break interrupt indicator */
diff --git a/include/linux/sht15.h b/include/linux/sht15.h
index 046bce05ecab..f85c7c523da0 100644
--- a/include/linux/sht15.h
+++ b/include/linux/sht15.h
@@ -8,17 +8,27 @@
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 *
12 * For further information, see the Documentation/hwmon/sht15 file.
11 */ 13 */
12 14
13/** 15/**
14 * struct sht15_platform_data - sht15 connectivity info 16 * struct sht15_platform_data - sht15 connectivity info
15 * @gpio_data: no. of gpio to which bidirectional data line is connected 17 * @gpio_data: no. of gpio to which bidirectional data line is
16 * @gpio_sck: no. of gpio to which the data clock is connected. 18 * connected.
17 * @supply_mv: supply voltage in mv. Overridden by regulator if available. 19 * @gpio_sck: no. of gpio to which the data clock is connected.
18 **/ 20 * @supply_mv: supply voltage in mv. Overridden by regulator if
21 * available.
22 * @checksum: flag to indicate the checksum should be validated.
23 * @no_otp_reload: flag to indicate no reload from OTP.
24 * @low_resolution: flag to indicate the temp/humidity resolution to use.
25 */
19struct sht15_platform_data { 26struct sht15_platform_data {
20 int gpio_data; 27 int gpio_data;
21 int gpio_sck; 28 int gpio_sck;
22 int supply_mv; 29 int supply_mv;
30 bool checksum;
31 bool no_otp_reload;
32 bool low_resolution;
23}; 33};
24 34
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 79aafbbf430a..e8b78ce14474 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1442,7 +1442,7 @@ extern int ___pskb_trim(struct sk_buff *skb, unsigned int len);
1442 1442
1443static inline void __skb_trim(struct sk_buff *skb, unsigned int len) 1443static inline void __skb_trim(struct sk_buff *skb, unsigned int len)
1444{ 1444{
1445 if (unlikely(skb->data_len)) { 1445 if (unlikely(skb_is_nonlinear(skb))) {
1446 WARN_ON(1); 1446 WARN_ON(1);
1447 return; 1447 return;
1448 } 1448 }
@@ -1782,7 +1782,7 @@ static inline int pskb_trim_rcsum(struct sk_buff *skb, unsigned int len)
1782 1782
1783#define skb_queue_walk(queue, skb) \ 1783#define skb_queue_walk(queue, skb) \
1784 for (skb = (queue)->next; \ 1784 for (skb = (queue)->next; \
1785 prefetch(skb->next), (skb != (struct sk_buff *)(queue)); \ 1785 skb != (struct sk_buff *)(queue); \
1786 skb = skb->next) 1786 skb = skb->next)
1787 1787
1788#define skb_queue_walk_safe(queue, skb, tmp) \ 1788#define skb_queue_walk_safe(queue, skb, tmp) \
@@ -1791,7 +1791,7 @@ static inline int pskb_trim_rcsum(struct sk_buff *skb, unsigned int len)
1791 skb = tmp, tmp = skb->next) 1791 skb = tmp, tmp = skb->next)
1792 1792
1793#define skb_queue_walk_from(queue, skb) \ 1793#define skb_queue_walk_from(queue, skb) \
1794 for (; prefetch(skb->next), (skb != (struct sk_buff *)(queue)); \ 1794 for (; skb != (struct sk_buff *)(queue); \
1795 skb = skb->next) 1795 skb = skb->next)
1796 1796
1797#define skb_queue_walk_from_safe(queue, skb, tmp) \ 1797#define skb_queue_walk_from_safe(queue, skb, tmp) \
@@ -1801,7 +1801,7 @@ static inline int pskb_trim_rcsum(struct sk_buff *skb, unsigned int len)
1801 1801
1802#define skb_queue_reverse_walk(queue, skb) \ 1802#define skb_queue_reverse_walk(queue, skb) \
1803 for (skb = (queue)->prev; \ 1803 for (skb = (queue)->prev; \
1804 prefetch(skb->prev), (skb != (struct sk_buff *)(queue)); \ 1804 skb != (struct sk_buff *)(queue); \
1805 skb = skb->prev) 1805 skb = skb->prev)
1806 1806
1807#define skb_queue_reverse_walk_safe(queue, skb, tmp) \ 1807#define skb_queue_reverse_walk_safe(queue, skb, tmp) \
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h
index 45ca123e8002..c8668d161dd8 100644
--- a/include/linux/slub_def.h
+++ b/include/linux/slub_def.h
@@ -37,9 +37,7 @@ enum stat_item {
37 37
38struct kmem_cache_cpu { 38struct kmem_cache_cpu {
39 void **freelist; /* Pointer to next available object */ 39 void **freelist; /* Pointer to next available object */
40#ifdef CONFIG_CMPXCHG_LOCAL
41 unsigned long tid; /* Globally unique transaction id */ 40 unsigned long tid; /* Globally unique transaction id */
42#endif
43 struct page *page; /* The slab from which we are allocating */ 41 struct page *page; /* The slab from which we are allocating */
44 int node; /* The node of the page (or -1 for debug) */ 42 int node; /* The node of the page (or -1 for debug) */
45#ifdef CONFIG_SLUB_STATS 43#ifdef CONFIG_SLUB_STATS
@@ -179,7 +177,8 @@ static __always_inline int kmalloc_index(size_t size)
179 if (size <= 4 * 1024) return 12; 177 if (size <= 4 * 1024) return 12;
180/* 178/*
181 * The following is only needed to support architectures with a larger page 179 * The following is only needed to support architectures with a larger page
182 * size than 4k. 180 * size than 4k. We need to support 2 * PAGE_SIZE here. So for a 64k page
181 * size we would have to go up to 128k.
183 */ 182 */
184 if (size <= 8 * 1024) return 13; 183 if (size <= 8 * 1024) return 13;
185 if (size <= 16 * 1024) return 14; 184 if (size <= 16 * 1024) return 14;
@@ -190,7 +189,8 @@ static __always_inline int kmalloc_index(size_t size)
190 if (size <= 512 * 1024) return 19; 189 if (size <= 512 * 1024) return 19;
191 if (size <= 1024 * 1024) return 20; 190 if (size <= 1024 * 1024) return 20;
192 if (size <= 2 * 1024 * 1024) return 21; 191 if (size <= 2 * 1024 * 1024) return 21;
193 return -1; 192 BUG();
193 return -1; /* Will never be reached */
194 194
195/* 195/*
196 * What we really wanted to do and cannot do because of compiler issues is: 196 * What we really wanted to do and cannot do because of compiler issues is:
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h
index 20fc303947d3..8d03f079688c 100644
--- a/include/linux/thread_info.h
+++ b/include/linux/thread_info.h
@@ -29,7 +29,7 @@ struct restart_block {
29 } futex; 29 } futex;
30 /* For nanosleep */ 30 /* For nanosleep */
31 struct { 31 struct {
32 clockid_t index; 32 clockid_t clockid;
33 struct timespec __user *rmtp; 33 struct timespec __user *rmtp;
34#ifdef CONFIG_COMPAT 34#ifdef CONFIG_COMPAT
35 struct compat_timespec __user *compat_rmtp; 35 struct compat_timespec __user *compat_rmtp;
diff --git a/include/linux/timerfd.h b/include/linux/timerfd.h
index 2d0792983f8c..d3b57fa12225 100644
--- a/include/linux/timerfd.h
+++ b/include/linux/timerfd.h
@@ -19,6 +19,7 @@
19 * shared O_* flags. 19 * shared O_* flags.
20 */ 20 */
21#define TFD_TIMER_ABSTIME (1 << 0) 21#define TFD_TIMER_ABSTIME (1 << 0)
22#define TFD_TIMER_CANCEL_ON_SET (1 << 1)
22#define TFD_CLOEXEC O_CLOEXEC 23#define TFD_CLOEXEC O_CLOEXEC
23#define TFD_NONBLOCK O_NONBLOCK 24#define TFD_NONBLOCK O_NONBLOCK
24 25
@@ -26,6 +27,6 @@
26/* Flags for timerfd_create. */ 27/* Flags for timerfd_create. */
27#define TFD_CREATE_FLAGS TFD_SHARED_FCNTL_FLAGS 28#define TFD_CREATE_FLAGS TFD_SHARED_FCNTL_FLAGS
28/* Flags for timerfd_settime. */ 29/* Flags for timerfd_settime. */
29#define TFD_SETTIME_FLAGS TFD_TIMER_ABSTIME 30#define TFD_SETTIME_FLAGS (TFD_TIMER_ABSTIME | TFD_TIMER_CANCEL_ON_SET)
30 31
31#endif /* _LINUX_TIMERFD_H */ 32#endif /* _LINUX_TIMERFD_H */
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 9f469c700550..d6f05292e456 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -50,6 +50,8 @@
50#define N_CAIF 20 /* CAIF protocol for talking to modems */ 50#define N_CAIF 20 /* CAIF protocol for talking to modems */
51#define N_GSM0710 21 /* GSM 0710 Mux */ 51#define N_GSM0710 21 /* GSM 0710 Mux */
52#define N_TI_WL 22 /* for TI's WL BT, FM, GPS combo chips */ 52#define N_TI_WL 22 /* for TI's WL BT, FM, GPS combo chips */
53#define N_TRACESINK 23 /* Trace data routing for MIPI P1149.7 */
54#define N_TRACEROUTER 24 /* Trace data routing for MIPI P1149.7 */
53 55
54/* 56/*
55 * This character is the same as _POSIX_VDISABLE: it cannot be used as 57 * This character is the same as _POSIX_VDISABLE: it cannot be used as
@@ -472,6 +474,7 @@ extern int tty_add_file(struct tty_struct *tty, struct file *file);
472extern void free_tty_struct(struct tty_struct *tty); 474extern void free_tty_struct(struct tty_struct *tty);
473extern void initialize_tty_struct(struct tty_struct *tty, 475extern void initialize_tty_struct(struct tty_struct *tty,
474 struct tty_driver *driver, int idx); 476 struct tty_driver *driver, int idx);
477extern void deinitialize_tty_struct(struct tty_struct *tty);
475extern struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx, 478extern struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx,
476 int first_ok); 479 int first_ok);
477extern int tty_release(struct inode *inode, struct file *filp); 480extern int tty_release(struct inode *inode, struct file *filp);
@@ -525,6 +528,7 @@ extern int tty_set_ldisc(struct tty_struct *tty, int ldisc);
525extern int tty_ldisc_setup(struct tty_struct *tty, struct tty_struct *o_tty); 528extern int tty_ldisc_setup(struct tty_struct *tty, struct tty_struct *o_tty);
526extern void tty_ldisc_release(struct tty_struct *tty, struct tty_struct *o_tty); 529extern void tty_ldisc_release(struct tty_struct *tty, struct tty_struct *o_tty);
527extern void tty_ldisc_init(struct tty_struct *tty); 530extern void tty_ldisc_init(struct tty_struct *tty);
531extern void tty_ldisc_deinit(struct tty_struct *tty);
528extern void tty_ldisc_begin(void); 532extern void tty_ldisc_begin(void);
529/* This last one is just for the tty layer internals and shouldn't be used elsewhere */ 533/* This last one is just for the tty layer internals and shouldn't be used elsewhere */
530extern void tty_ldisc_enable(struct tty_struct *tty); 534extern void tty_ldisc_enable(struct tty_struct *tty);
diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h
index ff7dc08696a8..5b07792ccb46 100644
--- a/include/linux/tty_ldisc.h
+++ b/include/linux/tty_ldisc.h
@@ -76,7 +76,7 @@
76 * tty device. It is solely the responsibility of the line 76 * tty device. It is solely the responsibility of the line
77 * discipline to handle poll requests. 77 * discipline to handle poll requests.
78 * 78 *
79 * void (*receive_buf)(struct tty_struct *, const unsigned char *cp, 79 * unsigned int (*receive_buf)(struct tty_struct *, const unsigned char *cp,
80 * char *fp, int count); 80 * char *fp, int count);
81 * 81 *
82 * This function is called by the low-level tty driver to send 82 * This function is called by the low-level tty driver to send
@@ -84,7 +84,8 @@
84 * processing. <cp> is a pointer to the buffer of input 84 * processing. <cp> is a pointer to the buffer of input
85 * character received by the device. <fp> is a pointer to a 85 * character received by the device. <fp> is a pointer to a
86 * pointer of flag bytes which indicate whether a character was 86 * pointer of flag bytes which indicate whether a character was
87 * received with a parity error, etc. 87 * received with a parity error, etc. Returns the amount of bytes
88 * received.
88 * 89 *
89 * void (*write_wakeup)(struct tty_struct *); 90 * void (*write_wakeup)(struct tty_struct *);
90 * 91 *
@@ -140,8 +141,8 @@ struct tty_ldisc_ops {
140 /* 141 /*
141 * The following routines are called from below. 142 * The following routines are called from below.
142 */ 143 */
143 void (*receive_buf)(struct tty_struct *, const unsigned char *cp, 144 unsigned int (*receive_buf)(struct tty_struct *,
144 char *fp, int count); 145 const unsigned char *cp, char *fp, int count);
145 void (*write_wakeup)(struct tty_struct *); 146 void (*write_wakeup)(struct tty_struct *);
146 void (*dcd_change)(struct tty_struct *, unsigned int, 147 void (*dcd_change)(struct tty_struct *, unsigned int,
147 struct pps_event_time *); 148 struct pps_event_time *);
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 65f78ca5d88e..73c7df489607 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -806,8 +806,10 @@ struct usbdrv_wrap {
806 * @resume: Called when the device is being resumed by the system. 806 * @resume: Called when the device is being resumed by the system.
807 * @reset_resume: Called when the suspended device has been reset instead 807 * @reset_resume: Called when the suspended device has been reset instead
808 * of being resumed. 808 * of being resumed.
809 * @pre_reset: Called by usb_reset_device() when the device 809 * @pre_reset: Called by usb_reset_device() when the device is about to be
810 * is about to be reset. 810 * reset. This routine must not return until the driver has no active
811 * URBs for the device, and no more URBs may be submitted until the
812 * post_reset method is called.
811 * @post_reset: Called by usb_reset_device() after the device 813 * @post_reset: Called by usb_reset_device() after the device
812 * has been reset 814 * has been reset
813 * @id_table: USB drivers use ID table to support hotplugging. 815 * @id_table: USB drivers use ID table to support hotplugging.
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h
index b72f305ce6bd..0fd3fbdd8283 100644
--- a/include/linux/usb/ch9.h
+++ b/include/linux/usb/ch9.h
@@ -579,7 +579,7 @@ struct usb_ss_ep_comp_descriptor {
579 579
580 __u8 bMaxBurst; 580 __u8 bMaxBurst;
581 __u8 bmAttributes; 581 __u8 bmAttributes;
582 __u16 wBytesPerInterval; 582 __le16 wBytesPerInterval;
583} __attribute__ ((packed)); 583} __attribute__ ((packed));
584 584
585#define USB_DT_SS_EP_COMP_SIZE 6 585#define USB_DT_SS_EP_COMP_SIZE 6
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h
index 882a084a8411..b78cba466d3d 100644
--- a/include/linux/usb/composite.h
+++ b/include/linux/usb/composite.h
@@ -37,6 +37,14 @@
37#include <linux/usb/ch9.h> 37#include <linux/usb/ch9.h>
38#include <linux/usb/gadget.h> 38#include <linux/usb/gadget.h>
39 39
40/*
41 * USB function drivers should return USB_GADGET_DELAYED_STATUS if they
42 * wish to delay the data/status stages of the control transfer till they
43 * are ready. The control transfer will then be kept from completing till
44 * all the function drivers that requested for USB_GADGET_DELAYED_STAUS
45 * invoke usb_composite_setup_continue().
46 */
47#define USB_GADGET_DELAYED_STATUS 0x7fff /* Impossibly large value */
40 48
41struct usb_configuration; 49struct usb_configuration;
42 50
@@ -285,6 +293,7 @@ struct usb_composite_driver {
285extern int usb_composite_probe(struct usb_composite_driver *driver, 293extern int usb_composite_probe(struct usb_composite_driver *driver,
286 int (*bind)(struct usb_composite_dev *cdev)); 294 int (*bind)(struct usb_composite_dev *cdev));
287extern void usb_composite_unregister(struct usb_composite_driver *driver); 295extern void usb_composite_unregister(struct usb_composite_driver *driver);
296extern void usb_composite_setup_continue(struct usb_composite_dev *cdev);
288 297
289 298
290/** 299/**
@@ -342,7 +351,12 @@ struct usb_composite_dev {
342 */ 351 */
343 unsigned deactivations; 352 unsigned deactivations;
344 353
345 /* protects at least deactivation count */ 354 /* the composite driver won't complete the control transfer's
355 * data/status stages till delayed_status is zero.
356 */
357 int delayed_status;
358
359 /* protects deactivations and delayed_status counts*/
346 spinlock_t lock; 360 spinlock_t lock;
347}; 361};
348 362
diff --git a/include/linux/usb/ehci_def.h b/include/linux/usb/ehci_def.h
index e49dfd45baa4..7cc95ee3606b 100644
--- a/include/linux/usb/ehci_def.h
+++ b/include/linux/usb/ehci_def.h
@@ -25,10 +25,15 @@
25struct ehci_caps { 25struct ehci_caps {
26 /* these fields are specified as 8 and 16 bit registers, 26 /* these fields are specified as 8 and 16 bit registers,
27 * but some hosts can't perform 8 or 16 bit PCI accesses. 27 * but some hosts can't perform 8 or 16 bit PCI accesses.
28 * some hosts treat caplength and hciversion as parts of a 32-bit
29 * register, others treat them as two separate registers, this
30 * affects the memory map for big endian controllers.
28 */ 31 */
29 u32 hc_capbase; 32 u32 hc_capbase;
30#define HC_LENGTH(p) (((p)>>00)&0x00ff) /* bits 7:0 */ 33#define HC_LENGTH(ehci, p) (0x00ff&((p) >> /* bits 7:0 / offset 00h */ \
31#define HC_VERSION(p) (((p)>>16)&0xffff) /* bits 31:16 */ 34 (ehci_big_endian_capbase(ehci) ? 24 : 0)))
35#define HC_VERSION(ehci, p) (0xffff&((p) >> /* bits 31:16 / offset 02h */ \
36 (ehci_big_endian_capbase(ehci) ? 0 : 16)))
32 u32 hcs_params; /* HCSPARAMS - offset 0x4 */ 37 u32 hcs_params; /* HCSPARAMS - offset 0x4 */
33#define HCS_DEBUG_PORT(p) (((p)>>20)&0xf) /* bits 23:20, debug port? */ 38#define HCS_DEBUG_PORT(p) (((p)>>20)&0xf) /* bits 23:20, debug port? */
34#define HCS_INDICATOR(p) ((p)&(1 << 16)) /* true: has port indicators */ 39#define HCS_INDICATOR(p) ((p)&(1 << 16)) /* true: has port indicators */
@@ -52,7 +57,7 @@ struct ehci_caps {
52#define HCC_PGM_FRAMELISTLEN(p) ((p)&(1 << 1)) /* true: periodic_size changes*/ 57#define HCC_PGM_FRAMELISTLEN(p) ((p)&(1 << 1)) /* true: periodic_size changes*/
53#define HCC_64BIT_ADDR(p) ((p)&(1)) /* true: can use 64-bit addr */ 58#define HCC_64BIT_ADDR(p) ((p)&(1)) /* true: can use 64-bit addr */
54 u8 portroute[8]; /* nibbles for routing - offset 0xC */ 59 u8 portroute[8]; /* nibbles for routing - offset 0xC */
55} __attribute__ ((packed)); 60};
56 61
57 62
58/* Section 2.3 Host Controller Operational Registers */ 63/* Section 2.3 Host Controller Operational Registers */
@@ -150,7 +155,7 @@ struct ehci_regs {
150#define PORT_CSC (1<<1) /* connect status change */ 155#define PORT_CSC (1<<1) /* connect status change */
151#define PORT_CONNECT (1<<0) /* device connected */ 156#define PORT_CONNECT (1<<0) /* device connected */
152#define PORT_RWC_BITS (PORT_CSC | PORT_PEC | PORT_OCC) 157#define PORT_RWC_BITS (PORT_CSC | PORT_PEC | PORT_OCC)
153} __attribute__ ((packed)); 158};
154 159
155#define USBMODE 0x68 /* USB Device mode */ 160#define USBMODE 0x68 /* USB Device mode */
156#define USBMODE_SDIS (1<<3) /* Stream disable */ 161#define USBMODE_SDIS (1<<3) /* Stream disable */
@@ -194,7 +199,7 @@ struct ehci_dbg_port {
194 u32 data47; 199 u32 data47;
195 u32 address; 200 u32 address;
196#define DBGP_EPADDR(dev, ep) (((dev)<<8)|(ep)) 201#define DBGP_EPADDR(dev, ep) (((dev)<<8)|(ep))
197} __attribute__ ((packed)); 202};
198 203
199#ifdef CONFIG_EARLY_PRINTK_DBGP 204#ifdef CONFIG_EARLY_PRINTK_DBGP
200#include <linux/init.h> 205#include <linux/init.h>
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index e538172c0f64..dd1571db55e7 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -890,8 +890,8 @@ static inline void usb_free_descriptors(struct usb_descriptor_header **v)
890/* utility wrapping a simple endpoint selection policy */ 890/* utility wrapping a simple endpoint selection policy */
891 891
892extern struct usb_ep *usb_ep_autoconfig(struct usb_gadget *, 892extern struct usb_ep *usb_ep_autoconfig(struct usb_gadget *,
893 struct usb_endpoint_descriptor *) __devinit; 893 struct usb_endpoint_descriptor *);
894 894
895extern void usb_ep_autoconfig_reset(struct usb_gadget *) __devinit; 895extern void usb_ep_autoconfig_reset(struct usb_gadget *);
896 896
897#endif /* __LINUX_USB_GADGET_H */ 897#endif /* __LINUX_USB_GADGET_H */
diff --git a/include/linux/usb/msm_hsusb.h b/include/linux/usb/msm_hsusb.h
index 3657403eac18..00311fe9d0df 100644
--- a/include/linux/usb/msm_hsusb.h
+++ b/include/linux/usb/msm_hsusb.h
@@ -2,7 +2,7 @@
2 * 2 *
3 * Copyright (C) 2008 Google, Inc. 3 * Copyright (C) 2008 Google, Inc.
4 * Author: Brian Swetland <swetland@google.com> 4 * Author: Brian Swetland <swetland@google.com>
5 * Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved. 5 * Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
6 * 6 *
7 * This software is licensed under the terms of the GNU General Public 7 * This software is licensed under the terms of the GNU General Public
8 * License version 2, as published by the Free Software Foundation, and 8 * License version 2, as published by the Free Software Foundation, and
@@ -54,6 +54,64 @@ enum otg_control_type {
54}; 54};
55 55
56/** 56/**
57 * PHY used in
58 *
59 * INVALID_PHY Unsupported PHY
60 * CI_45NM_INTEGRATED_PHY Chipidea 45nm integrated PHY
61 * SNPS_28NM_INTEGRATED_PHY Synopsis 28nm integrated PHY
62 *
63 */
64enum msm_usb_phy_type {
65 INVALID_PHY = 0,
66 CI_45NM_INTEGRATED_PHY,
67 SNPS_28NM_INTEGRATED_PHY,
68};
69
70#define IDEV_CHG_MAX 1500
71#define IUNIT 100
72
73/**
74 * Different states involved in USB charger detection.
75 *
76 * USB_CHG_STATE_UNDEFINED USB charger is not connected or detection
77 * process is not yet started.
78 * USB_CHG_STATE_WAIT_FOR_DCD Waiting for Data pins contact.
79 * USB_CHG_STATE_DCD_DONE Data pin contact is detected.
80 * USB_CHG_STATE_PRIMARY_DONE Primary detection is completed (Detects
81 * between SDP and DCP/CDP).
82 * USB_CHG_STATE_SECONDARY_DONE Secondary detection is completed (Detects
83 * between DCP and CDP).
84 * USB_CHG_STATE_DETECTED USB charger type is determined.
85 *
86 */
87enum usb_chg_state {
88 USB_CHG_STATE_UNDEFINED = 0,
89 USB_CHG_STATE_WAIT_FOR_DCD,
90 USB_CHG_STATE_DCD_DONE,
91 USB_CHG_STATE_PRIMARY_DONE,
92 USB_CHG_STATE_SECONDARY_DONE,
93 USB_CHG_STATE_DETECTED,
94};
95
96/**
97 * USB charger types
98 *
99 * USB_INVALID_CHARGER Invalid USB charger.
100 * USB_SDP_CHARGER Standard downstream port. Refers to a downstream port
101 * on USB2.0 compliant host/hub.
102 * USB_DCP_CHARGER Dedicated charger port (AC charger/ Wall charger).
103 * USB_CDP_CHARGER Charging downstream port. Enumeration can happen and
104 * IDEV_CHG_MAX can be drawn irrespective of USB state.
105 *
106 */
107enum usb_chg_type {
108 USB_INVALID_CHARGER = 0,
109 USB_SDP_CHARGER,
110 USB_DCP_CHARGER,
111 USB_CDP_CHARGER,
112};
113
114/**
57 * struct msm_otg_platform_data - platform device data 115 * struct msm_otg_platform_data - platform device data
58 * for msm_otg driver. 116 * for msm_otg driver.
59 * @phy_init_seq: PHY configuration sequence. val, reg pairs 117 * @phy_init_seq: PHY configuration sequence. val, reg pairs
@@ -64,7 +122,8 @@ enum otg_control_type {
64 * @otg_control: OTG switch controlled by user/Id pin 122 * @otg_control: OTG switch controlled by user/Id pin
65 * @default_mode: Default operational mode. Applicable only if 123 * @default_mode: Default operational mode. Applicable only if
66 * OTG switch is controller by user. 124 * OTG switch is controller by user.
67 * 125 * @pclk_src_name: pclk is derived from ebi1_usb_clk in case of 7x27 and 8k
126 * dfab_usb_hs_clk in case of 8660 and 8960.
68 */ 127 */
69struct msm_otg_platform_data { 128struct msm_otg_platform_data {
70 int *phy_init_seq; 129 int *phy_init_seq;
@@ -73,7 +132,9 @@ struct msm_otg_platform_data {
73 enum usb_mode_type mode; 132 enum usb_mode_type mode;
74 enum otg_control_type otg_control; 133 enum otg_control_type otg_control;
75 enum usb_mode_type default_mode; 134 enum usb_mode_type default_mode;
135 enum msm_usb_phy_type phy_type;
76 void (*setup_gpio)(enum usb_otg_state state); 136 void (*setup_gpio)(enum usb_otg_state state);
137 char *pclk_src_name;
77}; 138};
78 139
79/** 140/**
@@ -83,6 +144,7 @@ struct msm_otg_platform_data {
83 * @irq: IRQ number assigned for HSUSB controller. 144 * @irq: IRQ number assigned for HSUSB controller.
84 * @clk: clock struct of usb_hs_clk. 145 * @clk: clock struct of usb_hs_clk.
85 * @pclk: clock struct of usb_hs_pclk. 146 * @pclk: clock struct of usb_hs_pclk.
147 * @pclk_src: pclk source for voting.
86 * @phy_reset_clk: clock struct of usb_phy_clk. 148 * @phy_reset_clk: clock struct of usb_phy_clk.
87 * @core_clk: clock struct of usb_hs_core_clk. 149 * @core_clk: clock struct of usb_hs_core_clk.
88 * @regs: ioremapped register base address. 150 * @regs: ioremapped register base address.
@@ -90,7 +152,12 @@ struct msm_otg_platform_data {
90 * @sm_work: OTG state machine work. 152 * @sm_work: OTG state machine work.
91 * @in_lpm: indicates low power mode (LPM) state. 153 * @in_lpm: indicates low power mode (LPM) state.
92 * @async_int: Async interrupt arrived. 154 * @async_int: Async interrupt arrived.
93 * 155 * @cur_power: The amount of mA available from downstream port.
156 * @chg_work: Charger detection work.
157 * @chg_state: The state of charger detection process.
158 * @chg_type: The type of charger attached.
159 * @dcd_retires: The retry count used to track Data contact
160 * detection process.
94 */ 161 */
95struct msm_otg { 162struct msm_otg {
96 struct otg_transceiver otg; 163 struct otg_transceiver otg;
@@ -98,6 +165,7 @@ struct msm_otg {
98 int irq; 165 int irq;
99 struct clk *clk; 166 struct clk *clk;
100 struct clk *pclk; 167 struct clk *pclk;
168 struct clk *pclk_src;
101 struct clk *phy_reset_clk; 169 struct clk *phy_reset_clk;
102 struct clk *core_clk; 170 struct clk *core_clk;
103 void __iomem *regs; 171 void __iomem *regs;
@@ -107,6 +175,11 @@ struct msm_otg {
107 struct work_struct sm_work; 175 struct work_struct sm_work;
108 atomic_t in_lpm; 176 atomic_t in_lpm;
109 int async_int; 177 int async_int;
178 unsigned cur_power;
179 struct delayed_work chg_work;
180 enum usb_chg_state chg_state;
181 enum usb_chg_type chg_type;
182 u8 dcd_retries;
110}; 183};
111 184
112#endif 185#endif
diff --git a/include/linux/usb/msm_hsusb_hw.h b/include/linux/usb/msm_hsusb_hw.h
index 7d1babbff071..6e97a2d3d39f 100644
--- a/include/linux/usb/msm_hsusb_hw.h
+++ b/include/linux/usb/msm_hsusb_hw.h
@@ -24,6 +24,7 @@
24#define USB_PORTSC (MSM_USB_BASE + 0x0184) 24#define USB_PORTSC (MSM_USB_BASE + 0x0184)
25#define USB_OTGSC (MSM_USB_BASE + 0x01A4) 25#define USB_OTGSC (MSM_USB_BASE + 0x01A4)
26#define USB_USBMODE (MSM_USB_BASE + 0x01A8) 26#define USB_USBMODE (MSM_USB_BASE + 0x01A8)
27#define USB_PHY_CTRL (MSM_USB_BASE + 0x0240)
27 28
28#define USBCMD_RESET 2 29#define USBCMD_RESET 2
29#define USB_USBINTR (MSM_USB_BASE + 0x0148) 30#define USB_USBINTR (MSM_USB_BASE + 0x0148)
@@ -42,6 +43,7 @@
42 43
43#define ASYNC_INTR_CTRL (1 << 29) /* Enable async interrupt */ 44#define ASYNC_INTR_CTRL (1 << 29) /* Enable async interrupt */
44#define ULPI_STP_CTRL (1 << 30) /* Block communication with PHY */ 45#define ULPI_STP_CTRL (1 << 30) /* Block communication with PHY */
46#define PHY_RETEN (1 << 1) /* PHY retention enable/disable */
45 47
46/* OTG definitions */ 48/* OTG definitions */
47#define OTGSC_INTSTS_MASK (0x7f << 16) 49#define OTGSC_INTSTS_MASK (0x7f << 16)
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h
index 6e40718f5abe..d87f44f5b04e 100644
--- a/include/linux/usb/otg.h
+++ b/include/linux/usb/otg.h
@@ -168,6 +168,7 @@ otg_shutdown(struct otg_transceiver *otg)
168#ifdef CONFIG_USB_OTG_UTILS 168#ifdef CONFIG_USB_OTG_UTILS
169extern struct otg_transceiver *otg_get_transceiver(void); 169extern struct otg_transceiver *otg_get_transceiver(void);
170extern void otg_put_transceiver(struct otg_transceiver *); 170extern void otg_put_transceiver(struct otg_transceiver *);
171extern const char *otg_state_string(enum usb_otg_state state);
171#else 172#else
172static inline struct otg_transceiver *otg_get_transceiver(void) 173static inline struct otg_transceiver *otg_get_transceiver(void)
173{ 174{
@@ -177,6 +178,11 @@ static inline struct otg_transceiver *otg_get_transceiver(void)
177static inline void otg_put_transceiver(struct otg_transceiver *x) 178static inline void otg_put_transceiver(struct otg_transceiver *x)
178{ 179{
179} 180}
181
182static inline const char *otg_state_string(enum usb_otg_state state)
183{
184 return NULL;
185}
180#endif 186#endif
181 187
182/* Context: can sleep */ 188/* Context: can sleep */
diff --git a/include/linux/usb/renesas_usbhs.h b/include/linux/usb/renesas_usbhs.h
new file mode 100644
index 000000000000..3a7f1d982dd6
--- /dev/null
+++ b/include/linux/usb/renesas_usbhs.h
@@ -0,0 +1,156 @@
1/*
2 * Renesas USB
3 *
4 * Copyright (C) 2011 Renesas Solutions Corp.
5 * Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
15 *
16 */
17#ifndef RENESAS_USB_H
18#define RENESAS_USB_H
19#include <linux/platform_device.h>
20#include <linux/usb/ch9.h>
21
22/*
23 * module type
24 *
25 * it will be return value from get_id
26 */
27enum {
28 USBHS_HOST = 0,
29 USBHS_GADGET,
30 USBHS_MAX,
31};
32
33/*
34 * callback functions table for driver
35 *
36 * These functions are called from platform for driver.
37 * Callback function's pointer will be set before
38 * renesas_usbhs_platform_callback :: hardware_init was called
39 */
40struct renesas_usbhs_driver_callback {
41 int (*notify_hotplug)(struct platform_device *pdev);
42};
43
44/*
45 * callback functions for platform
46 *
47 * These functions are called from driver for platform
48 */
49struct renesas_usbhs_platform_callback {
50
51 /*
52 * option:
53 *
54 * Hardware init function for platform.
55 * it is called when driver was probed.
56 */
57 int (*hardware_init)(struct platform_device *pdev);
58
59 /*
60 * option:
61 *
62 * Hardware exit function for platform.
63 * it is called when driver was removed
64 */
65 void (*hardware_exit)(struct platform_device *pdev);
66
67 /*
68 * option:
69 *
70 * Phy reset for platform
71 */
72 void (*phy_reset)(struct platform_device *pdev);
73
74 /*
75 * get USB ID function
76 * - USBHS_HOST
77 * - USBHS_GADGET
78 */
79 int (*get_id)(struct platform_device *pdev);
80
81 /*
82 * get VBUS status function.
83 */
84 int (*get_vbus)(struct platform_device *pdev);
85};
86
87/*
88 * parameters for renesas usbhs
89 *
90 * some register needs USB chip specific parameters.
91 * This struct show it to driver
92 */
93struct renesas_usbhs_driver_param {
94 /*
95 * pipe settings
96 */
97 u32 *pipe_type; /* array of USB_ENDPOINT_XFER_xxx (from ep0) */
98 int pipe_size; /* pipe_type array size */
99
100 /*
101 * option:
102 *
103 * for BUSWAIT :: BWAIT
104 * */
105 int buswait_bwait;
106
107 /*
108 * option:
109 *
110 * delay time from notify_hotplug callback
111 */
112 int detection_delay;
113};
114
115/*
116 * option:
117 *
118 * platform information for renesas_usbhs driver.
119 */
120struct renesas_usbhs_platform_info {
121 /*
122 * option:
123 *
124 * platform set these functions before
125 * call platform_add_devices if needed
126 */
127 struct renesas_usbhs_platform_callback platform_callback;
128
129 /*
130 * driver set these callback functions pointer.
131 * platform can use it on callback functions
132 */
133 struct renesas_usbhs_driver_callback driver_callback;
134
135 /*
136 * option:
137 *
138 * driver use these param for some register
139 */
140 struct renesas_usbhs_driver_param driver_param;
141};
142
143/*
144 * macro for platform
145 */
146#define renesas_usbhs_get_info(pdev)\
147 ((struct renesas_usbhs_platform_info *)(pdev)->dev.platform_data)
148
149#define renesas_usbhs_call_notify_hotplug(pdev) \
150 ({ \
151 struct renesas_usbhs_driver_callback *dc; \
152 dc = &(renesas_usbhs_get_info(pdev)->driver_callback); \
153 if (dc && dc->notify_hotplug) \
154 dc->notify_hotplug(pdev); \
155 })
156#endif /* RENESAS_USB_H */
diff --git a/include/net/caif/caif_layer.h b/include/net/caif/caif_layer.h
index c8b07a904e78..35bc7883cf97 100644
--- a/include/net/caif/caif_layer.h
+++ b/include/net/caif/caif_layer.h
@@ -15,7 +15,6 @@ struct cfpktq;
15struct caif_payload_info; 15struct caif_payload_info;
16struct caif_packet_funcs; 16struct caif_packet_funcs;
17 17
18
19#define CAIF_LAYER_NAME_SZ 16 18#define CAIF_LAYER_NAME_SZ 16
20 19
21/** 20/**
@@ -33,7 +32,6 @@ do { \
33 } \ 32 } \
34} while (0) 33} while (0)
35 34
36
37/** 35/**
38 * enum caif_ctrlcmd - CAIF Stack Control Signaling sent in layer.ctrlcmd(). 36 * enum caif_ctrlcmd - CAIF Stack Control Signaling sent in layer.ctrlcmd().
39 * 37 *
@@ -141,7 +139,7 @@ enum caif_direction {
141 * - All layers must use this structure. If embedding it, then place this 139 * - All layers must use this structure. If embedding it, then place this
142 * structure first in the layer specific structure. 140 * structure first in the layer specific structure.
143 * 141 *
144 * - Each layer should not depend on any others layer private data. 142 * - Each layer should not depend on any others layer's private data.
145 * 143 *
146 * - In order to send data upwards do 144 * - In order to send data upwards do
147 * layer->up->receive(layer->up, packet); 145 * layer->up->receive(layer->up, packet);
@@ -155,16 +153,23 @@ struct cflayer {
155 struct list_head node; 153 struct list_head node;
156 154
157 /* 155 /*
158 * receive() - Receive Function. 156 * receive() - Receive Function (non-blocking).
159 * Contract: Each layer must implement a receive function passing the 157 * Contract: Each layer must implement a receive function passing the
160 * CAIF packets upwards in the stack. 158 * CAIF packets upwards in the stack.
161 * Packet handling rules: 159 * Packet handling rules:
162 * - The CAIF packet (cfpkt) cannot be accessed after 160 * - The CAIF packet (cfpkt) ownership is passed to the
163 * passing it to the next layer using up->receive(). 161 * called receive function. This means that the the
162 * packet cannot be accessed after passing it to the
163 * above layer using up->receive().
164 *
164 * - If parsing of the packet fails, the packet must be 165 * - If parsing of the packet fails, the packet must be
165 * destroyed and -1 returned from the function. 166 * destroyed and negative error code returned
167 * from the function.
168 * EXCEPTION: If the framing layer (cffrml) returns
169 * -EILSEQ, the packet is not freed.
170 *
166 * - If parsing succeeds (and above layers return OK) then 171 * - If parsing succeeds (and above layers return OK) then
167 * the function must return a value > 0. 172 * the function must return a value >= 0.
168 * 173 *
169 * Returns result < 0 indicates an error, 0 or positive value 174 * Returns result < 0 indicates an error, 0 or positive value
170 * indicates success. 175 * indicates success.
@@ -176,7 +181,7 @@ struct cflayer {
176 int (*receive)(struct cflayer *layr, struct cfpkt *cfpkt); 181 int (*receive)(struct cflayer *layr, struct cfpkt *cfpkt);
177 182
178 /* 183 /*
179 * transmit() - Transmit Function. 184 * transmit() - Transmit Function (non-blocking).
180 * Contract: Each layer must implement a transmit function passing the 185 * Contract: Each layer must implement a transmit function passing the
181 * CAIF packet downwards in the stack. 186 * CAIF packet downwards in the stack.
182 * Packet handling rules: 187 * Packet handling rules:
@@ -185,15 +190,16 @@ struct cflayer {
185 * cannot be accessed after passing it to the below 190 * cannot be accessed after passing it to the below
186 * layer using dn->transmit(). 191 * layer using dn->transmit().
187 * 192 *
188 * - If transmit fails, however, the ownership is returned 193 * - Upon error the packet ownership is still passed on,
189 * to thecaller. The caller of "dn->transmit()" must 194 * so the packet shall be freed where error is detected.
190 * destroy or resend packet. 195 * Callers of the transmit function shall not free packets,
196 * but errors shall be returned.
191 * 197 *
192 * - Return value less than zero means error, zero or 198 * - Return value less than zero means error, zero or
193 * greater than zero means OK. 199 * greater than zero means OK.
194 * 200 *
195 * result < 0 indicates an error, 0 or positive value 201 * Returns result < 0 indicates an error, 0 or positive value
196 * indicate success. 202 * indicates success.
197 * 203 *
198 * @layr: Pointer to the current layer the receive function 204 * @layr: Pointer to the current layer the receive function
199 * isimplemented for (this pointer). 205 * isimplemented for (this pointer).
@@ -202,7 +208,7 @@ struct cflayer {
202 int (*transmit) (struct cflayer *layr, struct cfpkt *cfpkt); 208 int (*transmit) (struct cflayer *layr, struct cfpkt *cfpkt);
203 209
204 /* 210 /*
205 * cttrlcmd() - Control Function upwards in CAIF Stack. 211 * cttrlcmd() - Control Function upwards in CAIF Stack (non-blocking).
206 * Used for signaling responses (CAIF_CTRLCMD_*_RSP) 212 * Used for signaling responses (CAIF_CTRLCMD_*_RSP)
207 * and asynchronous events from the modem (CAIF_CTRLCMD_*_IND) 213 * and asynchronous events from the modem (CAIF_CTRLCMD_*_IND)
208 * 214 *
diff --git a/include/net/genetlink.h b/include/net/genetlink.h
index b4c7c1cbcf40..d420f28b6d60 100644
--- a/include/net/genetlink.h
+++ b/include/net/genetlink.h
@@ -260,7 +260,7 @@ static inline int genlmsg_reply(struct sk_buff *skb, struct genl_info *info)
260 260
261/** 261/**
262 * gennlmsg_data - head of message payload 262 * gennlmsg_data - head of message payload
263 * @gnlh: genetlink messsage header 263 * @gnlh: genetlink message header
264 */ 264 */
265static inline void *genlmsg_data(const struct genlmsghdr *gnlh) 265static inline void *genlmsg_data(const struct genlmsghdr *gnlh)
266{ 266{
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 8c7189c3f6ed..e6d6a66a8f71 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -538,7 +538,7 @@ struct ieee80211_tx_info {
538}; 538};
539 539
540/** 540/**
541 * ieee80211_sched_scan_ies - scheduled scan IEs 541 * struct ieee80211_sched_scan_ies - scheduled scan IEs
542 * 542 *
543 * This structure is used to pass the appropriate IEs to be used in scheduled 543 * This structure is used to pass the appropriate IEs to be used in scheduled
544 * scans for all bands. It contains both the IEs passed from the userspace 544 * scans for all bands. It contains both the IEs passed from the userspace
@@ -2278,6 +2278,7 @@ static inline int ieee80211_sta_ps_transition_ni(struct ieee80211_sta *sta,
2278 2278
2279/** 2279/**
2280 * ieee80211_sta_set_tim - set the TIM bit for a sleeping station 2280 * ieee80211_sta_set_tim - set the TIM bit for a sleeping station
2281 * @sta: &struct ieee80211_sta pointer for the sleeping station
2281 * 2282 *
2282 * If a driver buffers frames for a powersave station instead of passing 2283 * If a driver buffers frames for a powersave station instead of passing
2283 * them back to mac80211 for retransmission, the station needs to be told 2284 * them back to mac80211 for retransmission, the station needs to be told
diff --git a/include/net/netlink.h b/include/net/netlink.h
index 8a3906a08f5f..02740a94f108 100644
--- a/include/net/netlink.h
+++ b/include/net/netlink.h
@@ -290,7 +290,7 @@ static inline int nlmsg_padlen(int payload)
290 290
291/** 291/**
292 * nlmsg_data - head of message payload 292 * nlmsg_data - head of message payload
293 * @nlh: netlink messsage header 293 * @nlh: netlink message header
294 */ 294 */
295static inline void *nlmsg_data(const struct nlmsghdr *nlh) 295static inline void *nlmsg_data(const struct nlmsghdr *nlh)
296{ 296{
diff --git a/include/sound/ak4641.h b/include/sound/ak4641.h
new file mode 100644
index 000000000000..96d1991c811d
--- /dev/null
+++ b/include/sound/ak4641.h
@@ -0,0 +1,26 @@
1/*
2 * AK4641 ALSA SoC Codec driver
3 *
4 * Copyright 2009 Philipp Zabel
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 version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __AK4641_H
12#define __AK4641_H
13
14/**
15 * struct ak4641_platform_data - platform specific AK4641 configuration
16 * @gpio_power: GPIO to control external power to AK4641
17 * @gpio_npdn: GPIO connected to AK4641 nPDN pin
18 *
19 * Both GPIO parameters are optional.
20 */
21struct ak4641_platform_data {
22 int gpio_power;
23 int gpio_npdn;
24};
25
26#endif /* __AK4641_H */
diff --git a/include/sound/control.h b/include/sound/control.h
index 404acb859cee..1a94a216ed99 100644
--- a/include/sound/control.h
+++ b/include/sound/control.h
@@ -113,6 +113,7 @@ struct snd_kcontrol *snd_ctl_new1(const struct snd_kcontrol_new * kcontrolnew, v
113void snd_ctl_free_one(struct snd_kcontrol * kcontrol); 113void snd_ctl_free_one(struct snd_kcontrol * kcontrol);
114int snd_ctl_add(struct snd_card * card, struct snd_kcontrol * kcontrol); 114int snd_ctl_add(struct snd_card * card, struct snd_kcontrol * kcontrol);
115int snd_ctl_remove(struct snd_card * card, struct snd_kcontrol * kcontrol); 115int snd_ctl_remove(struct snd_card * card, struct snd_kcontrol * kcontrol);
116int snd_ctl_replace(struct snd_card *card, struct snd_kcontrol *kcontrol, bool add_on_replace);
116int snd_ctl_remove_id(struct snd_card * card, struct snd_ctl_elem_id *id); 117int snd_ctl_remove_id(struct snd_card * card, struct snd_ctl_elem_id *id);
117int snd_ctl_rename_id(struct snd_card * card, struct snd_ctl_elem_id *src_id, struct snd_ctl_elem_id *dst_id); 118int snd_ctl_rename_id(struct snd_card * card, struct snd_ctl_elem_id *src_id, struct snd_ctl_elem_id *dst_id);
118int snd_ctl_activate_id(struct snd_card *card, struct snd_ctl_elem_id *id, 119int snd_ctl_activate_id(struct snd_card *card, struct snd_ctl_elem_id *id,
diff --git a/include/sound/max98095.h b/include/sound/max98095.h
new file mode 100644
index 000000000000..7513a42dd4aa
--- /dev/null
+++ b/include/sound/max98095.h
@@ -0,0 +1,54 @@
1/*
2 * Platform data for MAX98095
3 *
4 * Copyright 2011 Maxim Integrated Products
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 *
11 */
12
13#ifndef __SOUND_MAX98095_PDATA_H__
14#define __SOUND_MAX98095_PDATA_H__
15
16/* Equalizer filter response configuration */
17struct max98095_eq_cfg {
18 const char *name;
19 unsigned int rate;
20 u16 band1[5];
21 u16 band2[5];
22 u16 band3[5];
23 u16 band4[5];
24 u16 band5[5];
25};
26
27/* Biquad filter response configuration */
28struct max98095_biquad_cfg {
29 const char *name;
30 unsigned int rate;
31 u16 band1[5];
32 u16 band2[5];
33};
34
35/* codec platform data */
36struct max98095_pdata {
37
38 /* Equalizers for DAI1 and DAI2 */
39 struct max98095_eq_cfg *eq_cfg;
40 unsigned int eq_cfgcnt;
41
42 /* Biquad filter for DAI1 and DAI2 */
43 struct max98095_biquad_cfg *bq_cfg;
44 unsigned int bq_cfgcnt;
45
46 /* Analog/digital microphone configuration:
47 * 0 = analog microphone input (normal setting)
48 * 1 = digital microphone input
49 */
50 unsigned int digmic_left_mode:1;
51 unsigned int digmic_right_mode:1;
52};
53
54#endif
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index f72c1039a6fb..c46e7d89561d 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -24,7 +24,7 @@
24 * SoC dynamic audio power management 24 * SoC dynamic audio power management
25 * 25 *
26 * We can have up to 4 power domains 26 * We can have up to 4 power domains
27 * 1. Codec domain - VREF, VMID 27 * 1. Codec domain - VREF, VMID
28 * Usually controlled at codec probe/remove, although can be set 28 * Usually controlled at codec probe/remove, although can be set
29 * at stream time if power is not needed for sidetone, etc. 29 * at stream time if power is not needed for sidetone, etc.
30 * 2. Platform/Machine domain - physically connected inputs and outputs 30 * 2. Platform/Machine domain - physically connected inputs and outputs
@@ -39,30 +39,30 @@
39 39
40/* codec domain */ 40/* codec domain */
41#define SND_SOC_DAPM_VMID(wname) \ 41#define SND_SOC_DAPM_VMID(wname) \
42{ .id = snd_soc_dapm_vmid, .name = wname, .kcontrols = NULL, \ 42{ .id = snd_soc_dapm_vmid, .name = wname, .kcontrol_news = NULL, \
43 .num_kcontrols = 0} 43 .num_kcontrols = 0}
44 44
45/* platform domain */ 45/* platform domain */
46#define SND_SOC_DAPM_INPUT(wname) \ 46#define SND_SOC_DAPM_INPUT(wname) \
47{ .id = snd_soc_dapm_input, .name = wname, .kcontrols = NULL, \ 47{ .id = snd_soc_dapm_input, .name = wname, .kcontrol_news = NULL, \
48 .num_kcontrols = 0, .reg = SND_SOC_NOPM } 48 .num_kcontrols = 0, .reg = SND_SOC_NOPM }
49#define SND_SOC_DAPM_OUTPUT(wname) \ 49#define SND_SOC_DAPM_OUTPUT(wname) \
50{ .id = snd_soc_dapm_output, .name = wname, .kcontrols = NULL, \ 50{ .id = snd_soc_dapm_output, .name = wname, .kcontrol_news = NULL, \
51 .num_kcontrols = 0, .reg = SND_SOC_NOPM } 51 .num_kcontrols = 0, .reg = SND_SOC_NOPM }
52#define SND_SOC_DAPM_MIC(wname, wevent) \ 52#define SND_SOC_DAPM_MIC(wname, wevent) \
53{ .id = snd_soc_dapm_mic, .name = wname, .kcontrols = NULL, \ 53{ .id = snd_soc_dapm_mic, .name = wname, .kcontrol_news = NULL, \
54 .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ 54 .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \
55 .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD} 55 .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD}
56#define SND_SOC_DAPM_HP(wname, wevent) \ 56#define SND_SOC_DAPM_HP(wname, wevent) \
57{ .id = snd_soc_dapm_hp, .name = wname, .kcontrols = NULL, \ 57{ .id = snd_soc_dapm_hp, .name = wname, .kcontrol_news = NULL, \
58 .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ 58 .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \
59 .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} 59 .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD}
60#define SND_SOC_DAPM_SPK(wname, wevent) \ 60#define SND_SOC_DAPM_SPK(wname, wevent) \
61{ .id = snd_soc_dapm_spk, .name = wname, .kcontrols = NULL, \ 61{ .id = snd_soc_dapm_spk, .name = wname, .kcontrol_news = NULL, \
62 .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ 62 .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \
63 .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} 63 .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD}
64#define SND_SOC_DAPM_LINE(wname, wevent) \ 64#define SND_SOC_DAPM_LINE(wname, wevent) \
65{ .id = snd_soc_dapm_line, .name = wname, .kcontrols = NULL, \ 65{ .id = snd_soc_dapm_line, .name = wname, .kcontrol_news = NULL, \
66 .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ 66 .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \
67 .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} 67 .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD}
68 68
@@ -70,91 +70,91 @@
70#define SND_SOC_DAPM_PGA(wname, wreg, wshift, winvert,\ 70#define SND_SOC_DAPM_PGA(wname, wreg, wshift, winvert,\
71 wcontrols, wncontrols) \ 71 wcontrols, wncontrols) \
72{ .id = snd_soc_dapm_pga, .name = wname, .reg = wreg, .shift = wshift, \ 72{ .id = snd_soc_dapm_pga, .name = wname, .reg = wreg, .shift = wshift, \
73 .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols} 73 .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = wncontrols}
74#define SND_SOC_DAPM_OUT_DRV(wname, wreg, wshift, winvert,\ 74#define SND_SOC_DAPM_OUT_DRV(wname, wreg, wshift, winvert,\
75 wcontrols, wncontrols) \ 75 wcontrols, wncontrols) \
76{ .id = snd_soc_dapm_out_drv, .name = wname, .reg = wreg, .shift = wshift, \ 76{ .id = snd_soc_dapm_out_drv, .name = wname, .reg = wreg, .shift = wshift, \
77 .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols} 77 .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = wncontrols}
78#define SND_SOC_DAPM_MIXER(wname, wreg, wshift, winvert, \ 78#define SND_SOC_DAPM_MIXER(wname, wreg, wshift, winvert, \
79 wcontrols, wncontrols)\ 79 wcontrols, wncontrols)\
80{ .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ 80{ .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \
81 .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols} 81 .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = wncontrols}
82#define SND_SOC_DAPM_MIXER_NAMED_CTL(wname, wreg, wshift, winvert, \ 82#define SND_SOC_DAPM_MIXER_NAMED_CTL(wname, wreg, wshift, winvert, \
83 wcontrols, wncontrols)\ 83 wcontrols, wncontrols)\
84{ .id = snd_soc_dapm_mixer_named_ctl, .name = wname, .reg = wreg, \ 84{ .id = snd_soc_dapm_mixer_named_ctl, .name = wname, .reg = wreg, \
85 .shift = wshift, .invert = winvert, .kcontrols = wcontrols, \ 85 .shift = wshift, .invert = winvert, .kcontrol_news = wcontrols, \
86 .num_kcontrols = wncontrols} 86 .num_kcontrols = wncontrols}
87#define SND_SOC_DAPM_MICBIAS(wname, wreg, wshift, winvert) \ 87#define SND_SOC_DAPM_MICBIAS(wname, wreg, wshift, winvert) \
88{ .id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, .shift = wshift, \ 88{ .id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, .shift = wshift, \
89 .invert = winvert, .kcontrols = NULL, .num_kcontrols = 0} 89 .invert = winvert, .kcontrol_news = NULL, .num_kcontrols = 0}
90#define SND_SOC_DAPM_SWITCH(wname, wreg, wshift, winvert, wcontrols) \ 90#define SND_SOC_DAPM_SWITCH(wname, wreg, wshift, winvert, wcontrols) \
91{ .id = snd_soc_dapm_switch, .name = wname, .reg = wreg, .shift = wshift, \ 91{ .id = snd_soc_dapm_switch, .name = wname, .reg = wreg, .shift = wshift, \
92 .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1} 92 .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = 1}
93#define SND_SOC_DAPM_MUX(wname, wreg, wshift, winvert, wcontrols) \ 93#define SND_SOC_DAPM_MUX(wname, wreg, wshift, winvert, wcontrols) \
94{ .id = snd_soc_dapm_mux, .name = wname, .reg = wreg, .shift = wshift, \ 94{ .id = snd_soc_dapm_mux, .name = wname, .reg = wreg, .shift = wshift, \
95 .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1} 95 .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = 1}
96#define SND_SOC_DAPM_VIRT_MUX(wname, wreg, wshift, winvert, wcontrols) \ 96#define SND_SOC_DAPM_VIRT_MUX(wname, wreg, wshift, winvert, wcontrols) \
97{ .id = snd_soc_dapm_virt_mux, .name = wname, .reg = wreg, .shift = wshift, \ 97{ .id = snd_soc_dapm_virt_mux, .name = wname, .reg = wreg, .shift = wshift, \
98 .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1} 98 .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = 1}
99#define SND_SOC_DAPM_VALUE_MUX(wname, wreg, wshift, winvert, wcontrols) \ 99#define SND_SOC_DAPM_VALUE_MUX(wname, wreg, wshift, winvert, wcontrols) \
100{ .id = snd_soc_dapm_value_mux, .name = wname, .reg = wreg, \ 100{ .id = snd_soc_dapm_value_mux, .name = wname, .reg = wreg, \
101 .shift = wshift, .invert = winvert, .kcontrols = wcontrols, \ 101 .shift = wshift, .invert = winvert, .kcontrol_news = wcontrols, \
102 .num_kcontrols = 1} 102 .num_kcontrols = 1}
103 103
104/* Simplified versions of above macros, assuming wncontrols = ARRAY_SIZE(wcontrols) */ 104/* Simplified versions of above macros, assuming wncontrols = ARRAY_SIZE(wcontrols) */
105#define SOC_PGA_ARRAY(wname, wreg, wshift, winvert,\ 105#define SOC_PGA_ARRAY(wname, wreg, wshift, winvert,\
106 wcontrols) \ 106 wcontrols) \
107{ .id = snd_soc_dapm_pga, .name = wname, .reg = wreg, .shift = wshift, \ 107{ .id = snd_soc_dapm_pga, .name = wname, .reg = wreg, .shift = wshift, \
108 .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = ARRAY_SIZE(wcontrols)} 108 .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = ARRAY_SIZE(wcontrols)}
109#define SOC_MIXER_ARRAY(wname, wreg, wshift, winvert, \ 109#define SOC_MIXER_ARRAY(wname, wreg, wshift, winvert, \
110 wcontrols)\ 110 wcontrols)\
111{ .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ 111{ .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \
112 .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = ARRAY_SIZE(wcontrols)} 112 .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = ARRAY_SIZE(wcontrols)}
113#define SOC_MIXER_NAMED_CTL_ARRAY(wname, wreg, wshift, winvert, \ 113#define SOC_MIXER_NAMED_CTL_ARRAY(wname, wreg, wshift, winvert, \
114 wcontrols)\ 114 wcontrols)\
115{ .id = snd_soc_dapm_mixer_named_ctl, .name = wname, .reg = wreg, \ 115{ .id = snd_soc_dapm_mixer_named_ctl, .name = wname, .reg = wreg, \
116 .shift = wshift, .invert = winvert, .kcontrols = wcontrols, \ 116 .shift = wshift, .invert = winvert, .kcontrol_news = wcontrols, \
117 .num_kcontrols = ARRAY_SIZE(wcontrols)} 117 .num_kcontrols = ARRAY_SIZE(wcontrols)}
118 118
119/* path domain with event - event handler must return 0 for success */ 119/* path domain with event - event handler must return 0 for success */
120#define SND_SOC_DAPM_PGA_E(wname, wreg, wshift, winvert, wcontrols, \ 120#define SND_SOC_DAPM_PGA_E(wname, wreg, wshift, winvert, wcontrols, \
121 wncontrols, wevent, wflags) \ 121 wncontrols, wevent, wflags) \
122{ .id = snd_soc_dapm_pga, .name = wname, .reg = wreg, .shift = wshift, \ 122{ .id = snd_soc_dapm_pga, .name = wname, .reg = wreg, .shift = wshift, \
123 .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols, \ 123 .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = wncontrols, \
124 .event = wevent, .event_flags = wflags} 124 .event = wevent, .event_flags = wflags}
125#define SND_SOC_DAPM_OUT_DRV_E(wname, wreg, wshift, winvert, wcontrols, \ 125#define SND_SOC_DAPM_OUT_DRV_E(wname, wreg, wshift, winvert, wcontrols, \
126 wncontrols, wevent, wflags) \ 126 wncontrols, wevent, wflags) \
127{ .id = snd_soc_dapm_out_drv, .name = wname, .reg = wreg, .shift = wshift, \ 127{ .id = snd_soc_dapm_out_drv, .name = wname, .reg = wreg, .shift = wshift, \
128 .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols, \ 128 .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = wncontrols, \
129 .event = wevent, .event_flags = wflags} 129 .event = wevent, .event_flags = wflags}
130#define SND_SOC_DAPM_MIXER_E(wname, wreg, wshift, winvert, wcontrols, \ 130#define SND_SOC_DAPM_MIXER_E(wname, wreg, wshift, winvert, wcontrols, \
131 wncontrols, wevent, wflags) \ 131 wncontrols, wevent, wflags) \
132{ .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ 132{ .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \
133 .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = wncontrols, \ 133 .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = wncontrols, \
134 .event = wevent, .event_flags = wflags} 134 .event = wevent, .event_flags = wflags}
135#define SND_SOC_DAPM_MIXER_NAMED_CTL_E(wname, wreg, wshift, winvert, \ 135#define SND_SOC_DAPM_MIXER_NAMED_CTL_E(wname, wreg, wshift, winvert, \
136 wcontrols, wncontrols, wevent, wflags) \ 136 wcontrols, wncontrols, wevent, wflags) \
137{ .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ 137{ .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \
138 .invert = winvert, .kcontrols = wcontrols, \ 138 .invert = winvert, .kcontrol_news = wcontrols, \
139 .num_kcontrols = wncontrols, .event = wevent, .event_flags = wflags} 139 .num_kcontrols = wncontrols, .event = wevent, .event_flags = wflags}
140#define SND_SOC_DAPM_MICBIAS_E(wname, wreg, wshift, winvert, wevent, wflags) \ 140#define SND_SOC_DAPM_MICBIAS_E(wname, wreg, wshift, winvert, wevent, wflags) \
141{ .id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, .shift = wshift, \ 141{ .id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, .shift = wshift, \
142 .invert = winvert, .kcontrols = NULL, .num_kcontrols = 0, \ 142 .invert = winvert, .kcontrol_news = NULL, .num_kcontrols = 0, \
143 .event = wevent, .event_flags = wflags} 143 .event = wevent, .event_flags = wflags}
144#define SND_SOC_DAPM_SWITCH_E(wname, wreg, wshift, winvert, wcontrols, \ 144#define SND_SOC_DAPM_SWITCH_E(wname, wreg, wshift, winvert, wcontrols, \
145 wevent, wflags) \ 145 wevent, wflags) \
146{ .id = snd_soc_dapm_switch, .name = wname, .reg = wreg, .shift = wshift, \ 146{ .id = snd_soc_dapm_switch, .name = wname, .reg = wreg, .shift = wshift, \
147 .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1, \ 147 .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = 1, \
148 .event = wevent, .event_flags = wflags} 148 .event = wevent, .event_flags = wflags}
149#define SND_SOC_DAPM_MUX_E(wname, wreg, wshift, winvert, wcontrols, \ 149#define SND_SOC_DAPM_MUX_E(wname, wreg, wshift, winvert, wcontrols, \
150 wevent, wflags) \ 150 wevent, wflags) \
151{ .id = snd_soc_dapm_mux, .name = wname, .reg = wreg, .shift = wshift, \ 151{ .id = snd_soc_dapm_mux, .name = wname, .reg = wreg, .shift = wshift, \
152 .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1, \ 152 .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = 1, \
153 .event = wevent, .event_flags = wflags} 153 .event = wevent, .event_flags = wflags}
154#define SND_SOC_DAPM_VIRT_MUX_E(wname, wreg, wshift, winvert, wcontrols, \ 154#define SND_SOC_DAPM_VIRT_MUX_E(wname, wreg, wshift, winvert, wcontrols, \
155 wevent, wflags) \ 155 wevent, wflags) \
156{ .id = snd_soc_dapm_virt_mux, .name = wname, .reg = wreg, .shift = wshift, \ 156{ .id = snd_soc_dapm_virt_mux, .name = wname, .reg = wreg, .shift = wshift, \
157 .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1, \ 157 .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = 1, \
158 .event = wevent, .event_flags = wflags} 158 .event = wevent, .event_flags = wflags}
159 159
160/* additional sequencing control within an event type */ 160/* additional sequencing control within an event type */
@@ -173,26 +173,26 @@
173#define SOC_PGA_E_ARRAY(wname, wreg, wshift, winvert, wcontrols, \ 173#define SOC_PGA_E_ARRAY(wname, wreg, wshift, winvert, wcontrols, \
174 wevent, wflags) \ 174 wevent, wflags) \
175{ .id = snd_soc_dapm_pga, .name = wname, .reg = wreg, .shift = wshift, \ 175{ .id = snd_soc_dapm_pga, .name = wname, .reg = wreg, .shift = wshift, \
176 .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = ARRAY_SIZE(wcontrols), \ 176 .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = ARRAY_SIZE(wcontrols), \
177 .event = wevent, .event_flags = wflags} 177 .event = wevent, .event_flags = wflags}
178#define SOC_MIXER_E_ARRAY(wname, wreg, wshift, winvert, wcontrols, \ 178#define SOC_MIXER_E_ARRAY(wname, wreg, wshift, winvert, wcontrols, \
179 wevent, wflags) \ 179 wevent, wflags) \
180{ .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ 180{ .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \
181 .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = ARRAY_SIZE(wcontrols), \ 181 .invert = winvert, .kcontrol_news = wcontrols, .num_kcontrols = ARRAY_SIZE(wcontrols), \
182 .event = wevent, .event_flags = wflags} 182 .event = wevent, .event_flags = wflags}
183#define SOC_MIXER_NAMED_CTL_E_ARRAY(wname, wreg, wshift, winvert, \ 183#define SOC_MIXER_NAMED_CTL_E_ARRAY(wname, wreg, wshift, winvert, \
184 wcontrols, wevent, wflags) \ 184 wcontrols, wevent, wflags) \
185{ .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ 185{ .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \
186 .invert = winvert, .kcontrols = wcontrols, \ 186 .invert = winvert, .kcontrol_news = wcontrols, \
187 .num_kcontrols = ARRAY_SIZE(wcontrols), .event = wevent, .event_flags = wflags} 187 .num_kcontrols = ARRAY_SIZE(wcontrols), .event = wevent, .event_flags = wflags}
188 188
189/* events that are pre and post DAPM */ 189/* events that are pre and post DAPM */
190#define SND_SOC_DAPM_PRE(wname, wevent) \ 190#define SND_SOC_DAPM_PRE(wname, wevent) \
191{ .id = snd_soc_dapm_pre, .name = wname, .kcontrols = NULL, \ 191{ .id = snd_soc_dapm_pre, .name = wname, .kcontrol_news = NULL, \
192 .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ 192 .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \
193 .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD} 193 .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD}
194#define SND_SOC_DAPM_POST(wname, wevent) \ 194#define SND_SOC_DAPM_POST(wname, wevent) \
195{ .id = snd_soc_dapm_post, .name = wname, .kcontrols = NULL, \ 195{ .id = snd_soc_dapm_post, .name = wname, .kcontrol_news = NULL, \
196 .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ 196 .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \
197 .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD} 197 .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD}
198 198
@@ -232,7 +232,7 @@
232 232
233/* generic widgets */ 233/* generic widgets */
234#define SND_SOC_DAPM_REG(wid, wname, wreg, wshift, wmask, won_val, woff_val) \ 234#define SND_SOC_DAPM_REG(wid, wname, wreg, wshift, wmask, won_val, woff_val) \
235{ .id = wid, .name = wname, .kcontrols = NULL, .num_kcontrols = 0, \ 235{ .id = wid, .name = wname, .kcontrol_news = NULL, .num_kcontrols = 0, \
236 .reg = -((wreg) + 1), .shift = wshift, .mask = wmask, \ 236 .reg = -((wreg) + 1), .shift = wshift, .mask = wmask, \
237 .on_val = won_val, .off_val = woff_val, .event = dapm_reg_event, \ 237 .on_val = won_val, .off_val = woff_val, .event = dapm_reg_event, \
238 .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD} 238 .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD}
@@ -356,7 +356,8 @@ void snd_soc_dapm_shutdown(struct snd_soc_card *card);
356 356
357/* dapm sys fs - used by the core */ 357/* dapm sys fs - used by the core */
358int snd_soc_dapm_sys_add(struct device *dev); 358int snd_soc_dapm_sys_add(struct device *dev);
359void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm); 359void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm,
360 struct dentry *parent);
360 361
361/* dapm audio pin control and status */ 362/* dapm audio pin control and status */
362int snd_soc_dapm_enable_pin(struct snd_soc_dapm_context *dapm, 363int snd_soc_dapm_enable_pin(struct snd_soc_dapm_context *dapm,
@@ -472,7 +473,8 @@ struct snd_soc_dapm_widget {
472 473
473 /* kcontrols that relate to this widget */ 474 /* kcontrols that relate to this widget */
474 int num_kcontrols; 475 int num_kcontrols;
475 const struct snd_kcontrol_new *kcontrols; 476 const struct snd_kcontrol_new *kcontrol_news;
477 struct snd_kcontrol **kcontrols;
476 478
477 /* widget input and outputs */ 479 /* widget input and outputs */
478 struct list_head sources; 480 struct list_head sources;
@@ -516,4 +518,10 @@ struct snd_soc_dapm_context {
516#endif 518#endif
517}; 519};
518 520
521/* A list of widgets associated with an object, typically a snd_kcontrol */
522struct snd_soc_dapm_widget_list {
523 int num_widgets;
524 struct snd_soc_dapm_widget *widgets[0];
525};
526
519#endif 527#endif
diff --git a/include/sound/soc.h b/include/sound/soc.h
index bfa4836ea107..f1de3e0c75bc 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -248,7 +248,7 @@ typedef int (*hw_write_t)(void *,const char* ,int);
248extern struct snd_ac97_bus_ops soc_ac97_ops; 248extern struct snd_ac97_bus_ops soc_ac97_ops;
249 249
250enum snd_soc_control_type { 250enum snd_soc_control_type {
251 SND_SOC_CUSTOM, 251 SND_SOC_CUSTOM = 1,
252 SND_SOC_I2C, 252 SND_SOC_I2C,
253 SND_SOC_SPI, 253 SND_SOC_SPI,
254}; 254};
@@ -278,6 +278,10 @@ int snd_soc_register_codec(struct device *dev,
278void snd_soc_unregister_codec(struct device *dev); 278void snd_soc_unregister_codec(struct device *dev);
279int snd_soc_codec_volatile_register(struct snd_soc_codec *codec, 279int snd_soc_codec_volatile_register(struct snd_soc_codec *codec,
280 unsigned int reg); 280 unsigned int reg);
281int snd_soc_codec_readable_register(struct snd_soc_codec *codec,
282 unsigned int reg);
283int snd_soc_codec_writable_register(struct snd_soc_codec *codec,
284 unsigned int reg);
281int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec, 285int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec,
282 int addr_bits, int data_bits, 286 int addr_bits, int data_bits,
283 enum snd_soc_control_type control); 287 enum snd_soc_control_type control);
@@ -292,6 +296,8 @@ int snd_soc_default_volatile_register(struct snd_soc_codec *codec,
292 unsigned int reg); 296 unsigned int reg);
293int snd_soc_default_readable_register(struct snd_soc_codec *codec, 297int snd_soc_default_readable_register(struct snd_soc_codec *codec,
294 unsigned int reg); 298 unsigned int reg);
299int snd_soc_default_writable_register(struct snd_soc_codec *codec,
300 unsigned int reg);
295 301
296/* Utility functions to get clock rates from various things */ 302/* Utility functions to get clock rates from various things */
297int snd_soc_calc_frame_size(int sample_size, int channels, int tdm_slots); 303int snd_soc_calc_frame_size(int sample_size, int channels, int tdm_slots);
@@ -523,6 +529,7 @@ struct snd_soc_codec {
523 size_t reg_size; /* reg_cache_size * reg_word_size */ 529 size_t reg_size; /* reg_cache_size * reg_word_size */
524 int (*volatile_register)(struct snd_soc_codec *, unsigned int); 530 int (*volatile_register)(struct snd_soc_codec *, unsigned int);
525 int (*readable_register)(struct snd_soc_codec *, unsigned int); 531 int (*readable_register)(struct snd_soc_codec *, unsigned int);
532 int (*writable_register)(struct snd_soc_codec *, unsigned int);
526 533
527 /* runtime */ 534 /* runtime */
528 struct snd_ac97 *ac97; /* for ad-hoc ac97 devices */ 535 struct snd_ac97 *ac97; /* for ad-hoc ac97 devices */
@@ -539,10 +546,12 @@ struct snd_soc_codec {
539 546
540 /* codec IO */ 547 /* codec IO */
541 void *control_data; /* codec control (i2c/3wire) data */ 548 void *control_data; /* codec control (i2c/3wire) data */
549 enum snd_soc_control_type control_type;
542 hw_write_t hw_write; 550 hw_write_t hw_write;
543 unsigned int (*hw_read)(struct snd_soc_codec *, unsigned int); 551 unsigned int (*hw_read)(struct snd_soc_codec *, unsigned int);
544 unsigned int (*read)(struct snd_soc_codec *, unsigned int); 552 unsigned int (*read)(struct snd_soc_codec *, unsigned int);
545 int (*write)(struct snd_soc_codec *, unsigned int, unsigned int); 553 int (*write)(struct snd_soc_codec *, unsigned int, unsigned int);
554 int (*bulk_write_raw)(struct snd_soc_codec *, unsigned int, const void *, size_t);
546 void *reg_cache; 555 void *reg_cache;
547 const void *reg_def_copy; 556 const void *reg_def_copy;
548 const struct snd_soc_cache_ops *cache_ops; 557 const struct snd_soc_cache_ops *cache_ops;
@@ -568,7 +577,9 @@ struct snd_soc_codec_driver {
568 pm_message_t state); 577 pm_message_t state);
569 int (*resume)(struct snd_soc_codec *); 578 int (*resume)(struct snd_soc_codec *);
570 579
571 /* Default DAPM setup, added after probe() is run */ 580 /* Default control and setup, added after probe() is run */
581 const struct snd_kcontrol_new *controls;
582 int num_controls;
572 const struct snd_soc_dapm_widget *dapm_widgets; 583 const struct snd_soc_dapm_widget *dapm_widgets;
573 int num_dapm_widgets; 584 int num_dapm_widgets;
574 const struct snd_soc_dapm_route *dapm_routes; 585 const struct snd_soc_dapm_route *dapm_routes;
@@ -587,6 +598,7 @@ struct snd_soc_codec_driver {
587 size_t, unsigned int); 598 size_t, unsigned int);
588 int (*volatile_register)(struct snd_soc_codec *, unsigned int); 599 int (*volatile_register)(struct snd_soc_codec *, unsigned int);
589 int (*readable_register)(struct snd_soc_codec *, unsigned int); 600 int (*readable_register)(struct snd_soc_codec *, unsigned int);
601 int (*writable_register)(struct snd_soc_codec *, unsigned int);
590 short reg_cache_size; 602 short reg_cache_size;
591 short reg_cache_step; 603 short reg_cache_step;
592 short reg_word_size; 604 short reg_word_size;
@@ -690,6 +702,8 @@ struct snd_soc_aux_dev {
690/* SoC card */ 702/* SoC card */
691struct snd_soc_card { 703struct snd_soc_card {
692 const char *name; 704 const char *name;
705 const char *long_name;
706 const char *driver_name;
693 struct device *dev; 707 struct device *dev;
694 struct snd_card *snd_card; 708 struct snd_card *snd_card;
695 struct module *owner; 709 struct module *owner;
@@ -737,12 +751,15 @@ struct snd_soc_card {
737 struct snd_soc_pcm_runtime *rtd_aux; 751 struct snd_soc_pcm_runtime *rtd_aux;
738 int num_aux_rtd; 752 int num_aux_rtd;
739 753
754 const struct snd_kcontrol_new *controls;
755 int num_controls;
756
740 /* 757 /*
741 * Card-specific routes and widgets. 758 * Card-specific routes and widgets.
742 */ 759 */
743 struct snd_soc_dapm_widget *dapm_widgets; 760 const struct snd_soc_dapm_widget *dapm_widgets;
744 int num_dapm_widgets; 761 int num_dapm_widgets;
745 struct snd_soc_dapm_route *dapm_routes; 762 const struct snd_soc_dapm_route *dapm_routes;
746 int num_dapm_routes; 763 int num_dapm_routes;
747 764
748 struct work_struct deferred_resume_work; 765 struct work_struct deferred_resume_work;
@@ -805,7 +822,7 @@ struct soc_enum {
805 unsigned char shift_r; 822 unsigned char shift_r;
806 unsigned int max; 823 unsigned int max;
807 unsigned int mask; 824 unsigned int mask;
808 const char **texts; 825 const char * const *texts;
809 const unsigned int *values; 826 const unsigned int *values;
810 void *dapm; 827 void *dapm;
811}; 828};
@@ -814,6 +831,8 @@ struct soc_enum {
814unsigned int snd_soc_read(struct snd_soc_codec *codec, unsigned int reg); 831unsigned int snd_soc_read(struct snd_soc_codec *codec, unsigned int reg);
815unsigned int snd_soc_write(struct snd_soc_codec *codec, 832unsigned int snd_soc_write(struct snd_soc_codec *codec,
816 unsigned int reg, unsigned int val); 833 unsigned int reg, unsigned int val);
834unsigned int snd_soc_bulk_write_raw(struct snd_soc_codec *codec,
835 unsigned int reg, const void *data, size_t len);
817 836
818/* device driver data */ 837/* device driver data */
819 838
@@ -871,6 +890,9 @@ static inline void snd_soc_initialize_card_lists(struct snd_soc_card *card)
871 INIT_LIST_HEAD(&card->dapm_list); 890 INIT_LIST_HEAD(&card->dapm_list);
872} 891}
873 892
893int snd_soc_util_init(void);
894void snd_soc_util_exit(void);
895
874#include <sound/soc-dai.h> 896#include <sound/soc-dai.h>
875 897
876#ifdef CONFIG_DEBUG_FS 898#ifdef CONFIG_DEBUG_FS
diff --git a/include/sound/tea575x-tuner.h b/include/sound/tea575x-tuner.h
index 5718a02d3afb..d2ea112fc20f 100644
--- a/include/sound/tea575x-tuner.h
+++ b/include/sound/tea575x-tuner.h
@@ -26,29 +26,37 @@
26#include <media/v4l2-dev.h> 26#include <media/v4l2-dev.h>
27#include <media/v4l2-ioctl.h> 27#include <media/v4l2-ioctl.h>
28 28
29#define TEA575X_FMIF 10700
30
31#define TEA575X_DATA (1 << 0)
32#define TEA575X_CLK (1 << 1)
33#define TEA575X_WREN (1 << 2)
34#define TEA575X_MOST (1 << 3)
35
29struct snd_tea575x; 36struct snd_tea575x;
30 37
31struct snd_tea575x_ops { 38struct snd_tea575x_ops {
32 void (*write)(struct snd_tea575x *tea, unsigned int val); 39 void (*set_pins)(struct snd_tea575x *tea, u8 pins);
33 unsigned int (*read)(struct snd_tea575x *tea); 40 u8 (*get_pins)(struct snd_tea575x *tea);
34 void (*mute)(struct snd_tea575x *tea, unsigned int mute); 41 void (*set_direction)(struct snd_tea575x *tea, bool output);
35}; 42};
36 43
37struct snd_tea575x { 44struct snd_tea575x {
38 struct snd_card *card;
39 struct video_device *vd; /* video device */ 45 struct video_device *vd; /* video device */
40 int dev_nr; /* requested device number + 1 */ 46 bool tea5759; /* 5759 chip is present */
41 int tea5759; /* 5759 chip is present */ 47 bool mute; /* Device is muted? */
42 int mute; /* Device is muted? */ 48 bool stereo; /* receiving stereo */
43 unsigned int freq_fixup; /* crystal onboard */ 49 bool tuned; /* tuned to a station */
44 unsigned int val; /* hw value */ 50 unsigned int val; /* hw value */
45 unsigned long freq; /* frequency */ 51 unsigned long freq; /* frequency */
46 unsigned long in_use; /* set if the device is in use */ 52 unsigned long in_use; /* set if the device is in use */
47 struct snd_tea575x_ops *ops; 53 struct snd_tea575x_ops *ops;
48 void *private_data; 54 void *private_data;
55 u8 card[32];
56 u8 bus_info[32];
49}; 57};
50 58
51void snd_tea575x_init(struct snd_tea575x *tea); 59int snd_tea575x_init(struct snd_tea575x *tea);
52void snd_tea575x_exit(struct snd_tea575x *tea); 60void snd_tea575x_exit(struct snd_tea575x *tea);
53 61
54#endif /* __SOUND_TEA575X_TUNER_H */ 62#endif /* __SOUND_TEA575X_TUNER_H */
diff --git a/include/sound/tlv320dac33-plat.h b/include/sound/tlv320dac33-plat.h
index 6c6649656798..0b94192a8cdf 100644
--- a/include/sound/tlv320dac33-plat.h
+++ b/include/sound/tlv320dac33-plat.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Platform header for Texas Instruments TLV320DAC33 codec driver 2 * Platform header for Texas Instruments TLV320DAC33 codec driver
3 * 3 *
4 * Author: Peter Ujfalusi <peter.ujfalusi@nokia.com> 4 * Author: Peter Ujfalusi <peter.ujfalusi@ti.com>
5 * 5 *
6 * Copyright: (C) 2009 Nokia Corporation 6 * Copyright: (C) 2009 Nokia Corporation
7 * 7 *
diff --git a/include/sound/tpa6130a2-plat.h b/include/sound/tpa6130a2-plat.h
index e29fde6b5cbe..89beccb57edd 100644
--- a/include/sound/tpa6130a2-plat.h
+++ b/include/sound/tpa6130a2-plat.h
@@ -3,7 +3,7 @@
3 * 3 *
4 * Copyright (C) Nokia Corporation 4 * Copyright (C) Nokia Corporation
5 * 5 *
6 * Written by Peter Ujfalusi <peter.ujfalusi@nokia.com> 6 * Author: Peter Ujfalusi <peter.ujfalusi@ti.com>
7 * 7 *
8 * This program is free software; you can redistribute it and/or 8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License 9 * modify it under the terms of the GNU General Public License
diff --git a/include/sound/wm8915.h b/include/sound/wm8915.h
new file mode 100644
index 000000000000..5817d762f6f3
--- /dev/null
+++ b/include/sound/wm8915.h
@@ -0,0 +1,55 @@
1/*
2 * linux/sound/wm8915.h -- Platform data for WM8915
3 *
4 * Copyright 2011 Wolfson Microelectronics. PLC.
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 version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __LINUX_SND_WM8903_H
12#define __LINUX_SND_WM8903_H
13
14enum wm8915_inmode {
15 WM8915_DIFFERRENTIAL_1 = 0, /* IN1xP - IN1xN */
16 WM8915_INVERTING = 1, /* IN1xN */
17 WM8915_NON_INVERTING = 2, /* IN1xP */
18 WM8915_DIFFERENTIAL_2 = 3, /* IN2xP - IN2xP */
19};
20
21/**
22 * ReTune Mobile configurations are specified with a label, sample
23 * rate and set of values to write (the enable bits will be ignored).
24 *
25 * Configurations are expected to be generated using the ReTune Mobile
26 * control panel in WISCE - see http://www.wolfsonmicro.com/wisce/
27 */
28struct wm8915_retune_mobile_config {
29 const char *name;
30 int rate;
31 u16 regs[20];
32};
33
34#define WM8915_SET_DEFAULT 0x10000
35
36struct wm8915_pdata {
37 int irq_flags; /** Set IRQ trigger flags; default active low */
38
39 int ldo_ena; /** GPIO for LDO1; -1 for none */
40
41 int micdet_def; /** Default MICDET_SRC/HP1FB_SRC/MICD_BIAS */
42
43 enum wm8915_inmode inl_mode;
44 enum wm8915_inmode inr_mode;
45
46 u32 spkmute_seq; /** Value for register 0x802 */
47
48 int gpio_base;
49 u32 gpio_default[5];
50
51 int num_retune_mobile_cfgs;
52 struct wm8915_retune_mobile_config *retune_mobile_cfgs;
53};
54
55#endif
diff --git a/include/sound/wm8962.h b/include/sound/wm8962.h
index 2b5306c503fb..1750bed7c2f6 100644
--- a/include/sound/wm8962.h
+++ b/include/sound/wm8962.h
@@ -14,6 +14,28 @@
14/* Use to set GPIO default values to zero */ 14/* Use to set GPIO default values to zero */
15#define WM8962_GPIO_SET 0x10000 15#define WM8962_GPIO_SET 0x10000
16 16
17#define WM8962_GPIO_FN_CLKOUT 0
18#define WM8962_GPIO_FN_LOGIC 1
19#define WM8962_GPIO_FN_SDOUT 2
20#define WM8962_GPIO_FN_IRQ 3
21#define WM8962_GPIO_FN_THERMAL 4
22#define WM8962_GPIO_FN_PLL2_LOCK 6
23#define WM8962_GPIO_FN_PLL3_LOCK 7
24#define WM8962_GPIO_FN_FLL_LOCK 9
25#define WM8962_GPIO_FN_DRC_ACT 10
26#define WM8962_GPIO_FN_WSEQ_DONE 11
27#define WM8962_GPIO_FN_ALC_NG_ACT 12
28#define WM8962_GPIO_FN_ALC_PEAK_LIMIT 13
29#define WM8962_GPIO_FN_ALC_SATURATION 14
30#define WM8962_GPIO_FN_ALC_LEVEL_THR 15
31#define WM8962_GPIO_FN_ALC_LEVEL_LOCK 16
32#define WM8962_GPIO_FN_FIFO_ERR 17
33#define WM8962_GPIO_FN_OPCLK 18
34#define WM8962_GPIO_FN_DMICCLK 19
35#define WM8962_GPIO_FN_DMICDAT 20
36#define WM8962_GPIO_FN_MICD 21
37#define WM8962_GPIO_FN_MICSCD 22
38
17struct wm8962_pdata { 39struct wm8962_pdata {
18 int gpio_base; 40 int gpio_base;
19 u32 gpio_init[WM8962_MAX_GPIO]; 41 u32 gpio_init[WM8962_MAX_GPIO];
diff --git a/include/video/newport.h b/include/video/newport.h
index 3d7c4b492ec6..de980a3b60c9 100644
--- a/include/video/newport.h
+++ b/include/video/newport.h
@@ -3,7 +3,7 @@
3 * newport.h: Defines and register layout for NEWPORT graphics 3 * newport.h: Defines and register layout for NEWPORT graphics
4 * hardware. 4 * hardware.
5 * 5 *
6 * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com) 6 * Copyright (C) 1996 David S. Miller (davem@davemloft.net)
7 * 7 *
8 * Ulf Carlsson - Compatibility with the IRIX structures added 8 * Ulf Carlsson - Compatibility with the IRIX structures added
9 */ 9 */