• Dong Aisheng's avatar
    pinctrl: imx: add generic pin config core support · a5cadbbb
    Dong Aisheng authored
    The design is based on the exist architecture that the core will
    provide a uniformed way to decode the generic pin config into platform
    config register raw data according to the imx_cfg_params_decode maps
    registered by platform.
    
    Two useful macros, IMX_CFG_PARAMS_DECODE and IMX_CFG_PARAMS_DECODE_INVERT,
    are created for platform to register decode map conveniently.
    
    In order to cope with some special case, a platform specific fixup()
    function is also available to use.
    
    Note that rather than fully utilizing the generic pinconf support
    provided by pinctrl core, IMX only adopts the device tree bindings
    of generic pinconf. The config used in .pin_config_get[set] are raw
    register data instead of generic one which makes us align the exist
    using. And that's also why we cannot set pinconf_ops.is_generic.
    
    Cc: Bai Ping <ping.bai@nxp.com>
    Signed-off-by: default avatarDong Aisheng <aisheng.dong@nxp.com>
    Acked-by: default avatarShawn Guo <shawnguo@kernel.org>
    Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    a5cadbbb
Kconfig 2.48 KB