[U-Boot] Fixed clock driver (clk: convert API to match reset/mailbox style)

Michal Simek monstr at monstr.eu
Tue Nov 15 20:07:01 CET 2016


Hi guys,

I just found today with playing with clock drivers that the patch
clk: convert API to match reset/mailbox style
(sha1: 135aa95002646c46e89de93fa36adad1b010548f)

added this part of code to fixed clock driver
-static ulong clk_fixed_rate_get_rate(struct udevice *dev)
+static ulong clk_fixed_rate_get_rate(struct clk *clk)
 {
-       return to_clk_fixed_rate(dev)->fixed_rate;
-}
+       if (clk->id != 0)
+               return -EINVAL;


which is returning -EINVAL when ulong should be returned.

The next thing I have found is that fixed clock driver has no set_rate
function which is fine but when I was testing one driver which tries to
set rate then error code was generated but without any useful
information what happened.
Are you ok with adding empty set_rate function with returning error
message that set rate is not supported for fixed clocks?

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP SoCs



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161115/183d18c2/attachment.sig>


More information about the U-Boot mailing list