summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/aiodev/lm75.c10
-rw-r--r--drivers/clk/rockchip/clk-pll.c3
-rw-r--r--drivers/eeprom/at24.c9
-rw-r--r--drivers/gpio/gpio-pca953x.c8
-rw-r--r--drivers/gpio/gpio-sx150x.c8
-rw-r--r--drivers/i2c/muxes/i2c-mux-pca954x.c8
-rw-r--r--drivers/input/qt1070.c9
-rw-r--r--drivers/mfd/act8846.c10
-rw-r--r--drivers/mfd/da9053.c10
-rw-r--r--drivers/mfd/da9063.c9
-rw-r--r--drivers/mfd/lp3972.c10
-rw-r--r--drivers/mfd/mc34704.c9
-rw-r--r--drivers/mfd/mc9sdz60.c10
-rw-r--r--drivers/mfd/stmpe-i2c.c10
-rw-r--r--drivers/mfd/twl4030.c10
-rw-r--r--drivers/mfd/twl6030.c10
-rw-r--r--drivers/net/designware.c10
-rw-r--r--drivers/net/phy/phy.c4
-rw-r--r--drivers/of/base.c2
-rw-r--r--drivers/pinctrl/pinctrl-at91.c4
-rw-r--r--drivers/rtc/rtc-abracon.c8
-rw-r--r--drivers/rtc/rtc-ds1307.c9
-rw-r--r--drivers/video/mtl017.c10
-rw-r--r--drivers/video/rave-sp-backlight.c1
-rw-r--r--drivers/video/ssd1307fb.c10
-rw-r--r--drivers/video/tc358767.c8
26 files changed, 42 insertions, 167 deletions
diff --git a/drivers/aiodev/lm75.c b/drivers/aiodev/lm75.c
index b4da5a0f75..af54227e40 100644
--- a/drivers/aiodev/lm75.c
+++ b/drivers/aiodev/lm75.c
@@ -19,7 +19,6 @@
*/
#include <common.h>
-#include <init.h>
#include <driver.h>
#include <xfuncs.h>
#include <i2c/i2c.h>
@@ -252,11 +251,4 @@ static struct driver_d lm75_driver = {
.probe = lm75_probe,
.id_table = lm75_ids,
};
-
-static int lm75_init(void)
-{
- i2c_driver_register(&lm75_driver);
- return 0;
-}
-
-device_initcall(lm75_init);
+device_i2c_driver(lm75_driver);
diff --git a/drivers/clk/rockchip/clk-pll.c b/drivers/clk/rockchip/clk-pll.c
index f0dc12091b..87a3969c28 100644
--- a/drivers/clk/rockchip/clk-pll.c
+++ b/drivers/clk/rockchip/clk-pll.c
@@ -164,6 +164,9 @@ static int rockchip_rk3066_pll_set_rate(struct clk *hw, unsigned long drate,
int cur_parent;
int ret;
+ if (old_rate == drate)
+ return 0;
+
pr_debug("%s: changing %s from %lu to %lu with a parent rate of %lu\n",
__func__, __clk_get_name(hw), old_rate, drate, prate);
diff --git a/drivers/eeprom/at24.c b/drivers/eeprom/at24.c
index 4fae3a12e4..e79031a2d3 100644
--- a/drivers/eeprom/at24.c
+++ b/drivers/eeprom/at24.c
@@ -11,7 +11,6 @@
*/
#include <common.h>
-#include <init.h>
#include <malloc.h>
#include <clock.h>
#include <driver.h>
@@ -529,10 +528,4 @@ static struct driver_d at24_driver = {
.probe = at24_probe,
.id_table = at24_ids,
};
-
-static int at24_init(void)
-{
- i2c_driver_register(&at24_driver);
- return 0;
-}
-device_initcall(at24_init);
+device_i2c_driver(at24_driver);
diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
index 53e8c7650d..98a7a6c97c 100644
--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -14,7 +14,6 @@
*/
#include <common.h>
-#include <init.h>
#include <malloc.h>
#include <driver.h>
#include <xfuncs.h>
@@ -508,9 +507,4 @@ static struct driver_d pca953x_driver = {
.of_compatible = DRV_OF_COMPAT(pca953x_dt_ids),
.id_table = pca953x_id,
};
-
-static int __init pca953x_init(void)
-{
- return i2c_driver_register(&pca953x_driver);
-}
-device_initcall(pca953x_init);
+device_i2c_driver(pca953x_driver);
diff --git a/drivers/gpio/gpio-sx150x.c b/drivers/gpio/gpio-sx150x.c
index 7b8cfb5042..76535187b0 100644
--- a/drivers/gpio/gpio-sx150x.c
+++ b/drivers/gpio/gpio-sx150x.c
@@ -17,7 +17,6 @@
*/
#include <common.h>
-#include <init.h>
#include <malloc.h>
#include <driver.h>
#include <xfuncs.h>
@@ -266,9 +265,4 @@ static struct driver_d sx150x_driver = {
.probe = sx150x_probe,
.of_compatible = sx150x_dt_ids,
};
-
-static int __init sx150x_init(void)
-{
- return i2c_driver_register(&sx150x_driver);
-}
-device_initcall(sx150x_init);
+device_i2c_driver(sx150x_driver);
diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c b/drivers/i2c/muxes/i2c-mux-pca954x.c
index 395254cdca..d397e803b1 100644
--- a/drivers/i2c/muxes/i2c-mux-pca954x.c
+++ b/drivers/i2c/muxes/i2c-mux-pca954x.c
@@ -44,7 +44,6 @@
#include <i2c/i2c.h>
#include <i2c/i2c-algo-bit.h>
#include <i2c/i2c-mux.h>
-#include <init.h>
#include <gpio.h>
#include <of_gpio.h>
@@ -248,12 +247,7 @@ static struct driver_d pca954x_driver = {
.probe = pca954x_probe,
.id_table = pca954x_id,
};
-
-static int __init pca954x_init(void)
-{
- return i2c_driver_register(&pca954x_driver);
-}
-device_initcall(pca954x_init);
+device_i2c_driver(pca954x_driver);
MODULE_AUTHOR("Rodolfo Giometti <giometti@linux.it>");
MODULE_DESCRIPTION("PCA954x I2C mux/switch driver");
diff --git a/drivers/input/qt1070.c b/drivers/input/qt1070.c
index d81a8fa401..59acee5c39 100644
--- a/drivers/input/qt1070.c
+++ b/drivers/input/qt1070.c
@@ -6,7 +6,6 @@
#include <common.h>
#include <errno.h>
-#include <init.h>
#include <clock.h>
#include <poller.h>
#include <kfifo.h>
@@ -284,10 +283,4 @@ static struct driver_d qt1070_driver = {
.name = "qt1070",
.probe = qt1070_probe,
};
-
-static int qt1070_init(void)
-{
- i2c_driver_register(&qt1070_driver);
- return 0;
-}
-device_initcall(qt1070_init);
+device_i2c_driver(qt1070_driver);
diff --git a/drivers/mfd/act8846.c b/drivers/mfd/act8846.c
index dfca0498b1..53ab70f5cc 100644
--- a/drivers/mfd/act8846.c
+++ b/drivers/mfd/act8846.c
@@ -18,7 +18,6 @@
*/
#include <common.h>
-#include <init.h>
#include <driver.h>
#include <xfuncs.h>
#include <errno.h>
@@ -144,11 +143,4 @@ static struct driver_d act8846_driver = {
.name = DRIVERNAME,
.probe = act8846_probe,
};
-
-static int act8846_init(void)
-{
- i2c_driver_register(&act8846_driver);
- return 0;
-}
-
-device_initcall(act8846_init);
+device_i2c_driver(act8846_driver);
diff --git a/drivers/mfd/da9053.c b/drivers/mfd/da9053.c
index c706082a8b..b156bf113f 100644
--- a/drivers/mfd/da9053.c
+++ b/drivers/mfd/da9053.c
@@ -15,7 +15,6 @@
*/
#include <common.h>
-#include <init.h>
#include <driver.h>
#include <xfuncs.h>
#include <errno.h>
@@ -310,11 +309,4 @@ static struct driver_d da9053_driver = {
.probe = da9053_probe,
.of_compatible = DRV_OF_COMPAT(da9053_dt_ids),
};
-
-static int da9053_init(void)
-{
- i2c_driver_register(&da9053_driver);
- return 0;
-}
-
-device_initcall(da9053_init);
+device_i2c_driver(da9053_driver);
diff --git a/drivers/mfd/da9063.c b/drivers/mfd/da9063.c
index 0c27bf495f..b6114a614b 100644
--- a/drivers/mfd/da9063.c
+++ b/drivers/mfd/da9063.c
@@ -16,7 +16,6 @@
#include <common.h>
#include <driver.h>
#include <restart.h>
-#include <init.h>
#include <i2c/i2c.h>
#include <malloc.h>
#include <notifier.h>
@@ -297,10 +296,4 @@ static struct driver_d da9063_driver = {
.id_table = da9063_id,
.of_compatible = DRV_OF_COMPAT(da906x_dt_ids),
};
-
-static int da9063_init(void)
-{
- return i2c_driver_register(&da9063_driver);
-}
-
-device_initcall(da9063_init);
+device_i2c_driver(da9063_driver);
diff --git a/drivers/mfd/lp3972.c b/drivers/mfd/lp3972.c
index 054713b942..42b28070ad 100644
--- a/drivers/mfd/lp3972.c
+++ b/drivers/mfd/lp3972.c
@@ -17,7 +17,6 @@
*/
#include <common.h>
-#include <init.h>
#include <driver.h>
#include <xfuncs.h>
#include <errno.h>
@@ -96,11 +95,4 @@ static struct driver_d lp_driver = {
.name = DRIVERNAME,
.probe = lp_probe,
};
-
-static int lp_init(void)
-{
- i2c_driver_register(&lp_driver);
- return 0;
-}
-
-device_initcall(lp_init);
+device_i2c_driver(lp_driver);
diff --git a/drivers/mfd/mc34704.c b/drivers/mfd/mc34704.c
index bfda169aaa..f15f37ef6e 100644
--- a/drivers/mfd/mc34704.c
+++ b/drivers/mfd/mc34704.c
@@ -17,7 +17,6 @@
*/
#include <common.h>
-#include <init.h>
#include <driver.h>
#include <xfuncs.h>
#include <errno.h>
@@ -133,10 +132,4 @@ static struct driver_d mc34704_driver = {
.probe = mc34704_probe,
.of_compatible = DRV_OF_COMPAT(mc34704_dt_ids),
};
-
-static int mc34704_init(void)
-{
- i2c_driver_register(&mc34704_driver);
- return 0;
-}
-device_initcall(mc34704_init);
+device_i2c_driver(mc34704_driver);
diff --git a/drivers/mfd/mc9sdz60.c b/drivers/mfd/mc9sdz60.c
index 9993efc5de..2cb38d9784 100644
--- a/drivers/mfd/mc9sdz60.c
+++ b/drivers/mfd/mc9sdz60.c
@@ -16,7 +16,6 @@
*/
#include <common.h>
-#include <init.h>
#include <driver.h>
#include <xfuncs.h>
#include <errno.h>
@@ -139,11 +138,4 @@ static struct driver_d mc_driver = {
.name = DRIVERNAME,
.probe = mc_probe,
};
-
-static int mc_init(void)
-{
- i2c_driver_register(&mc_driver);
- return 0;
-}
-
-device_initcall(mc_init);
+device_i2c_driver(mc_driver);
diff --git a/drivers/mfd/stmpe-i2c.c b/drivers/mfd/stmpe-i2c.c
index 51c56bbf56..084e4b43bb 100644
--- a/drivers/mfd/stmpe-i2c.c
+++ b/drivers/mfd/stmpe-i2c.c
@@ -15,7 +15,6 @@
*/
#include <common.h>
-#include <init.h>
#include <driver.h>
#include <xfuncs.h>
#include <errno.h>
@@ -173,11 +172,4 @@ static struct driver_d stmpe_driver = {
.probe = stmpe_probe,
.id_table = stmpe_i2c_id,
};
-
-static int stmpe_init(void)
-{
- i2c_driver_register(&stmpe_driver);
- return 0;
-}
-
-device_initcall(stmpe_init);
+device_i2c_driver(stmpe_driver);
diff --git a/drivers/mfd/twl4030.c b/drivers/mfd/twl4030.c
index 3b4c661a87..cf33efbd89 100644
--- a/drivers/mfd/twl4030.c
+++ b/drivers/mfd/twl4030.c
@@ -6,7 +6,6 @@
*/
#include <common.h>
-#include <init.h>
#include <driver.h>
#include <xfuncs.h>
#include <errno.h>
@@ -50,11 +49,4 @@ static struct driver_d twl_driver = {
.name = DRIVERNAME,
.probe = twl_probe,
};
-
-static int twl_init(void)
-{
- i2c_driver_register(&twl_driver);
- return 0;
-}
-
-device_initcall(twl_init);
+device_i2c_driver(twl_driver);
diff --git a/drivers/mfd/twl6030.c b/drivers/mfd/twl6030.c
index 0645d3c4db..0a244de077 100644
--- a/drivers/mfd/twl6030.c
+++ b/drivers/mfd/twl6030.c
@@ -5,7 +5,6 @@
*/
#include <common.h>
-#include <init.h>
#include <driver.h>
#include <xfuncs.h>
#include <errno.h>
@@ -67,11 +66,4 @@ static struct driver_d twl_driver = {
.name = DRIVERNAME,
.probe = twl_probe,
};
-
-static int twl_init(void)
-{
- i2c_driver_register(&twl_driver);
- return 0;
-}
-
-device_initcall(twl_init);
+device_i2c_driver(twl_driver);
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index 49ddaa20d8..58880b0e52 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -408,12 +408,22 @@ static void dwc_version(struct device_d *dev, u32 hwid)
static int dwc_probe_dt(struct device_d *dev, struct dw_eth_dev *priv)
{
+ struct device_node *child;
+
if (!IS_ENABLED(CONFIG_OFTREE))
return -ENODEV;
priv->phy_addr = -1;
priv->interface = of_get_phy_mode(dev->device_node);
+ /* Set MDIO bus device node, if present. */
+ for_each_child_of_node(dev->device_node, child) {
+ if (of_device_is_compatible(child, "snps,dwmac-mdio")) {
+ priv->miibus.dev.device_node = child;
+ break;
+ }
+ }
+
return 0;
}
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 42dcad9069..63f249fcff 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -398,6 +398,10 @@ static int phy_device_attach(struct phy_device *phy, struct eth_device *edev,
phy->adjust_link = adjust_link;
+ /* If the phy is a fixed-link, then call adjust_link directly */
+ if (!phy->bus && adjust_link)
+ adjust_link(edev);
+
return 0;
}
diff --git a/drivers/of/base.c b/drivers/of/base.c
index fc01a99ef2..0d8289d5fa 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1235,7 +1235,7 @@ int of_property_write_u64_array(struct device_node *np,
*
* @np: device node to which the property value is to be written.
* @propname: name of the property to be written.
- * value: pointer to the string to write
+ * @value: pointer to the string to write
*
* Search for a property in a device node and write a string to
* it. If the property does not exist, it will be created and appended to
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
index 84348a0530..3201eb9cb1 100644
--- a/drivers/pinctrl/pinctrl-at91.c
+++ b/drivers/pinctrl/pinctrl-at91.c
@@ -510,7 +510,7 @@ static int at91_pinctrl_probe(struct device_d *dev)
if (ret)
return ret;
- dev_info(dev, "AT91 pinctrl registered\n");
+ dev_dbg(dev, "AT91 pinctrl registered\n");
return 0;
}
@@ -690,7 +690,7 @@ static int at91_gpio_probe(struct device_d *dev)
return ret;
}
- dev_info(dev, "AT91 gpio driver registered\n");
+ dev_dbg(dev, "AT91 gpio driver registered\n");
return 0;
}
diff --git a/drivers/rtc/rtc-abracon.c b/drivers/rtc/rtc-abracon.c
index 02de2f1063..571909bf71 100644
--- a/drivers/rtc/rtc-abracon.c
+++ b/drivers/rtc/rtc-abracon.c
@@ -10,7 +10,6 @@
*/
#include <common.h>
-#include <init.h>
#include <driver.h>
#include <xfuncs.h>
#include <errno.h>
@@ -118,9 +117,4 @@ static struct driver_d abracon_driver = {
.probe = abracon_probe,
.id_table = abracon_id,
};
-
-static int __init abracon_init(void)
-{
- return i2c_driver_register(&abracon_driver);
-}
-device_initcall(abracon_init);
+device_i2c_driver(abracon_driver);
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
index 73d88ba6f2..bb597305e5 100644
--- a/drivers/rtc/rtc-ds1307.c
+++ b/drivers/rtc/rtc-ds1307.c
@@ -14,7 +14,6 @@
*/
#include <common.h>
-#include <init.h>
#include <driver.h>
#include <xfuncs.h>
#include <malloc.h>
@@ -112,6 +111,7 @@ static struct platform_device_id ds1307_id[] = {
{ "ds1308", ds_1338 }, /* Difference 1308 to 1338 irrelevant */
{ "ds1338", ds_1338 },
{ "ds1341", ds_1341 },
+ { "ds3231", ds_1337 },
{ "pt7c4338", ds_1307 },
{ }
};
@@ -489,9 +489,4 @@ static struct driver_d ds1307_driver = {
.probe = ds1307_probe,
.id_table = ds1307_id,
};
-
-static int __init ds1307_init(void)
-{
- return i2c_driver_register(&ds1307_driver);
-}
-device_initcall(ds1307_init);
+device_i2c_driver(ds1307_driver);
diff --git a/drivers/video/mtl017.c b/drivers/video/mtl017.c
index 1a1f686223..085ea110ba 100644
--- a/drivers/video/mtl017.c
+++ b/drivers/video/mtl017.c
@@ -16,7 +16,6 @@
*
*/
#include <common.h>
-#include <init.h>
#include <driver.h>
#include <xfuncs.h>
#include <errno.h>
@@ -270,11 +269,4 @@ static struct driver_d twl_driver = {
.name = "mtl017",
.probe = mtl017_probe,
};
-
-static int mtl017_init(void)
-{
- i2c_driver_register(&twl_driver);
- return 0;
-}
-
-device_initcall(mtl017_init);
+device_i2c_driver(twl_driver);
diff --git a/drivers/video/rave-sp-backlight.c b/drivers/video/rave-sp-backlight.c
index 88ec86e730..3a20def661 100644
--- a/drivers/video/rave-sp-backlight.c
+++ b/drivers/video/rave-sp-backlight.c
@@ -46,6 +46,7 @@ static int rave_sp_backlight_probe(struct device_d *dev)
bd = xzalloc(sizeof(*bd));
bd->dev.priv = dev->parent->priv;
+ bd->dev.parent = dev;
bd->brightness_default = 50;
bd->brightness_max = 100;
bd->brightness_set = rave_sp_backlight_set;
diff --git a/drivers/video/ssd1307fb.c b/drivers/video/ssd1307fb.c
index 54e02e7220..d68f0c5056 100644
--- a/drivers/video/ssd1307fb.c
+++ b/drivers/video/ssd1307fb.c
@@ -18,7 +18,6 @@
*/
#include <common.h>
-#include <init.h>
#include <fb.h>
#include <i2c/i2c.h>
#include <of_device.h>
@@ -581,11 +580,4 @@ static struct driver_d ssd1307fb_driver = {
.probe = ssd1307fb_probe,
.of_compatible = DRV_OF_COMPAT(ssd1307fb_of_match),
};
-
-static int ssd1307_init(void)
-{
- i2c_driver_register(&ssd1307fb_driver);
- return 0;
-}
-
-device_initcall(ssd1307_init);
+device_i2c_driver(ssd1307fb_driver);
diff --git a/drivers/video/tc358767.c b/drivers/video/tc358767.c
index 125e8236c1..e64dde1ddf 100644
--- a/drivers/video/tc358767.c
+++ b/drivers/video/tc358767.c
@@ -20,7 +20,6 @@
*/
#include <common.h>
-#include <init.h>
#include <driver.h>
#include <malloc.h>
#include <errno.h>
@@ -1434,9 +1433,4 @@ static struct driver_d tc_driver = {
.name = "tc358767",
.probe = tc_probe,
};
-
-static int tc_init(void)
-{
- return i2c_driver_register(&tc_driver);
-}
-device_initcall(tc_init);
+device_i2c_driver(tc_driver);