From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 89C6CECAAD8 for ; Tue, 13 Sep 2022 18:13:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232259AbiIMSN5 (ORCPT ); Tue, 13 Sep 2022 14:13:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232686AbiIMSNh (ORCPT ); Tue, 13 Sep 2022 14:13:37 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD2129A954; Tue, 13 Sep 2022 10:21:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663089684; x=1694625684; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=1ZNR5WfgGNzNcp/Bdx5BLP+k/cNO7NVcoI5L/8sUO5E=; b=c7ohSKlN5KVvpqh0u2fJ4ERx1khFt78qw2yruWKVc+djd8wFNoJtsnAg GMlrlY1M7TMJ6HVXHXulXNjq8MXbkYjqrwthYpcaZks2iOL5QUbErWIEu GQos6+mUD8/8uQtlR8eB3GprZhHAO7Bqqv4KnEr9s/LGrbZJyzbodHEWp q/u9LVi9UNBfqrw9aGyGd1w4Ot67fsCp0jLAXcAHxUrp4Ymne5lqLjxC1 i8OsOdDqbRFxbGzBzwWiGp0Wc2O85LwB1hf8zyXgSsobuSlFiYigvCfq2 fz7yDiLedvCI4Hat3nCAJpwXT0QmYhSWHRNS1x6q9WolsQCISQdetyBc5 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10469"; a="285221297" X-IronPort-AV: E=Sophos;i="5.93,313,1654585200"; d="scan'208";a="285221297" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Sep 2022 10:21:23 -0700 X-IronPort-AV: E=Sophos;i="5.93,313,1654585200"; d="scan'208";a="616537399" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Sep 2022 10:21:19 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1oY9b2-001r5L-0N; Tue, 13 Sep 2022 20:21:16 +0300 Date: Tue, 13 Sep 2022 20:21:15 +0300 From: Andy Shevchenko To: Raul E Rangel Cc: linux-acpi@vger.kernel.org, linux-input@vger.kernel.org, jingle.wu@emc.com.tw, mario.limonciello@amd.com, timvp@google.com, linus.walleij@linaro.org, hdegoede@redhat.com, rafael@kernel.org, Dan Williams , Greg Kroah-Hartman , Jonathan Cameron , Len Brown , Terry Bowman , Wolfram Sang , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 06/13] ACPI: resources: Add wake_capable parameter to acpi_dev_irq_flags Message-ID: References: <20220912221317.2775651-1-rrangel@chromium.org> <20220912160931.v2.6.I8092e417a8152475d13d8d638eb4c5d8ea12ac7b@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220912160931.v2.6.I8092e417a8152475d13d8d638eb4c5d8ea12ac7b@changeid> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org On Mon, Sep 12, 2022 at 04:13:10PM -0600, Raul E Rangel wrote: > ACPI IRQ/Interrupt resources contain a bit that describes if the > interrupt should wake the system. This change exposes that bit via > a new IORESOURCE_IRQ_WAKECAPABLE flag. Drivers should check this flag > before arming an IRQ to wake the system. ... > static inline void acpi_irq_parse_one_match(struct fwnode_handle *fwnode, > u32 hwirq, u8 triggering, > u8 polarity, u8 shareable, > + u8 wake_capable, > struct acpi_irq_parse_one_ctx *ctx) This function is used only in scope of a single C-file. Why instead not converting it to use some internal structure and acpi_irq_parse_one_cb() becomes like: struct internal_struct s; switch (ares->type) { case ACPI_RESOURCE_TYPE_IRQ: ...fill internal_struct... break; case ACPI_RESOURCE_TYPE_EXTENDED_IRQ: ...fill internal_struct... break; default: return AE_OK; acpi_irq_parse_one_match(&s); return AE_CTRL_TERMINATE; ? ... > + acpi_dev_get_irqresource(res, > + ext_irq->interrupts[index], > + ext_irq->triggering, > + ext_irq->polarity, > + ext_irq->shareable, > + ext_irq->wake_capable, false); Ditto. Actually it can be shared structure for these too. -- With Best Regards, Andy Shevchenko