Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux

Pull clk fixes from Stephen Boyd:
"Here's a trio of fixes:

- The runtime PM clk patches that landed this merge window forgot to
runtime resume devices that may be off while recalculating and
setting rates of child clks of whatever clk is changing rates.

- We had a NULL pointer deref in an old clk tracepoint when
clk_set_parent() is called with a NULL parent pointer. This
shouldn't really happen, but it's best to avoid this regardless.

- The sun9i-mmc clk driver didn't provide 'reset' support, just
'assert' and 'deassert' so the MMC driver stopped probing when the
probe was changed to do a reset instead of assert/deassert pair.
This implements the reset so things work again"

* tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
clk: sunxi: sun9i-mmc: Implement reset callback for reset controls
clk: fix a panic error caused by accessing NULL pointer
clk: Manage proper runtime PM state in clk_change_rate()

+19 -2
+5
drivers/clk/clk.c
··· 1564 1564 best_parent_rate = core->parent->rate; 1565 1565 } 1566 1566 1567 + if (clk_pm_runtime_get(core)) 1568 + return; 1569 + 1567 1570 if (core->flags & CLK_SET_RATE_UNGATE) { 1568 1571 unsigned long flags; 1569 1572 ··· 1637 1634 /* handle the new child who might not be in core->children yet */ 1638 1635 if (core->new_child) 1639 1636 clk_change_rate(core->new_child); 1637 + 1638 + clk_pm_runtime_put(core); 1640 1639 } 1641 1640 1642 1641 static int clk_core_set_rate_nolock(struct clk_core *core,
+12
drivers/clk/sunxi/clk-sun9i-mmc.c
··· 16 16 17 17 #include <linux/clk.h> 18 18 #include <linux/clk-provider.h> 19 + #include <linux/delay.h> 19 20 #include <linux/init.h> 20 21 #include <linux/of.h> 21 22 #include <linux/of_device.h> ··· 84 83 return 0; 85 84 } 86 85 86 + static int sun9i_mmc_reset_reset(struct reset_controller_dev *rcdev, 87 + unsigned long id) 88 + { 89 + sun9i_mmc_reset_assert(rcdev, id); 90 + udelay(10); 91 + sun9i_mmc_reset_deassert(rcdev, id); 92 + 93 + return 0; 94 + } 95 + 87 96 static const struct reset_control_ops sun9i_mmc_reset_ops = { 88 97 .assert = sun9i_mmc_reset_assert, 89 98 .deassert = sun9i_mmc_reset_deassert, 99 + .reset = sun9i_mmc_reset_reset, 90 100 }; 91 101 92 102 static int sun9i_a80_mmc_config_clk_probe(struct platform_device *pdev)
+2 -2
include/trace/events/clk.h
··· 134 134 135 135 TP_STRUCT__entry( 136 136 __string( name, core->name ) 137 - __string( pname, parent->name ) 137 + __string( pname, parent ? parent->name : "none" ) 138 138 ), 139 139 140 140 TP_fast_assign( 141 141 __assign_str(name, core->name); 142 - __assign_str(pname, parent->name); 142 + __assign_str(pname, parent ? parent->name : "none"); 143 143 ), 144 144 145 145 TP_printk("%s %s", __get_str(name), __get_str(pname))