Commit 6069aa09d909a2eb0d894dc9853b4eeb09dc84db
1 parent
983b708fb5
Exists in
smarc_8mm-imx_v2018.03_4.14.98_2.0.0_ga
and in
5 other branches
MLK-19133 pinctrl: Fix select input issue in pinctrl driver
The pinctrl supports to set any bit in input register on iMX6 if the MSB of input value is 0xff. But the driver uses signed int for input value, so when executing the codes below, it won't meet. Because this is arithmetic right shift. if (input_val >> 24 == 0xff) Fix the issue by changing the input_val, config_val and mux_mode to u32. Signed-off-by: Ye Li <ye.li@nxp.com> Acked-by: Fugang Duan <fugang.duan@nxp.com> (cherry picked from commit e464bbcd13d472ddf2df5b62b0002a127147e17b)
Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff
drivers/pinctrl/nxp/pinctrl-imx.c
... | ... | @@ -24,7 +24,8 @@ |
24 | 24 | const struct fdt_property *prop; |
25 | 25 | u32 *pin_data; |
26 | 26 | int npins, size, pin_size; |
27 | - int mux_reg, conf_reg, input_reg, input_val, mux_mode, config_val; | |
27 | + int mux_reg, conf_reg, input_reg; | |
28 | + u32 input_val, mux_mode, config_val; | |
28 | 29 | u32 mux_shift = info->mux_mask ? ffs(info->mux_mask) - 1 : 0; |
29 | 30 | int i, j = 0; |
30 | 31 |