@@ -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"
@@ -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
@@ -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;