diff options
Diffstat (limited to 'drivers/i2c/busses/i2c-designware-core.c')
-rw-r--r-- | drivers/i2c/busses/i2c-designware-core.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-designware-core.c b/drivers/i2c/busses/i2c-designware-core.c index 1e48bec80edf..7b8ebbefb581 100644 --- a/drivers/i2c/busses/i2c-designware-core.c +++ b/drivers/i2c/busses/i2c-designware-core.c | |||
@@ -25,6 +25,7 @@ | |||
25 | * ---------------------------------------------------------------------------- | 25 | * ---------------------------------------------------------------------------- |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | #include <linux/export.h> | ||
28 | #include <linux/clk.h> | 29 | #include <linux/clk.h> |
29 | #include <linux/errno.h> | 30 | #include <linux/errno.h> |
30 | #include <linux/err.h> | 31 | #include <linux/err.h> |
@@ -316,6 +317,7 @@ int i2c_dw_init(struct dw_i2c_dev *dev) | |||
316 | dw_writel(dev, dev->master_cfg , DW_IC_CON); | 317 | dw_writel(dev, dev->master_cfg , DW_IC_CON); |
317 | return 0; | 318 | return 0; |
318 | } | 319 | } |
320 | EXPORT_SYMBOL_GPL(i2c_dw_init); | ||
319 | 321 | ||
320 | /* | 322 | /* |
321 | * Waiting for bus not busy | 323 | * Waiting for bus not busy |
@@ -568,12 +570,14 @@ done: | |||
568 | 570 | ||
569 | return ret; | 571 | return ret; |
570 | } | 572 | } |
573 | EXPORT_SYMBOL_GPL(i2c_dw_xfer); | ||
571 | 574 | ||
572 | u32 i2c_dw_func(struct i2c_adapter *adap) | 575 | u32 i2c_dw_func(struct i2c_adapter *adap) |
573 | { | 576 | { |
574 | struct dw_i2c_dev *dev = i2c_get_adapdata(adap); | 577 | struct dw_i2c_dev *dev = i2c_get_adapdata(adap); |
575 | return dev->functionality; | 578 | return dev->functionality; |
576 | } | 579 | } |
580 | EXPORT_SYMBOL_GPL(i2c_dw_func); | ||
577 | 581 | ||
578 | static u32 i2c_dw_read_clear_intrbits(struct dw_i2c_dev *dev) | 582 | static u32 i2c_dw_read_clear_intrbits(struct dw_i2c_dev *dev) |
579 | { | 583 | { |
@@ -678,17 +682,20 @@ tx_aborted: | |||
678 | 682 | ||
679 | return IRQ_HANDLED; | 683 | return IRQ_HANDLED; |
680 | } | 684 | } |
685 | EXPORT_SYMBOL_GPL(i2c_dw_isr); | ||
681 | 686 | ||
682 | void i2c_dw_enable(struct dw_i2c_dev *dev) | 687 | void i2c_dw_enable(struct dw_i2c_dev *dev) |
683 | { | 688 | { |
684 | /* Enable the adapter */ | 689 | /* Enable the adapter */ |
685 | dw_writel(dev, 1, DW_IC_ENABLE); | 690 | dw_writel(dev, 1, DW_IC_ENABLE); |
686 | } | 691 | } |
692 | EXPORT_SYMBOL_GPL(i2c_dw_enable); | ||
687 | 693 | ||
688 | u32 i2c_dw_is_enabled(struct dw_i2c_dev *dev) | 694 | u32 i2c_dw_is_enabled(struct dw_i2c_dev *dev) |
689 | { | 695 | { |
690 | return dw_readl(dev, DW_IC_ENABLE); | 696 | return dw_readl(dev, DW_IC_ENABLE); |
691 | } | 697 | } |
698 | EXPORT_SYMBOL_GPL(i2c_dw_is_enabled); | ||
692 | 699 | ||
693 | void i2c_dw_disable(struct dw_i2c_dev *dev) | 700 | void i2c_dw_disable(struct dw_i2c_dev *dev) |
694 | { | 701 | { |
@@ -699,18 +706,22 @@ void i2c_dw_disable(struct dw_i2c_dev *dev) | |||
699 | dw_writel(dev, 0, DW_IC_INTR_MASK); | 706 | dw_writel(dev, 0, DW_IC_INTR_MASK); |
700 | dw_readl(dev, DW_IC_CLR_INTR); | 707 | dw_readl(dev, DW_IC_CLR_INTR); |
701 | } | 708 | } |
709 | EXPORT_SYMBOL_GPL(i2c_dw_disable); | ||
702 | 710 | ||
703 | void i2c_dw_clear_int(struct dw_i2c_dev *dev) | 711 | void i2c_dw_clear_int(struct dw_i2c_dev *dev) |
704 | { | 712 | { |
705 | dw_readl(dev, DW_IC_CLR_INTR); | 713 | dw_readl(dev, DW_IC_CLR_INTR); |
706 | } | 714 | } |
715 | EXPORT_SYMBOL_GPL(i2c_dw_clear_int); | ||
707 | 716 | ||
708 | void i2c_dw_disable_int(struct dw_i2c_dev *dev) | 717 | void i2c_dw_disable_int(struct dw_i2c_dev *dev) |
709 | { | 718 | { |
710 | dw_writel(dev, 0, DW_IC_INTR_MASK); | 719 | dw_writel(dev, 0, DW_IC_INTR_MASK); |
711 | } | 720 | } |
721 | EXPORT_SYMBOL_GPL(i2c_dw_disable_int); | ||
712 | 722 | ||
713 | u32 i2c_dw_read_comp_param(struct dw_i2c_dev *dev) | 723 | u32 i2c_dw_read_comp_param(struct dw_i2c_dev *dev) |
714 | { | 724 | { |
715 | return dw_readl(dev, DW_IC_COMP_PARAM_1); | 725 | return dw_readl(dev, DW_IC_COMP_PARAM_1); |
716 | } | 726 | } |
727 | EXPORT_SYMBOL_GPL(i2c_dw_read_comp_param); | ||