Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp215689rdb; Thu, 21 Dec 2023 07:17:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IHMVNcrBrYacqF3KjPDYotjPTMeP81enk7Ge0Nk1sAVQHe2bwoMmSEZ1PDJ2uFF3JoVE+Bn X-Received: by 2002:ac2:5edd:0:b0:50e:3568:4875 with SMTP id d29-20020ac25edd000000b0050e35684875mr1965655lfq.219.1703171849035; Thu, 21 Dec 2023 07:17:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703171849; cv=none; d=google.com; s=arc-20160816; b=RhqtaUSO45LXtCRq+3krCSeECBAVbw60I2IhHUc/gmORoSvzZvK3HUx1erCjyeF2+Q AMe/YZ/HAXGFHTbCQXxELnONXOrLonM3GIz7ax9dV1If5iSTC5xlVpJ6pCHTmkhW1hnS TpwPKCM3SpMziNZeHuipVVSB5RYbST6dIojdInXEvhyIKpjpKCF1xVcX9AZHLD5PgkS0 MH1BvAzn45RiAiZa7ZDBWa6DEvR9RPEFBBINsYTnCR/xR3UJ6FUYsFirWXJ/6HfjUuHb Ju0jhpXrr2MYKvPECpUBKfHC/uZJ3HORBnsvBqpjGmIuktvhAE+D/5/956t6fZFwSpkv zSFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=organization:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=+m0QuuLRxm2GfcPJRnSckw5KMFO5x/z8wco6cqZMqew=; fh=T5jjdEulVy6/ha6iQYQG1D+/7w24sdRUzVOXZ1I36MY=; b=d1M8jjirjqRW3C3NCcbJIE4ja1ReQXVp30PfiNBeQT9CUqSMq3M00W8Rvd+v4hY6zd A7sq6LEgdJ6bYFhNcPmINn7vYm2x/PpqougGjIgf53Ylz5Kbl+b7LtfhibiR2zkLSZcd 5vFEvYF0N3Ohr45uDIPxX1kKQIfcIvzaEiGfRDs8SB80QCe/gohoepSzMIh7C/mgjfDp 5omTQcTSQGJwrFWom3fJFEaIhXSDqjQ8h6img6fYqLWbYbJVhWZ0ymJeY3L5cflDovyR 3vV7cb6TnSdOke+cpe/Beg/ZlNhPDmYDqCe11ycQCdjmf4zJTDAvC3wkvp/dU3ofGF+m bsvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=meFCWKZ+; spf=pass (google.com: domain of linux-kernel+bounces-8632-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8632-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 q5-20020a1709060e4500b00a233bdbec63si932732eji.614.2023.12.21.07.17.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 07:17:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8632-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=meFCWKZ+; spf=pass (google.com: domain of linux-kernel+bounces-8632-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8632-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 C2BE01F24E24 for ; Thu, 21 Dec 2023 15:17:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5DC95539E2; Thu, 21 Dec 2023 15:17:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="meFCWKZ+" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (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 73D031D6A9; Thu, 21 Dec 2023 15:17:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703171837; x=1734707837; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=EOkAr+xks6NnAFalQxZEayj9BKUN4na1y02YSzTzR8k=; b=meFCWKZ+2wnslpRTe9fOgJ3Cp3m1TWmThPYt8dkFTdhSRdPVqda22qu2 vJsitH3b3xlQG56J0KPqAbZpuvYR8ogrF5fV3fp4Y1/lXFd47RrtWzcvy 8JB6u5lXURh/45ymmLM5Z24lnZQctSsRBQQu6quK9f+yYx4uybPtanXIO TLJc9NT5dMiq9V0yJ2+8TrfXAplgJwFCbhRIBMdRQ4XoFS0Am57WyfR/k thsiE06bTtHUI2P0BmNE7O9IzWSlZ5pGtH0a+0KUo35Ky/MOR7VxStgkY UFDCQC7Y94KvN1cvrEYZHuoeBkrqyt5CbwyuqTUJTXu0MISTwvzg5G8T4 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10931"; a="3077406" X-IronPort-AV: E=Sophos;i="6.04,293,1695711600"; d="scan'208";a="3077406" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Dec 2023 07:17:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10931"; a="867338199" X-IronPort-AV: E=Sophos;i="6.04,293,1695711600"; d="scan'208";a="867338199" Received: from smile.fi.intel.com ([10.237.72.54]) by FMSMGA003.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Dec 2023 07:17:11 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rGKnL-00000007sec-42uD; Thu, 21 Dec 2023 17:17:07 +0200 Date: Thu, 21 Dec 2023 17:17:07 +0200 From: Andy Shevchenko To: Mark Hasemeyer Cc: LKML , AngeloGioacchino Del Regno , Krzysztof Kozlowski , Tzung-Bi Shih , Raul Rangel , Konrad Dybcio , Rob Herring , Sudeep Holla , Bartosz Golaszewski , Len Brown , Linus Walleij , Mika Westerberg , "Rafael J. Wysocki" , Wolfram Sang , linux-acpi@vger.kernel.org, linux-gpio@vger.kernel.org, linux-i2c@vger.kernel.org Subject: Re: [PATCH v2 01/22] gpiolib: acpi: Modify acpi_dev_irq_wake_get_by() to use resource Message-ID: References: <20231220235459.2965548-1-markhas@chromium.org> <20231220165423.v2.1.Ifd0903f1c351e84376d71dbdadbd43931197f5ea@changeid> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231220165423.v2.1.Ifd0903f1c351e84376d71dbdadbd43931197f5ea@changeid> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Wed, Dec 20, 2023 at 04:54:15PM -0700, Mark Hasemeyer wrote: > Other information besides wake capability can be provided about GPIO > IRQs such as triggering, polarity, and sharability. Use resource flags > to provide this information to the caller if they want it. > > This should keep the API more robust over time as flags are added, > modified, or removed. It also more closely matches acpi_irq_get() which > take a resource as an argument. > > Rename the function to acpi_dev_get_gpio_irq_resource() to better > describe the function's new behavior. ... > + *r = DEFINE_RES_IRQ(irq); > + r->flags = acpi_dev_irq_flags(info.triggering, info.polarity, > + info.shareable, info.wake_capable); Looking at this I am wondering if we can actually to have unsigned long irq_flags; ... irq_flags = acpi_dev_irq_flags(info.triggering, info.polarity, info.shareable, info.wake_capable); *r = DEFINE_RES_NAMED(irq, 1, NULL, irq_flags); as we don't need to duplicate IORESOURCE_IRQ. -- With Best Regards, Andy Shevchenko