Received: by 2002:ab2:2997:0:b0:1ec:cbc4:63fb with SMTP id n23csp489344lqb; Thu, 29 Feb 2024 06:53:34 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWKeoHT14PlbrmJ7JLRW7Yc0nkaV40MH7ahKrVdAtPYtlRa6bvhtUMceJE0EDb/DpxZ+PcEOiGkKnKjRcqCZ23pNBhilG/YUH2qf/sL1w== X-Google-Smtp-Source: AGHT+IErzgVzarqbz3nh36PW6vQxoIrc4BHkluw76oFInN3lhtqb47cXtcZ48GbPjXQ6LCSOPBX8 X-Received: by 2002:a05:6830:1e97:b0:6e4:9317:34cc with SMTP id n23-20020a0568301e9700b006e4931734ccmr2170585otr.30.1709218414033; Thu, 29 Feb 2024 06:53:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709218413; cv=pass; d=google.com; s=arc-20160816; b=I/y9Olf+ktnZmCWbTBqa/EDT7C9uXjiTNlz3tc3UHzIuXXWWqv9jmo02hMJMs6r2/C XXOHzUATsoliw0A5+3KPTG+3xk3OcCRI0ZWdivAuRTCd0PtTaJ0HS6EBVggZYMiIWk7/ CR7OsxJ1R/8hSzsR/KKjEwbJnctFe3sPAmMjpo8y1hXRnReok7qAU9EMWiLs6XlftDo7 OXk1dQsRkKAW3WrB2IHtERxMvUzN+eoHIdEQrY/tkbQcl7Mz+bzQpGt2ySychWWjklQ0 Lpy6Q8V9MFHUNrchWu/rEpVmiBcvJgdlVO9pkNUcgJLMx1p/75J//BMyzsy0j+PzyGbA DfRw== 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=c80YF+z6sBSmBIcb8LEhkAjryY1iM1p0RN7e34CUk/o=; fh=/yQ0WMMU6iSfCOURJxcAcuvBWf4Rti7xY+fCKCJGOV0=; b=kJ+MwmA0NWbuCi6HgxaXUXA1F7s2ULD/99KsBZpRJb29kEDpuJFK4Wy6RLLgZthIUj 4I9agyLH9rQ1n31TxUnzj9YMec6AcTf3fZF5O5feLd4u3IrZMLRVyFkwtSkhvtGHwhQb vDccglGY+4xUC5xbS3WI5FuJyYBw1KFdsQcu1K/HyD7ItF4XbUTwtI2vP9ux5AcCvnxc 4ve+V7XGG8Cp6wf+PckIIpm352QU3Q+eLeUXB3j0U92LuxlCJkfo63Jz4Q2RlzNTl9nD Eu8VQp5Q9410keycptJBb/8aTLsm2guQl+wNJOiGPQrLSqWtRI7uwq/RWmrz0ggeV/2q /TvQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gEpfA6qV; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-86877-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86877-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id u10-20020a6540ca000000b005dc4190c756si1501515pgp.866.2024.02.29.06.53.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 06:53:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-86877-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gEpfA6qV; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-86877-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86877-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 3D3AC28720A for ; Thu, 29 Feb 2024 14:53:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3C4A213776C; Thu, 29 Feb 2024 14:53:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="gEpfA6qV" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (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 D9ED613775A; Thu, 29 Feb 2024 14:53:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709218392; cv=none; b=bsvBThLncYjxyreOq+g5AHnlmsnp9IX7DUJ8cD0RroWp/YG3hi8GJVwbauU+sJ6WklmzKRDqFHc+hNyTKswFJ1BauZSFZIHHMlhYD+Hvp/B1VB+0NqJz40E318OhqvPwo3fnP9uqSdVr26RUV3KzPS4NZ9Ttukr/Xni0BFh2r8g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709218392; c=relaxed/simple; bh=Ib6eTByt4PRivyNulwEfDuCdZsACS0AUVpPOMm+fhJY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=FKFunRbSpuwc2/3zXDH3VwJOzh9yh8F4DUK2h/QLLQntBJ1A0Q7UfGPyW2hvhZNmBCFJMqYXkgUI1mG0NhDnAR0lR/+1gx9rMN+X46tKScU33hjowGTlfz6JvmQnuV7oA/bhIH8HdVf+0aUXoSM4ULPIRu48phu8po3nDiM8B0I= 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=gEpfA6qV; arc=none smtp.client-ip=192.198.163.11 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=1709218391; x=1740754391; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Ib6eTByt4PRivyNulwEfDuCdZsACS0AUVpPOMm+fhJY=; b=gEpfA6qVfMffPkeE4FdzBAo4z0HybIgIiGsKlO2ja4zuUR8Z4X6TO49u xgb5Gi1iSMXYeuiNh/dYTTTKjLv2yaS6V4h4Eb3Hj9fy+vEuljdv4o6Zj c6VYoLpb5LRpl97ZA7Vmh4oyDsQ6uPmn0ddvjLkHqgaDNtTnvnrf44Wu2 uJG2vQfUGzXOjHTSbS4BMYIgd71iwrZkXWpzMc+q9v88wmNVSYmyv9sMi jc58inNn2xTPZEcOgAi6qcQC1cIes4HRImqAJa03gSC0BE7tv3Sa/Heb0 MMO0Kv70zRvuPDAkIKxqnfLslvjzrK5pRBVYqODPd1onprEO9M0YeKK4U w==; X-IronPort-AV: E=McAfee;i="6600,9927,10998"; a="14326503" X-IronPort-AV: E=Sophos;i="6.06,194,1705392000"; d="scan'208";a="14326503" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Feb 2024 06:53:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10998"; a="937036061" X-IronPort-AV: E=Sophos;i="6.06,194,1705392000"; d="scan'208";a="937036061" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 29 Feb 2024 06:53:06 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id D3F3923A; Thu, 29 Feb 2024 16:53:04 +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 v2 0/2] gpiolib: Align prototypes of *gpio_count() APIs Date: Thu, 29 Feb 2024 16:51:37 +0200 Message-ID: <20240229145303.3801332-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] In v2: - fixed typo (Chris) - added tag (Linus) 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