lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu,  7 Mar 2013 13:17:54 +0000
From:	Ian Lartey <ian@...mlogic.co.uk>
To:	linux-kernel@...r.kernel.org
Cc:	linux-doc@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-leds@...r.kernel.org, linux-watchdog@...r.kernel.org,
	swarren@...dotorg.org, grant.likely@...retlab.ca,
	broonie@...nsource.wolfsonmicro.com, rob.herring@...xeda.com,
	rob@...dley.net, mturquette@...aro.org, linus.walleij@...aro.org,
	cooloney@...il.com, rpurdie@...ys.net, sameo@...ux.intel.com,
	wim@...ana.be, lgirdwood@...il.com, gg@...mlogic.co.uk,
	j-keerthy@...com, ldewangan@...dia.com, t-kristo@...com,
	Ian Lartey <ian@...mlogic.co.uk>
Subject: [PATCH v8 10/12] clk: Kconfig for Palmas clock driver

Signed-off-by: Graeme Gregory <gg@...mlogic.co.uk>
Signed-off-by: J Keerthy <j-keerthy@...com>
Signed-off-by: Ian Lartey <ian@...mlogic.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

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ