aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/drm/drm_fourcc.h6
-rw-r--r--include/linux/atmel-ssc.h1
-rw-r--r--include/linux/i2c-pnx.h1
-rw-r--r--include/linux/kobject.h2
-rw-r--r--include/linux/mISDNhw.h2
-rw-r--r--include/linux/mfd/core.h4
-rw-r--r--include/linux/mfd/tps65217.h12
-rw-r--r--include/linux/mfd/tps6586x.h1
-rw-r--r--include/linux/mlx4/device.h13
-rw-r--r--include/linux/nfs_fs.h5
-rw-r--r--include/linux/nfs_xdr.h2
-rw-r--r--include/linux/perf_event.h4
-rw-r--r--include/linux/sched.h1
-rw-r--r--include/linux/sunrpc/xprt.h3
-rw-r--r--include/linux/usb/nop-usb-xceiv.h24
-rw-r--r--include/linux/usb/omap_usb.h46
-rw-r--r--include/linux/usb/otg.h236
-rw-r--r--include/linux/usb/phy.h233
-rw-r--r--include/linux/usb/phy_companion.h34
-rw-r--r--include/linux/usb/tegra_usb_phy.h80
-rw-r--r--include/net/bluetooth/smp.h2
-rw-r--r--include/net/xfrm.h3
-rw-r--r--include/target/target_core_backend.h4
-rw-r--r--include/target/target_core_base.h1
24 files changed, 464 insertions, 256 deletions
diff --git a/include/drm/drm_fourcc.h b/include/drm/drm_fourcc.h
index bdf0152cbbe9..f4621184a9b4 100644
--- a/include/drm/drm_fourcc.h
+++ b/include/drm/drm_fourcc.h
@@ -107,8 +107,7 @@
107#define DRM_FORMAT_NV16 fourcc_code('N', 'V', '1', '6') /* 2x1 subsampled Cr:Cb plane */ 107#define DRM_FORMAT_NV16 fourcc_code('N', 'V', '1', '6') /* 2x1 subsampled Cr:Cb plane */
108#define DRM_FORMAT_NV61 fourcc_code('N', 'V', '6', '1') /* 2x1 subsampled Cb:Cr plane */ 108#define DRM_FORMAT_NV61 fourcc_code('N', 'V', '6', '1') /* 2x1 subsampled Cb:Cr plane */
109 109
110/* 2 non contiguous plane YCbCr */ 110/* special NV12 tiled format */
111#define DRM_FORMAT_NV12M fourcc_code('N', 'M', '1', '2') /* 2x2 subsampled Cr:Cb plane */
112#define DRM_FORMAT_NV12MT fourcc_code('T', 'M', '1', '2') /* 2x2 subsampled Cr:Cb plane 64x32 macroblocks */ 111#define DRM_FORMAT_NV12MT fourcc_code('T', 'M', '1', '2') /* 2x2 subsampled Cr:Cb plane 64x32 macroblocks */
113 112
114/* 113/*
@@ -131,7 +130,4 @@
131#define DRM_FORMAT_YUV444 fourcc_code('Y', 'U', '2', '4') /* non-subsampled Cb (1) and Cr (2) planes */ 130#define DRM_FORMAT_YUV444 fourcc_code('Y', 'U', '2', '4') /* non-subsampled Cb (1) and Cr (2) planes */
132#define DRM_FORMAT_YVU444 fourcc_code('Y', 'V', '2', '4') /* non-subsampled Cr (1) and Cb (2) planes */ 131#define DRM_FORMAT_YVU444 fourcc_code('Y', 'V', '2', '4') /* non-subsampled Cr (1) and Cb (2) planes */
133 132
134/* 3 non contiguous plane YCbCr */
135#define DRM_FORMAT_YUV420M fourcc_code('Y', 'M', '1', '2') /* 2x2 subsampled Cb (1) and Cr (2) planes */
136
137#endif /* DRM_FOURCC_H */ 133#endif /* DRM_FOURCC_H */
diff --git a/include/linux/atmel-ssc.h b/include/linux/atmel-ssc.h
index 06023393fba9..4eb31752e2b7 100644
--- a/include/linux/atmel-ssc.h
+++ b/include/linux/atmel-ssc.h
@@ -3,6 +3,7 @@
3 3
4#include <linux/platform_device.h> 4#include <linux/platform_device.h>
5#include <linux/list.h> 5#include <linux/list.h>
6#include <linux/io.h>
6 7
7struct ssc_device { 8struct ssc_device {
8 struct list_head list; 9 struct list_head list;
diff --git a/include/linux/i2c-pnx.h b/include/linux/i2c-pnx.h
index 1bc74afe7a35..49ed17fdf055 100644
--- a/include/linux/i2c-pnx.h
+++ b/include/linux/i2c-pnx.h
@@ -22,6 +22,7 @@ struct i2c_pnx_mif {
22 struct timer_list timer; /* Timeout */ 22 struct timer_list timer; /* Timeout */
23 u8 * buf; /* Data buffer */ 23 u8 * buf; /* Data buffer */
24 int len; /* Length of data buffer */ 24 int len; /* Length of data buffer */
25 int order; /* RX Bytes to order via TX */
25}; 26};
26 27
27struct i2c_pnx_algo_data { 28struct i2c_pnx_algo_data {
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index fc615a97e2d3..1e57449395b1 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -224,7 +224,7 @@ static inline int kobject_uevent_env(struct kobject *kobj,
224 224
225static inline __printf(2, 3) 225static inline __printf(2, 3)
226int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...) 226int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...)
227{ return 0; } 227{ return -ENOMEM; }
228 228
229static inline int kobject_action_type(const char *buf, size_t count, 229static inline int kobject_action_type(const char *buf, size_t count,
230 enum kobject_action *type) 230 enum kobject_action *type)
diff --git a/include/linux/mISDNhw.h b/include/linux/mISDNhw.h
index d0752eca9b44..9d96d5d4dfed 100644
--- a/include/linux/mISDNhw.h
+++ b/include/linux/mISDNhw.h
@@ -183,7 +183,7 @@ extern int mISDN_initbchannel(struct bchannel *, unsigned short,
183 unsigned short); 183 unsigned short);
184extern int mISDN_freedchannel(struct dchannel *); 184extern int mISDN_freedchannel(struct dchannel *);
185extern void mISDN_clear_bchannel(struct bchannel *); 185extern void mISDN_clear_bchannel(struct bchannel *);
186extern int mISDN_freebchannel(struct bchannel *); 186extern void mISDN_freebchannel(struct bchannel *);
187extern int mISDN_ctrl_bchannel(struct bchannel *, struct mISDN_ctrl_req *); 187extern int mISDN_ctrl_bchannel(struct bchannel *, struct mISDN_ctrl_req *);
188extern void queue_ch_frame(struct mISDNchannel *, u_int, 188extern void queue_ch_frame(struct mISDNchannel *, u_int,
189 int, struct sk_buff *); 189 int, struct sk_buff *);
diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h
index 3a8435a8058f..cebe97ee98b8 100644
--- a/include/linux/mfd/core.h
+++ b/include/linux/mfd/core.h
@@ -16,6 +16,8 @@
16 16
17#include <linux/platform_device.h> 17#include <linux/platform_device.h>
18 18
19struct irq_domain;
20
19/* 21/*
20 * This struct describes the MFD part ("cell"). 22 * This struct describes the MFD part ("cell").
21 * After registration the copy of this structure will become the platform data 23 * After registration the copy of this structure will become the platform data
@@ -98,7 +100,7 @@ static inline const struct mfd_cell *mfd_get_cell(struct platform_device *pdev)
98extern int mfd_add_devices(struct device *parent, int id, 100extern int mfd_add_devices(struct device *parent, int id,
99 struct mfd_cell *cells, int n_devs, 101 struct mfd_cell *cells, int n_devs,
100 struct resource *mem_base, 102 struct resource *mem_base,
101 int irq_base); 103 int irq_base, struct irq_domain *irq_domain);
102 104
103extern void mfd_remove_devices(struct device *parent); 105extern void mfd_remove_devices(struct device *parent);
104 106
diff --git a/include/linux/mfd/tps65217.h b/include/linux/mfd/tps65217.h
index 12c06870829a..7cd83d826ed8 100644
--- a/include/linux/mfd/tps65217.h
+++ b/include/linux/mfd/tps65217.h
@@ -22,6 +22,9 @@
22#include <linux/regulator/driver.h> 22#include <linux/regulator/driver.h>
23#include <linux/regulator/machine.h> 23#include <linux/regulator/machine.h>
24 24
25/* TPS chip id list */
26#define TPS65217 0xF0
27
25/* I2C ID for TPS65217 part */ 28/* I2C ID for TPS65217 part */
26#define TPS65217_I2C_ID 0x24 29#define TPS65217_I2C_ID 0x24
27 30
@@ -248,13 +251,11 @@ struct tps_info {
248struct tps65217 { 251struct tps65217 {
249 struct device *dev; 252 struct device *dev;
250 struct tps65217_board *pdata; 253 struct tps65217_board *pdata;
254 unsigned int id;
251 struct regulator_desc desc[TPS65217_NUM_REGULATOR]; 255 struct regulator_desc desc[TPS65217_NUM_REGULATOR];
252 struct regulator_dev *rdev[TPS65217_NUM_REGULATOR]; 256 struct regulator_dev *rdev[TPS65217_NUM_REGULATOR];
253 struct tps_info *info[TPS65217_NUM_REGULATOR]; 257 struct tps_info *info[TPS65217_NUM_REGULATOR];
254 struct regmap *regmap; 258 struct regmap *regmap;
255
256 /* Client devices */
257 struct platform_device *regulator_pdev[TPS65217_NUM_REGULATOR];
258}; 259};
259 260
260static inline struct tps65217 *dev_to_tps65217(struct device *dev) 261static inline struct tps65217 *dev_to_tps65217(struct device *dev)
@@ -262,6 +263,11 @@ static inline struct tps65217 *dev_to_tps65217(struct device *dev)
262 return dev_get_drvdata(dev); 263 return dev_get_drvdata(dev);
263} 264}
264 265
266static inline int tps65217_chip_id(struct tps65217 *tps65217)
267{
268 return tps65217->id;
269}
270
265int tps65217_reg_read(struct tps65217 *tps, unsigned int reg, 271int tps65217_reg_read(struct tps65217 *tps, unsigned int reg,
266 unsigned int *val); 272 unsigned int *val);
267int tps65217_reg_write(struct tps65217 *tps, unsigned int reg, 273int tps65217_reg_write(struct tps65217 *tps, unsigned int reg,
diff --git a/include/linux/mfd/tps6586x.h b/include/linux/mfd/tps6586x.h
index f350fd0ba1df..94514710a03f 100644
--- a/include/linux/mfd/tps6586x.h
+++ b/include/linux/mfd/tps6586x.h
@@ -14,6 +14,7 @@
14#define TPS6586X_SLEW_RATE_MASK 0x07 14#define TPS6586X_SLEW_RATE_MASK 0x07
15 15
16enum { 16enum {
17 TPS6586X_ID_SYS,
17 TPS6586X_ID_SM_0, 18 TPS6586X_ID_SM_0,
18 TPS6586X_ID_SM_1, 19 TPS6586X_ID_SM_1,
19 TPS6586X_ID_SM_2, 20 TPS6586X_ID_SM_2,
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index bd6c9fcdf2dd..6e1b0f973a03 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -796,6 +796,19 @@ enum mlx4_net_trans_rule_id {
796 MLX4_NET_TRANS_RULE_NUM, /* should be last */ 796 MLX4_NET_TRANS_RULE_NUM, /* should be last */
797}; 797};
798 798
799extern const u16 __sw_id_hw[];
800
801static inline int map_hw_to_sw_id(u16 header_id)
802{
803
804 int i;
805 for (i = 0; i < MLX4_NET_TRANS_RULE_NUM; i++) {
806 if (header_id == __sw_id_hw[i])
807 return i;
808 }
809 return -EINVAL;
810}
811
799enum mlx4_net_trans_promisc_mode { 812enum mlx4_net_trans_promisc_mode {
800 MLX4_FS_PROMISC_NONE = 0, 813 MLX4_FS_PROMISC_NONE = 0,
801 MLX4_FS_PROMISC_UPLINK, 814 MLX4_FS_PROMISC_UPLINK,
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 1f8fc7f9bcd8..4b03f56e280e 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -265,11 +265,6 @@ static inline const struct nfs_rpc_ops *NFS_PROTO(const struct inode *inode)
265 return NFS_SERVER(inode)->nfs_client->rpc_ops; 265 return NFS_SERVER(inode)->nfs_client->rpc_ops;
266} 266}
267 267
268static inline __be32 *NFS_COOKIEVERF(const struct inode *inode)
269{
270 return NFS_I(inode)->cookieverf;
271}
272
273static inline unsigned NFS_MINATTRTIMEO(const struct inode *inode) 268static inline unsigned NFS_MINATTRTIMEO(const struct inode *inode)
274{ 269{
275 struct nfs_server *nfss = NFS_SERVER(inode); 270 struct nfs_server *nfss = NFS_SERVER(inode);
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index ac7c8ae254f2..be9cf3c7e79e 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -652,7 +652,7 @@ struct nfs_getaclargs {
652}; 652};
653 653
654/* getxattr ACL interface flags */ 654/* getxattr ACL interface flags */
655#define NFS4_ACL_LEN_REQUEST 0x0001 /* zero length getxattr buffer */ 655#define NFS4_ACL_TRUNC 0x0001 /* ACL was truncated */
656struct nfs_getaclres { 656struct nfs_getaclres {
657 size_t acl_len; 657 size_t acl_len;
658 size_t acl_data_offset; 658 size_t acl_data_offset;
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 7602ccb3f40e..33ed9d605f91 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -926,7 +926,7 @@ struct perf_event {
926 struct hw_perf_event hw; 926 struct hw_perf_event hw;
927 927
928 struct perf_event_context *ctx; 928 struct perf_event_context *ctx;
929 struct file *filp; 929 atomic_long_t refcount;
930 930
931 /* 931 /*
932 * These accumulate total time (in nanoseconds) that children 932 * These accumulate total time (in nanoseconds) that children
@@ -1296,6 +1296,7 @@ extern int perf_swevent_get_recursion_context(void);
1296extern void perf_swevent_put_recursion_context(int rctx); 1296extern void perf_swevent_put_recursion_context(int rctx);
1297extern void perf_event_enable(struct perf_event *event); 1297extern void perf_event_enable(struct perf_event *event);
1298extern void perf_event_disable(struct perf_event *event); 1298extern void perf_event_disable(struct perf_event *event);
1299extern int __perf_event_disable(void *info);
1299extern void perf_event_task_tick(void); 1300extern void perf_event_task_tick(void);
1300#else 1301#else
1301static inline void 1302static inline void
@@ -1334,6 +1335,7 @@ static inline int perf_swevent_get_recursion_context(void) { return -1; }
1334static inline void perf_swevent_put_recursion_context(int rctx) { } 1335static inline void perf_swevent_put_recursion_context(int rctx) { }
1335static inline void perf_event_enable(struct perf_event *event) { } 1336static inline void perf_event_enable(struct perf_event *event) { }
1336static inline void perf_event_disable(struct perf_event *event) { } 1337static inline void perf_event_disable(struct perf_event *event) { }
1338static inline int __perf_event_disable(void *info) { return -1; }
1337static inline void perf_event_task_tick(void) { } 1339static inline void perf_event_task_tick(void) { }
1338#endif 1340#endif
1339 1341
diff --git a/include/linux/sched.h b/include/linux/sched.h
index b8c86648a2f9..23bddac4bad8 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -954,7 +954,6 @@ struct sched_domain {
954 unsigned int smt_gain; 954 unsigned int smt_gain;
955 int flags; /* See SD_* */ 955 int flags; /* See SD_* */
956 int level; 956 int level;
957 int idle_buddy; /* cpu assigned to select_idle_sibling() */
958 957
959 /* Runtime fields. */ 958 /* Runtime fields. */
960 unsigned long last_balance; /* init to jiffies. units in jiffies */ 959 unsigned long last_balance; /* init to jiffies. units in jiffies */
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h
index cff40aa7db62..bf8c49ff7530 100644
--- a/include/linux/sunrpc/xprt.h
+++ b/include/linux/sunrpc/xprt.h
@@ -114,6 +114,7 @@ struct rpc_xprt_ops {
114 void (*set_buffer_size)(struct rpc_xprt *xprt, size_t sndsize, size_t rcvsize); 114 void (*set_buffer_size)(struct rpc_xprt *xprt, size_t sndsize, size_t rcvsize);
115 int (*reserve_xprt)(struct rpc_xprt *xprt, struct rpc_task *task); 115 int (*reserve_xprt)(struct rpc_xprt *xprt, struct rpc_task *task);
116 void (*release_xprt)(struct rpc_xprt *xprt, struct rpc_task *task); 116 void (*release_xprt)(struct rpc_xprt *xprt, struct rpc_task *task);
117 void (*alloc_slot)(struct rpc_xprt *xprt, struct rpc_task *task);
117 void (*rpcbind)(struct rpc_task *task); 118 void (*rpcbind)(struct rpc_task *task);
118 void (*set_port)(struct rpc_xprt *xprt, unsigned short port); 119 void (*set_port)(struct rpc_xprt *xprt, unsigned short port);
119 void (*connect)(struct rpc_task *task); 120 void (*connect)(struct rpc_task *task);
@@ -281,6 +282,8 @@ void xprt_connect(struct rpc_task *task);
281void xprt_reserve(struct rpc_task *task); 282void xprt_reserve(struct rpc_task *task);
282int xprt_reserve_xprt(struct rpc_xprt *xprt, struct rpc_task *task); 283int xprt_reserve_xprt(struct rpc_xprt *xprt, struct rpc_task *task);
283int xprt_reserve_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task); 284int xprt_reserve_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task);
285void xprt_alloc_slot(struct rpc_xprt *xprt, struct rpc_task *task);
286void xprt_lock_and_alloc_slot(struct rpc_xprt *xprt, struct rpc_task *task);
284int xprt_prepare_transmit(struct rpc_task *task); 287int xprt_prepare_transmit(struct rpc_task *task);
285void xprt_transmit(struct rpc_task *task); 288void xprt_transmit(struct rpc_task *task);
286void xprt_end_transmit(struct rpc_task *task); 289void xprt_end_transmit(struct rpc_task *task);
diff --git a/include/linux/usb/nop-usb-xceiv.h b/include/linux/usb/nop-usb-xceiv.h
new file mode 100644
index 000000000000..28884c717411
--- /dev/null
+++ b/include/linux/usb/nop-usb-xceiv.h
@@ -0,0 +1,24 @@
1#ifndef __LINUX_USB_NOP_XCEIV_H
2#define __LINUX_USB_NOP_XCEIV_H
3
4#include <linux/usb/otg.h>
5
6struct nop_usb_xceiv_platform_data {
7 enum usb_phy_type type;
8};
9
10#if defined(CONFIG_NOP_USB_XCEIV) || (defined(CONFIG_NOP_USB_XCEIV_MODULE) && defined(MODULE))
11/* sometimes transceivers are accessed only through e.g. ULPI */
12extern void usb_nop_xceiv_register(void);
13extern void usb_nop_xceiv_unregister(void);
14#else
15static inline void usb_nop_xceiv_register(void)
16{
17}
18
19static inline void usb_nop_xceiv_unregister(void)
20{
21}
22#endif
23
24#endif /* __LINUX_USB_NOP_XCEIV_H */
diff --git a/include/linux/usb/omap_usb.h b/include/linux/usb/omap_usb.h
new file mode 100644
index 000000000000..0ea17f8ae820
--- /dev/null
+++ b/include/linux/usb/omap_usb.h
@@ -0,0 +1,46 @@
1/*
2 * omap_usb.h -- omap usb2 phy header file
3 *
4 * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * Author: Kishon Vijay Abraham I <kishon@ti.com>
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 */
18
19#ifndef __DRIVERS_OMAP_USB2_H
20#define __DRIVERS_OMAP_USB2_H
21
22#include <linux/usb/otg.h>
23
24struct omap_usb {
25 struct usb_phy phy;
26 struct phy_companion *comparator;
27 struct device *dev;
28 u32 __iomem *control_dev;
29 struct clk *wkupclk;
30 u8 is_suspended:1;
31};
32
33#define PHY_PD 0x1
34
35#define phy_to_omapusb(x) container_of((x), struct omap_usb, phy)
36
37#if defined(CONFIG_OMAP_USB2) || defined(CONFIG_OMAP_USB2_MODULE)
38extern int omap_usb2_set_comparator(struct phy_companion *comparator);
39#else
40static inline int omap_usb2_set_comparator(struct phy_companion *comparator)
41{
42 return -ENODEV;
43}
44#endif
45
46#endif /* __DRIVERS_OMAP_USB_H */
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h
index 45824be0a2f9..e8a5fe87c6bd 100644
--- a/include/linux/usb/otg.h
+++ b/include/linux/usb/otg.h
@@ -9,56 +9,7 @@
9#ifndef __LINUX_USB_OTG_H 9#ifndef __LINUX_USB_OTG_H
10#define __LINUX_USB_OTG_H 10#define __LINUX_USB_OTG_H
11 11
12#include <linux/notifier.h> 12#include <linux/usb/phy.h>
13
14/* OTG defines lots of enumeration states before device reset */
15enum usb_otg_state {
16 OTG_STATE_UNDEFINED = 0,
17
18 /* single-role peripheral, and dual-role default-b */
19 OTG_STATE_B_IDLE,
20 OTG_STATE_B_SRP_INIT,
21 OTG_STATE_B_PERIPHERAL,
22
23 /* extra dual-role default-b states */
24 OTG_STATE_B_WAIT_ACON,
25 OTG_STATE_B_HOST,
26
27 /* dual-role default-a */
28 OTG_STATE_A_IDLE,
29 OTG_STATE_A_WAIT_VRISE,
30 OTG_STATE_A_WAIT_BCON,
31 OTG_STATE_A_HOST,
32 OTG_STATE_A_SUSPEND,
33 OTG_STATE_A_PERIPHERAL,
34 OTG_STATE_A_WAIT_VFALL,
35 OTG_STATE_A_VBUS_ERR,
36};
37
38enum usb_phy_events {
39 USB_EVENT_NONE, /* no events or cable disconnected */
40 USB_EVENT_VBUS, /* vbus valid event */
41 USB_EVENT_ID, /* id was grounded */
42 USB_EVENT_CHARGER, /* usb dedicated charger */
43 USB_EVENT_ENUMERATED, /* gadget driver enumerated */
44};
45
46/* associate a type with PHY */
47enum usb_phy_type {
48 USB_PHY_TYPE_UNDEFINED,
49 USB_PHY_TYPE_USB2,
50 USB_PHY_TYPE_USB3,
51};
52
53struct usb_phy;
54
55/* for transceivers connected thru an ULPI interface, the user must
56 * provide access ops
57 */
58struct usb_phy_io_ops {
59 int (*read)(struct usb_phy *x, u32 reg);
60 int (*write)(struct usb_phy *x, u32 val, u32 reg);
61};
62 13
63struct usb_otg { 14struct usb_otg {
64 u8 default_a; 15 u8 default_a;
@@ -85,134 +36,9 @@ struct usb_otg {
85 36
86}; 37};
87 38
88/*
89 * the otg driver needs to interact with both device side and host side
90 * usb controllers. it decides which controller is active at a given
91 * moment, using the transceiver, ID signal, HNP and sometimes static
92 * configuration information (including "board isn't wired for otg").
93 */
94struct usb_phy {
95 struct device *dev;
96 const char *label;
97 unsigned int flags;
98
99 enum usb_phy_type type;
100 enum usb_otg_state state;
101 enum usb_phy_events last_event;
102
103 struct usb_otg *otg;
104
105 struct device *io_dev;
106 struct usb_phy_io_ops *io_ops;
107 void __iomem *io_priv;
108
109 /* for notification of usb_phy_events */
110 struct atomic_notifier_head notifier;
111
112 /* to pass extra port status to the root hub */
113 u16 port_status;
114 u16 port_change;
115
116 /* to support controllers that have multiple transceivers */
117 struct list_head head;
118
119 /* initialize/shutdown the OTG controller */
120 int (*init)(struct usb_phy *x);
121 void (*shutdown)(struct usb_phy *x);
122
123 /* effective for B devices, ignored for A-peripheral */
124 int (*set_power)(struct usb_phy *x,
125 unsigned mA);
126
127 /* for non-OTG B devices: set transceiver into suspend mode */
128 int (*set_suspend)(struct usb_phy *x,
129 int suspend);
130
131 /* notify phy connect status change */
132 int (*notify_connect)(struct usb_phy *x, int port);
133 int (*notify_disconnect)(struct usb_phy *x, int port);
134};
135
136
137/* for board-specific init logic */
138extern int usb_add_phy(struct usb_phy *, enum usb_phy_type type);
139extern void usb_remove_phy(struct usb_phy *);
140
141#if defined(CONFIG_NOP_USB_XCEIV) || (defined(CONFIG_NOP_USB_XCEIV_MODULE) && defined(MODULE))
142/* sometimes transceivers are accessed only through e.g. ULPI */
143extern void usb_nop_xceiv_register(void);
144extern void usb_nop_xceiv_unregister(void);
145#else
146static inline void usb_nop_xceiv_register(void)
147{
148}
149
150static inline void usb_nop_xceiv_unregister(void)
151{
152}
153#endif
154
155/* helpers for direct access thru low-level io interface */
156static inline int usb_phy_io_read(struct usb_phy *x, u32 reg)
157{
158 if (x->io_ops && x->io_ops->read)
159 return x->io_ops->read(x, reg);
160
161 return -EINVAL;
162}
163
164static inline int usb_phy_io_write(struct usb_phy *x, u32 val, u32 reg)
165{
166 if (x->io_ops && x->io_ops->write)
167 return x->io_ops->write(x, val, reg);
168
169 return -EINVAL;
170}
171
172static inline int
173usb_phy_init(struct usb_phy *x)
174{
175 if (x->init)
176 return x->init(x);
177
178 return 0;
179}
180
181static inline void
182usb_phy_shutdown(struct usb_phy *x)
183{
184 if (x->shutdown)
185 x->shutdown(x);
186}
187
188/* for usb host and peripheral controller drivers */
189#ifdef CONFIG_USB_OTG_UTILS 39#ifdef CONFIG_USB_OTG_UTILS
190extern struct usb_phy *usb_get_phy(enum usb_phy_type type);
191extern struct usb_phy *devm_usb_get_phy(struct device *dev,
192 enum usb_phy_type type);
193extern void usb_put_phy(struct usb_phy *);
194extern void devm_usb_put_phy(struct device *dev, struct usb_phy *x);
195extern const char *otg_state_string(enum usb_otg_state state); 40extern const char *otg_state_string(enum usb_otg_state state);
196#else 41#else
197static inline struct usb_phy *usb_get_phy(enum usb_phy_type type)
198{
199 return NULL;
200}
201
202static inline struct usb_phy *devm_usb_get_phy(struct device *dev,
203 enum usb_phy_type type)
204{
205 return NULL;
206}
207
208static inline void usb_put_phy(struct usb_phy *x)
209{
210}
211
212static inline void devm_usb_put_phy(struct device *dev, struct usb_phy *x)
213{
214}
215
216static inline const char *otg_state_string(enum usb_otg_state state) 42static inline const char *otg_state_string(enum usb_otg_state state)
217{ 43{
218 return NULL; 44 return NULL;
@@ -262,42 +88,6 @@ otg_set_peripheral(struct usb_otg *otg, struct usb_gadget *periph)
262} 88}
263 89
264static inline int 90static inline int
265usb_phy_set_power(struct usb_phy *x, unsigned mA)
266{
267 if (x && x->set_power)
268 return x->set_power(x, mA);
269 return 0;
270}
271
272/* Context: can sleep */
273static inline int
274usb_phy_set_suspend(struct usb_phy *x, int suspend)
275{
276 if (x->set_suspend != NULL)
277 return x->set_suspend(x, suspend);
278 else
279 return 0;
280}
281
282static inline int
283usb_phy_notify_connect(struct usb_phy *x, int port)
284{
285 if (x->notify_connect)
286 return x->notify_connect(x, port);
287 else
288 return 0;
289}
290
291static inline int
292usb_phy_notify_disconnect(struct usb_phy *x, int port)
293{
294 if (x->notify_disconnect)
295 return x->notify_disconnect(x, port);
296 else
297 return 0;
298}
299
300static inline int
301otg_start_srp(struct usb_otg *otg) 91otg_start_srp(struct usb_otg *otg)
302{ 92{
303 if (otg && otg->start_srp) 93 if (otg && otg->start_srp)
@@ -306,31 +96,7 @@ otg_start_srp(struct usb_otg *otg)
306 return -ENOTSUPP; 96 return -ENOTSUPP;
307} 97}
308 98
309/* notifiers */
310static inline int
311usb_register_notifier(struct usb_phy *x, struct notifier_block *nb)
312{
313 return atomic_notifier_chain_register(&x->notifier, nb);
314}
315
316static inline void
317usb_unregister_notifier(struct usb_phy *x, struct notifier_block *nb)
318{
319 atomic_notifier_chain_unregister(&x->notifier, nb);
320}
321
322/* for OTG controller drivers (and maybe other stuff) */ 99/* for OTG controller drivers (and maybe other stuff) */
323extern int usb_bus_start_enum(struct usb_bus *bus, unsigned port_num); 100extern int usb_bus_start_enum(struct usb_bus *bus, unsigned port_num);
324 101
325static inline const char *usb_phy_type_string(enum usb_phy_type type)
326{
327 switch (type) {
328 case USB_PHY_TYPE_USB2:
329 return "USB2 PHY";
330 case USB_PHY_TYPE_USB3:
331 return "USB3 PHY";
332 default:
333 return "UNKNOWN PHY TYPE";
334 }
335}
336#endif /* __LINUX_USB_OTG_H */ 102#endif /* __LINUX_USB_OTG_H */
diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h
new file mode 100644
index 000000000000..06b5bae35b29
--- /dev/null
+++ b/include/linux/usb/phy.h
@@ -0,0 +1,233 @@
1/* USB OTG (On The Go) defines */
2/*
3 *
4 * These APIs may be used between USB controllers. USB device drivers
5 * (for either host or peripheral roles) don't use these calls; they
6 * continue to use just usb_device and usb_gadget.
7 */
8
9#ifndef __LINUX_USB_PHY_H
10#define __LINUX_USB_PHY_H
11
12#include <linux/notifier.h>
13
14enum usb_phy_events {
15 USB_EVENT_NONE, /* no events or cable disconnected */
16 USB_EVENT_VBUS, /* vbus valid event */
17 USB_EVENT_ID, /* id was grounded */
18 USB_EVENT_CHARGER, /* usb dedicated charger */
19 USB_EVENT_ENUMERATED, /* gadget driver enumerated */
20};
21
22/* associate a type with PHY */
23enum usb_phy_type {
24 USB_PHY_TYPE_UNDEFINED,
25 USB_PHY_TYPE_USB2,
26 USB_PHY_TYPE_USB3,
27};
28
29/* OTG defines lots of enumeration states before device reset */
30enum usb_otg_state {
31 OTG_STATE_UNDEFINED = 0,
32
33 /* single-role peripheral, and dual-role default-b */
34 OTG_STATE_B_IDLE,
35 OTG_STATE_B_SRP_INIT,
36 OTG_STATE_B_PERIPHERAL,
37
38 /* extra dual-role default-b states */
39 OTG_STATE_B_WAIT_ACON,
40 OTG_STATE_B_HOST,
41
42 /* dual-role default-a */
43 OTG_STATE_A_IDLE,
44 OTG_STATE_A_WAIT_VRISE,
45 OTG_STATE_A_WAIT_BCON,
46 OTG_STATE_A_HOST,
47 OTG_STATE_A_SUSPEND,
48 OTG_STATE_A_PERIPHERAL,
49 OTG_STATE_A_WAIT_VFALL,
50 OTG_STATE_A_VBUS_ERR,
51};
52
53struct usb_phy;
54struct usb_otg;
55
56/* for transceivers connected thru an ULPI interface, the user must
57 * provide access ops
58 */
59struct usb_phy_io_ops {
60 int (*read)(struct usb_phy *x, u32 reg);
61 int (*write)(struct usb_phy *x, u32 val, u32 reg);
62};
63
64struct usb_phy {
65 struct device *dev;
66 const char *label;
67 unsigned int flags;
68
69 enum usb_phy_type type;
70 enum usb_otg_state state;
71 enum usb_phy_events last_event;
72
73 struct usb_otg *otg;
74
75 struct device *io_dev;
76 struct usb_phy_io_ops *io_ops;
77 void __iomem *io_priv;
78
79 /* for notification of usb_phy_events */
80 struct atomic_notifier_head notifier;
81
82 /* to pass extra port status to the root hub */
83 u16 port_status;
84 u16 port_change;
85
86 /* to support controllers that have multiple transceivers */
87 struct list_head head;
88
89 /* initialize/shutdown the OTG controller */
90 int (*init)(struct usb_phy *x);
91 void (*shutdown)(struct usb_phy *x);
92
93 /* effective for B devices, ignored for A-peripheral */
94 int (*set_power)(struct usb_phy *x,
95 unsigned mA);
96
97 /* for non-OTG B devices: set transceiver into suspend mode */
98 int (*set_suspend)(struct usb_phy *x,
99 int suspend);
100
101 /* notify phy connect status change */
102 int (*notify_connect)(struct usb_phy *x, int port);
103 int (*notify_disconnect)(struct usb_phy *x, int port);
104};
105
106
107/* for board-specific init logic */
108extern int usb_add_phy(struct usb_phy *, enum usb_phy_type type);
109extern void usb_remove_phy(struct usb_phy *);
110
111/* helpers for direct access thru low-level io interface */
112static inline int usb_phy_io_read(struct usb_phy *x, u32 reg)
113{
114 if (x->io_ops && x->io_ops->read)
115 return x->io_ops->read(x, reg);
116
117 return -EINVAL;
118}
119
120static inline int usb_phy_io_write(struct usb_phy *x, u32 val, u32 reg)
121{
122 if (x->io_ops && x->io_ops->write)
123 return x->io_ops->write(x, val, reg);
124
125 return -EINVAL;
126}
127
128static inline int
129usb_phy_init(struct usb_phy *x)
130{
131 if (x->init)
132 return x->init(x);
133
134 return 0;
135}
136
137static inline void
138usb_phy_shutdown(struct usb_phy *x)
139{
140 if (x->shutdown)
141 x->shutdown(x);
142}
143
144/* for usb host and peripheral controller drivers */
145#ifdef CONFIG_USB_OTG_UTILS
146extern struct usb_phy *usb_get_phy(enum usb_phy_type type);
147extern struct usb_phy *devm_usb_get_phy(struct device *dev,
148 enum usb_phy_type type);
149extern void usb_put_phy(struct usb_phy *);
150extern void devm_usb_put_phy(struct device *dev, struct usb_phy *x);
151#else
152static inline struct usb_phy *usb_get_phy(enum usb_phy_type type)
153{
154 return NULL;
155}
156
157static inline struct usb_phy *devm_usb_get_phy(struct device *dev,
158 enum usb_phy_type type)
159{
160 return NULL;
161}
162
163static inline void usb_put_phy(struct usb_phy *x)
164{
165}
166
167static inline void devm_usb_put_phy(struct device *dev, struct usb_phy *x)
168{
169}
170
171#endif
172
173static inline int
174usb_phy_set_power(struct usb_phy *x, unsigned mA)
175{
176 if (x && x->set_power)
177 return x->set_power(x, mA);
178 return 0;
179}
180
181/* Context: can sleep */
182static inline int
183usb_phy_set_suspend(struct usb_phy *x, int suspend)
184{
185 if (x->set_suspend != NULL)
186 return x->set_suspend(x, suspend);
187 else
188 return 0;
189}
190
191static inline int
192usb_phy_notify_connect(struct usb_phy *x, int port)
193{
194 if (x->notify_connect)
195 return x->notify_connect(x, port);
196 else
197 return 0;
198}
199
200static inline int
201usb_phy_notify_disconnect(struct usb_phy *x, int port)
202{
203 if (x->notify_disconnect)
204 return x->notify_disconnect(x, port);
205 else
206 return 0;
207}
208
209/* notifiers */
210static inline int
211usb_register_notifier(struct usb_phy *x, struct notifier_block *nb)
212{
213 return atomic_notifier_chain_register(&x->notifier, nb);
214}
215
216static inline void
217usb_unregister_notifier(struct usb_phy *x, struct notifier_block *nb)
218{
219 atomic_notifier_chain_unregister(&x->notifier, nb);
220}
221
222static inline const char *usb_phy_type_string(enum usb_phy_type type)
223{
224 switch (type) {
225 case USB_PHY_TYPE_USB2:
226 return "USB2 PHY";
227 case USB_PHY_TYPE_USB3:
228 return "USB3 PHY";
229 default:
230 return "UNKNOWN PHY TYPE";
231 }
232}
233#endif /* __LINUX_USB_PHY_H */
diff --git a/include/linux/usb/phy_companion.h b/include/linux/usb/phy_companion.h
new file mode 100644
index 000000000000..edd2ec23d282
--- /dev/null
+++ b/include/linux/usb/phy_companion.h
@@ -0,0 +1,34 @@
1/*
2 * phy-companion.h -- phy companion to indicate the comparator part of PHY
3 *
4 * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * Author: Kishon Vijay Abraham I <kishon@ti.com>
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 */
18
19#ifndef __DRIVERS_PHY_COMPANION_H
20#define __DRIVERS_PHY_COMPANION_H
21
22#include <linux/usb/otg.h>
23
24/* phy_companion to take care of VBUS, ID and srp capabilities */
25struct phy_companion {
26
27 /* effective for A-peripheral, ignored for B devices */
28 int (*set_vbus)(struct phy_companion *x, bool enabled);
29
30 /* for B devices only: start session with A-Host */
31 int (*start_srp)(struct phy_companion *x);
32};
33
34#endif /* __DRIVERS_PHY_COMPANION_H */
diff --git a/include/linux/usb/tegra_usb_phy.h b/include/linux/usb/tegra_usb_phy.h
new file mode 100644
index 000000000000..176b1ca06ae4
--- /dev/null
+++ b/include/linux/usb/tegra_usb_phy.h
@@ -0,0 +1,80 @@
1/*
2 * Copyright (C) 2010 Google, Inc.
3 *
4 * This software is licensed under the terms of the GNU General Public
5 * License version 2, as published by the Free Software Foundation, and
6 * may be copied, distributed, and modified under those terms.
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#ifndef __TEGRA_USB_PHY_H
16#define __TEGRA_USB_PHY_H
17
18#include <linux/clk.h>
19#include <linux/usb/otg.h>
20
21struct tegra_utmip_config {
22 u8 hssync_start_delay;
23 u8 elastic_limit;
24 u8 idle_wait_delay;
25 u8 term_range_adj;
26 u8 xcvr_setup;
27 u8 xcvr_lsfslew;
28 u8 xcvr_lsrslew;
29};
30
31struct tegra_ulpi_config {
32 int reset_gpio;
33 const char *clk;
34};
35
36enum tegra_usb_phy_port_speed {
37 TEGRA_USB_PHY_PORT_SPEED_FULL = 0,
38 TEGRA_USB_PHY_PORT_SPEED_LOW,
39 TEGRA_USB_PHY_PORT_SPEED_HIGH,
40};
41
42enum tegra_usb_phy_mode {
43 TEGRA_USB_PHY_MODE_DEVICE,
44 TEGRA_USB_PHY_MODE_HOST,
45};
46
47struct tegra_xtal_freq;
48
49struct tegra_usb_phy {
50 int instance;
51 const struct tegra_xtal_freq *freq;
52 void __iomem *regs;
53 void __iomem *pad_regs;
54 struct clk *clk;
55 struct clk *pll_u;
56 struct clk *pad_clk;
57 enum tegra_usb_phy_mode mode;
58 void *config;
59 struct usb_phy *ulpi;
60 struct usb_phy u_phy;
61 struct device *dev;
62};
63
64struct tegra_usb_phy *tegra_usb_phy_open(struct device *dev, int instance,
65 void __iomem *regs, void *config, enum tegra_usb_phy_mode phy_mode);
66
67void tegra_usb_phy_clk_disable(struct tegra_usb_phy *phy);
68
69void tegra_usb_phy_clk_enable(struct tegra_usb_phy *phy);
70
71void tegra_usb_phy_preresume(struct tegra_usb_phy *phy);
72
73void tegra_usb_phy_postresume(struct tegra_usb_phy *phy);
74
75void tegra_ehci_phy_restore_start(struct tegra_usb_phy *phy,
76 enum tegra_usb_phy_port_speed port_speed);
77
78void tegra_ehci_phy_restore_end(struct tegra_usb_phy *phy);
79
80#endif /* __TEGRA_USB_PHY_H */
diff --git a/include/net/bluetooth/smp.h b/include/net/bluetooth/smp.h
index ca356a734920..8b27927b2a55 100644
--- a/include/net/bluetooth/smp.h
+++ b/include/net/bluetooth/smp.h
@@ -136,7 +136,7 @@ struct smp_chan {
136}; 136};
137 137
138/* SMP Commands */ 138/* SMP Commands */
139int smp_conn_security(struct l2cap_conn *conn, __u8 sec_level); 139int smp_conn_security(struct hci_conn *hcon, __u8 sec_level);
140int smp_sig_channel(struct l2cap_conn *conn, struct sk_buff *skb); 140int smp_sig_channel(struct l2cap_conn *conn, struct sk_buff *skb);
141int smp_distribute_keys(struct l2cap_conn *conn, __u8 force); 141int smp_distribute_keys(struct l2cap_conn *conn, __u8 force);
142int smp_user_confirm_reply(struct hci_conn *conn, u16 mgmt_op, __le32 passkey); 142int smp_user_confirm_reply(struct hci_conn *conn, u16 mgmt_op, __le32 passkey);
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 976a81abe1a2..639dd1316d37 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -273,6 +273,9 @@ struct xfrm_replay {
273 int (*check)(struct xfrm_state *x, 273 int (*check)(struct xfrm_state *x,
274 struct sk_buff *skb, 274 struct sk_buff *skb,
275 __be32 net_seq); 275 __be32 net_seq);
276 int (*recheck)(struct xfrm_state *x,
277 struct sk_buff *skb,
278 __be32 net_seq);
276 void (*notify)(struct xfrm_state *x, int event); 279 void (*notify)(struct xfrm_state *x, int event);
277 int (*overflow)(struct xfrm_state *x, struct sk_buff *skb); 280 int (*overflow)(struct xfrm_state *x, struct sk_buff *skb);
278}; 281};
diff --git a/include/target/target_core_backend.h b/include/target/target_core_backend.h
index f1405d335a96..941c84bf1065 100644
--- a/include/target/target_core_backend.h
+++ b/include/target/target_core_backend.h
@@ -23,7 +23,9 @@ struct se_subsystem_api {
23 struct se_device *(*create_virtdevice)(struct se_hba *, 23 struct se_device *(*create_virtdevice)(struct se_hba *,
24 struct se_subsystem_dev *, void *); 24 struct se_subsystem_dev *, void *);
25 void (*free_device)(void *); 25 void (*free_device)(void *);
26 int (*transport_complete)(struct se_cmd *cmd, struct scatterlist *); 26 void (*transport_complete)(struct se_cmd *cmd,
27 struct scatterlist *,
28 unsigned char *);
27 29
28 int (*parse_cdb)(struct se_cmd *cmd); 30 int (*parse_cdb)(struct se_cmd *cmd);
29 ssize_t (*check_configfs_dev_params)(struct se_hba *, 31 ssize_t (*check_configfs_dev_params)(struct se_hba *,
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index 015cea01ae39..5be89373ceac 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -121,6 +121,7 @@
121 121
122#define SE_INQUIRY_BUF 512 122#define SE_INQUIRY_BUF 512
123#define SE_MODE_PAGE_BUF 512 123#define SE_MODE_PAGE_BUF 512
124#define SE_SENSE_BUF 96
124 125
125/* struct se_hba->hba_flags */ 126/* struct se_hba->hba_flags */
126enum hba_flags_table { 127enum hba_flags_table {