diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2021-01-07 21:01:58 +0200 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2021-01-08 14:57:16 +0200 |
commit | 998c49e8f8b7c99faefe9e7401022514fe3a7b10 (patch) | |
tree | 609ea2ac4d57716623264a05c7c88e17c6e2ed4b /drivers/pinctrl/intel | |
parent | 036e126c72eb29b9464e5868c1ac86f8fd9c8a80 (diff) |
pinctrl: intel: Drop unnecessary check for predefined features
None of the drivers is overriding features. Remove unnecessary check.
While here, rename rev to value to make easier further development.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/pinctrl/intel')
-rw-r--r-- | drivers/pinctrl/intel/pinctrl-intel.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c index ae13e4390935..1a479112ed85 100644 --- a/drivers/pinctrl/intel/pinctrl-intel.c +++ b/drivers/pinctrl/intel/pinctrl-intel.c @@ -1473,6 +1473,7 @@ static int intel_pinctrl_probe(struct platform_device *pdev, struct intel_community *community = &pctrl->communities[i]; void __iomem *regs; u32 padbar; + u32 value; *community = pctrl->soc->communities[i]; @@ -1480,18 +1481,11 @@ static int intel_pinctrl_probe(struct platform_device *pdev, if (IS_ERR(regs)) return PTR_ERR(regs); - /* - * Determine community features based on the revision if - * not specified already. - */ - if (!community->features) { - u32 rev; - - rev = (readl(regs + REVID) & REVID_MASK) >> REVID_SHIFT; - if (rev >= 0x94) { - community->features |= PINCTRL_FEATURE_DEBOUNCE; - community->features |= PINCTRL_FEATURE_1K_PD; - } + /* Determine community features based on the revision */ + value = readl(regs + REVID); + if (((value & REVID_MASK) >> REVID_SHIFT) >= 0x94) { + community->features |= PINCTRL_FEATURE_DEBOUNCE; + community->features |= PINCTRL_FEATURE_1K_PD; } /* Read offset of the pad configuration registers */ |