drivers: gpio: gpio_intel: Corrected offset to check PMODE
Corrected offset to read PMODE to check function number. Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
This commit is contained in:
parent
f2e275639d
commit
f6aa3e8adb
1 changed files with 1 additions and 1 deletions
|
@ -157,7 +157,7 @@ static bool check_perm(const struct device *dev, uint32_t raw_pin)
|
|||
}
|
||||
|
||||
/* Also need to make sure the function of pad is GPIO */
|
||||
offset = data->pad_base + (raw_pin << 3);
|
||||
offset = data->pad_base + (raw_pin << 4);
|
||||
val = sys_read32(regs(dev) + offset);
|
||||
if (val & PAD_CFG0_PMODE_MASK) {
|
||||
/* mode is not zero => not functioning as GPIO */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue