ipq40xx: net: phy: qca807x: fix GPIO driver
authorRobert Marko <robert.marko@sartura.hr>
Thu, 4 Mar 2021 11:38:31 +0000 (12:38 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Mon, 29 Mar 2021 20:26:27 +0000 (22:26 +0200)
While rebasing into setting bits instead of magic values,
I accidentally forgot to actually set the force bit.

Without it using the pins as GPIO-s did not actually work.

Fixes: b5c93ed ("ipq40xx: add Qualcomm QCA807x driver")
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
(cherry picked from commit 7f2d9ccd09a1d3034aaf9c943747fc1631da5cac)

target/linux/ipq40xx/files/drivers/net/phy/qca807x.c

index 10d38d94a65cc0f1322a4f20934fbfd5fc53ab7d..16d7a80455efe7dcb609d95fc85497bb060d323f 100644 (file)
@@ -356,6 +356,7 @@ static void qca807x_gpio_set(struct gpio_chip *gc, unsigned int offset, int valu
 
        val = phy_read_mmd(priv->phy, MDIO_MMD_AN, qca807x_gpio_get_reg(offset));
        val &= ~QCA807X_GPIO_FORCE_MODE_MASK;
+       val |= QCA807X_GPIO_FORCE_EN;
        val |= FIELD_PREP(QCA807X_GPIO_FORCE_MODE_MASK, value);
 
        phy_write_mmd(priv->phy, MDIO_MMD_AN, qca807x_gpio_get_reg(offset), val);