From patchwork Tue Oct 18 10:37:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sascha Hauer X-Patchwork-Id: 13010238 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0C2D2C4332F for ; Tue, 18 Oct 2022 10:39:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Puo0HuBUothW567Lr/56cEyUn8KqUCzvrKfs1lApWXw=; b=biq/0bZFemIYJs 2L7HHgleS5H5ual7pVilHLJH5RodgqnYlBq7bxej1ktaAzgrnmSH3KqXnwc01gaVLAlcUiaJ/nSqj KM88fjUGa8FYCCpHJtNmbfo3JmtvojRxx14FHu+SMJs+jjb24dg07nul1338NVOAcBHEn/WVQibQB aRrym++d5DSm1MhEe2gJTsBelw1fsGxv+agKyiKdq2yju+YA2Vvk70M7apC10W+IgMRk8KDBX6bkZ S2Igk38K/A25ryGuu83Vr5y5lBuSjRCHrRll7LxAft5Hdn4FBbk2TG8LnM3T75fQwlwYkw8yZ6lsi WS3NaLHuCEBOd+gCOfvw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1okjzB-005ZBB-A4; Tue, 18 Oct 2022 10:38:13 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1okjyb-005YyV-Ih for linux-arm-kernel@lists.infradead.org; Tue, 18 Oct 2022 10:37:41 +0000 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1okjyU-0002Go-Af; Tue, 18 Oct 2022 12:37:30 +0200 Received: from [2a0a:edc0:0:1101:1d::28] (helo=dude02.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1okjyS-002G1D-6v; Tue, 18 Oct 2022 12:37:28 +0200 Received: from sha by dude02.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1okjyQ-00BIRN-Po; Tue, 18 Oct 2022 12:37:26 +0200 From: Sascha Hauer To: linux-usb@vger.kernel.org Cc: Peng Fan , Pengutronix Kernel Team , linux-arm-kernel@lists.infradead.org, Xu Yang , Sascha Hauer , Xu Yang Subject: [PATCH v2 2/4] usb: chipidea: usbmisc_imx: Fix setting i.MX6SX wakeup source Date: Tue, 18 Oct 2022 12:37:23 +0200 Message-Id: <20221018103725.2580679-3-s.hauer@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221018103725.2580679-1-s.hauer@pengutronix.de> References: <20221018103725.2580679-1-s.hauer@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221018_033737_679613_CBC12176 X-CRM114-Status: GOOD ( 11.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org MX6SX_USB_VBUS_WAKEUP_SOURCE are two bits containing an enum value, so when read/modify/write that we have to clear both bits bits before setting the desired bits. The clearing of the bits was forgotten, add it. Signed-off-by: Sascha Hauer Reviewed-by: Xu Yang Link: https://lore.kernel.org/r/20221011082924.884123-3-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer --- drivers/usb/chipidea/usbmisc_imx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/chipidea/usbmisc_imx.c b/drivers/usb/chipidea/usbmisc_imx.c index 8f805aa9c383c..e1b4b7f9b3f31 100644 --- a/drivers/usb/chipidea/usbmisc_imx.c +++ b/drivers/usb/chipidea/usbmisc_imx.c @@ -551,6 +551,7 @@ static int usbmisc_imx6sx_init(struct imx_usbmisc_data *data) spin_lock_irqsave(&usbmisc->lock, flags); /* Set vbus wakeup source as bvalid */ val = readl(reg); + val &= ~MX6SX_USB_VBUS_WAKEUP_SOURCE(3); writel(val | MX6SX_USB_VBUS_WAKEUP_SOURCE_BVALID, reg); /* * Disable dp/dm wakeup in device mode when vbus is