Skip to content

Commit

Permalink
phy: rockchip-inno-usb2: Support multi-bit mask properties
Browse files Browse the repository at this point in the history
The "bvalid" and "id" interrupts can trigger on either the rising edge
or the falling edge, so each interrupt has two enable bits and two
status bits. This change allows using a single property for both bits,
checking whether either bit is set.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Tested-by: Michael Riesch <michael.riesch@wolfvision.net>
Link: https://lore.kernel.org/r/20220414032258.40984-5-samuel@sholland.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
  • Loading branch information
Samuel Holland authored and Vinod Koul committed Apr 20, 2022
1 parent 5a709a4 commit ffe597d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/phy/rockchip/phy-rockchip-inno-usb2.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ static inline bool property_enabled(struct regmap *base,
return false;

tmp = (orig & mask) >> reg->bitstart;
return tmp == reg->enable;
return tmp != reg->disable;
}

static int rockchip_usb2phy_clk480m_prepare(struct clk_hw *hw)
Expand Down

0 comments on commit ffe597d

Please sign in to comment.