Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1753660pxm; Thu, 24 Feb 2022 08:45:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJxWoPZKXfBTjttHZyaLHoRFvI/iJGvHSRxIq/UJoR9YtWyoZUN6BGC1g579TLCwcpf82KEn X-Received: by 2002:a63:4005:0:b0:373:9ac7:fec1 with SMTP id n5-20020a634005000000b003739ac7fec1mr2890498pga.12.1645721100302; Thu, 24 Feb 2022 08:45:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645721100; cv=none; d=google.com; s=arc-20160816; b=KB6w5UgohgjZNvQX0jx8nH+zuMG4a+OlpM6uDVUSJDSqXqqGxnRiWpYWQW0bmBcJ+H YwW0yjn3KV3fB0lxIS2k/B16ZJcqq8Pg/opu8x7i7in18U+8dJFHAQMLAOE9tq6ZyZYq ktOAEzHgPFPg0Wsi/f7VZcelNuU5Qf6jaS+/Sngwmcx9+ffJNdRRYNkwRDvbW3qQV3s8 wsf5YoS7gMSGi3mDqIwUtUPTYJnuAgWzMQU2Poj70GeEL7b8hk8vlc2f5dMADFY2S/nO ooxLySCss5mbteojAL9rSU3y6vZ2Vg+gpHOgX1rj45+iHXMO3MFVZsA+H96K7MH2+cPT c+6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=3AVbMEK1Kj2Wq9B+4ntgjAAH5iOrMVQj74iBl24oPtw=; b=E0o+IXRjsCkOH7mZ47n8gA0Qb4341olkvuiyyAf+fqDwp/qvXUNcdg9wk1cFVv7BiJ P0oNyQ8ngzvW9PsbYHsKRZj8ZJxwRGp7teOOQjXDsnoSWMV9ke6EKoelyu+73wYpM9kc 5ekW3cviPa76w/lN9AmsLLSu4ubYhYlAK6FuG1kSrWJGJgiq66gygifgA8y+JDmO8z1O hHeiUurplmeDoytEApA0L3zbuiAtiKpVUClJcl0+U9+A3Tae7go6Z0ci560N/aERLjl9 vTfQsmKhZn6kH1Q3yUwZON4M6fnOhFSCmYQO3XEwrQUL1mgkUhIFsBMz8S91CDIwIGzv ddmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=ITei4q9+; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id s17si2797230pgq.489.2022.02.24.08.44.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Feb 2022 08:45:00 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=ITei4q9+; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1E5DE2036E2; Thu, 24 Feb 2022 08:24:18 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230052AbiBXQNs (ORCPT + 99 others); Thu, 24 Feb 2022 11:13:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229521AbiBXQNr (ORCPT ); Thu, 24 Feb 2022 11:13:47 -0500 Received: from ssl.serverraum.org (ssl.serverraum.org [IPv6:2a01:4f8:151:8464::1:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 421C01B2AF4; Thu, 24 Feb 2022 08:13:10 -0800 (PST) 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 4DA5022236; Thu, 24 Feb 2022 17:10:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1645719037; 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=3AVbMEK1Kj2Wq9B+4ntgjAAH5iOrMVQj74iBl24oPtw=; b=ITei4q9+8nn/DYKLqakBypCqB2YpmgMFhVkxmsND14t8x2SN3jXGfW0/oVaGBvbnwN+dX3 vwOanXjcD2um8NA8npBeore3XYI+pRrYa/vfRZ1hqYI/NKnX18vbOoWJOP/xTsCQF+Rdf7 ZsNKPmPLk2WuLgaho/Vlt601Xapzg8k= 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 v1 0/5] pinctrl: microchip-sgpio: locking and synchronous output Date: Thu, 24 Feb 2022 17:10:16 +0100 Message-Id: <20220224161021.2197263-1-michael@walle.cc> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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. 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 | 101 ++++++++++++++++++---- 1 file changed, 86 insertions(+), 15 deletions(-) -- 2.30.2