[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1367144681-14248-1-git-send-email-sebastian.hesselbarth@gmail.com>
Date: Sun, 28 Apr 2013 12:24:41 +0200
From: Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>
To: Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>
Cc: Stephen Rothwell <sfr@...b.auug.org.au>,
Grant Likely <grant.likely@...retlab.ca>,
Rob Herring <rob.herring@...xeda.com>,
Rob Landley <rob@...dley.net>,
Mike Turquette <mturquette@...aro.org>,
Stephen Warren <swarren@...dia.com>,
Thierry Reding <thierry.reding@...onic-design.de>,
Dom Cobley <popcornmix@...il.com>,
Linus Walleij <linus.walleij@...aro.org>,
Arnd Bergmann <arnd@...db.de>,
Andrew Morton <akpm@...ux-foundation.org>,
Pawel Moll <pawel.moll@....com>,
Mark Brown <broonie@...nsource.wolfsonmicro.com>,
Russell King - ARM Linux <linux@....linux.org.uk>,
Rabeeh Khoury <rabeeh@...id-run.com>,
Daniel Mack <zonque@...il.com>,
Jean-Francois Moine <moinejf@...e.fr>,
Lars-Peter Clausen <lars@...afoo.de>,
Guenter Roeck <linux@...ck-us.net>,
Michal Bachraty <michal.bachraty@...eamunlimited.com>,
Marek Belisko <marek.belisko@...eamunlimited.com>,
devicetree-discuss@...ts.ozlabs.org, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: [PATCH] clk: si5351: Allow to build without CONFIG_OF
In clk-si5351 there was some dependency to CONFIG_OF that permitted the
use of the driver on !CONFIG_OF platforms. This patch adds proper #ifdef
around of_clk_add_provider and removes the dependency on CONFIG_OF.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>
---
Note:
This patch is based upon v3.9-rc8 with clk-si5351 v8 plus two fixes by
Marek Belisko applied. It has been compile-tested on x86_64 allmodconfig.
Cc: Stephen Rothwell <sfr@...b.auug.org.au>
Cc: Grant Likely <grant.likely@...retlab.ca>
Cc: Rob Herring <rob.herring@...xeda.com>
Cc: Rob Landley <rob@...dley.net>
Cc: Mike Turquette <mturquette@...aro.org>
Cc: Stephen Warren <swarren@...dia.com>
Cc: Thierry Reding <thierry.reding@...onic-design.de>
Cc: Dom Cobley <popcornmix@...il.com>
Cc: Linus Walleij <linus.walleij@...aro.org>
Cc: Arnd Bergmann <arnd@...db.de>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Pawel Moll <pawel.moll@....com>
Cc: Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc: Russell King - ARM Linux <linux@....linux.org.uk>
Cc: Rabeeh Khoury <rabeeh@...id-run.com>
Cc: Daniel Mack <zonque@...il.com>
Cc: Jean-Francois Moine <moinejf@...e.fr>
Cc: Lars-Peter Clausen <lars@...afoo.de>
Cc: Guenter Roeck <linux@...ck-us.net>
Cc: Michal Bachraty <michal.bachraty@...eamunlimited.com>
Cc: Marek Belisko <marek.belisko@...eamunlimited.com>
Cc: devicetree-discuss@...ts.ozlabs.org
Cc: linux-doc@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
Cc: linux-arm-kernel@...ts.infradead.org
---
drivers/clk/Kconfig | 1 -
drivers/clk/clk-si5351.c | 2 ++
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
index 6412f55..5039e41 100644
--- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig
@@ -58,7 +58,6 @@ config COMMON_CLK_MAX77686
config COMMON_CLK_SI5351
tristate "Clock driver for SiLabs 5351A/B/C"
depends on I2C
- depends on OF
select REGMAP_I2C
select RATIONAL
---help---
diff --git a/drivers/clk/clk-si5351.c b/drivers/clk/clk-si5351.c
index 8323c31..91c0f01 100644
--- a/drivers/clk/clk-si5351.c
+++ b/drivers/clk/clk-si5351.c
@@ -1489,12 +1489,14 @@ static int si5351_i2c_probe(struct i2c_client *client,
}
}
+#ifdef CONFIG_OF
ret = of_clk_add_provider(client->dev.of_node, of_clk_src_onecell_get,
&drvdata->onecell);
if (ret) {
dev_err(&client->dev, "unable to add clk provider\n");
return ret;
}
+#endif
return 0;
}
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists