blob: 479f58b4231dcb547936397f093365f08cd1d791 [file] [log] [blame]
From c576ce67488bc8b0285933f315cb183c9171f199 Mon Sep 17 00:00:00 2001
From: Bo-Cun Chen <bc-bocun.chen@mediatek.com>
Date: Thu, 7 Sep 2023 12:01:57 +0800
Subject: [PATCH] 999-2730-net-phy-sfp-change-shared-mod-def0
---
drivers/net/phy/sfp.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c
index 0c335b1..d49a825 100644
--- a/drivers/net/phy/sfp.c
+++ b/drivers/net/phy/sfp.c
@@ -152,7 +152,7 @@ static const char *gpio_of_names[] = {
};
static const enum gpiod_flags gpio_flags[] = {
- GPIOD_IN,
+ GPIOD_IN | GPIOD_FLAGS_BIT_NONEXCLUSIVE,
GPIOD_IN,
GPIOD_IN,
GPIOD_ASIS,
@@ -512,7 +512,7 @@ static unsigned int sfp_gpio_get_state(struct sfp *sfp)
unsigned int i, state, v;
for (i = state = 0; i < GPIO_MAX; i++) {
- if (gpio_flags[i] != GPIOD_IN || !sfp->gpio[i])
+ if (((gpio_flags[i] & GPIOD_IN) != GPIOD_IN) || !sfp->gpio[i])
continue;
v = gpiod_get_value_cansleep(sfp->gpio[i]);
@@ -2757,7 +2757,7 @@ static int sfp_probe(struct platform_device *pdev)
}
for (i = 0; i < GPIO_MAX; i++) {
- if (gpio_flags[i] != GPIOD_IN || !sfp->gpio[i])
+ if (((gpio_flags[i] & GPIOD_IN) != GPIOD_IN) || !sfp->gpio[i])
continue;
sfp->gpio_irq[i] = gpiod_to_irq(sfp->gpio[i]);
--
2.18.0