Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

phy: exynos5-usbdrd: make phy_isol() take a bool for clarity

on / not on is just a boolean flag and is a bit misleading as currently
on==1 means to turn off the power, and on==0 to turn power on.

Rename the flag and make it a bool to avoid confusion of future readers
of this code. No functional change.

While at it, fix a whitespace issue in nearby comment.

No functional change.

Signed-off-by: André Draszik <andre.draszik@linaro.org>
Reviewed-by: Peter Griffin <peter.griffin@linaro.org>
Link: https://lore.kernel.org/r/20240507-samsung-usb-phy-fixes-v1-3-4ccba5afa7cc@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

André Draszik and committed by
Vinod Koul
f2b6fc4d 27f3d3f6

+6 -6
+6 -6
drivers/phy/samsung/phy-exynos5-usbdrd.c
··· 173 173 174 174 struct exynos5_usbdrd_phy_config { 175 175 u32 id; 176 - void (*phy_isol)(struct phy_usb_instance *inst, u32 on); 176 + void (*phy_isol)(struct phy_usb_instance *inst, bool isolate); 177 177 void (*phy_init)(struct exynos5_usbdrd_phy *phy_drd); 178 178 unsigned int (*set_refclk)(struct phy_usb_instance *inst); 179 179 }; ··· 273 273 } 274 274 275 275 static void exynos5_usbdrd_phy_isol(struct phy_usb_instance *inst, 276 - unsigned int on) 276 + bool isolate) 277 277 { 278 278 unsigned int val; 279 279 280 280 if (!inst->reg_pmu) 281 281 return; 282 282 283 - val = on ? 0 : EXYNOS4_PHY_ENABLE; 283 + val = isolate ? 0 : EXYNOS4_PHY_ENABLE; 284 284 285 285 regmap_update_bits(inst->reg_pmu, inst->pmu_offset, 286 286 EXYNOS4_PHY_ENABLE, val); ··· 525 525 } 526 526 } 527 527 528 - /* Power-on PHY*/ 529 - inst->phy_cfg->phy_isol(inst, 0); 528 + /* Power-on PHY */ 529 + inst->phy_cfg->phy_isol(inst, false); 530 530 531 531 return 0; 532 532 ··· 553 553 dev_dbg(phy_drd->dev, "Request to power_off usbdrd_phy phy\n"); 554 554 555 555 /* Power-off the PHY */ 556 - inst->phy_cfg->phy_isol(inst, 1); 556 + inst->phy_cfg->phy_isol(inst, true); 557 557 558 558 /* Disable VBUS supply */ 559 559 if (phy_drd->vbus)