• Hans de Goede's avatar
    pinctrl: baytrail: Fix selecting gpio pinctrl state · fed6d9a8
    Hans de Goede authored
    For all the "score" pin-groups all the intel_pingroup-s to select
    the non GPIO function are re-used for byt_score_gpio_groups[].
    
    But this is incorrect since a pin-group includes the mode setting,
    which for the non GPIO functions generally is 1, where as to select
    the GPIO function mode must be set to 0.
    
    So the GPIO function needs separate intel_pingroup-s with their own mode
    value of 0.
    
    Add a new PIN_GROUP_GPIO macro which adds a foo_gpio entry to each
    pin-group defined this way and update byt_score_gpio_groups[] to point
    to the new foo_gpio entries.
    
    The "sus" usb_oc_grp usb_ulpi_grp and pcu_spi_grp pin-groups are special
    because these have a non 0 mode value to select the GPIO functions and
    these already have matching foo_gpio pin-groups, leave these are unchanged.
    
    The pmu_clk "sus" groups added in commit 2f46d7f7 ("pinctrl: baytrail:
    Add pinconf group + function for the pmu_clk") do need to use the new
    PIN_GROUP_GPIO macro.
    
    Fixes: 2f46d7f7 ("pinctrl: baytrail: Add pinconf group + function for the pmu_clk")
    Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
    Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
    fed6d9a8
pinctrl-intel.h 9.24 KB