switch-case is slightly better to maintain in case some new features will come in new revisions of the hardware. Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> --- drivers/pinctrl/intel/pinctrl-intel.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c index 1a479112ed85..00979acb0203 100644 --- a/drivers/pinctrl/intel/pinctrl-intel.c +++ b/drivers/pinctrl/intel/pinctrl-intel.c @@ -1483,9 +1483,13 @@ static int intel_pinctrl_probe(struct platform_device *pdev, /* Determine community features based on the revision */ value = readl(regs + REVID); - if (((value & REVID_MASK) >> REVID_SHIFT) >= 0x94) { + switch ((value & REVID_MASK) >> REVID_SHIFT) { + case 0x0094 ... 0xffff: community->features |= PINCTRL_FEATURE_DEBOUNCE; community->features |= PINCTRL_FEATURE_1K_PD; + break; + default: + break; } /* Read offset of the pad configuration registers */ -- 2.29.2