Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6751959rdb; Tue, 2 Jan 2024 12:04:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IFFXCr8PjK4c47yaMmUsVwWKOiO25s8OpYoyLUyygKWU0pC+IFdLQsmjLA8e0yCvBLjmgBg X-Received: by 2002:aa7:d808:0:b0:556:b324:40bd with SMTP id v8-20020aa7d808000000b00556b32440bdmr292157edq.20.1704225844784; Tue, 02 Jan 2024 12:04:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704225844; cv=none; d=google.com; s=arc-20160816; b=UQ+JYjDSeKE+S38TvV72BUuz2Z0qDKonfG2J1YeD+zcJw/v59dx/YbDFx3DnZkD/pm OI6xenJxk0iFmiSiLuiDZaIBSMOUqijJbyFwHbNMP79/LJevX9TIn7gMhHDkr1wJoknB Nz93/J4X5tad2dXtGio/eFTvOsAzQNnJPj646xut/pGVNey3NxkUEenFR2ze5RtgeJqn VFC8FpIIfelUpZ24JOADnzayF3EHwDaEhd5hq4Q85iTN05EJnOymGaheWQwLVwgMBN2i qNRahrMt3M8YmgSx7wQt2yXaNnIqEUIXjkxL3xbfuKFfypiJUMVZtD2QoLN5fNiWSfK5 RPZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=pfHt0I2z8mA2aMyeN1/mHDUnhoQ0xxk+YhecaMv3gUA=; fh=q7llbLmdqZIjHWZXbk7NTfjiIxynBSmU9iHQ8vusZ6A=; b=stCxYeaX4YXt/d9ANamm2a7lBD8x6oLd6/xb7IQaUJyPWm/7wMD0zvCt4TP16eo39V b4JOLjTW2rr6lEtqnRMJ1Di9RgwriXgUH8roubvBNuC5OXyc5xwS/CjXi4POnAQYrTUF AB+gl6UILRAKg5Ln4gLyhOEp3pcg7rxvC3YytqEjrZrhQnB3bYDxMN/mGWA6WRbmXj29 /n545rU834c0UOBlZHgbe9xRlwgjvD+nSi42O1LVUhaxQVr0pzLsgv8ZJrWz4mDxxe4O PirRWkAssAfwPdW856jpDh2YVpR3maq/bkYsBBrhnTijVa3VBU4OSje3+zY3DcBwm0a6 orXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=OcZ299Ej; spf=pass (google.com: domain of linux-kernel+bounces-14791-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14791-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id m14-20020a50930e000000b005545a90ed20si10300756eda.106.2024.01.02.12.04.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 12:04:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-14791-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=OcZ299Ej; spf=pass (google.com: domain of linux-kernel+bounces-14791-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14791-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org 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 8454B1F2353A for ; Tue, 2 Jan 2024 20:04:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 760681640F; Tue, 2 Jan 2024 20:03:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="OcZ299Ej" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-yw1-f173.google.com (mail-yw1-f173.google.com [209.85.128.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7003216405 for ; Tue, 2 Jan 2024 20:03:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-yw1-f173.google.com with SMTP id 00721157ae682-5f2aab1c0c5so10161227b3.0 for ; Tue, 02 Jan 2024 12:03:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1704225833; x=1704830633; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=pfHt0I2z8mA2aMyeN1/mHDUnhoQ0xxk+YhecaMv3gUA=; b=OcZ299EjiRzOnCd3LOK8gfy5lUs1Ol9+Qmx9c6Jwl9KYEBYOr4E9CnPjK5F0I4TJl4 XTGjoKpCsS1DEBPs2DuAHjXBf5vg4SlBhuQfw6ZNy9wzbLdNY/wAr8hy8BJZQtGcPhR6 gXUG5g6vbiv5bV/J4R46ASb7M9ZsDJby1EJcQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704225833; x=1704830633; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=pfHt0I2z8mA2aMyeN1/mHDUnhoQ0xxk+YhecaMv3gUA=; b=bcaPcMKP0AKvnrKdr/UlrQZSPDavJXUeNig7ZL0ai5tHX/4W0vpoN/rfpL8R2epevC icstyljhcj5UkKy9hVBsIM2LMzXK8QWKS3JnyKnSvPqGM86+vWhHfUUzlQDUK1NQT6zL jHDS+xvVqQEGnvpwCRVmmdtgK1iz6Obf1t2lWC5nucD8Sjbro8lU4VrvpNXmaivyvuw5 kdbfVb5hkd2wApPwMwUNto8Vr88ZVXMcGZftUjHI3ohRruA4uA2rN690IoFRtFSjTNHk h/ty+iebh7++hu+iVyVH2sJorblOlboO9nf3uaZLxEv2bRKq/8psm6cl+4ilvBV8QT1D 90sQ== X-Gm-Message-State: AOJu0YzIMxp3XwjJNYFyW8yV11wgGGg8EX3mijCPq9ea8LdOpJ49lhLx IzCnyjRSxaIC4PoQxIr/EGt5mNxvtcNnZAzePDB3GmSMSkT5 X-Received: by 2002:a05:6902:10e:b0:dbc:efce:f34b with SMTP id o14-20020a056902010e00b00dbcefcef34bmr11240647ybh.29.1704225833418; Tue, 02 Jan 2024 12:03:53 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231226192149.1830592-1-markhas@chromium.org> <20231226122113.v3.2.Ifd0903f1c351e84376d71dbdadbd43931197f5ea@changeid> In-Reply-To: From: Mark Hasemeyer Date: Tue, 2 Jan 2024 13:03:42 -0700 Message-ID: Subject: Re: [PATCH v3 02/24] gpiolib: acpi: Modify acpi_dev_irq_wake_get_by() to use resource To: Andy Shevchenko Cc: LKML , AngeloGioacchino Del Regno , Krzysztof Kozlowski , Rob Herring , Konrad Dybcio , Sudeep Holla , Raul Rangel , Tzung-Bi Shih , 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 Content-Type: text/plain; charset="UTF-8" > > > + *r = DEFINE_RES_NAMED(irq, 1, NULL, res_flags); > > So? The whole exercise with the first patch is to have here: > > *r = DEFINE_RES_IRQ_NAMED_FLAGS(irq, NULL, res_flags); Thanks. I was staring at the macro changes in ioport.h for too long... > > > + ret = acpi_dev_get_gpio_irq_resource(adev, name, index, &r); > > + return ret ?: r.start; > > Btw, this function requires header to include ioport.h. I'm not sure > if it's good for ACPI. I would prefer safest approach, i.e. exporting > this from a C code, i.e. gpiolib-acpi.c. It actually just needs 'struct resource' declared. I removed the dependency on ioport.h, but it may make sense to leave the definition of 'acpi_dev_gpio_irq_get_by()' here because non ACPI based systems need a default implementation anyway.