aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-07-02 16:43:38 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-02 16:43:38 -0400
commit3883cbb6c1bda013a3ce2dbdab7dc97c52e4a232 (patch)
tree5b69f83b049d24ac81123ac954ca8c9128e48443 /drivers/i2c
parentd2033f2c1d1de2239ded15e478ddb4028f192a15 (diff)
parent1eb92b24e243085d242cf5ffd64829bba70972e1 (diff)
Merge tag 'soc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC specific changes from Arnd Bergmann: "These changes are all to SoC-specific code, a total of 33 branches on 17 platforms were pulled into this. Like last time, Renesas sh-mobile is now the platform with the most changes, followed by OMAP and EXYNOS. Two new platforms, TI Keystone and Rockchips RK3xxx are added in this branch, both containing almost no platform specific code at all, since they are using generic subsystem interfaces for clocks, pinctrl, interrupts etc. The device drivers are getting merged through the respective subsystem maintainer trees. One more SoC (u300) is now multiplatform capable and several others (shmobile, exynos, msm, integrator, kirkwood, clps711x) are moving towards that goal with this series but need more work. Also noteworthy is the work on PCI here, which is traditionally part of the SoC specific code. With the changes done by Thomas Petazzoni, we can now more easily have PCI host controller drivers as loadable modules and keep them separate from the platform code in drivers/pci/host. This has already led to the discovery that three platforms (exynos, spear and imx) are actually using an identical PCIe host controller and will be able to share a driver once support for spear and imx is added." * tag 'soc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (480 commits) ARM: integrator: let pciv3 use mem/premem from device tree ARM: integrator: set local side PCI addresses right ARM: dts: Add pcie controller node for exynos5440-ssdk5440 ARM: dts: Add pcie controller node for Samsung EXYNOS5440 SoC ARM: EXYNOS: Enable PCIe support for Exynos5440 pci: Add PCIe driver for Samsung Exynos ARM: OMAP5: voltagedomain data: remove temporary OMAP4 voltage data ARM: keystone: Move CPU bringup code to dedicated asm file ARM: multiplatform: always pick one CPU type ARM: imx: select syscon for IMX6SL ARM: keystone: select ARM_ERRATA_798181 only for SMP ARM: imx: Synertronixx scb9328 needs to select SOC_IMX1 ARM: OMAP2+: AM43x: resolve SMP related build error dmaengine: edma: enable build for AM33XX ARM: edma: Add EDMA crossbar event mux support ARM: edma: Add DT and runtime PM support to the private EDMA API dmaengine: edma: Add TI EDMA device tree binding arm: add basic support for Rockchip RK3066a boards arm: add debug uarts for rockchip rk29xx and rk3xxx series arm: Add basic clocks for Rockchip rk3066a SoCs ...
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-stu300.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-stu300.c b/drivers/i2c/busses/i2c-stu300.c
index 0a6f941133f6..d1a6b204af00 100644
--- a/drivers/i2c/busses/i2c-stu300.c
+++ b/drivers/i2c/busses/i2c-stu300.c
@@ -17,6 +17,7 @@
17#include <linux/clk.h> 17#include <linux/clk.h>
18#include <linux/io.h> 18#include <linux/io.h>
19#include <linux/slab.h> 19#include <linux/slab.h>
20#include <linux/of_i2c.h>
20 21
21/* the name of this kernel module */ 22/* the name of this kernel module */
22#define NAME "stu300" 23#define NAME "stu300"
@@ -867,7 +868,6 @@ stu300_probe(struct platform_device *pdev)
867 struct resource *res; 868 struct resource *res;
868 int bus_nr; 869 int bus_nr;
869 int ret = 0; 870 int ret = 0;
870 char clk_name[] = "I2C0";
871 871
872 dev = devm_kzalloc(&pdev->dev, sizeof(struct stu300_dev), GFP_KERNEL); 872 dev = devm_kzalloc(&pdev->dev, sizeof(struct stu300_dev), GFP_KERNEL);
873 if (!dev) { 873 if (!dev) {
@@ -876,8 +876,7 @@ stu300_probe(struct platform_device *pdev)
876 } 876 }
877 877
878 bus_nr = pdev->id; 878 bus_nr = pdev->id;
879 clk_name[3] += (char)bus_nr; 879 dev->clk = devm_clk_get(&pdev->dev, NULL);
880 dev->clk = devm_clk_get(&pdev->dev, clk_name);
881 if (IS_ERR(dev->clk)) { 880 if (IS_ERR(dev->clk)) {
882 dev_err(&pdev->dev, "could not retrieve i2c bus clock\n"); 881 dev_err(&pdev->dev, "could not retrieve i2c bus clock\n");
883 return PTR_ERR(dev->clk); 882 return PTR_ERR(dev->clk);
@@ -923,6 +922,7 @@ stu300_probe(struct platform_device *pdev)
923 adap->nr = bus_nr; 922 adap->nr = bus_nr;
924 adap->algo = &stu300_algo; 923 adap->algo = &stu300_algo;
925 adap->dev.parent = &pdev->dev; 924 adap->dev.parent = &pdev->dev;
925 adap->dev.of_node = pdev->dev.of_node;
926 i2c_set_adapdata(adap, dev); 926 i2c_set_adapdata(adap, dev);
927 927
928 /* i2c device drivers may be active on return from add_adapter() */ 928 /* i2c device drivers may be active on return from add_adapter() */
@@ -934,6 +934,10 @@ stu300_probe(struct platform_device *pdev)
934 } 934 }
935 935
936 platform_set_drvdata(pdev, dev); 936 platform_set_drvdata(pdev, dev);
937 dev_info(&pdev->dev, "ST DDC I2C @ %p, irq %d\n",
938 dev->virtbase, dev->irq);
939 of_i2c_register_devices(adap);
940
937 return 0; 941 return 0;
938} 942}
939 943
@@ -978,11 +982,17 @@ stu300_remove(struct platform_device *pdev)
978 return 0; 982 return 0;
979} 983}
980 984
985static const struct of_device_id stu300_dt_match[] = {
986 { .compatible = "st,ddci2c" },
987 {},
988};
989
981static struct platform_driver stu300_i2c_driver = { 990static struct platform_driver stu300_i2c_driver = {
982 .driver = { 991 .driver = {
983 .name = NAME, 992 .name = NAME,
984 .owner = THIS_MODULE, 993 .owner = THIS_MODULE,
985 .pm = STU300_I2C_PM, 994 .pm = STU300_I2C_PM,
995 .of_match_table = stu300_dt_match,
986 }, 996 },
987 .remove = __exit_p(stu300_remove), 997 .remove = __exit_p(stu300_remove),
988 998