Skip to content

Commit f2b6fc4

Browse files
andredvinodkoul
authored andcommitted
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 <[email protected]> Reviewed-by: Peter Griffin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 27f3d3f commit f2b6fc4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/phy/samsung/phy-exynos5-usbdrd.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ struct exynos5_usbdrd_phy;
173173

174174
struct exynos5_usbdrd_phy_config {
175175
u32 id;
176-
void (*phy_isol)(struct phy_usb_instance *inst, u32 on);
176+
void (*phy_isol)(struct phy_usb_instance *inst, bool isolate);
177177
void (*phy_init)(struct exynos5_usbdrd_phy *phy_drd);
178178
unsigned int (*set_refclk)(struct phy_usb_instance *inst);
179179
};
@@ -273,14 +273,14 @@ static unsigned int exynos5_rate_to_clk(unsigned long rate, u32 *reg)
273273
}
274274

275275
static void exynos5_usbdrd_phy_isol(struct phy_usb_instance *inst,
276-
unsigned int on)
276+
bool isolate)
277277
{
278278
unsigned int val;
279279

280280
if (!inst->reg_pmu)
281281
return;
282282

283-
val = on ? 0 : EXYNOS4_PHY_ENABLE;
283+
val = isolate ? 0 : EXYNOS4_PHY_ENABLE;
284284

285285
regmap_update_bits(inst->reg_pmu, inst->pmu_offset,
286286
EXYNOS4_PHY_ENABLE, val);
@@ -525,8 +525,8 @@ static int exynos5_usbdrd_phy_power_on(struct phy *phy)
525525
}
526526
}
527527

528-
/* Power-on PHY*/
529-
inst->phy_cfg->phy_isol(inst, 0);
528+
/* Power-on PHY */
529+
inst->phy_cfg->phy_isol(inst, false);
530530

531531
return 0;
532532

@@ -553,7 +553,7 @@ static int exynos5_usbdrd_phy_power_off(struct phy *phy)
553553
dev_dbg(phy_drd->dev, "Request to power_off usbdrd_phy phy\n");
554554

555555
/* Power-off the PHY */
556-
inst->phy_cfg->phy_isol(inst, 1);
556+
inst->phy_cfg->phy_isol(inst, true);
557557

558558
/* Disable VBUS supply */
559559
if (phy_drd->vbus)

0 commit comments

Comments
 (0)