]> git.baikalelectronics.ru Git - kernel.git/commit
drm/sun4i: dsi: Handle bus clock via regmap_mmio_attach_clk
authorJagan Teki <jagan@amarulasolutions.com>
Sun, 22 Dec 2019 13:22:26 +0000 (18:52 +0530)
committerMaxime Ripard <maxime@cerno.tech>
Thu, 26 Dec 2019 09:36:31 +0000 (10:36 +0100)
commit8a8b25bdacc8187420f5773e6d91de54a27d9d88
tree7bb2b90ac15512c095351a18c87a40ae430f3a85
parent26e695d906e88a78531ba5c3d4006b1d093c368c
drm/sun4i: dsi: Handle bus clock via regmap_mmio_attach_clk

regmap has special API to enable the controller bus clock while
initializing register space, and current driver is using
devm_regmap_init_mmio_clk which require to specify bus
clk_id argument as "bus"

But, the usage of clocks are varies between different Allwinner
DSI controllers. Clocking in A33 would need bus and mod clocks
where as A64 would need only bus clock.

Since A64 support only single bus clock, it is optional to
specify the clock-names on the controller device tree node.
So using NULL on clk_id would get the attached clock.

To support clk_id as "bus" and "NULL" during clock enablement
between controllers, this patch add generic code to handle
the bus clock using regmap_mmio_attach_clk with associated
regmap APIs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20191222132229.30276-5-jagan@amarulasolutions.com
drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c