<levd1>
Seems the clock is not available at `probe` function.
<levd1>
mmind00: any hint? I see the same usage in ov13858 driver in Chrome OS.
<mmind00>
levd1: no idea ... which what kernel did you experience this [mainline?]
<levd1>
the vendor kernel 4.4
<levd1>
I just work around this problem using kernel module
<mmind00>
levd1: just checked ISP driver didn't make it into mainline yet ... but I also do not do support for the vendor-kernel
<levd1>
got it. i just wonder why :)
<beeble>
i would guess since the i2c driver is not yet loaded the pinmux will also not be configured. you will need to defer the isp probe until i2c is available
matthias_bgg has joined #linux-rockchip
<beeble>
on how to do that correctly, no idea :)
<levd1>
in drivers/Makefile, pinctrl is placed before i2c, therefore it must be initialized before i2c.
<beeble>
the order in the makefile does not influence the order drivers will probed at all
<levd1>
then what determinate the order?
<beeble>
thats handled on-demand with devicetree and in parallel.
<levd1>
you are right. I also check the kernel log, pinctrl is initialized before i2c.
<mmind00>
pinctrl should be initialized early on ... but the isp thingy should probably be initialized after i2c
<mmind00>
or in any case isp should defer if i2c is not yet available ... normally I'd expect the driver to do this already, but that may be a bug in said driver
<levd1>
the sensor is being power/clock on to read the sensor id in the probe function, which is not related to isp thingy yet
<levd1>
clocks should be initialized earlier than pinctrl. I just wonder why I cannot turn on the SCLK_CIF_OUT clock and set the power gpio pin high.
<levd1>
if i compile it as a kernel module and insmod it after system startup, all is normal