From patchwork Thu Jan 12 16:38:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 42645 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp3989180wrt; Thu, 12 Jan 2023 08:54:46 -0800 (PST) X-Google-Smtp-Source: AMrXdXsSOkHIxL5wbOAN1uhpmgaQhlae0HgOKpWtHh0VFzlci5Km9uXLsLE60ZmorAEjqUryiOzN X-Received: by 2002:a17:907:a485:b0:7c1:709d:fa49 with SMTP id vp5-20020a170907a48500b007c1709dfa49mr84165811ejc.18.1673542486132; Thu, 12 Jan 2023 08:54:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673542486; cv=none; d=google.com; s=arc-20160816; b=mp1Qdv7qPmCc8NvlVuKzYi0i0PRr0NSh4qrdpX7GXxvs5ZK3gZUB0RASNyl6cslTWZ +/3nNp8C0NFITWAAULmbR/yBUppWhxsO4PuFrVYvjDqFRDFKwGjP63sY2a+ObaF43aqj 4gmMDnzDBnJaffWZsYnaXXm1CjRCZCuzyR481L5IiF8ZVUvYh3G/g8r3vtdDsjSxnxyi 6qNrehr9r6qzPSDJEy760Yyuj5wcdXJHOLtchvwT4PjCNm2CEgkYuYyxQowo6DbSakoo FbPaSdbFvXy1mBeao21nqjUo9+5Ui1r7XbX3g4hs8EER+gF9Mt8KYyUn4y7/mis0TtxQ Z3fA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=YLWMzvgDF9hy5bVd7h/DZaPP+A0dvJQ36dHwojKYuhY=; b=v28YCkfW56+jHS9RyvEKKPWZYPCwJz1YhIRKbo8CYlOQ4PyS9v6obviZ6bwS6aafRU Dosyt2v173mnXZ8oIWLmSO3CCkhkLxM1no48X5YICpkzi8TpDpthr1JX6onOPV32SXy0 n2n2hHOZ2qpL3yU/Z8YhmksRVMa1H5vazwkCzk/MGCeLykHfHBuJn6OfLuy/h9Qqqlqd +0/+c7eITYhKpzKd9hGzttPUyUhgxKYZy4NZd2P7pFqfFPdRLC7NZDmuTFJUk7VNAC3G RUzlX5zgVMRkx8X8OsyWS5cKTHm1Wlipyp06tzSVLwYOmK0llKzR3SBiNSY67AsRJi1+ Hwxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=R5vyJ2Ba; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id go32-20020a1709070da000b0084d36ddfb02si16959505ejc.771.2023.01.12.08.54.22; Thu, 12 Jan 2023 08:54:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=R5vyJ2Ba; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241346AbjALQty (ORCPT + 99 others); Thu, 12 Jan 2023 11:49:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241305AbjALQoo (ORCPT ); Thu, 12 Jan 2023 11:44:44 -0500 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2026DBE14; Thu, 12 Jan 2023 08:38:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673541513; x=1705077513; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4BOtLkvp4AVdkK2zPygGM6fUB1lerPp5K/6FblR5a3Q=; b=R5vyJ2Bagf28KdcLpfMWEKK5BjBZkusDsNjni2ghCRQUqfVKwfjpxcrs TXkCSRImEkmjOPXH5Yp9jW+F+y6U1od1pg3zAns3M7aRI8Ef3F11TmAXF aYLg5QnZvFTTrAeCqQn672iYh9ccv9tTe6+n8KaiRWlAntvdW1D8vNiwP eXVrVtYyVIBc19iZKZRSEVORw7nZ18sNdco5+2ZUr8Az8cK4haiLTVQBq 6Sn1OB+ZIh5g9ovU8p+r2z2MptqvQyVp35o2SgUOUiQt2xxPGd0sEbeAi D22IRZrUzrggCcKD9Pnn0MBjOTyEcqjOOsx6WaXaW+gzxjnXxe8g7htZx Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10588"; a="304132472" X-IronPort-AV: E=Sophos;i="5.97,211,1669104000"; d="scan'208";a="304132472" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jan 2023 08:38:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10588"; a="635446946" X-IronPort-AV: E=Sophos;i="5.97,211,1669104000"; d="scan'208";a="635446946" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga006.jf.intel.com with ESMTP; 12 Jan 2023 08:37:59 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id B8AE0130; Thu, 12 Jan 2023 18:38:33 +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 , Ray Jui , Scott Branden , Broadcom internal kernel review list , Andy Shevchenko Subject: [PATCH v1 2/2] gpiolib: of: Remove no more used ->of_gpio_ranges_fallback() Date: Thu, 12 Jan 2023 18:38:25 +0200 Message-Id: <20230112163825.72983-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230112163825.72983-1-andriy.shevchenko@linux.intel.com> References: <20230112163825.72983-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754836486290267739?= X-GMAIL-MSGID: =?utf-8?q?1754836486290267739?= Since the only one and last user of the ->of_gpio_ranges_fallback() gone, remove the callback completely. New platforms must use the gpio-ranges property. Signed-off-by: Andy Shevchenko Acked-by: Bartosz Golaszewski --- drivers/gpio/gpiolib-of.c | 5 ----- include/linux/gpio/driver.h | 11 ----------- 2 files changed, 16 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..29c283919f8a 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -522,17 +522,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 */ };