From patchwork Fri Jan 13 17:10:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13101418 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 E39DFC3DA78 for ; Fri, 13 Jan 2023 17:35:29 +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=1ffEiICuo87BHfAMfFclyii5U6IU9CdLUFOc0wYHQlU=; b=08H8fGdC74cGwH +KBcRU7cVR4H2SDOkhXyGpb4Iwsjg+cC0WZBxAZ0kiBOufYxgVnTOe7vMxfob5tr3zwtBYtcXQ6mo 9mpBrikpYV0QqTi2erO/6I0dBgiVlxnpvNrtcpenvEV+9il3wgIjD2G8oBNWBgUTGukCR1Gi1Ly2e 4CiBxfWFF3cA3sDKHtIq83MtBJF7zuAXHBDrky/+mpqvQVfEuPfavrISFnfz+iJU79+TDnZ0Mop76 JgYQGxhGSSLUyWTnivxZof0ari22aSbiMwqyBx5MXkIEVhUmVcqBQ3Vu1JRtCmHwmm19+jrjpX+ef A28ZaZTlSjP5oQNkSxNQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGNwN-003nLC-Vo; Fri, 13 Jan 2023 17:34:08 +0000 Received: from mga03.intel.com ([134.134.136.65]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGNdY-003cWd-Gg; Fri, 13 Jan 2023 17:14:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673630080; x=1705166080; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=X8stOTJGnm5tBQ17hxvmLP0ufU3YgC/jbWgKibzqyBQ=; b=HuVli0vao2Z3VqLIbFgQK5T4iL4tsbfitfGf68au0ApUu8TQWe4no53K CNO0DLTlHH4QXUm7Imrnuo/QBE//fxc1/l4If2PLGJrMWoZEzW4nVqsOG rppjm3RfSJrBELtm+NQcyvMbwsSoL7M6qg+fAhfKw15KtaCQi4cZT+E36 mA0MrTqsTXLePpHRGFHZRVFsvyJszLo8fOosqVAMNl2ByLa44MAjOqdLG 2TivDg4HTJdSqeTxxVSeWBkLl5R9jpjtPZGKKdJJGqaXMItrPXT+ielnC yCawOs19WJOB27ayl5dco7C65QqLv+ans3Jml4SnFallK7OSo5fy//lsW A==; X-IronPort-AV: E=McAfee;i="6500,9779,10589"; a="326101570" X-IronPort-AV: E=Sophos;i="5.97,214,1669104000"; d="scan'208";a="326101570" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jan 2023 09:10:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10589"; a="903625125" X-IronPort-AV: E=Sophos;i="5.97,214,1669104000"; d="scan'208";a="903625125" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga006.fm.intel.com with ESMTP; 13 Jan 2023 09:10:18 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 8741F92; Fri, 13 Jan 2023 19:10:52 +0200 (EET) From: Andy Shevchenko To: Bartosz Golaszewski , Dmitry Torokhov , Linus Walleij , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org Cc: Bartosz Golaszewski , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , Stefan Wahren , Andy Shevchenko Subject: [PATCH v2 2/2] Revert "gpiolib: of: Introduce hook for missing gpio-ranges" Date: Fri, 13 Jan 2023 19:10:51 +0200 Message-Id: <20230113171051.19309-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230113171051.19309-1-andriy.shevchenko@linux.intel.com> References: <20230113171051.19309-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230113_091440_928593_68F35A18 X-CRM114-Status: GOOD ( 11.36 ) 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 This reverts commit 3550bba25d5587a701e6edf20e20984d2ee72c78. No users for this one, revert it for good. The ->add_pin_ranges() can be used instead. Signed-off-by: Andy Shevchenko Acked-by: Bartosz Golaszewski --- v2: made it as a pure revert drivers/gpio/gpiolib-of.c | 5 ----- include/linux/gpio/driver.h | 12 ------------ 2 files changed, 17 deletions(-) diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index 72d8a3da31e3..266352b1a966 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -980,11 +980,6 @@ static int of_gpiochip_add_pin_range(struct gpio_chip *chip) if (!np) return 0; - if (!of_property_read_bool(np, "gpio-ranges") && - chip->of_gpio_ranges_fallback) { - return chip->of_gpio_ranges_fallback(chip, np); - } - group_names = of_find_property(np, group_names_propname, NULL); for (;; index++) { diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index ddc7a14a274f..5ab50ba3c309 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -521,18 +521,6 @@ struct gpio_chip { */ int (*of_xlate)(struct gpio_chip *gc, const struct of_phandle_args *gpiospec, u32 *flags); - - /** - * @of_gpio_ranges_fallback: - * - * Optional hook for the case that no gpio-ranges property is defined - * within the device tree node "np" (usually DT before introduction - * of gpio-ranges). So this callback is helpful to provide the - * necessary backward compatibility for the pin ranges. - */ - int (*of_gpio_ranges_fallback)(struct gpio_chip *gc, - struct device_node *np); - #endif /* CONFIG_OF_GPIO */ };