On 2016-08-09 11:16:25 +0300, Laurent Pinchart wrote: > Hi Niklas, > > On Tuesday 09 Aug 2016 09:03:14 Niklas Söderlund wrote: > > On 2016-08-09 06:01:48 +0000, Kuninori Morimoto wrote: > > > Hi duclm > > > > > > > root@linaro-nano:~# cd /sys/bus/platform/drivers/i2c-rcar; find -type l > > > > ./e6510000.i2c > > > > root@linaro-nano:/sys/bus/platform/drivers/i2c-rcar# echo e6510000.i2c > > > > > unbind [ 30.505950] clk_unregister: unregistering prepared clock: > > > > clk_multiplier root@linaro-nano:/sys/bus/platform/drivers/i2c-rcar# ls > > > > -d e6510000.i2c ls: cannot access e6510000.i2c: No such file or > > > > directory > > > > root@linaro-nano:/sys/bus/platform/drivers/i2c-rcar# echo e6510000.i2c > > > > > bind [ 40.825298] cs2000-cp 2-004f: revision - C1 > > > > [ 40.829587] i2c-rcar e6510000.i2c: probed > > > > root@linaro-nano:/sys/bus/platform/drivers/i2c-rcar# ls -d e6510000.i2c > > > > e6510000.i2c > > > > root@linaro-nano:/sys/bus/platform/drivers/i2c-rcar# > > > > root@linaro-nano:/sys/bus/platform/drivers/i2c-rcar# aplay > > > > /home/board-lager/FSI/data/test.wav> > > > Thank you for your report. > > > This is open (and deep) issue (Oops after "unbind" -> "rebind") > > > We have similar issue on I2C / ALSA SoC / DMAEngine / V4L2 SoC etc... > > > and we should care about it, but it is still under discussion I think. > > > ALSA SoC had started to solve this issue, but it will take over 2 years > > > > FWIW the VIN patches for Gen3 which are posted to ML solves the > > unbind/bind problem for the rcar-vin driver. > > Given that the driver > > - allocates struct rvin_dev structure with devm_kzalloc > - embeds struct video_device in rvin_dev > - sets video_device::release to video_device_release_empty > > I have some doubts about this :-) > > Could you try the following sequence ? > > - Open the video device node and keep it open (yavta --sleep-forever) > - Unbind the VIN device from the driver > - Close the video device node Ohh my bad, I was talking about unbind/bind of V4L2 subdevices while the VIN driver would remain functional after such cycle. Yes keeping the video node open and unbinding the VIN driver itself would not work. Neither will unbind/bind of subdevices if the video node is kept open, if it is closed however it is able to recover from its subdevices being unbound/bound. Sorry for the noise. -- Regards, Niklas Söderlund