developer | b6c36bf | 2023-09-07 12:05:01 +0800 | [diff] [blame] | 1 | From c576ce67488bc8b0285933f315cb183c9171f199 Mon Sep 17 00:00:00 2001 |
| 2 | From: Bo-Cun Chen <bc-bocun.chen@mediatek.com> |
| 3 | Date: Thu, 7 Sep 2023 12:01:57 +0800 |
| 4 | Subject: [PATCH] 999-2730-net-phy-sfp-change-shared-mod-def0 |
| 5 | |
| 6 | --- |
| 7 | drivers/net/phy/sfp.c | 6 +++--- |
| 8 | 1 file changed, 3 insertions(+), 3 deletions(-) |
| 9 | |
| 10 | diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c |
| 11 | index 0c335b1..d49a825 100644 |
| 12 | --- a/drivers/net/phy/sfp.c |
| 13 | +++ b/drivers/net/phy/sfp.c |
| 14 | @@ -152,7 +152,7 @@ static const char *gpio_of_names[] = { |
| 15 | }; |
| 16 | |
| 17 | static const enum gpiod_flags gpio_flags[] = { |
| 18 | - GPIOD_IN, |
| 19 | + GPIOD_IN | GPIOD_FLAGS_BIT_NONEXCLUSIVE, |
| 20 | GPIOD_IN, |
| 21 | GPIOD_IN, |
| 22 | GPIOD_ASIS, |
| 23 | @@ -512,7 +512,7 @@ static unsigned int sfp_gpio_get_state(struct sfp *sfp) |
| 24 | unsigned int i, state, v; |
| 25 | |
| 26 | for (i = state = 0; i < GPIO_MAX; i++) { |
| 27 | - if (gpio_flags[i] != GPIOD_IN || !sfp->gpio[i]) |
| 28 | + if (((gpio_flags[i] & GPIOD_IN) != GPIOD_IN) || !sfp->gpio[i]) |
| 29 | continue; |
| 30 | |
| 31 | v = gpiod_get_value_cansleep(sfp->gpio[i]); |
| 32 | @@ -2757,7 +2757,7 @@ static int sfp_probe(struct platform_device *pdev) |
| 33 | } |
| 34 | |
| 35 | for (i = 0; i < GPIO_MAX; i++) { |
| 36 | - if (gpio_flags[i] != GPIOD_IN || !sfp->gpio[i]) |
| 37 | + if (((gpio_flags[i] & GPIOD_IN) != GPIOD_IN) || !sfp->gpio[i]) |
| 38 | continue; |
| 39 | |
| 40 | sfp->gpio_irq[i] = gpiod_to_irq(sfp->gpio[i]); |
| 41 | -- |
| 42 | 2.18.0 |
| 43 | |