From mboxrd@z Thu Jan 1 00:00:00 1970 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 CF2DBC433EF for ; Sat, 26 Feb 2022 20:47:09 +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: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:In-Reply-To:References: List-Owner; bh=3hL4HOCiVFzH5LcR5CRMRbQQ5oir/ytkpKM/U9SmiNs=; b=RVkvLmobeDszGr Mex0l1uJR3Kj6RpK/NmJ8fWwe2RQVIpLUj7IptQydACpIwB0bekqaDqFpQlO5wLeZtt79ZO/c4bfD MeoNoEE1NMXJ77/EZ214CI9zAFg+4vkjN+SDb3TfsIv86YNouzMHdPL0PNHy0/M6/GeflgdBa86lT dS5n64pQL8O9RWTA6ucsiBvWrCwqRuFZpg4KqPBmB05YaGaJxqAAsUUvD7JfUTdRovctBRLg5E4QJ avWatG46+J/rXEEsc85VCsH17XwLehvSPb4R6Y8z8wfvgV29J0KdsBTTLZpf0AXK021LBbLjLNAoU sl2l26jqEWydY+cXLrBw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nO3wy-008UzR-6g; Sat, 26 Feb 2022 20:45:56 +0000 Received: from ssl.serverraum.org ([2a01:4f8:151:8464::1:2]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nO3wT-008Us8-W9 for linux-arm-kernel@lists.infradead.org; Sat, 26 Feb 2022 20:45:27 +0000 Received: from mwalle01.kontron.local. (unknown [213.135.10.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id B06D32223E; Sat, 26 Feb 2022 21:45:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1645908318; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=zfmHvO4bszehQ082Y/9bfCsKjhj2g/yezRDipNTYzxM=; b=oPFkyD/cXbecBViD08SNc2TScbiUMLeJJq7NBT9IWis/4jib06hEhSh9mjASAWVyuKmDBl u4lsngYZzGg2G9hkZGCaFwx0ATXM5xWJzLkYDOxvJagp4ZGUUtBgkvjNSu21BU/OKct4Yf oop6LQ57nKlu+7zaoR/fDT9KAMB/dE4= From: Michael Walle To: Lars Povlsen , Steen Hegelund , Linus Walleij Cc: UNGLinuxDriver@microchip.com, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Colin Foster , Michael Walle Subject: [PATCH v2 0/5] pinctrl: microchip-sgpio: locking and synchronous output Date: Sat, 26 Feb 2022 21:45:02 +0100 Message-Id: <20220226204507.2511633-1-michael@walle.cc> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220226_124526_207462_763A4D2F X-CRM114-Status: GOOD ( 11.51 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org There are boards which use the output of the SGPIO to drive I2C muxers. SGPIO right now is broken in a way that when the software sets this bit there is a rather large delay until that value ends up on the hardware pin. While digging into this, I've noticed that there is no locking at all in this driver. Add locking for all RWM accesses. Please note, that parts of the modification of the first patch are removed again in a later patch. This is because the first patch is intended to be backported to the stable trees. This was also just tested on a LAN9668 SoC. If you have additional hardware, please test. Changes since v1: - add Ocelot support Michael Walle (5): pinctrl: microchip-sgpio: lock RMW access pinctrl: microchip-sgpio: don't do RMW for interrupt ack register pinctrl: microchip-sgpio: use regmap_update_bits() pinctrl: microchip-sgpio: return error in spgio_output_set() pinctrl: microchip-sgpio: wait until output is actually set drivers/pinctrl/pinctrl-microchip-sgpio.c | 112 +++++++++++++++++++--- 1 file changed, 97 insertions(+), 15 deletions(-) -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel