public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Samuel Holland <samuel@sholland.org>
To: Kishon Vijay Abraham I <kishon@ti.com>,
	Vinod Koul <vkoul@kernel.org>, Heiko Stuebner <heiko@sntech.de>
Cc: Peter Geis <pgwipeout@gmail.com>,
	Samuel Holland <samuel@sholland.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org,
	linux-rockchip@lists.infradead.org
Subject: [PATCH 4/6] phy: rockchip-inno-usb2: Support multi-bit mask properties
Date: Wed, 13 Apr 2022 22:22:55 -0500	[thread overview]
Message-ID: <20220414032258.40984-5-samuel@sholland.org> (raw)
In-Reply-To: <20220414032258.40984-1-samuel@sholland.org>

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>
---

 drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
index 3422db56be76..c694517496f8 100644
--- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
+++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
@@ -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)
-- 
2.35.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2022-04-14  3:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-14  3:22 [PATCH 0/6] phy: rockchip-inno-usb2: RK356x OTG fix and enhancements Samuel Holland
2022-04-14  3:22 ` [PATCH 1/6] phy: rockchip-inno-usb2: Fix muxed interrupt support Samuel Holland
2022-04-14  3:22 ` [PATCH 2/6] phy: rockchip-inno-usb2: Do not check bvalid twice Samuel Holland
2022-04-14  3:22 ` [PATCH 3/6] phy: rockchip-inno-usb2: Do not lock in bvalid IRQ handler Samuel Holland
2022-04-14  3:22 ` Samuel Holland [this message]
2022-04-14  3:22 ` [PATCH 5/6] phy: rockchip-inno-usb2: Handle bvalid falling Samuel Holland
2022-04-14  3:22 ` [PATCH 6/6] phy: rockchip-inno-usb2: Handle ID IRQ Samuel Holland
2022-04-14 14:00 ` [PATCH 0/6] phy: rockchip-inno-usb2: RK356x OTG fix and enhancements Michael Riesch
2022-04-20  9:14 ` Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220414032258.40984-5-samuel@sholland.org \
    --to=samuel@sholland.org \
    --cc=heiko@sntech.de \
    --cc=kishon@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=pgwipeout@gmail.com \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox