s5k3l6xx: support HKS-disconnection / module removal while streaming
we have a udev rule that simply unloads the module when the HKS disconnects the device. But for the rear camera, things a are not balanced when streaming:
[ 386.136907] ------------[ cut here ]------------
[ 386.136926] WARNING: CPU: 3 PID: 2907 at drivers/regulator/core.c:2330 _regulator_put.part.0+0x160/0x170
[ 386.136950] Modules linked in: hi846 s5k3l6xx(-) aes_ce_ccm redpine_sdio redpine_91x bluetooth mac80211 cfg80211 qmi_wwan cdc_wdm usbnet option mii usb_wwan usbserial mousedev caam_jr caamhash_desc caamalg_desc crypto_engine usb_f_acm u_serial usb_f_ncm u_ether aes_ce_blk crct10dif_ce snd_soc_gtm601 ghash_ce hantro_vpu sha2_ce v4l2_vp9 sha1_ce snd_soc_simple_card v4l2_h264 v4l2_mem2mem snd_soc_imx_hdmi pwm_vibra snd_soc_simple_card_utils snd_soc_hdmi_codec snd_soc_wm8962 edt_ft5x06 st_lsm6dsx_spi dw9714 snd_soc_fsl_sai snd_soc_fsl_utils videobuf2_dma_contig videobuf2_memops st_magn_spi st_sensors_spi leds_lm3560 videobuf2_v4l2 videobuf2_common v4l2_fwnode v4l2_flash_led_class v4l2_async st_lsm6dsx_i2c imx_pcm_dma st_magn_i2c st_magn st_sensors_i2c st_lsm6dsx vcnl4000 st_sensors industrialio_triggered_buffer videodev gnss_mtk kfifo_buf gnss_serial mc gnss caam snd_soc_core imx2_wdt error snd_pcm_dmaengine snd_pcm snd_timer watchdog snd rfkill_hks soundcore rfkill libcomposite
[ 386.137173] ledtrig_timer ledtrig_pattern fuse zram ip_tables x_tables ipv6 uas usb_storage mtdblock mtd_blkdevs overlay ofpart xhci_plat_hcd xhci_hcd spi_nor usbcore mtd dwc3 ulpi cdns_mhdp_imx cdns_mhdp_drmcore drm_display_helper imx_dcss tps6598x udc_core bq25890_charger phy_fsl_imx8mq_usb usb_common typec clk_bd718x7 roles snvs_pwrkey imx_sdma virt_dma [last unloaded: imx8mq_mipi_csi2(C)]
[ 386.137272] CPU: 3 PID: 2907 Comm: rmmod Tainted: G C 6.1.22-librem5-00453-g7834de6cba92 #224
[ 386.137280] Hardware name: Purism Librem 5r4 (DT)
[ 386.137284] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 386.137291] pc : _regulator_put.part.0+0x160/0x170
[ 386.137299] lr : regulator_bulk_free+0x68/0x94
[ 386.137307] sp : ffff80000bff3b20
[ 386.137310] x29: ffff80000bff3b20 x28: ffff000028e88e80 x27: 0000000000000000
[ 386.137321] x26: 0000000000000000 x25: 0000000000000000 x24: ffff8000095289e0
[ 386.137331] x23: ffff8000091a7008 x22: ffff0000698680f8 x21: ffff800009701b00
[ 386.137342] x20: ffff00003a8bcd00 x19: ffff00003a8bcd00 x18: 0000000000000000
[ 386.137353] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000
[ 386.137363] x14: 000000000000001d x13: 0000000000000000 x12: 0000000000000000
[ 386.137373] x11: 0000000000000001 x10: ffff000009514ea8 x9 : ffff80000875a628
[ 386.137384] x8 : ffff80000884aff4 x7 : 0000000000000000 x6 : ffff000028e88e80
[ 386.137394] x5 : 0000000000000001 x4 : 0000000000000000 x3 : ffff800009701b00
[ 386.137404] x2 : ffff000028e88e80 x1 : 0000000000000000 x0 : 0000000000000001
[ 386.137415] Call trace:
[ 386.137419] _regulator_put.part.0+0x160/0x170
[ 386.137427] regulator_bulk_free+0x68/0x94
[ 386.137434] devm_regulator_bulk_release+0x24/0x30
[ 386.137441] release_nodes+0x64/0x104
[ 386.137450] devres_release_group+0xd4/0x140
[ 386.137457] i2c_device_remove+0x50/0xe0
[ 386.137465] device_remove+0x54/0x8c
[ 386.137475] device_release_driver_internal+0x1e4/0x250
[ 386.137483] driver_detach+0x58/0xa0
[ 386.137491] bus_remove_driver+0x64/0x100
[ 386.137498] driver_unregister+0x38/0x70
[ 386.137506] i2c_del_driver+0x5c/0xa4
[ 386.137511] s5k3l6xx_i2c_driver_exit+0x18/0xe9c [s5k3l6xx]
[ 386.137529] __arm64_sys_delete_module+0x184/0x31c
[ 386.137541] invoke_syscall+0x50/0x120
[ 386.137550] el0_svc_common.constprop.0+0xd4/0xf4
[ 386.137557] do_el0_svc+0x24/0x30
[ 386.137564] el0_svc+0x2c/0x84
[ 386.137573] el0t_64_sync_handler+0xb8/0xc0
[ 386.137580] el0t_64_sync+0x18c/0x190
[ 386.137587] ---[ end trace 0000000000000000 ]---
also, the focus driver needs to be taken into account.