diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2021-03-30 00:46:49 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2021-03-30 00:46:49 +0200 |
commit | ba845907b23a6584e5944f6fbffda3efb010c28b (patch) | |
tree | 6d68567c248c7f147e430109909147ffbcef4968 /drivers/pinctrl | |
parent | 58b5ada8c465b5f1300bc021ebd3d3b8149124b4 (diff) | |
parent | 39c1f1bd8adf29840ef52225ce95f390e3d7b2cf (diff) |
Merge tag 'intel-pinctrl-v5.12-3' of gitolite.kernel.org:pub/scm/linux/kernel/git/pinctrl/intel into fixes
intel-pinctrl for v5.12-3
* Check if device is present, which is not the case in Xen
The following is an automated git shortlog grouped by driver:
intel:
- check REVID register value for device presence
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/intel/pinctrl-intel.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c index 7283203861ae..9f3361c13ded 100644 --- a/drivers/pinctrl/intel/pinctrl-intel.c +++ b/drivers/pinctrl/intel/pinctrl-intel.c @@ -1493,8 +1493,13 @@ static int intel_pinctrl_probe(struct platform_device *pdev, if (IS_ERR(regs)) return PTR_ERR(regs); - /* Determine community features based on the revision */ + /* + * Determine community features based on the revision. + * A value of all ones means the device is not present. + */ value = readl(regs + REVID); + if (value == ~0u) + return -ENODEV; if (((value & REVID_MASK) >> REVID_SHIFT) >= 0x94) { community->features |= PINCTRL_FEATURE_DEBOUNCE; community->features |= PINCTRL_FEATURE_1K_PD; |