mfd: syscon: enable specified clocks on syscon_base_lookup_by_phandle
Since commit b36b7b72 ("mfd: syscon: clock peripheral if specified in
device tree"), we now clock syscons during access if the device tree nodes
indicate a clocks property. We haven't been doing this for
syscon_base_lookup_by_phandle though, because we did this as part of the
regmap access functions, but that function returns a direct pointer to
the MMIO region.

The best way forward is probably dropping the syscon_base API altogether
and change users to the regmap API instead, but for now, make the behavior
consistent by enabling it permanently.

This makes use safe from breakage that results from upstream device trees moving
a clock from the consumer to the syscon provider (like in [1])

I've reviewed the current driver code users of syscon_base_lookup_by_phandle
and all upstream device trees that match against the drivers lack
a clocks property, so this shouldn't alter behavior (for now).

[1]: c9322d4fe ("net: designware: eqos: stm32: drop no longer needed syscfg-clk")

Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 96b0fd0 commit f4d3f554bc9214d9d1ac1e3bf16529996896cfd3
@Ahmad Fatoum Ahmad Fatoum authored on 15 Apr 2020
Sascha Hauer committed on 15 Apr 2020
Showing 1 changed file
View
drivers/mfd/syscon.c