diff options
author | Sonic Zhang <sonic.zhang@analog.com> | 2012-06-13 04:22:46 -0400 |
---|---|---|
committer | Wolfram Sang <w.sang@pengutronix.de> | 2012-07-13 02:37:30 -0400 |
commit | f88aafe513df2b2daad0883d70daee7a51e89c82 (patch) | |
tree | 77129faf61b24a605efa9a01a1906a3981092a8b /drivers/i2c | |
parent | c9d87edbcc8c8a8517e5d5e870fca376864e8198 (diff) |
i2c: i2c-bfin-twi: Move TWI peripheral pin request array to platform data.
Depend on commit cf93feb3a0dee97c7896016a352a3226139fbcf4
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-bfin-twi.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/i2c/busses/i2c-bfin-twi.c b/drivers/i2c/busses/i2c-bfin-twi.c index 39b8d77bf35c..f4fbbd211ddd 100644 --- a/drivers/i2c/busses/i2c-bfin-twi.c +++ b/drivers/i2c/busses/i2c-bfin-twi.c | |||
@@ -78,11 +78,6 @@ DEFINE_TWI_REG(XMT_DATA16, 0x84) | |||
78 | DEFINE_TWI_REG(RCV_DATA8, 0x88) | 78 | DEFINE_TWI_REG(RCV_DATA8, 0x88) |
79 | DEFINE_TWI_REG(RCV_DATA16, 0x8C) | 79 | DEFINE_TWI_REG(RCV_DATA16, 0x8C) |
80 | 80 | ||
81 | static const u16 pin_req[2][3] = { | ||
82 | {P_TWI0_SCL, P_TWI0_SDA, 0}, | ||
83 | {P_TWI1_SCL, P_TWI1_SDA, 0}, | ||
84 | }; | ||
85 | |||
86 | static void bfin_twi_handle_interrupt(struct bfin_twi_iface *iface, | 81 | static void bfin_twi_handle_interrupt(struct bfin_twi_iface *iface, |
87 | unsigned short twi_int_status) | 82 | unsigned short twi_int_status) |
88 | { | 83 | { |
@@ -712,7 +707,8 @@ static int i2c_bfin_twi_probe(struct platform_device *pdev) | |||
712 | p_adap->timeout = 5 * HZ; | 707 | p_adap->timeout = 5 * HZ; |
713 | p_adap->retries = 3; | 708 | p_adap->retries = 3; |
714 | 709 | ||
715 | rc = peripheral_request_list(pin_req[pdev->id], "i2c-bfin-twi"); | 710 | rc = peripheral_request_list((unsigned short *)pdev->dev.platform_data, |
711 | "i2c-bfin-twi"); | ||
716 | if (rc) { | 712 | if (rc) { |
717 | dev_err(&pdev->dev, "Can't setup pin mux!\n"); | 713 | dev_err(&pdev->dev, "Can't setup pin mux!\n"); |
718 | goto out_error_pin_mux; | 714 | goto out_error_pin_mux; |
@@ -759,7 +755,7 @@ out_error_add_adapter: | |||
759 | free_irq(iface->irq, iface); | 755 | free_irq(iface->irq, iface); |
760 | out_error_req_irq: | 756 | out_error_req_irq: |
761 | out_error_no_irq: | 757 | out_error_no_irq: |
762 | peripheral_free_list(pin_req[pdev->id]); | 758 | peripheral_free_list((unsigned short *)pdev->dev.platform_data); |
763 | out_error_pin_mux: | 759 | out_error_pin_mux: |
764 | iounmap(iface->regs_base); | 760 | iounmap(iface->regs_base); |
765 | out_error_ioremap: | 761 | out_error_ioremap: |
@@ -777,7 +773,7 @@ static int i2c_bfin_twi_remove(struct platform_device *pdev) | |||
777 | 773 | ||
778 | i2c_del_adapter(&(iface->adap)); | 774 | i2c_del_adapter(&(iface->adap)); |
779 | free_irq(iface->irq, iface); | 775 | free_irq(iface->irq, iface); |
780 | peripheral_free_list(pin_req[pdev->id]); | 776 | peripheral_free_list((unsigned short *)pdev->dev.platform_data); |
781 | iounmap(iface->regs_base); | 777 | iounmap(iface->regs_base); |
782 | kfree(iface); | 778 | kfree(iface); |
783 | 779 | ||