Commit Graph
4 Commits
Author SHA1 Message Date
Stephen Boyd f6c90df8e7 clk: sprd: Don't reference clk_init_data after registration
A future patch is going to change semantics of clk_register() so that
clk_hw::init is guaranteed to be NULL after a clk is registered. Avoid
referencing this member here so that we don't run into NULL pointer
exceptions.

Cc: Chunyan Zhang <[email protected]>
Cc: Baolin Wang <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Acked-by: Baolin Wang <[email protected]>
Acked-by: Chunyan Zhang <[email protected]>
2019-08-16 10:20:07 -07:00
Chunyan Zhang 78f5296951 clk: sprd: Check error only for devm_regmap_init_mmio()
The function devm_regmap_init_mmio() wouldn't return NULL pointer for
now, so only need to ensure the return value is not an error code.

Signed-off-by: Chunyan Zhang <[email protected]>
Reviewed-by: Baolin Wang <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
2019-06-26 11:15:08 -07:00
Chunyan Zhang 69b39d2503 clk: sprd: Switch from of_iomap() to devm_ioremap_resource()
devm_ioremap_resources() automatically requests resources and devm_ wrappers
do better error handling and unmapping of the I/O region when needed,
that would make drivers more clean and simple.

Signed-off-by: Chunyan Zhang <[email protected]>
Reviewed-by: Baolin Wang <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
2019-06-26 11:12:50 -07:00
Chunyan Zhang d41f59fd92 clk: sprd: Add common infrastructure
Added Spreadtrum's clock driver framework together with common
structures and interface functions.

Signed-off-by: Chunyan Zhang <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
2017-12-21 15:00:51 -08:00