From patchwork Fri Jan 26 20:11:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jan_Kundr=C3=A1t?= X-Patchwork-Id: 866572 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=cesnet.cz header.i=@cesnet.cz header.b="ZhXp3AEV"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zSqpY5s2Tz9t3G for ; Sat, 27 Jan 2018 07:13:09 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752072AbeAZUNH (ORCPT ); Fri, 26 Jan 2018 15:13:07 -0500 Received: from office2.cesnet.cz ([195.113.144.244]:32802 "EHLO office2.cesnet.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751734AbeAZUNE (ORCPT ); Fri, 26 Jan 2018 15:13:04 -0500 Received: from localhost (unknown [IPv6:2001:718:1:2c:4c87:d4a8:de7f:541e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by office2.cesnet.cz (Postfix) with ESMTPSA id 598F2400064; Fri, 26 Jan 2018 21:13:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cesnet.cz; s=office2; t=1516997582; bh=ZceLXwF+7/XAlA1+Wy2qmCo5wuuvqCKf8i2j2aQ/XS0=; h=Resent-Date:Resent-From:Resent-To:Resent-Cc:From:Date:Subject:To: Cc; b=ZhXp3AEV2g5hWPIhJAh6arP3Ac42mhkBR9hdDpDw37OWnnp0ouE+TbRGxhdLVRiNM ulGX7OuqPMVzMA0rQvibTPfVCqxWaQNhfC7K/DPkkd11PFqhK2TZ64pQhUIL78CQZ0 2vDsOx+pjd9Do90Ogoghqcuad9rcPSA3kHUgIyio= Message-Id: From: =?utf-8?q?Jan_Kundr=C3=A1t?= Date: Fri, 26 Jan 2018 21:11:03 +0100 Subject: [PATCH 0/4] Improvements for MCP23Sxx chips MIME-Version: 1.0 To: linux-gpio@vger.kernel.org Cc: linux-spi@vger.kernel.org, Linus Walleij , Phil Reid , Sebastian Reichel Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org a) Open-Drain output of the IRQ lane (see inside for possible caveats). b) Improvements for multi-instances on the same SPI CS. This chip is "special" because it supports several "instances" sharing the same SPI CS lane. Each chip has three HW pins for specifying an internal address. The first byte of each SPI transaction then distinguishes which chip we're talking to. So far, so good -- that's something that the driver already supports. The actual implementation simply instantiates several regmap and pinctrl instances sharing the same parent (the spi/spiX.Y dev). That leads to clashes as soon as more HW chips are present because of naming clashes within debugfs. Fixing this for regmap is pretty straightforward. The patch which implements something similar for the pinctrl subsystem is a bit more involved because it touches the pinctrl core. The resulting names are ugly and the `strcmp` in there is largely a hack in order to not force even more ugliness to the existing chips. Jan Kundrát (4): pinctrl: mcp23s08: IRQ behavior for open-drain interrupts pinctrl: mcp23s08: spi: Fix regmap debugfs entries pinctrl: mcp23s08: spi: Add HW address to gpio_chip.label pinctrl: mcp23s08: spi: Fix duplicate pinctrl debugfs entries .../bindings/pinctrl/pinctrl-mcp23s08.txt | 4 + drivers/pinctrl/core.c | 18 ++- drivers/pinctrl/pinctrl-mcp23s08.c | 131 +++++++++++++++------ 3 files changed, 114 insertions(+), 39 deletions(-)