summaryrefslogtreecommitdiffstats
path: root/drivers/clk/clk-si544.c
AgeCommit message (Collapse)AuthorFilesLines
2019-06-27clk: clk-si544: Implement small frequency change supportMike Looijmans1-10/+92
The Si544 supports changing frequencies "on the fly" when the change is less than 950 ppm from the current center frequency. The driver now uses the small adjustment routine for implementing this. Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2018-06-29clk-si514, clk-si544: Implement prepare/unprepare/is_prepared operationsMike Looijmans1-1/+37
This adds prepare/unprepare/is_prepared functionality to the drivers for the SI544 and SI514 chips, allowing the clock output to be disabled when the clock is not in use. Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2018-06-01clk-si544: Properly round requested frequency to nearest matchMike Looijmans1-0/+1
The si544 driver had a rounding problem that using the result of clk_round_rate may set the clock to yet another rate, for example: clk_round_rate(195000000) = 194999999 clk_round_rate(194999999) = 194999998 Clients would expect that after clk_set_rate(clk, freq2=clk_round_rate(clk, freq)) the chip will be running at exactly freq2. The problem was in the calculation of the feedback divider, it was always rounded down instead of to the nearest possible VCO value. After this change, the following holds true for any supported frequency: actual_freq = clk_round_rate(clk, freq); clk_set_rate(clk, actual_freq); clk_round_rate(clk, actual_freq) == actual_freq && clk_get_rate(clk) == actual_freq Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Fixes: 953cc3e81170 ("clk: Add driver for the si544 clock generator chip") Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2018-03-23clk: Add driver for the si544 clock generator chipMike Looijmans1-0/+411
This patch adds the driver and devicetree documentation for the Silicon Labs SI544 clock generator chip. This is an I2C controlled oscillator capable of generating clock signals ranging from 200kHz to 1500MHz. Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> [sboyd: assign max_freq to 0 in is_valid_frequency() to squelch warning] Signed-off-by: Stephen Boyd <sboyd@kernel.org>