[][kernel][pinctrl][Backport spinlock for mtk_rmw]

Add spinlock mechanism for mtk_rmw api.
1. When multiple threads operate on the same register resource
which include multiple pins, it will make the register resource
wrong to control. So we add spinlock to avoid this case.

This patch adds spinlock mechanism to protect mtk_rmw. Without it,
you may suffer from some unexpected problems such as race conidtion
while interrupt occured. And this will lead to pin setting fail.
Hence, we strongly recommand you to merge this patch in your code

Change-Id: I1128dc16cb683b89c2cd9f9138f32552abb00400
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/7962757
1 file changed