aboutsummaryrefslogtreecommitdiff
path: root/drivers/clk/clk-lochnagar.c
AgeCommit message (Collapse)AuthorFilesLines
2023-10-23clk: Use device_get_match_data()Rob Herring1-7/+2
Use preferred device_get_match_data() instead of of_match_device() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Signed-off-by: Rob Herring <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Dmitry Baryshkov <[email protected]> #msm part Acked-by: Krzysztof Kozlowski <[email protected]> # Samsung Acked-by: David Lechner <[email protected]> Acked-by: Chanwoo Choi <[email protected]> Acked-by: Charles Keepax <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
2023-06-08clk: lochnagar: Add a determine_rate hookMaxime Ripard1-0/+1
The lochnagar clocks implement a mux with a set_parent hook, but doesn't provide a determine_rate implementation. This is a bit odd, since set_parent() is there to, as its name implies, change the parent of a clock. However, the most likely candidates to trigger that parent change are either the assigned-clock-parents device tree property or a call to clk_set_rate(), with determine_rate() figuring out which parent is the best suited for a given rate. The other trigger would be a call to clk_set_parent(), but it's far less used, and it doesn't look like there's any obvious user for that clock. Since there's no upstream device tree using that driver, it's a bit hard to tell if it uses the assigned-clock properties. The binding and its example uses them though, so it's likely that the author intent was to force the parent through the device tree and prevent any reparenting but through an explicit call to clk_set_parent(). This case is equivalent to setting the determine_rate implementation to clk_hw_determine_rate_no_reparent(). Indeed, if no determine_rate implementation is provided, clk_round_rate() (through clk_core_round_rate_nolock()) will call itself on the parent if CLK_SET_RATE_PARENT is set, and will not change the clock rate otherwise. Cc: Charles Keepax <[email protected]> Cc: Richard Fitzgerald <[email protected]> Cc: [email protected] Tested-by: Charles Keepax <[email protected]> Signed-off-by: Maxime Ripard <[email protected]> Link: https://lore.kernel.org/r/[email protected] | Reported-by: kernel test robot <[email protected]>: | Reported-by: kernel test robot <[email protected]>: Signed-off-by: Stephen Boyd <[email protected]>
2022-08-22dt-bindings: clock: Move lochnagar.h to dt-bindings/clockLukas Bulwahn1-1/+1
Most of the clock-related dt-binding header files are located in include/dt-bindings/clock. It would be good to keep all the similar header files at a single location. This was discovered while investigating the state of ownership of the files in include/dt-bindings/ according to the MAINTAINERS file. This change here is similar to commit 8e28918a85a0 ("dt-bindings: clock: Move ti-dra7-atl.h to dt-bindings/clock") and commit 35d35aae8177 ("dt-bindings: clock: Move at91.h to dt-bindigs/clock"). Signed-off-by: Lukas Bulwahn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Acked-by: Charles Keepax <[email protected]> Acked-by: Rob Herring <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
2019-08-16clk: lochnagar: Don't reference clk_init_data after registrationStephen Boyd1-1/+1
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: Charles Keepax <[email protected]> Cc: Richard Fitzgerald <[email protected]> Signed-off-by: Stephen Boyd <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Acked-by: Charles Keepax <[email protected]>
2019-06-25clk: lochnagar: Use new parent_data approach to register clock parentsCharles Keepax1-119/+86
Switch over to the more modern style of registering parents and simplify the code in the process. Suggested-by: Stephen Boyd <[email protected]> Signed-off-by: Charles Keepax <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
2019-04-23clk: lochnagar: Add support for the Cirrus Logic LochnagarCharles Keepax1-0/+336
Lochnagar is an evaluation and development board for Cirrus Logic Smart CODEC and Amp devices. It allows the connection of most Cirrus Logic devices on mini-cards, as well as allowing connection of various application processor systems to provide a full evaluation platform. This driver supports the board controller chip on the Lochnagar board. The Lochnagar can take several input clocks from the host system, provides several of its own clock sources, and provides extensive routing options for those clocks to be supplied to the attached CODEC/Amp device. Signed-off-by: Charles Keepax <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>