1.support counter, frequency meter, global control and
wave generator.
2.add struct rockchip_pwm_funcs and modify struct
rockchip_pwm_data for compatibility and extensibility.
3.rename current .enable/.config/.irq_handler to v1.
4.not to return ERRNO if failed to get irq in probing for
pwm_v3.
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I28c6a2946ccb9072f464397d6b25f4b6803fa8c5
drivers/media/platform/rockchip/hdmirx/rk_hdmirx_cec.c:143:3: error: implicit declaration of function 'cec_transmit_attempt_done' [-Werror,-Wimplicit-function-declaration]
drivers/media/platform/rockchip/hdmirx/rk_hdmirx_cec.c:148:3: error: implicit declaration of function 'cec_received_msg' [-Werror,-Wimplicit-function-declaration]
drivers/media/platform/rockchip/hdmirx/rk_hdmirx_cec.c:224:14: error: implicit declaration of function 'cec_allocate_adapter' [-Werror,-Wimplicit-function-declaration]
drivers/media/platform/rockchip/hdmirx/rk_hdmirx_cec.c:224:12: error: incompatible integer to pointer conversion assigning to 'struct cec_adapter *' from 'int' [-Werror,-Wint-conversion]
drivers/media/platform/rockchip/hdmirx/rk_hdmirx.c:1068:2: error: implicit declaration of function 'cec_queue_pin_hpd_event' [-Werror,-Wimplicit-function-declaration]
drivers/media/platform/rockchip/hdmirx/rk_hdmirx.c:1077:2: error: implicit declaration of function 'cec_queue_pin_hpd_event' [-Werror,-Wimplicit-function-declaration]
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ibad7f45af8ecf9a789d7062a2b33c68c4f1541cb
support dual sc230ai
support master_slaver mode
Change-Id: I0b3fdffa22dd5ca0b9272e6b3f8159aeb4727208
Signed-off-by: Lan Honglin <helin.lan@rock-chips.com>
When building s390 allmodconfig after commit 9b91a65230 ("usb: gadget:
uvc: increase worker prio to WQ_HIGHPRI"), the following error occurs:
In file included from ../include/linux/string.h:253,
from ../include/linux/bitmap.h:11,
from ../include/linux/cpumask.h:12,
from ../include/linux/smp.h:13,
from ../include/linux/lockdep.h:14,
from ../include/linux/rcupdate.h:29,
from ../include/linux/rculist.h:11,
from ../include/linux/pid.h:5,
from ../include/linux/sched.h:14,
from ../include/linux/ratelimit.h:6,
from ../include/linux/dev_printk.h:16,
from ../include/linux/device.h:15,
from ../drivers/usb/gadget/function/f_uvc.c:9:
In function ‘fortify_memset_chk’,
inlined from ‘uvc_register_video’ at ../drivers/usb/gadget/function/f_uvc.c:424:2:
../include/linux/fortify-string.h:301:25: error: call to ‘__write_overflow_field’ declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror=attribute-warning]
301 | __write_overflow_field(p_size_field, size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This points to the memset() in uvc_register_video(). It is clear that
the argument to sizeof() is incorrect, as uvc->vdev (a 'struct
video_device') is being zeroed out but the size of uvc->video (a 'struct
uvc_video') is being used as the third arugment to memset().
pahole shows that prior to commit 9b91a65230 ("usb: gadget: uvc:
increase worker prio to WQ_HIGHPRI"), 'struct video_device' and
'struct ucv_video' had the same size, meaning that the argument to
sizeof() is incorrect semantically but there is no visible issue:
$ pahole -s build/drivers/usb/gadget/function/f_uvc.o | grep -E "(uvc_video|video_device)\s+"
video_device 1400 4
uvc_video 1400 3
After that change, uvc_video becomes slightly larger, meaning that the
memset() will overwrite by 8 bytes:
$ pahole -s build/drivers/usb/gadget/function/f_uvc.o | grep -E "(uvc_video|video_device)\s+"
video_device 1400 4
uvc_video 1408 3
Fix the arugment to sizeof() so that there is no overwrite.
Cc: stable@vger.kernel.org
Fixes: e4ce9ed835 ("usb: gadget: uvc: ensure the vdev is unset")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20220928201921.3152163-1-nathan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit a15e17acce)
Change-Id: Id7fe8570ae7f3998593f33c01ffb63c8c89f0716
This patch is changing the simple workqueue in the gadget driver to be
allocated as async_wq with a higher priority. The pump worker, that is
filling the usb requests, will have a higher priority and will not be
scheduled away so often while the video stream is handled. This will
lead to fewer streaming underruns.
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Link: https://lore.kernel.org/r/20220907215818.2670097-1-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 9b91a65230)
Change-Id: I3a70591f53a4040c50d723784f5e520cf2d53d99
It's hard to debug without log if folks add wrong present
gpio.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Ic9d54a90911d6d268830e21df90710af0a352992
1 if is_multi_overflow don't set is_first_double
2 avoid dual_sensor resume same sensor only readback once
Signed-off-by: Mingwei Yan <mingwei.yan@rock-chips.com>
Change-Id: I9c25801de47e308d6845b3549f767bd801f5e5f1
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Ensure that the I2C->msg is synchronized with the idle state,
and the I2C->msg may still be used in the stop phase, need to
wait until the I2C transfer is completed, and then set I2C->msg
to be null.
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I8a8e8c1e72f28cf4c95fe4efb559177056f483d1
If the start interrupt is not enabled, don't care about this
interrupt, clean it can slove the warning log:
"rk3x-i2c fead0000.i2c: unexpected irq in STOP: 0x10 may appear".
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I0ebb145ac7971b4c128c172e136bd1dda6e6192e
Usually we think rk3568 max resolution is 4096x2160, in face rk3568 can
also support 2160x4096.
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I96358f481f9e26d1196e2118b3ce3b82c4a6ce82
API snd_soc_register_component will try to rebind card per
each component register. and the ASoC allow no-pcm card instance.
devm_snd_soc_register_component
snd_soc_try_rebind_card
snd_soc_bind_card
snd_soc_add_pcm_runtime
devm_snd_dmaengine_pcm_register
So, we should register PCM before DAI component.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I578b7c54b96cfa89fd2f8cf346832e2b68a1d355
This patch do full hw params re-configuation instead of the reset one.
Fixes: 0c2c6c9430 ("drm/bridge: synopsys: Fix wrong FIFO reset on AUD_CONF0")
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I1e259797ce22cd9a3be7086e1f21bd02c440ac57