linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ian@slimlogic.co.uk (Ian Lartey)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v8 10/12] clk: Kconfig for Palmas clock driver
Date: Thu,  7 Mar 2013 13:17:54 +0000	[thread overview]
Message-ID: <1362662276-20792-10-git-send-email-ian@slimlogic.co.uk> (raw)
In-Reply-To: <1362662276-20792-1-git-send-email-ian@slimlogic.co.uk>

Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: J Keerthy <j-keerthy@ti.com>
Signed-off-by: Ian Lartey <ian@slimlogic.co.uk>
---
 drivers/clk/Kconfig        |    8 ++++++++
 drivers/clk/Makefile       |    1 +
 drivers/leds/leds-palmas.c |   19 ++++++-------------
 3 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
index a47e6ee..a8e0655 100644
--- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig
@@ -63,6 +63,14 @@ config CLK_TWL6040
 	  McPDM. McPDM module is using the external bit clock on the McPDM bus
 	  as functional clock.
 
+config CLK_PALMAS
+	tristate "Palmas PMIC Clock Support"
+	depends on MFD_PALMAS
+	---help---
+	  Enable clock support for the two clocks on Palmas PMIC chips:
+	  - A 32KHz audio-gated clock (primarily for audio devices)
+	  - A digitally-gated 32KHz clock
+
 endmenu
 
 source "drivers/clk/mvebu/Kconfig"
diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
index 300d477..77dc283 100644
--- a/drivers/clk/Makefile
+++ b/drivers/clk/Makefile
@@ -34,3 +34,4 @@ obj-$(CONFIG_X86)		+= x86/
 obj-$(CONFIG_COMMON_CLK_WM831X) += clk-wm831x.o
 obj-$(CONFIG_COMMON_CLK_MAX77686) += clk-max77686.o
 obj-$(CONFIG_CLK_TWL6040)	+= clk-twl6040.o
+obj-$(CONFIG_CLK_PALMAS)	+= clk-palmas.o
diff --git a/drivers/leds/leds-palmas.c b/drivers/leds/leds-palmas.c
index 4a35352..ea53bfe 100644
--- a/drivers/leds/leds-palmas.c
+++ b/drivers/leds/leds-palmas.c
@@ -341,37 +341,30 @@ static int  palmas_dt_to_pdata(struct device *dev,
 		struct device_node *node,
 		struct palmas_leds_platform_data *pdata)
 {
-	struct device_node *child_node;
 	int ret;
 	u32 prop;
 
-	child_node = of_get_child_by_name(node, "leds");
-	if (!child_node) {
-		dev_err(dev, "child node 'palmas_leds' not found\n");
-		return -EINVAL;
-	}
-
-	ret = of_property_read_u32(child_node, "ti,led1-current", &prop);
+	ret = of_property_read_u32(node, "ti,led1-current", &prop);
 	if (!ret)
 		pdata->led1_current = prop;
 
-	ret = of_property_read_u32(child_node, "ti,led2-current", &prop);
+	ret = of_property_read_u32(node, "ti,led2-current", &prop);
 	if (!ret)
 		pdata->led2_current = prop;
 
-	ret = of_property_read_u32(child_node, "ti,led3-current", &prop);
+	ret = of_property_read_u32(node, "ti,led3-current", &prop);
 	if (!ret)
 		pdata->led3_current = prop;
 
-	ret = of_property_read_u32(child_node, "ti,led4-current", &prop);
+	ret = of_property_read_u32(node, "ti,led4-current", &prop);
 	if (!ret)
 		pdata->led4_current = prop;
 
-	ret = of_property_read_u32(child_node, "ti,chrg-led-mode", &prop);
+	ret = of_property_read_u32(node, "ti,chrg-led-mode", &prop);
 	if (!ret)
 		pdata->chrg_led_mode = prop;
 
-	ret = of_property_read_u32(child_node, "ti,chrg-led-vbat-low", &prop);
+	ret = of_property_read_u32(node, "ti,chrg-led-vbat-low", &prop);
 	if (!ret)
 		pdata->chrg_led_vbat_low = prop;
 
-- 
1.7.0.4

  parent reply	other threads:[~2013-03-07 13:17 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-07 13:17 [PATCH v8 01/12] mfd: DT bindings for the palmas family MFD Ian Lartey
2013-03-07 13:17 ` [PATCH v8 02/12] mfd: palmas: is_palmas_charger needed by multiple drivers Ian Lartey
2013-03-07 13:17 ` [PATCH v8 03/12] mfd: palmas add variant and OTP detection Ian Lartey
2013-03-07 13:17 ` [PATCH v8 04/12] regulator: palmas correct dt parsing Ian Lartey
2013-03-08  9:44   ` Mark Brown
2013-03-07 13:17 ` [PATCH v8 05/12] watchdog: add Palmas Watchdog support Ian Lartey
2013-03-07 13:17 ` [PATCH v8 06/12] watchdog: Kconfig for Palmas watchdog Ian Lartey
2013-03-07 13:17 ` [PATCH v8 07/12] gpio: palmas: add in GPIO support for palmas charger Ian Lartey
2013-03-13 14:15   ` Linus Walleij
2013-03-14 11:58     ` Ian Lartey
2013-03-07 13:17 ` [PATCH v8 08/12] gpio: palmas: Enable DT support for palmas gpio Ian Lartey
2013-03-13 14:20   ` Linus Walleij
2013-03-07 13:17 ` [PATCH v8 09/12] leds: Add support for Palmas LEDs Ian Lartey
2013-03-08  1:13   ` Kim, Milo
2013-03-11 15:16     ` Ian Lartey
2013-03-07 13:17 ` Ian Lartey [this message]
2013-03-08  1:13   ` [PATCH v8 10/12] clk: Kconfig for Palmas clock driver Kim, Milo
2013-03-08 17:14     ` Ian Lartey
2013-03-07 13:17 ` [PATCH v8 11/12] leds: Kconfig for Palmas LEDs Ian Lartey
2013-03-08  1:13   ` Kim, Milo
2013-03-08 17:13     ` Ian Lartey
2013-03-13 20:31       ` Stephen Warren
2013-03-13 23:48         ` Ian Lartey
2013-03-07 13:17 ` [PATCH v8 12/12] clk: add a clock driver for palmas Ian Lartey
2013-03-21 21:23   ` Mike Turquette
2013-03-07 13:23 ` [PATCH v8 0/12] Palmas Updates Ian Lartey
2013-03-08  7:12   ` Linus Walleij
2013-03-08 17:12     ` Ian Lartey
2013-03-13 20:28 ` [PATCH v8 01/12] mfd: DT bindings for the palmas family MFD Stephen Warren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1362662276-20792-10-git-send-email-ian@slimlogic.co.uk \
    --to=ian@slimlogic.co.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).