From patchwork Sat Nov 13 16:29:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joey Gouly X-Patchwork-Id: 517185 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ED346C433F5 for ; Sat, 13 Nov 2021 16:30:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CDEE861168 for ; Sat, 13 Nov 2021 16:30:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235918AbhKMQc6 (ORCPT ); Sat, 13 Nov 2021 11:32:58 -0500 Received: from mail-eopbgr00056.outbound.protection.outlook.com ([40.107.0.56]:38529 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S235909AbhKMQc5 (ORCPT ); Sat, 13 Nov 2021 11:32:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=C2SJg8qFQHtCK0RzMPRlVPNFfskVWXkAANXaebBiCuY=; b=PXuPC5n2RIWVc1ZkDW/osYNCcFFCwwtrjPpXlTITIZNbIQRcvc+jTK7RnMfcC9gTAPD0NfVU2mYSPoZFt/gj4hE9kC+x2XrjpLDBEb3X+QWQNtaDdQhnUnzzogWhvgRU4OH2vdMI124AaXH9d/voR7PovQ7ZAZ7Mlc+Lyq9Rfd8= Received: from AS9PR06CA0105.eurprd06.prod.outlook.com (2603:10a6:20b:465::27) by AM0PR08MB3634.eurprd08.prod.outlook.com (2603:10a6:208:d6::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.19; Sat, 13 Nov 2021 16:30:01 +0000 Received: from AM5EUR03FT009.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:465:cafe::c2) by AS9PR06CA0105.outlook.office365.com (2603:10a6:20b:465::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.19 via Frontend Transport; Sat, 13 Nov 2021 16:30:01 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT009.mail.protection.outlook.com (10.152.16.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.20 via Frontend Transport; Sat, 13 Nov 2021 16:30:01 +0000 Received: ("Tessian outbound f65bc39c8ea9:v109"); Sat, 13 Nov 2021 16:30:00 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 207628c0c43ae417 X-CR-MTA-TID: 64aa7808 Received: from ccd730139c56.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 90B551E7-A781-46B6-B75B-92188015808D.1; Sat, 13 Nov 2021 16:29:54 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id ccd730139c56.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Sat, 13 Nov 2021 16:29:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nkE30GoyfhO1ZKwFdZqPV0it8eLnUPV5pwqgSyTGSO1Gijhw6ODW5JkB6Pb4TapNmdTSd6EJ06jOmWWTWqGh6BjsviDw0FJZL4kU6kBirqINLlxiBp+dMe0RZdONikNWrCeeO3QD6FSpdHJ84KghX0Slofur4TkD2Mvyt4FAbEgzIn6AZcK+AQxf3yr7GRtERVqCn4ZtyXCio5rHny2FKuaWNJVwX3v5L12PX1GyZJB7cDNReGT3VB7s6wv9qmgfVlhvIDQ/CKoJAj7cBg9bWmUuKRTAEqT2genefmFwHX0HQVrCPHJIqsrabqdGyuy12E87wDIuxonRuHTfrNYhug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=C2SJg8qFQHtCK0RzMPRlVPNFfskVWXkAANXaebBiCuY=; b=OnKngueUW6SzGqTAXxkCGYo/xqTObBT7gP5Dpkf2FjB7WpIyhE0dswjQSzEaxnY0xpH4fKR5tHgpCXWcsfGHbqoOV5j5Nl+sH/pozb+rnRF7+LrhIxRiDTDWnwB8TKL2YM/iTlQBfjSA8efObEVYcLatbJnGO1P5pcKgA+aPE3XLFfbYwqdE8tghQa+ZETVbLJSJgvX20bpRNV69ThWhXdSxiTXzWrvGVwgFhxQO0TlsPI4FZtmwJasgc6csMUJgDjuET3n5S5xJcDHU2g8rMtBZXU0knDiNUflyNOU4miWpxGeseZCunE1XK493y8zmVf//lbY4PabHaYxvSxWaCw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=C2SJg8qFQHtCK0RzMPRlVPNFfskVWXkAANXaebBiCuY=; b=PXuPC5n2RIWVc1ZkDW/osYNCcFFCwwtrjPpXlTITIZNbIQRcvc+jTK7RnMfcC9gTAPD0NfVU2mYSPoZFt/gj4hE9kC+x2XrjpLDBEb3X+QWQNtaDdQhnUnzzogWhvgRU4OH2vdMI124AaXH9d/voR7PovQ7ZAZ7Mlc+Lyq9Rfd8= Received: from AS8PR07CA0044.eurprd07.prod.outlook.com (2603:10a6:20b:459::17) by AM9PR08MB6850.eurprd08.prod.outlook.com (2603:10a6:20b:2fd::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11; Sat, 13 Nov 2021 16:29:52 +0000 Received: from VE1EUR03FT026.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:459:cafe::ba) by AS8PR07CA0044.outlook.office365.com (2603:10a6:20b:459::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.8 via Frontend Transport; Sat, 13 Nov 2021 16:29:52 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; Received: from nebula.arm.com (40.67.248.234) by VE1EUR03FT026.mail.protection.outlook.com (10.152.18.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4690.20 via Frontend Transport; Sat, 13 Nov 2021 16:29:52 +0000 Received: from AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2308.20; Sat, 13 Nov 2021 16:29:51 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.20; Sat, 13 Nov 2021 16:29:51 +0000 Received: from e124191.cambridge.arm.com (10.1.197.45) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2308.20 via Frontend Transport; Sat, 13 Nov 2021 16:29:51 +0000 From: Joey Gouly To: CC: Linus Walleij , Andy Shevchenko , Hector Martin , , Joey Gouly Subject: [PATCH v1 1/9] pinctrl: apple: fix some formatting issues Date: Sat, 13 Nov 2021 16:29:36 +0000 Message-ID: <20211113162944.22412-2-joey.gouly@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211113162944.22412-1-joey.gouly@arm.com> References: <20211113162944.22412-1-joey.gouly@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 964c6b2a-b60f-42c9-b60d-08d9a6c2d747 X-MS-TrafficTypeDiagnostic: AM9PR08MB6850:|AM0PR08MB3634: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:854;OLM:854; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: BEmptz7cumxgWRZX1XR0yr7RIMZYCwTrt9NreE1l/XRzpld5uHlwaP+0HIPAwvGpJWLJM2nN7KTji50ouno+AFtMCbXbe3ZgSAjKEUQ8e24XCKhz97NBNAFZ0KQeuGnb2L/scu/d5Fb07F6OhBqQHyw7aHH4JPM/Dza5sTJJOOz/Mp/MEKIKdguHNRCh9cE5nLId1F4uSKVvvRCa687f9lupVKxvSx+9XKEQrXdbfXnaqgj29iyBsgRUo3IvKOYskedEK5U6pDwoxLqnmf5niaEfl3ujxf+iJz6NiUULlzjQ19VigxtAYdgv61VJEaWmj3GzTEDRPI97Gp5zTb50XJL8Hj1lo2uoJbfkRUl2Eemu7kRYqUSGByJmGtS2j/XVCDcXcEiNMEY8JugjIkROg/UwEO7hg5+TxMKEU4ljvRvHfOOFFYhWT8y/OfG2QhLLGDxeaBfRqLKZfs+WNxk1JbetTLseX58KIWB8B4SoJqtiEC7kqINeKc525WuX65dLfRE8POdqhbKr6xKeBLHgUA6y93ZqyfT229U110V3GBMLwnq+dL5dOgY9k8PKu9k84wbmgMEzF445koQLILF1Wvuto+Kgmo44tleD2S3VSK/wOnwlOqVB74+K5aveSTjf943ETiXEgYjOqxzTOQXMDcthAd+6kLaIZFuNWtlRm+uTf2ZQQOpDvEITFeALPnpHj0nqq5Kw9BFui2bx/v3/2uACIVxxzU6zxp2QvnucnOWQ8RlNTuNVrNbd+LfsCcWG74J1v1qvpKxMSduR3muy7A== X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(4636009)(47660400002)(46966006)(36840700001)(86362001)(70206006)(426003)(186003)(6916009)(508600001)(82310400003)(70586007)(1076003)(54906003)(6666004)(44832011)(8936002)(316002)(83380400001)(4326008)(36756003)(26005)(47076005)(8676002)(36860700001)(81166007)(2906002)(336012)(5660300002)(7696005)(2616005)(356005)(46800400005)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB6850 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT009.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: c6630709-10d9-48e8-3fcb-08d9a6c2d209 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rv9Xa+ZJG3GQ7/ibDypoa+3UOi8uD2ztGuG3Fb9I1K7sQqzlBjNMLCjJKwsubjcE+WE6QfoVvX+pKzN4EQOcds9AJldKjKZHcls6QgVkeTPJGMokSbskSFocppNI9jip8XP9H8lb8PhL/Iwohr/MsVg+2+LHS7TRApIfV9zdyNZ+ScmQItSJzAMDuN87gruyTQWH4PJL1ZBoUU6r8PczvM0yj27uehm6QHEKQQjDDWBdaMi9DdXMXOwdHnlsjlMpZB+McNU3V+npkc/78omyxYQ6e1ZJd288J+XBVF7fGP/Jymew2s//dfYLELFucOmFbLKviVybBKMRmuhXOBbAfjt5CJQb2Rnx2Iv8rg/AK0VvhARAxBx4OuOQWzQTmo4U3kPRWk0NRkE3/F4+pAqslLieabdwNf/oh6YLjMG8pcCpWc8Ou/ehLedjVdn3qBQIiAkO/cqFp9V3ZjmHUNqqrFhYMCDLQFDAlk/TGI2QV+vu2ij/Aj3hs0X9tjkC3DKzRT6IojR2Y3AhWQVWXThlnBnTp4a7DdnP5P+9PpOEwFy1KTK2ZtT+ELPzixeRPkSviWLlCC6dolMx72vzPK8fU3qglmQ/BxUJeIEzG22pBKiafIJfR/K2D2Ejaj3SnN/3Ym9VS72R2qFw93whum1K0lOtygZvxIDP1JduuJqvf0HlS1wKAYbJSdYCsx2GIccwaPYkcYEAgGRf+rTnMBiyCbTRUj81lH22cPxmUSjp6Z8= X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(47660400002)(36840700001)(46966006)(47076005)(54906003)(8676002)(70586007)(7696005)(6666004)(70206006)(4326008)(36860700001)(508600001)(1076003)(36756003)(26005)(44832011)(186003)(426003)(82310400003)(83380400001)(336012)(6916009)(8936002)(2906002)(2616005)(86362001)(81166007)(5660300002)(316002)(46800400005); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Nov 2021 16:30:01.4543 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 964c6b2a-b60f-42c9-b60d-08d9a6c2d747 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM5EUR03FT009.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3634 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Reflow some of the code now that the extra '_gpio' was removed. Signed-off-by: Joey Gouly --- drivers/pinctrl/pinctrl-apple-gpio.c | 75 ++++++++++++---------------- 1 file changed, 31 insertions(+), 44 deletions(-) diff --git a/drivers/pinctrl/pinctrl-apple-gpio.c b/drivers/pinctrl/pinctrl-apple-gpio.c index a7861079a650..23466ee59d79 100644 --- a/drivers/pinctrl/pinctrl-apple-gpio.c +++ b/drivers/pinctrl/pinctrl-apple-gpio.c @@ -70,18 +70,18 @@ struct regmap_config regmap_config = { .cache_type = REGCACHE_FLAT, .max_register = 512 * sizeof(u32), .num_reg_defaults_raw = 512, - .use_relaxed_mmio = true + .use_relaxed_mmio = true, }; -// No locking needed to mask/unmask IRQs as the interrupt mode is per pin-register. +/* No locking needed to mask/unmask IRQs as the interrupt mode is per pin-register. */ static void apple_gpio_set_reg(struct apple_gpio_pinctrl *pctl, - unsigned int pin, u32 mask, u32 value) + unsigned int pin, u32 mask, u32 value) { regmap_update_bits(pctl->map, REG_GPIO(pin), mask, value); } -static uint32_t apple_gpio_get_reg(struct apple_gpio_pinctrl *pctl, - unsigned int pin) +static u32 apple_gpio_get_reg(struct apple_gpio_pinctrl *pctl, + unsigned int pin) { unsigned int val = 0; @@ -92,9 +92,9 @@ static uint32_t apple_gpio_get_reg(struct apple_gpio_pinctrl *pctl, /* Pin controller functions */ static int apple_gpio_dt_node_to_map(struct pinctrl_dev *pctldev, - struct device_node *node, - struct pinctrl_map **map, - unsigned *num_maps) + struct device_node *node, + struct pinctrl_map **map, + unsigned *num_maps) { unsigned reserved_maps; struct apple_gpio_pinctrl *pctl; @@ -119,8 +119,7 @@ static int apple_gpio_dt_node_to_map(struct pinctrl_dev *pctldev, num_pins = ret; - ret = pinctrl_utils_reserve_map(pctldev, map, &reserved_maps, num_maps, - num_pins); + ret = pinctrl_utils_reserve_map(pctldev, map, &reserved_maps, num_maps, num_pins); if (ret) return ret; @@ -138,11 +137,10 @@ static int apple_gpio_dt_node_to_map(struct pinctrl_dev *pctldev, } group_name = pinctrl_generic_get_group_name(pctldev, pin); - function_name = - pinmux_generic_get_function_name(pctl->pctldev, func); + function_name = pinmux_generic_get_function_name(pctl->pctldev, func); ret = pinctrl_utils_add_map_mux(pctl->pctldev, map, - &reserved_maps, num_maps, - group_name, function_name); + &reserved_maps, num_maps, + group_name, function_name); if (ret) goto free_map; } @@ -165,7 +163,7 @@ static const struct pinctrl_ops apple_gpio_pinctrl_ops = { /* Pin multiplexer functions */ static int apple_gpio_pinmux_set(struct pinctrl_dev *pctldev, unsigned func, - unsigned group) + unsigned group) { struct apple_gpio_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); @@ -186,8 +184,7 @@ static const struct pinmux_ops apple_gpio_pinmux_ops = { /* GPIO chip functions */ -static int apple_gpio_get_direction(struct gpio_chip *chip, - unsigned int offset) +static int apple_gpio_get_direction(struct gpio_chip *chip, unsigned int offset) { struct apple_gpio_pinctrl *pctl = gpiochip_get_data(chip); unsigned int reg = apple_gpio_get_reg(pctl, offset); @@ -211,17 +208,14 @@ static int apple_gpio_get(struct gpio_chip *chip, unsigned offset) return !!(reg & REG_GPIOx_DATA); } -static void apple_gpio_set(struct gpio_chip *chip, unsigned int offset, - int value) +static void apple_gpio_set(struct gpio_chip *chip, unsigned int offset, int value) { struct apple_gpio_pinctrl *pctl = gpiochip_get_data(chip); - apple_gpio_set_reg(pctl, offset, REG_GPIOx_DATA, - value ? REG_GPIOx_DATA : 0); + apple_gpio_set_reg(pctl, offset, REG_GPIOx_DATA, value ? REG_GPIOx_DATA : 0); } -static int apple_gpio_direction_input(struct gpio_chip *chip, - unsigned int offset) +static int apple_gpio_direction_input(struct gpio_chip *chip, unsigned int offset) { struct apple_gpio_pinctrl *pctl = gpiochip_get_data(chip); @@ -234,7 +228,7 @@ static int apple_gpio_direction_input(struct gpio_chip *chip, } static int apple_gpio_direction_output(struct gpio_chip *chip, - unsigned int offset, int value) + unsigned int offset, int value) { struct apple_gpio_pinctrl *pctl = gpiochip_get_data(chip); @@ -249,13 +243,10 @@ static int apple_gpio_direction_output(struct gpio_chip *chip, static void apple_gpio_irq_ack(struct irq_data *data) { - struct apple_gpio_pinctrl *pctl = - gpiochip_get_data(irq_data_get_irq_chip_data(data)); - unsigned int irqgrp = - FIELD_GET(REG_GPIOx_GRP, apple_gpio_get_reg(pctl, data->hwirq)); + struct apple_gpio_pinctrl *pctl = gpiochip_get_data(irq_data_get_irq_chip_data(data)); + unsigned int irqgrp = FIELD_GET(REG_GPIOx_GRP, apple_gpio_get_reg(pctl, data->hwirq)); - writel(BIT(data->hwirq & 31), - pctl->base + REG_IRQ(irqgrp, data->hwirq)); + writel(BIT(data->hwirq & 31), pctl->base + REG_IRQ(irqgrp, data->hwirq)); } static unsigned int apple_gpio_irq_type(unsigned int type) @@ -278,20 +269,19 @@ static unsigned int apple_gpio_irq_type(unsigned int type) static void apple_gpio_irq_mask(struct irq_data *data) { - struct apple_gpio_pinctrl *pctl = - gpiochip_get_data(irq_data_get_irq_chip_data(data)); + struct apple_gpio_pinctrl *pctl = gpiochip_get_data(irq_data_get_irq_chip_data(data)); + apple_gpio_set_reg(pctl, data->hwirq, REG_GPIOx_MODE, - FIELD_PREP(REG_GPIOx_MODE, REG_GPIOx_IN_IRQ_OFF)); + FIELD_PREP(REG_GPIOx_MODE, REG_GPIOx_IN_IRQ_OFF)); } static void apple_gpio_irq_unmask(struct irq_data *data) { - struct apple_gpio_pinctrl *pctl = - gpiochip_get_data(irq_data_get_irq_chip_data(data)); + struct apple_gpio_pinctrl *pctl = gpiochip_get_data(irq_data_get_irq_chip_data(data)); unsigned int irqtype = apple_gpio_irq_type(irqd_get_trigger_type(data)); apple_gpio_set_reg(pctl, data->hwirq, REG_GPIOx_MODE, - FIELD_PREP(REG_GPIOx_MODE, irqtype)); + FIELD_PREP(REG_GPIOx_MODE, irqtype)); } static unsigned int apple_gpio_irq_startup(struct irq_data *data) @@ -300,7 +290,7 @@ static unsigned int apple_gpio_irq_startup(struct irq_data *data) struct apple_gpio_pinctrl *pctl = gpiochip_get_data(chip); apple_gpio_set_reg(pctl, data->hwirq, REG_GPIOx_GRP, - FIELD_PREP(REG_GPIOx_GRP, 0)); + FIELD_PREP(REG_GPIOx_GRP, 0)); apple_gpio_direction_input(chip, data->hwirq); apple_gpio_irq_unmask(data); @@ -308,18 +298,16 @@ static unsigned int apple_gpio_irq_startup(struct irq_data *data) return 0; } -static int apple_gpio_irq_set_type(struct irq_data *data, - unsigned int type) +static int apple_gpio_irq_set_type(struct irq_data *data, unsigned int type) { - struct apple_gpio_pinctrl *pctl = - gpiochip_get_data(irq_data_get_irq_chip_data(data)); + struct apple_gpio_pinctrl *pctl = gpiochip_get_data(irq_data_get_irq_chip_data(data)); unsigned int irqtype = apple_gpio_irq_type(type); if (irqtype == REG_GPIOx_IN_IRQ_OFF) return -EINVAL; apple_gpio_set_reg(pctl, data->hwirq, REG_GPIOx_MODE, - FIELD_PREP(REG_GPIOx_MODE, irqtype)); + FIELD_PREP(REG_GPIOx_MODE, irqtype)); if (type & IRQ_TYPE_LEVEL_MASK) irq_set_handler_locked(data, handle_level_irq); @@ -402,8 +390,7 @@ static int apple_gpio_register(struct apple_gpio_pinctrl *pctl) } for (i = 0; i < girq->num_parents; i++) { - ret = platform_get_irq(to_platform_device(pctl->dev), - i); + ret = platform_get_irq(to_platform_device(pctl->dev), i); if (ret < 0) goto out; From patchwork Sat Nov 13 16:29:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joey Gouly X-Patchwork-Id: 517182 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0DB76C433F5 for ; Sat, 13 Nov 2021 16:30:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E181861177 for ; Sat, 13 Nov 2021 16:30:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236027AbhKMQdI (ORCPT ); Sat, 13 Nov 2021 11:33:08 -0500 Received: from mail-eopbgr50070.outbound.protection.outlook.com ([40.107.5.70]:53380 "EHLO EUR03-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S236043AbhKMQdI (ORCPT ); Sat, 13 Nov 2021 11:33:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SY8G0lJXBxsYHsTunT6YMLI9rFZfmVz1KSVJcNQ8tk8=; b=naa/qhZIMk/fPAJVpmx5A3vDhxZs7fVzZ0fH5xcfRQqhcQFOPVt/pWqbggKre90eLjfaMPwaPZZhyFFDTXFeRtY4y8JVBeS1GPTCint0ZNRhI3fuUU1Qe6AMOWExN36T6LBtIUouYejW3IzJKXFom1q24rAxRpNM1r78vImW9PU= Received: from DB7PR03CA0078.eurprd03.prod.outlook.com (2603:10a6:10:72::19) by DB6PR08MB2920.eurprd08.prod.outlook.com (2603:10a6:6:1f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.26; Sat, 13 Nov 2021 16:30:11 +0000 Received: from DB5EUR03FT003.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:72::4) by DB7PR03CA0078.outlook.office365.com (2603:10a6:10:72::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.15 via Frontend Transport; Sat, 13 Nov 2021 16:30:11 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT003.mail.protection.outlook.com (10.152.20.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.19 via Frontend Transport; Sat, 13 Nov 2021 16:30:11 +0000 Received: ("Tessian outbound 892d2780d3aa:v109"); Sat, 13 Nov 2021 16:30:11 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 994f32378549d8a5 X-CR-MTA-TID: 64aa7808 Received: from 4c14e497aef6.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id D150CF5F-6ADD-4DBE-ABC8-1AAF47F2B455.1; Sat, 13 Nov 2021 16:30:05 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 4c14e497aef6.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Sat, 13 Nov 2021 16:30:05 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dzdSXRhzLSV2yYzdjRrBMgJ08NtuNsnZ09vyWientKA1WIPLOnN3aHHEQtTDMWvdF6AmTZNB8SWo1lgR5Wnuf6kfeVx66l7O4lpt8ajXrQORbfpONInBYAb5mzHmkjsWbeMJWlUEQQkq4HMzJf7tmbx8R8EPVDSZN/kqdOowcgX3q14MYZ2LtqxK285yWN20Oz4daLcyFfG9S4niY77kb+0S/9eSXavDpDnjAg+Ivm5Krga7KrzfZRSM8YKUKtKVDJgAvl21qGczd9tk4YVASRvkCqO45ovvDK1pAb6SDoIp+vbPCvIZwWKePF3edJbz3oqJIbs2TKhBxWb7YLg/ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=SY8G0lJXBxsYHsTunT6YMLI9rFZfmVz1KSVJcNQ8tk8=; b=ICJORuflxeHVpgliiUdnDwv+lkPuLp/lupGN86hKAb/J/3B5RN8PZnpgkMamJxc7i5YVuXLT3mVVF7lyz42/rLfoAksl/BSabUg2SnpJEmGzEq+Gz9WWNHqmuZJnK2TszkCOQROC4uZ6oAOgAC+rnMlI0T3pUNRK71mYer+BBL8+qMVdsf9aKhcSDuFGRkD7x52JuRN4VzFbek/PfiQZYazVhVXwTNuX9SQXADc1AJQsQukmtU9sEF39sKjJXUuwndBGqm75L8ZqUlHyD6o5ahjih5tiXlkFTu/ycBdn113f+1Uzs9DxY/u+XWzoinvkVvN4flYMy2AzcMeieopgRQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SY8G0lJXBxsYHsTunT6YMLI9rFZfmVz1KSVJcNQ8tk8=; b=naa/qhZIMk/fPAJVpmx5A3vDhxZs7fVzZ0fH5xcfRQqhcQFOPVt/pWqbggKre90eLjfaMPwaPZZhyFFDTXFeRtY4y8JVBeS1GPTCint0ZNRhI3fuUU1Qe6AMOWExN36T6LBtIUouYejW3IzJKXFom1q24rAxRpNM1r78vImW9PU= Received: from AS9PR06CA0395.eurprd06.prod.outlook.com (2603:10a6:20b:461::30) by DBBPR08MB4871.eurprd08.prod.outlook.com (2603:10a6:10:da::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.16; Sat, 13 Nov 2021 16:29:55 +0000 Received: from VE1EUR03FT034.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:461:cafe::c4) by AS9PR06CA0395.outlook.office365.com (2603:10a6:20b:461::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.19 via Frontend Transport; Sat, 13 Nov 2021 16:29:55 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; Received: from nebula.arm.com (40.67.248.234) by VE1EUR03FT034.mail.protection.outlook.com (10.152.18.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4690.20 via Frontend Transport; Sat, 13 Nov 2021 16:29:54 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Sat, 13 Nov 2021 16:29:51 +0000 Received: from e124191.cambridge.arm.com (10.1.197.45) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2308.20 via Frontend Transport; Sat, 13 Nov 2021 16:29:51 +0000 From: Joey Gouly To: CC: Linus Walleij , Andy Shevchenko , Hector Martin , , Joey Gouly Subject: [PATCH v1 3/9] pinctrl: apple: handle regmap_read errors Date: Sat, 13 Nov 2021 16:29:38 +0000 Message-ID: <20211113162944.22412-4-joey.gouly@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211113162944.22412-1-joey.gouly@arm.com> References: <20211113162944.22412-1-joey.gouly@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 39ea0c7f-5dd3-44c7-e8e9-08d9a6c2dd5e X-MS-TrafficTypeDiagnostic: DBBPR08MB4871:|DB6PR08MB2920: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:813;OLM:813; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: m1vgK0Vau8x1cBda+vEI6jLfYf5DYufTdKuM20hBTXqepeNN3QTWv5SHEN09Nxwz05cXntHa+sjpYEfj2yd6hmsmEEl8XEygKoJFwAlOH5WkX5aIRkU/CHwHgxBY6NG3Xa1IWESK62isxUR9XX7HgT+qsjAJMcnRVxkmqmvirqSNVhIk3ZDFxwE6HMQptEkkMeUcgSrRbas1JTWWfaRs2heJIbOCgUY0zkfxvPhxb4kQR9jUnR9gBcAk8SWuYXHt2l6wGlpeHdtHh98fJEXhQClWIQbh9S0K5Rz1LmEW1e2/XSr624qxZI+80DwFYFD0ri+9KwXFzQQ3Votg042iZ0DC7UCY4JCV8NDz4VOJQRUOo0E0bEjKizIj/xGGj8168jMn8c/XI8/aqrMkTFM8bbObIJIKhO4G3dBIkLYqd3kBBwGi53V9k3ZEoP3IZAnjb8oOQs3IqgaZoIy1Y/WQcN8GVZQ56p88GSsImUcRYD/dNY5nzxLKQIgwxULapXEjivAolyTvKJ2XKe0F5tc8B6/OZV91NELKvHzF/rcIxQjHHHOzgxJNJ2KMqEq7GzSE99rn8wUtrKdr5FsmQh4z+E8jqWNFNbk/YN7zq/AESu145P/1EF6lY4kTiPgDZwkf/Dc1xt5dKCE6/PJX7NLlTtZ7J/JCIC9sBs6M2OR1ipIqa0NiNH7SDNok4OLe3p0Ko7q+vWgp8n96Zobj1sycjX/kGFtBEBP+2TN/ftSuXLlUt8Jgxfk3yZQuD7khujjm74gSa7zpDrx1mFWlZB1GjA== X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(4636009)(47660400002)(36840700001)(46966006)(8676002)(336012)(8936002)(82310400003)(44832011)(70206006)(6916009)(36860700001)(86362001)(81166007)(426003)(508600001)(36756003)(1076003)(2616005)(83380400001)(70586007)(316002)(54906003)(26005)(186003)(6666004)(5660300002)(4326008)(47076005)(7696005)(2906002)(356005)(4744005)(46800400005)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB4871 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT003.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 1e06aa43-58fe-4eda-b144-08d9a6c2d356 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: R5ghGg8f1Nyvx7sQ91kfWIee+4gbYyctxATojgSIECp7LdNEfBWLmrtJbPui+Pn4l8khzXHQxjm2kuQTEZsqxU934HMUgufllPVwWtEx1cvaDjVpRK1GsU3Gy/qdAEz+6aNqLYl4zVFKLBRpV04DX+/IRqKJcfGWH9F6jwyXAQo/488PMgt/sDW5vb/cESQIDXzgp43Uh+RcU2hSUGV5ij0C3s/ZxGGT/vaAIXtW3Gs7hsuZbQwDtgzKeya0CQfHZI6ejprWEdSAwvqG97DsTnjd9hfhJqkqk8FRXizDcOpYef4L0I4ndrw6+bd51HPCs9FJb0QwJj0aLERSPXHWinUwsI1JkfIBS8eGB8RJGmpDptdVeeF/qE+Pqv02T1plk3pz4vnJ4MCBdjzQiRvYXMjVLoPJujYFDHPs1RT4Ii1n5GkFzjRHDeqvkGlYHj+9S1xKrNqO0azVRAEwCJC2vCx3P/NqbDKQ7+XG53QXLX2KpV/XRjYqmFCVcM4Kn20CyCN4mgicCOUACfym1cPYdVZfwIm2NTiq5b2BZgRzYXW9w5SREYZ6cmTMFbbPuZRUt4+yt/IfNADOrZgaa0HK+Jm6PwkaVhngsbR6mn0cBbLgHF+e2GIC0QF9c/BI+UQDqpaEZYSDclDOpUqMs7eJdkH4jbxFc4sUUuBshae1MSqV20shFpHe9M4+Hd8zHXvjtM5oMxulOFHRzjjuaOIMKZiQGFmd/cXFklfgT5OTHig= X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(47660400002)(46966006)(36840700001)(7696005)(5660300002)(6916009)(508600001)(36860700001)(2616005)(86362001)(1076003)(2906002)(8936002)(8676002)(316002)(186003)(70206006)(6666004)(47076005)(70586007)(336012)(83380400001)(54906003)(426003)(44832011)(26005)(4326008)(36756003)(82310400003)(81166007)(4744005)(46800400005); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Nov 2021 16:30:11.7396 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 39ea0c7f-5dd3-44c7-e8e9-08d9a6c2dd5e X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DB5EUR03FT003.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR08MB2920 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Explicitly return 0 if the regmap_read fails. Signed-off-by: Joey Gouly --- drivers/pinctrl/pinctrl-apple-gpio.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/pinctrl-apple-gpio.c b/drivers/pinctrl/pinctrl-apple-gpio.c index 4f7fb79d8e11..bd7f28150ac0 100644 --- a/drivers/pinctrl/pinctrl-apple-gpio.c +++ b/drivers/pinctrl/pinctrl-apple-gpio.c @@ -84,9 +84,13 @@ static void apple_gpio_set_reg(struct apple_gpio_pinctrl *pctl, static u32 apple_gpio_get_reg(struct apple_gpio_pinctrl *pctl, unsigned int pin) { - unsigned int val = 0; + int ret; + u32 val; + + ret = regmap_read(pctl->map, REG_GPIO(pin), &val); + if (ret) + return 0; - regmap_read(pctl->map, REG_GPIO(pin), &val); return val; } From patchwork Sat Nov 13 16:29:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joey Gouly X-Patchwork-Id: 517183 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A684C43219 for ; Sat, 13 Nov 2021 16:30:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 62C7B60E75 for ; Sat, 13 Nov 2021 16:30:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235923AbhKMQdB (ORCPT ); Sat, 13 Nov 2021 11:33:01 -0500 Received: from mail-eopbgr60058.outbound.protection.outlook.com ([40.107.6.58]:1766 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S236029AbhKMQdA (ORCPT ); Sat, 13 Nov 2021 11:33:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ENxxYiKACKwEXTrBb0xDqj9yXeSc4qNK1JDlXvFaNtY=; b=e321ywrUYhQUHUmtQIJMAYEE8vL/w9KK/F/oVB1gfkszjBul6y6OEC8hSBNx6zzqu1jMNAO0bGg8I+joQqYBVgplEUcwtIwFId/qZnewkcnxVR/zHceWTTc+q5JO3c4RwEPfapjZKaDsLXqnvJ0EgreQ+PnyPm10EtGhgEyz6Rk= Received: from DB6P191CA0020.EURP191.PROD.OUTLOOK.COM (2603:10a6:6:28::30) by VE1PR08MB5775.eurprd08.prod.outlook.com (2603:10a6:800:1a0::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.18; Sat, 13 Nov 2021 16:30:04 +0000 Received: from DB5EUR03FT020.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:28:cafe::6a) by DB6P191CA0020.outlook.office365.com (2603:10a6:6:28::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.25 via Frontend Transport; Sat, 13 Nov 2021 16:30:04 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT020.mail.protection.outlook.com (10.152.20.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.19 via Frontend Transport; Sat, 13 Nov 2021 16:30:04 +0000 Received: ("Tessian outbound 892d2780d3aa:v109"); Sat, 13 Nov 2021 16:30:04 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: d659337763de8086 X-CR-MTA-TID: 64aa7808 Received: from 85c597a3c4bd.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 92A4BE84-B651-4047-BBDD-F3120ABB55D6.1; Sat, 13 Nov 2021 16:29:57 +0000 Received: from EUR03-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 85c597a3c4bd.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Sat, 13 Nov 2021 16:29:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H98sW2qWElf7V5XIc9lmd8vBbFuOMmud4AD9rwy3UjFlgwq8Nqm1qQHoHn/GCwPtbZBfdPTR2/rogT3WZtTLgXTFBU5X7VG3peMaBU+48vHbj4BG4KF/ZJNQQu6r9P1UMZ7K2EZBwEk6T5DJpFtZpm9QYQJ0hYUeYgMf3LJXBhfmSZ3NrZr6zmMux9nhjsiXHRNQHFeakQ80dPmGuB4mSC1ABr9ud7k3VItXL6tHPqk4pRJlhFxlmerhZM7Nv3XG12Eh+uK28oza/p4Vu/gIoSKylg2DvJ9+uh9Vowmx0FN+Y3k7suh2hJsOGXN8ajB1rAH3x0Fxqmm+bK0eslhiJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ENxxYiKACKwEXTrBb0xDqj9yXeSc4qNK1JDlXvFaNtY=; b=B4MS0XKOHjq/13cAASfOFhXR8aJTYotAv98d68GPcRUoTFa2XZWvxGy976/fr5d/S9YHhWLt4ovq+o/2U2uQ+1V/8coz161q3YgouHsHQbXE2MTNJpdzCA5kMK8r7uJ4nNRD5KjPQnJhW697JSQWSBD1HF/Ua/E5DG/XVrt3cGXnKQPnGkUZPJYdf6yCBLnWLVLraotk6CRDbSr0o38PW/CKqeqlyme6WczYLtKyKkeMwQM3AJFNZxwlTYirhzx0JD5504SzATOZEsQHn+W5Mfoj0Vq4UFobkWxyIYDzz0WaDt4UPXyehg2ewJjqkkLLZm0B719RSkjVJVvn5Rl+yQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ENxxYiKACKwEXTrBb0xDqj9yXeSc4qNK1JDlXvFaNtY=; b=e321ywrUYhQUHUmtQIJMAYEE8vL/w9KK/F/oVB1gfkszjBul6y6OEC8hSBNx6zzqu1jMNAO0bGg8I+joQqYBVgplEUcwtIwFId/qZnewkcnxVR/zHceWTTc+q5JO3c4RwEPfapjZKaDsLXqnvJ0EgreQ+PnyPm10EtGhgEyz6Rk= Received: from AS9PR06CA0399.eurprd06.prod.outlook.com (2603:10a6:20b:461::12) by AM9PR08MB6804.eurprd08.prod.outlook.com (2603:10a6:20b:30f::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.16; Sat, 13 Nov 2021 16:29:56 +0000 Received: from VE1EUR03FT034.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:461:cafe::31) by AS9PR06CA0399.outlook.office365.com (2603:10a6:20b:461::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.19 via Frontend Transport; Sat, 13 Nov 2021 16:29:56 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; Received: from nebula.arm.com (40.67.248.234) by VE1EUR03FT034.mail.protection.outlook.com (10.152.18.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4690.20 via Frontend Transport; Sat, 13 Nov 2021 16:29:56 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Sat, 13 Nov 2021 16:29:52 +0000 Received: from e124191.cambridge.arm.com (10.1.197.45) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2308.20 via Frontend Transport; Sat, 13 Nov 2021 16:29:52 +0000 From: Joey Gouly To: CC: Linus Walleij , Andy Shevchenko , Hector Martin , , Joey Gouly Subject: [PATCH v1 4/9] pinctrl: apple: make apple_gpio_get_direction more readable Date: Sat, 13 Nov 2021 16:29:39 +0000 Message-ID: <20211113162944.22412-5-joey.gouly@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211113162944.22412-1-joey.gouly@arm.com> References: <20211113162944.22412-1-joey.gouly@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c3eb95e6-4a5c-4044-780d-08d9a6c2d922 X-MS-TrafficTypeDiagnostic: AM9PR08MB6804:|VE1PR08MB5775: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:494;OLM:494; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: WDsEflV68dS00VvFcW4pqK/20V4da1Y8/nuBr24LSbsJZ/qVcGChMYoGQRx7dhxeyAwuK7Iq9dTHver9NHt6f1yB/wbzF6KBBPEl7b5dJDGx2PAJdvAROOhp2emTw0gFH/Cg+kGc3w5efIonJvDZPPcfqkEVujHXK4AOdCSTQqJC0HxU8SavwwR8d+4X4YNxVLrgm9RpLmgJvSwiwbgrq3bKYiaWGwdCOuYZdLXT2YJtDp+T4kUo/U5sySNhXItWwJgUbHUtNkZNXIAV2yx8ralAcEBtaYvxftaWdosE1D8yvWCiZWzWyqUqVSMfqybDFemukVV62iym3V4RBGXFdxqPP4qPyAUNsf/uVHEwQZKqkuvIbbzT4HueO6Eog+v8cTpVCEcim1eaxjJaY6WTXacEaVk7+JAmTx4XUlo8uvOqSq1Z29/6lTfhgDq5+4D4gIStCf0Y22WBh00ZxQd/UB/or3JMxPz6KAvW8aiZNt2hNPzchKbidZr8hvGHAbRCZCgXmtJ3FePlyBB3l8bJzMmlWOVnY9w1soCnCLgo6FJ/Les7pSNmcKPaLoKc3z5wk9EoAeF6A6dSerVcGlWbEyFXOgcinP5n1WENjA5Z7xmm0yAkAMH/O18oxHPukgJwQe6w73DEc5aFY0LP7X3IKJeJSY7l0hwUt8HwyEFuBs2L2CkGSjwKwa2b5bhGDCvqRFYD+WaS35P/laFngR1JZLqlE2T0skwMsnMrzKL4zs9s3tDC8k+SGkvJM/CGIkDnodtgvLqpXRvByA1RQtvuew== X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(4636009)(47660400002)(46966006)(36840700001)(4744005)(81166007)(356005)(36860700001)(186003)(316002)(86362001)(83380400001)(82310400003)(36756003)(5660300002)(54906003)(47076005)(70586007)(4326008)(7696005)(6666004)(2906002)(44832011)(26005)(2616005)(426003)(508600001)(8676002)(1076003)(6916009)(336012)(8936002)(70206006)(46800400005)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB6804 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT020.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 2115c8e4-8473-4f11-670e-08d9a6c2d40d X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NsPhYOfkgWB2s29yxQn/r1iATOVUz68vQjfHvMlk33EHBzMYlI6vXb1dzku33RVkP4HW/23IifsqT5hFI9vnNa00/Q8YZdtjJPv5EuBaK8+Fd3LfhV87E7NqEKpwkBy7ffqUnXA1pyHlRC4PWA6bNvNe+dDfSpMVtEDb3hVRc9JM5hCRq/Umcmcp6cA/535rHViQBAVNru/kcR3221despCNFdMsGe8QL5fXEgnRsUy/I8hNaabPq3/MKTJQefuzvUnc7WIQhVECyhAxwJnSVcOJJ4EIYXTliiYRkX8gef1VoaTOSGXc8H6h2OvOvi0ODdRZppoSnYu2DPlOKtdO1Yh3DO0y8AnZhgxAbqCU2ieo+MGYWqk9w9yBp3LOSU4e0VH6tRR08LWu8UebCT/B1r5BL1r13VdpUPnPIyYWmAGHzsZC07fSo+E3Vc7d62srToZzBiPxjZqEbtwrJb1bdPkB/HM4UFxMp1mFem7YLaJbPUouOjvsU36HJ4FYjBQrh5LFas9AjhDu6FGBNKdwMQJgP+OL7at8Wx0QG/BatScERhMmQNxYbOTcC2cYgc8EgAr0qHzXWJA3JHlFgkfLtPAwzxFqt4INUWG6/dS/Ay+uqh49H3FUAqufYt0BhtRr4D5SAn4/5bCXiAtrTRC0hV3cPoO36JIdTbO6NIIONx0dSq0oCGrUhvYanub0MpqBRmoNwIGn7Gx1tCTi814tXIrHlHqAEYQZx+gKUf4guL4= X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(47660400002)(46966006)(36840700001)(2616005)(1076003)(508600001)(426003)(5660300002)(316002)(70206006)(44832011)(26005)(6666004)(4744005)(186003)(86362001)(54906003)(70586007)(336012)(4326008)(7696005)(36756003)(47076005)(6916009)(83380400001)(8676002)(36860700001)(8936002)(2906002)(81166007)(82310400003)(46800400005); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Nov 2021 16:30:04.6336 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c3eb95e6-4a5c-4044-780d-08d9a6c2d922 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DB5EUR03FT020.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5775 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Try to make this more readable by not using a long line with a ternary operator. Signed-off-by: Joey Gouly --- drivers/pinctrl/pinctrl-apple-gpio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/pinctrl-apple-gpio.c b/drivers/pinctrl/pinctrl-apple-gpio.c index bd7f28150ac0..fba2d4ec383c 100644 --- a/drivers/pinctrl/pinctrl-apple-gpio.c +++ b/drivers/pinctrl/pinctrl-apple-gpio.c @@ -194,8 +194,9 @@ static int apple_gpio_get_direction(struct gpio_chip *chip, unsigned int offset) struct apple_gpio_pinctrl *pctl = gpiochip_get_data(chip); unsigned int reg = apple_gpio_get_reg(pctl, offset); - return (FIELD_GET(REG_GPIOx_MODE, reg) == REG_GPIOx_OUT) ? - GPIO_LINE_DIRECTION_OUT : GPIO_LINE_DIRECTION_IN; + if (FIELD_GET(REG_GPIOx_MODE, reg) == REG_GPIOx_OUT) + return GPIO_LINE_DIRECTION_OUT; + return GPIO_LINE_DIRECTION_IN; } static int apple_gpio_get(struct gpio_chip *chip, unsigned offset) From patchwork Sat Nov 13 16:29:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joey Gouly X-Patchwork-Id: 517184 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B30FAC433EF for ; Sat, 13 Nov 2021 16:30:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8EB2460E75 for ; Sat, 13 Nov 2021 16:30:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236034AbhKMQdA (ORCPT ); Sat, 13 Nov 2021 11:33:00 -0500 Received: from mail-eopbgr140051.outbound.protection.outlook.com ([40.107.14.51]:33536 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S235909AbhKMQc7 (ORCPT ); Sat, 13 Nov 2021 11:32:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PgyIFblOe5qPv5E0wYV+J5dpXgSmAd0z/ZUnO+LvYQM=; b=tPwG8djKpMbYgxEfLdB0Y6F7sXHc2oPa6v42U1UMQdqO7Jtgn8x4WsvjemdQLUe6sQNxbAauFrtzUhANRUa8YWbYgiFabZ4PBz2TUOxgnNZb6AXOXJWGRbSFAB78eL7+VzVnlndVC6AoJCILQC1ilZzODfDiKRDIPoquKz9Jqfw= Received: from DB3PR06CA0003.eurprd06.prod.outlook.com (2603:10a6:8:1::16) by DB8PR08MB5465.eurprd08.prod.outlook.com (2603:10a6:10:118::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.26; Sat, 13 Nov 2021 16:30:05 +0000 Received: from DB5EUR03FT039.eop-EUR03.prod.protection.outlook.com (2603:10a6:8:1:cafe::c7) by DB3PR06CA0003.outlook.office365.com (2603:10a6:8:1::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.17 via Frontend Transport; Sat, 13 Nov 2021 16:30:05 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT039.mail.protection.outlook.com (10.152.21.120) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.19 via Frontend Transport; Sat, 13 Nov 2021 16:30:05 +0000 Received: ("Tessian outbound 1cfce3f02e53:v109"); Sat, 13 Nov 2021 16:30:05 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 6697cc7c218d05c8 X-CR-MTA-TID: 64aa7808 Received: from 499bca74dc51.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 0B4BAA20-682D-4362-80A2-1EAF0C3814AB.1; Sat, 13 Nov 2021 16:29:58 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 499bca74dc51.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Sat, 13 Nov 2021 16:29:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PA+nRmR7GurdVX6JpgVRHMpUcxB8nGv3vsn89N95kcvzPhtVi6Mh3ZczB62Ds0Mhp5j9+8/DIJyeChxopbK3ftKS12YiD51PIC1QGepuj1pQIg4OikGiJTR7YWO4CPXqYHfkW49hJgZ3DGLDVUoNTie49wl/lKLxSP3rCRN87HI/ruV/lRhWWp6hBJQ1DVmJBTcIjf7PY5WbP19PyIBzQ8hUD1nSZ9PMtd3SM3EAD07afzfffh9b4zuwRlDlxbrmoDUdPiFxMT73TDc11adHuKSzLdIHYazoULrzkkLA5Wj/u9NITTiZtHH0pRKiMC/XJ+xct1zQzhe4Lg149UU2Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=PgyIFblOe5qPv5E0wYV+J5dpXgSmAd0z/ZUnO+LvYQM=; b=IXK/dV6Y7YcvVBxtKSt6YF0Gnj+K+SCJ8EgP5nehZj/QyfQUHBHRGknjxmYSYdV5FHpAx5Koq5y15L/q7kTpO8bYayDtjkG3wLn+dv6sRU//+Sq3XSB1azaULKthruotYOhkl/2vm04NFfveq93xIzqZEK46RHu96AeD5xYNC+MHflUHg8zWlCmzxc+R/J/RMtZ7nQZcNRtrabH4Jki+MI+EtP4wqaGr2zcIaJI/wn6DPSKfojOC48j6BsoIbhOPSfE0tHEOvajQBMOTowwMyxf1HfLdOCKTK1HAjDBFTNRscJx/GwbhCuwxNsJy4Cc4TZ2EJK/UOcsUc/STzF+J/w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PgyIFblOe5qPv5E0wYV+J5dpXgSmAd0z/ZUnO+LvYQM=; b=tPwG8djKpMbYgxEfLdB0Y6F7sXHc2oPa6v42U1UMQdqO7Jtgn8x4WsvjemdQLUe6sQNxbAauFrtzUhANRUa8YWbYgiFabZ4PBz2TUOxgnNZb6AXOXJWGRbSFAB78eL7+VzVnlndVC6AoJCILQC1ilZzODfDiKRDIPoquKz9Jqfw= Received: from AS9PR06CA0407.eurprd06.prod.outlook.com (2603:10a6:20b:461::14) by AM4PR0802MB2305.eurprd08.prod.outlook.com (2603:10a6:200:5f::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.16; Sat, 13 Nov 2021 16:29:57 +0000 Received: from VE1EUR03FT034.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:461:cafe::60) by AS9PR06CA0407.outlook.office365.com (2603:10a6:20b:461::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.15 via Frontend Transport; Sat, 13 Nov 2021 16:29:57 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; Received: from nebula.arm.com (40.67.248.234) by VE1EUR03FT034.mail.protection.outlook.com (10.152.18.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4690.20 via Frontend Transport; Sat, 13 Nov 2021 16:29:57 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Sat, 13 Nov 2021 16:29:52 +0000 Received: from e124191.cambridge.arm.com (10.1.197.45) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2308.20 via Frontend Transport; Sat, 13 Nov 2021 16:29:52 +0000 From: Joey Gouly To: CC: Linus Walleij , Andy Shevchenko , Hector Martin , , Joey Gouly Subject: [PATCH v1 5/9] pinctrl: apple: give error label a specific name Date: Sat, 13 Nov 2021 16:29:40 +0000 Message-ID: <20211113162944.22412-6-joey.gouly@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211113162944.22412-1-joey.gouly@arm.com> References: <20211113162944.22412-1-joey.gouly@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cc467e3d-4c11-4940-04b6-08d9a6c2d98f X-MS-TrafficTypeDiagnostic: AM4PR0802MB2305:|DB8PR08MB5465: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:1122;OLM:1122; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: CkGXoSugUKI+rt1mfKSwECD/Tjm8fc9YgWCpmFBU74PfsJ6BGXIzuW65LFfbaz5A69XzxU11PiiLH3aesBtKe0kfcw4hIju+uhVqcqYKbQfK/LC6WowJovM6tAM4NzB7pnfS0TNPDukq4mIYIIV6k9dYoo5iOpJW1OyzC4ADqD3sGaLhsgdZFo9wJJ0nyoym7nYzQeqyYTk6kW5MRNhXQq+Y8DQkLnWuPwi179gLuV+62pVJDWmhfmDYv9Df939T0sdJAdNYMSMsk+gXO+mrUFq8ndvTUFp+fj9B71Ht1ph30GHAYlwy+By+PCvsNAcOSZdBy1GRFX2jmeNQ4dQSsGBeHQR3NjmI5nohTIOXcEqysYDEooBxgcjFYbjPnnlS3vbN3gn/qh0xciWm7uIOW+JxA5SxSEYzb0RcHLwGpOBzqJlKQ16aMVqOJTzK8vg/UMQtFRlf9KT18mBDy5amCfZUTsAQz/RVW0ya/rybJmSdTwqfSEvhOy/pwWlPiyg76fJQulP8xov8Q/T6gYgXIXLcrR4iS6WLptEMFgD/2wBAphrwJ4Vr6nN1MiRjR5YSV0pRXAD9twZgO8ZYZL+wSRowTBjyvESHC4/M5gY1pc9taMSVm+MHqUvz3aKeF8jRaiuBvWEzhuBXsASqPO08BfBbccrM12itba5mtVFLLRg8aZr+r5IlAi8hsxkdZ6WFxWvubMe9iKaYuGA+0LBmJYwy2PpuBrmy3rt/dfTm53vljgVlOMp6ij5vIrotpPoKXIZa+eQj7Z70kidzczOXgQ== X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(4636009)(47660400002)(46966006)(36840700001)(81166007)(54906003)(356005)(1076003)(2616005)(82310400003)(4326008)(36860700001)(8936002)(36756003)(44832011)(508600001)(70206006)(70586007)(5660300002)(426003)(8676002)(4744005)(186003)(6666004)(336012)(83380400001)(86362001)(26005)(47076005)(7696005)(2906002)(6916009)(316002)(46800400005)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR0802MB2305 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT039.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: e1216e81-4e6e-413b-6d8c-08d9a6c2d4e6 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iLvuModSD6dFmU+bDI+e9KLYHBP8DSvjFWSFc2XW4Gl90RqPKSNEEKvuonrSdV37yFhvOzvK7+58EJIvaPAK9KGlSazmIaHC37IZnCtOWuQ/dq4qAWPTj1rF44/RHUpJqhORcC4XJNoeWIqQcZDXk62XYD9Vb2Npyibedm9+J9RL73/nuPupK9HbFP8ZGTuH0r3j1q9yQBP78KZIBBqplpdmdD6AASLPohcjM07W6ESssLuMAd2Gv4jmLQGJllgberf8B5c7MoePcTq3fh1PlYNe6jq7etUn8evG+Cka+KAoLKgQefV090p2/8F37iP9qj+3+OZde3sQg8NEZp0aMrwbDkK2XGKh4mluPKXYoktK8XGQ5RKXjfmS64pFT4tqDpLhhX2EZhiQRvx8VhaZPHh+NUwJCcAd1Y40+ciWs4VW2px2PG2sUzZJvCJv4JUgaz+i3CcNxe+eyVb78sbu9R8UYjrN6tYvkfY2q8FollDPY/TnRv1cj0PI6rtcyPNZFu6KiHUjc76D7rkQtF47LKKMTCDwXZU0Dsy6+k7mJORvEwV2VpLsYEaX98upYiVPstZtFFvdLe5c491WTKsTcJBVnamIhXi8HJ+NZx88zHMgAJvwD1jXVfIdmYev4G1/IpE2TWkVtxTTsqlJONhHYfPCWTflgNJ8RwbSgcVpGxo9HQg4EZRdoXEgBtySoRqogr7Tbdfz4fkKxLoYX40Fmna/VOR5epVHUUiS0lngypw= X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(47660400002)(46966006)(36840700001)(2616005)(426003)(82310400003)(336012)(6666004)(186003)(5660300002)(26005)(7696005)(1076003)(8936002)(508600001)(6916009)(2906002)(4744005)(316002)(8676002)(54906003)(4326008)(36860700001)(47076005)(81166007)(36756003)(86362001)(70586007)(83380400001)(44832011)(70206006)(46800400005); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Nov 2021 16:30:05.3460 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cc467e3d-4c11-4940-04b6-08d9a6c2d98f X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DB5EUR03FT039.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB5465 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Signed-off-by: Joey Gouly --- drivers/pinctrl/pinctrl-apple-gpio.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/pinctrl/pinctrl-apple-gpio.c b/drivers/pinctrl/pinctrl-apple-gpio.c index fba2d4ec383c..fb34cbe189ce 100644 --- a/drivers/pinctrl/pinctrl-apple-gpio.c +++ b/drivers/pinctrl/pinctrl-apple-gpio.c @@ -392,13 +392,13 @@ static int apple_gpio_register(struct apple_gpio_pinctrl *pctl) GFP_KERNEL); if (!girq->parents || !irq_data) { ret = -ENOMEM; - goto out; + goto out_free_irq_data; } for (i = 0; i < girq->num_parents; i++) { ret = platform_get_irq(to_platform_device(pctl->dev), i); if (ret < 0) - goto out; + goto out_free_irq_data; girq->parents[i] = ret; pctl->irqgrps[i] = i; @@ -412,7 +412,8 @@ static int apple_gpio_register(struct apple_gpio_pinctrl *pctl) } ret = devm_gpiochip_add_data(pctl->dev, &pctl->gpio_chip, pctl); -out: + +out_free_irq_data: kfree(girq->parents); kfree(irq_data); From patchwork Sat Nov 13 16:29:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joey Gouly X-Patchwork-Id: 517181 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 012DFC433EF for ; Sat, 13 Nov 2021 16:30:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DC5D861168 for ; Sat, 13 Nov 2021 16:30:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236042AbhKMQdO (ORCPT ); Sat, 13 Nov 2021 11:33:14 -0500 Received: from mail-eopbgr30060.outbound.protection.outlook.com ([40.107.3.60]:29638 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S236045AbhKMQdN (ORCPT ); Sat, 13 Nov 2021 11:33:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QBhS06QuUTSdOlylvab77tl6FTFv+94nH0b7kNwQv1Q=; b=OrHyey7l8Baal3qc5pwGIcQYYAWcM/iOxnTfP+0Ef9Gl7l82py6Y3fjdsg5ZW1Nbqbl00glvzO5bRlX+t9Wb/Ns5K7iudIGGlsBt14OynPjMZHxVqVv7srbcSa1ZtNnuJQJDxTPBHfdyjsF69uO7c8ByYUM1z6il4at2SFcJEJk= Received: from AS9P194CA0022.EURP194.PROD.OUTLOOK.COM (2603:10a6:20b:46d::28) by DBAPR08MB5765.eurprd08.prod.outlook.com (2603:10a6:10:1ac::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.16; Sat, 13 Nov 2021 16:30:19 +0000 Received: from VE1EUR03FT037.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:46d:cafe::1) by AS9P194CA0022.outlook.office365.com (2603:10a6:20b:46d::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.15 via Frontend Transport; Sat, 13 Nov 2021 16:30:19 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT037.mail.protection.outlook.com (10.152.19.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.20 via Frontend Transport; Sat, 13 Nov 2021 16:30:18 +0000 Received: ("Tessian outbound 798acf5fb8aa:v109"); Sat, 13 Nov 2021 16:30:18 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 39407971bbaf0c56 X-CR-MTA-TID: 64aa7808 Received: from a34eafe9044b.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id CD3D40B0-373D-48F5-ADDE-0D7B6009C9ED.1; Sat, 13 Nov 2021 16:30:12 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id a34eafe9044b.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Sat, 13 Nov 2021 16:30:12 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vnwcflsuz3/+XDvY6EMUP0m6qX0dcEWtuvU2F5xdPXSkoxONVxnF1BCjpxt5mwMlk1kymvtgtksJsGRXLuFQ/+qr7Icc3FqWWCaNW0sfxEvsjgaB8g4ERhWTR0USMHskVcjB3OuUzZhrFgvN8TI2MvQS5OK87a+3X8Z4Fg1hZQih7kRec8sOfiSwBaFt0P+OtKMlUdkd80i14T4TmFdIfEnvi59d6BD1i5ODwkp1Mh2XH2b9Nay2Fh0XsSI+qonx/gxPXy1sJJgxs21jJBfEBFyS71zGXYnVdzOKmYxM1fYuSa/Pm/ordCyoKye4Moo2AfyIpXiQKr9g5zGpyhDnJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QBhS06QuUTSdOlylvab77tl6FTFv+94nH0b7kNwQv1Q=; b=Ag27EidaFmnOpGVMZ2BaFrZ+kxGE6sqlUb1y7GvStSwn0sCT18CgkFC4l7qEpJvluqIfSx6aNR2Wt2JTS5R6wm96cM94tVw9Xs67hfdKCmOhujeiywibMpzeaP/g3Ac4Eh4sGRrZCl/bT8ZmOof6g3bxwMpPwn45t8bvZuXdsxas6CZS1FCWhsfnNV8JMAT2hB0AosRP4SjwgvAF9DaNT+Hov9BpACYORWt+HvvuCqNMO6I2B62XlNzsnZ8d3WJ0C6CB5r95Bdgy60/PNVTl0T5bTscd/ynli6y7od+jEIgZCxbxPwVEq0M08QqkLf9018UVEqE7j/p5xTvmg4jR/w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QBhS06QuUTSdOlylvab77tl6FTFv+94nH0b7kNwQv1Q=; b=OrHyey7l8Baal3qc5pwGIcQYYAWcM/iOxnTfP+0Ef9Gl7l82py6Y3fjdsg5ZW1Nbqbl00glvzO5bRlX+t9Wb/Ns5K7iudIGGlsBt14OynPjMZHxVqVv7srbcSa1ZtNnuJQJDxTPBHfdyjsF69uO7c8ByYUM1z6il4at2SFcJEJk= Received: from AS9PR06CA0410.eurprd06.prod.outlook.com (2603:10a6:20b:461::28) by DU0PR08MB7487.eurprd08.prod.outlook.com (2603:10a6:10:357::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11; Sat, 13 Nov 2021 16:29:58 +0000 Received: from VE1EUR03FT034.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:461:cafe::83) by AS9PR06CA0410.outlook.office365.com (2603:10a6:20b:461::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.19 via Frontend Transport; Sat, 13 Nov 2021 16:29:58 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; Received: from nebula.arm.com (40.67.248.234) by VE1EUR03FT034.mail.protection.outlook.com (10.152.18.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4690.20 via Frontend Transport; Sat, 13 Nov 2021 16:29:58 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Sat, 13 Nov 2021 16:29:53 +0000 Received: from e124191.cambridge.arm.com (10.1.197.45) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2308.20 via Frontend Transport; Sat, 13 Nov 2021 16:29:52 +0000 From: Joey Gouly To: CC: Linus Walleij , Andy Shevchenko , Hector Martin , , Joey Gouly Subject: [PATCH v1 7/9] pinctrl: apple: don't set gpio_chip.of_node Date: Sat, 13 Nov 2021 16:29:42 +0000 Message-ID: <20211113162944.22412-8-joey.gouly@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211113162944.22412-1-joey.gouly@arm.com> References: <20211113162944.22412-1-joey.gouly@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b534802a-416b-462e-3968-08d9a6c2e1ae X-MS-TrafficTypeDiagnostic: DU0PR08MB7487:|DBAPR08MB5765: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:628;OLM:628; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: z2JJehomScOJlRUh2YH2IJsjNMr9/TcRfKFb9/zcHZN9EtE1ZKKmPVSPjU6x8a1k87A3GLim0IkUQN7ba3y5lyusP22NBLp7NNxYrE4l3uyBy+vbs0argDytgdYGGZEee11U3vE3UYEVsDXpQrklAjrf97PdDQZaTkx1oAzgJzrpAB5PNZ/zUd/nBIOaDhVC7tlSEz2hsVGnuVPshY4KkykYepmqCFEtb9JQ3ZSP1MfAPeAad+vWbSZIyrp2g1UE+9flOfRuMJhx2v5CrLmxrdQeyvPQGKu0lMzlrYyrcNEWB85xu62mrDQxqwiWGZwsCWknOnwpU6XZUKTRAoLHm2Uz3C7kaU5KQBVZEouUooQxQ0q8hd3T/5GqNimb+r93YmYvW9v3rGXLMdaZTYTLF8O3Rbx0Gp1QHwLWVNQTUk5bRWo76ymgLlrR2XqyXgu/kRIwUPcoO5Kz9OgMvD4+4ePhDGpHVbLxiXRIrslzwcu5l9Rt2XVOiCenRKTmU24aGPLQ/22k1OmU6DDLj3vTI+N0IH/x7AcIJr40zGaSJue4jnNYCbMplD9+ZNQHiBeBeZZvA4VUWPcN9TCpG7WxXVtooY5hU/FSSKDxxw9Fos+XEU93s3clGovwBA9jlLQAwTjqOG1wZbYQws/JAAlP+ET+qT+r1+IIoQLjEQTP1G2H9h8oLMLJwOzzxtfRO5IYY+JA81C9kmvBk1MYX4e7XjRiV50i9SFmdDWFcYHC30z3AiNFLK3uphEPHbvdTvJ5TYb3mNazRexY5fd3yG+Fsg== X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(4636009)(47660400002)(36840700001)(46966006)(1076003)(4326008)(83380400001)(426003)(336012)(36756003)(316002)(81166007)(26005)(86362001)(356005)(508600001)(44832011)(5660300002)(4744005)(8676002)(70206006)(70586007)(186003)(54906003)(7696005)(6666004)(2906002)(8936002)(6916009)(2616005)(47076005)(82310400003)(36860700001)(46800400005)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB7487 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT037.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: b107ee69-f87a-4e83-a6b3-08d9a6c2d585 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8Nw52gxewJNww/m6P5PBljnYH25Ofms9LU2rFIKFck4tGS7S9ggdv+aIvSI1WDvzwWcdDmzLopM/xhHuv34HYKniyZKKHweyZUmk8y5CwdFLrcw1dBKkLHgNQfr0kOSqF8G/dOzv9yrFfOeNuYcUIntTHbL/DEsokZyEv+WQSb1g86042u2wn3LxlnmG3HTLfOT1VQZJ7DZ/sD8XjcsfrivesbbN+nYnsEV20MU3U5y+0cXbRnabHXAC3ROT8HdkIdBuy3cEBYIRJd21MS3jCBQ4kLd4e3OoD+MxOlqgAzE9m0Vkq3kF9mUltFakd6VvkdWalsW7O5bEXs6cQhdaaZXtrpG4UdOPlxW8AJFghwSqmJZ31sI18RXOzcvARxToZb0sJWnwZAxp90dS8ibOM8UGWjT9y7QZPecz6PvTTGFlZg6vA+mGH/dGz7SG6YOVuUC64HndiVSaRiGTBZ402XuAVz9ZSu6SRU1WA8OSAt/JVYQTrxq3AzCRi5FESOGywY9LZ3/iO419Bi+Vs4JwFGm9Bm2LdFDJNxxnimZP7bqu8OMbJScVyYz0NKxeVasgcT/NJiS/TnUm4JYyPcA5qAYwKEGHd51Vj8QFYS8sy8dbUz6sjnGDHwPOZ2bzIzeKIfjYt8x/5RAZNtvcbsaSPnpqK85jPYPtOrLA3nX0u1A8RrqB2TmgzPJpA/5JyNeQcbguji5W5d6DR17k7cUfci92wL77bTSpo08bIMrbzko= X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(47660400002)(36840700001)(46966006)(47076005)(83380400001)(81166007)(7696005)(54906003)(8676002)(4744005)(26005)(4326008)(36860700001)(316002)(186003)(82310400003)(6916009)(36756003)(1076003)(70206006)(5660300002)(336012)(2906002)(86362001)(8936002)(2616005)(426003)(6666004)(44832011)(70586007)(508600001)(46800400005); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Nov 2021 16:30:18.8730 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b534802a-416b-462e-3968-08d9a6c2e1ae X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: VE1EUR03FT037.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR08MB5765 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org The gpio core code sets of_node, so no need to do it here. Signed-off-by: Joey Gouly --- drivers/pinctrl/pinctrl-apple-gpio.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-apple-gpio.c b/drivers/pinctrl/pinctrl-apple-gpio.c index 471d3abf9d99..8e794ebb47da 100644 --- a/drivers/pinctrl/pinctrl-apple-gpio.c +++ b/drivers/pinctrl/pinctrl-apple-gpio.c @@ -373,7 +373,6 @@ static int apple_gpio_register(struct apple_gpio_pinctrl *pctl) pctl->gpio_chip.base = -1; pctl->gpio_chip.ngpio = pctl->pinctrl_desc.npins; pctl->gpio_chip.parent = pctl->dev; - pctl->gpio_chip.of_node = pctl->dev->of_node; if (girq->num_parents) { int i;