diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/usb/otg/isp1301_omap.c | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'drivers/usb/otg/isp1301_omap.c')
-rw-r--r-- | drivers/usb/otg/isp1301_omap.c | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/drivers/usb/otg/isp1301_omap.c b/drivers/usb/otg/isp1301_omap.c index 456969492410..8c282258e1bd 100644 --- a/drivers/usb/otg/isp1301_omap.c +++ b/drivers/usb/otg/isp1301_omap.c | |||
@@ -234,29 +234,9 @@ isp1301_clear_bits(struct isp1301 *isp, u8 reg, u8 bits) | |||
234 | 234 | ||
235 | /*-------------------------------------------------------------------------*/ | 235 | /*-------------------------------------------------------------------------*/ |
236 | 236 | ||
237 | static const char *state_string(enum usb_otg_state state) | ||
238 | { | ||
239 | switch (state) { | ||
240 | case OTG_STATE_A_IDLE: return "a_idle"; | ||
241 | case OTG_STATE_A_WAIT_VRISE: return "a_wait_vrise"; | ||
242 | case OTG_STATE_A_WAIT_BCON: return "a_wait_bcon"; | ||
243 | case OTG_STATE_A_HOST: return "a_host"; | ||
244 | case OTG_STATE_A_SUSPEND: return "a_suspend"; | ||
245 | case OTG_STATE_A_PERIPHERAL: return "a_peripheral"; | ||
246 | case OTG_STATE_A_WAIT_VFALL: return "a_wait_vfall"; | ||
247 | case OTG_STATE_A_VBUS_ERR: return "a_vbus_err"; | ||
248 | case OTG_STATE_B_IDLE: return "b_idle"; | ||
249 | case OTG_STATE_B_SRP_INIT: return "b_srp_init"; | ||
250 | case OTG_STATE_B_PERIPHERAL: return "b_peripheral"; | ||
251 | case OTG_STATE_B_WAIT_ACON: return "b_wait_acon"; | ||
252 | case OTG_STATE_B_HOST: return "b_host"; | ||
253 | default: return "UNDEFINED"; | ||
254 | } | ||
255 | } | ||
256 | |||
257 | static inline const char *state_name(struct isp1301 *isp) | 237 | static inline const char *state_name(struct isp1301 *isp) |
258 | { | 238 | { |
259 | return state_string(isp->otg.state); | 239 | return otg_state_string(isp->otg.state); |
260 | } | 240 | } |
261 | 241 | ||
262 | /*-------------------------------------------------------------------------*/ | 242 | /*-------------------------------------------------------------------------*/ |
@@ -501,7 +481,7 @@ static void check_state(struct isp1301 *isp, const char *tag) | |||
501 | if (isp->otg.state == state && !extra) | 481 | if (isp->otg.state == state && !extra) |
502 | return; | 482 | return; |
503 | pr_debug("otg: %s FSM %s/%02x, %s, %06x\n", tag, | 483 | pr_debug("otg: %s FSM %s/%02x, %s, %06x\n", tag, |
504 | state_string(state), fsm, state_name(isp), | 484 | otg_state_string(state), fsm, state_name(isp), |
505 | omap_readl(OTG_CTRL)); | 485 | omap_readl(OTG_CTRL)); |
506 | } | 486 | } |
507 | 487 | ||
@@ -1095,7 +1075,7 @@ static void isp_update_otg(struct isp1301 *isp, u8 stat) | |||
1095 | 1075 | ||
1096 | if (state != isp->otg.state) | 1076 | if (state != isp->otg.state) |
1097 | pr_debug(" isp, %s -> %s\n", | 1077 | pr_debug(" isp, %s -> %s\n", |
1098 | state_string(state), state_name(isp)); | 1078 | otg_state_string(state), state_name(isp)); |
1099 | 1079 | ||
1100 | #ifdef CONFIG_USB_OTG | 1080 | #ifdef CONFIG_USB_OTG |
1101 | /* update the OTG controller state to match the isp1301; may | 1081 | /* update the OTG controller state to match the isp1301; may |
@@ -1247,7 +1227,7 @@ static int __exit isp1301_remove(struct i2c_client *i2c) | |||
1247 | isp->timer.data = 0; | 1227 | isp->timer.data = 0; |
1248 | set_bit(WORK_STOP, &isp->todo); | 1228 | set_bit(WORK_STOP, &isp->todo); |
1249 | del_timer_sync(&isp->timer); | 1229 | del_timer_sync(&isp->timer); |
1250 | flush_scheduled_work(); | 1230 | flush_work_sync(&isp->work); |
1251 | 1231 | ||
1252 | put_device(&i2c->dev); | 1232 | put_device(&i2c->dev); |
1253 | the_transceiver = NULL; | 1233 | the_transceiver = NULL; |
@@ -1510,7 +1490,7 @@ isp1301_start_hnp(struct otg_transceiver *dev) | |||
1510 | 1490 | ||
1511 | /*-------------------------------------------------------------------------*/ | 1491 | /*-------------------------------------------------------------------------*/ |
1512 | 1492 | ||
1513 | static int __init | 1493 | static int __devinit |
1514 | isp1301_probe(struct i2c_client *i2c, const struct i2c_device_id *id) | 1494 | isp1301_probe(struct i2c_client *i2c, const struct i2c_device_id *id) |
1515 | { | 1495 | { |
1516 | int status; | 1496 | int status; |
@@ -1531,7 +1511,7 @@ isp1301_probe(struct i2c_client *i2c, const struct i2c_device_id *id) | |||
1531 | i2c_set_clientdata(i2c, isp); | 1511 | i2c_set_clientdata(i2c, isp); |
1532 | isp->client = i2c; | 1512 | isp->client = i2c; |
1533 | 1513 | ||
1534 | /* verify the chip (shouldn't be necesary) */ | 1514 | /* verify the chip (shouldn't be necessary) */ |
1535 | status = isp1301_get_u16(isp, ISP1301_VENDOR_ID); | 1515 | status = isp1301_get_u16(isp, ISP1301_VENDOR_ID); |
1536 | if (status != I2C_VENDOR_ID_PHILIPS) { | 1516 | if (status != I2C_VENDOR_ID_PHILIPS) { |
1537 | dev_dbg(&i2c->dev, "not philips id: %d\n", status); | 1517 | dev_dbg(&i2c->dev, "not philips id: %d\n", status); |