]> git.dujemihanovic.xyz Git - u-boot.git/commit
pinctrl: imx: Fix select input issue
authorYe Li <ye.li@nxp.com>
Fri, 4 Jan 2019 09:08:26 +0000 (09:08 +0000)
committerStefano Babic <sbabic@denx.de>
Mon, 28 Jan 2019 19:35:47 +0000 (20:35 +0100)
commit11a1c27eb454ece04ca4e61f0ea1ab4ebaafa5b5
tree8c845839e078b0320d5892b7d01c7b98cf86de7c
parent59ceb152f84811a89f9f23c52e4eb0c805b9d618
pinctrl: imx: Fix select input issue

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>
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
drivers/pinctrl/nxp/pinctrl-imx.c