Received: by 2002:a05:7208:13ce:b0:7f:395a:35b6 with SMTP id r14csp20945rbe; Wed, 28 Feb 2024 10:44:29 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU0dioJPy+0u53QIu5PO7oltHAajkTqkboX7iA5V5n7pTOXZmHHdm31XXvH87R3U9KuWjiL6CZfjiwuOesYVzgwofNe1l2lRfIuBTsNgQ== X-Google-Smtp-Source: AGHT+IFNEaXpFd0FqbRgxfw+lArlnS9IWbBrE4i8IDLROEsI3yVvsfo3u3GsUWu+CRcZznqRwUCB X-Received: by 2002:aa7:d741:0:b0:563:e047:cb9f with SMTP id a1-20020aa7d741000000b00563e047cb9fmr184587eds.19.1709145869386; Wed, 28 Feb 2024 10:44:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709145869; cv=pass; d=google.com; s=arc-20160816; b=ivnzzmi6MTJXQOBJFPmLvl9eHHOZ0lalhQtnyJve/svVXUq2gkDHtTTrtHaYPCdQVn 6OrfpeqZnw2yMiG5FnIGrJMC5/xoERnwOeCURpD1vcTFYVZcb9RAm5Vmoi4P2qxXYc6S AINokiOqxIfGNbfkHN4+nq0lbhPUaa7/KuzfS8ho7er1BPQ6886Pq5wjqyYH5IRRXLIK 0PPW82I1xwQ4ESpJcTaEAgymAtdPP8hsecW2PQFyKorafeK9GGRG4Evbya7B9ML9jGDz x7EOYhME1E4VI9i4pRnNwAPxPL93YA1shM6jXEjLaSyuJfjA2YcDeyHeOY8gv+h5DArb tnrQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=/sJFDQ1sDKrQEnS/QPM7sPgJ7N9t7L040jYmwMOdFig=; fh=/yQ0WMMU6iSfCOURJxcAcuvBWf4Rti7xY+fCKCJGOV0=; b=yl2q0NJAXYgUaZiWU/5MQzOVG9B+aY+ROmysqT8ZIuxlX0wtxbmNpUVe3OM631MYGL zW3kWQfIA1rdwUJeEtLSPPhuz9q46juQD8tIxhvC2XMs51ZYE55j+wtICYgBrcE9WJ1W /kFXuyrLE3pjbtlsp7V14E9yprVsjo7dM4eRQZBlvF1wZqcYvSninQcKB9BSMa1CGx3I ZUf9kMObJkwO5+BIcj2er6cuVxbzZW/vSmYJKeA6vZ9CN5zNSVqtmg7TqDT+QtM1raLA C4CDFlalDmxXdUVMN8mq4aPW/WzV/gmb9pQRR9FJKB4tjY600NyZoyaooA9K8gwjH/Oz +Whg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gx7X2jbf; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-85544-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85544-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id u25-20020a50c059000000b0056631d89158si1841796edd.402.2024.02.28.10.44.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 10:44:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85544-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gx7X2jbf; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-85544-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85544-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 0BC881F252DF for ; Wed, 28 Feb 2024 18:44:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 38CAE71ED0; Wed, 28 Feb 2024 18:44:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="gx7X2jbf" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7982871EAE; Wed, 28 Feb 2024 18:44:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709145860; cv=none; b=pbxbu4BmVj1oKVmKg000Clvnp27XjxtWOWaQ4HvKmOUOW6D190dDEd4m8ZktvC0YRNwhN5vJBrAJZGFkTasH3XzIn2DCa6IPVi5McFFFoF9ALO5eXFgyUMKTkR34yDCcyr8hsoYTzeoqvIhY3F/2DXy6F4lVet/9VOGlk5KNzLc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709145860; c=relaxed/simple; bh=lDadQ60W+scUEa1H+i74ZjntqFwyrcfss1QHZ2gw77Q=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=B2RftI2ia37gLxYO/Pj+CTukVHxPFLX+UELzVgxTCpmWcdbONK7COErkrPFKWDPGvuJRDOiFtE9eDpxhpb1ye8CXBz8eHRE97nZJ6mFagsBvMy8dxiDFpE6/LqkFLmsRm18hS3WQDZU0il63zS6440jebflxHYhzE7/T0sML2Fc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=gx7X2jbf; arc=none smtp.client-ip=198.175.65.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709145859; x=1740681859; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=lDadQ60W+scUEa1H+i74ZjntqFwyrcfss1QHZ2gw77Q=; b=gx7X2jbfTHOOA7MHEYyd8yDpiHO2UPk/B4uyU4kJenalFkX8AOemTlKw CZI2kTgBref1wQ9GgwMwqu2lWRAQ1pRd5f7ObAcXT8v9Gj1qzK09UqcqK 4B+U/7NQiuBmAGHJzd7oxtEZN6qBNp+DX75OlhNdkhWOd89igkE49Vbkv lwNO4dAx9jElqWuCNyGIfjpquG9H1gjvZ0Q4PDTqziHJIQveDfMHi3aYY qlG0Dekh78cp6Tyw0pobLPg0oH0WntIMPia26iGSVC+I/3HLENmCabCCX fxZSmzRl0IvmcLTGmDy/GgkrSH6JTA8A07aPHI6StYxiZ84RDx2t1mV2w g==; X-IronPort-AV: E=McAfee;i="6600,9927,10998"; a="21023733" X-IronPort-AV: E=Sophos;i="6.06,191,1705392000"; d="scan'208";a="21023733" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2024 10:44:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10998"; a="937034565" X-IronPort-AV: E=Sophos;i="6.06,191,1705392000"; d="scan'208";a="937034565" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 28 Feb 2024 10:44:15 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 0D5D11C5; Wed, 28 Feb 2024 20:44:13 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , Bartosz Golaszewski , linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mika Westerberg , Linus Walleij , Bartosz Golaszewski , Chris Packham Subject: [PATCH v1 0/2] gpiolib: Align prototypes of *gpio_count() APIs Date: Wed, 28 Feb 2024 20:40:45 +0200 Message-ID: <20240228184412.3591847-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Two out of three GPIO count APIs take device pointer. OF case clearly does not need it as it immediately switches to device node inside, and ACPI abstracts that to struct acpi_device pointer. Unify all these by making them to take struct fwnode_handle pointer. This, in particular, will allow to create fwnode_gpio_count() API if needed. The need of that was discussed here [1]. Note, no functional changes intended. Link: https://lore.kernel.org/r/2ad735ed-963c-4e75-b83e-687ea2c0aef5@alliedtelesis.co.nz [1] Andy Shevchenko (2): gpiolib-of: Make of_gpio_get_count() take firmware node as a parameter gpiolib-acpi: Make acpi_gpio_count() take firmware node as a parameter drivers/gpio/gpiolib-acpi.c | 13 ++++++------- drivers/gpio/gpiolib-acpi.h | 4 ++-- drivers/gpio/gpiolib-of.c | 13 ++++++------- drivers/gpio/gpiolib-of.h | 5 +++-- drivers/gpio/gpiolib.c | 4 ++-- 5 files changed, 19 insertions(+), 20 deletions(-) -- 2.43.0.rc1.1.gbec44491f096