From patchwork Wed Dec 11 16:07:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 849340 Received: from mail-qv1-f54.google.com (mail-qv1-f54.google.com [209.85.219.54]) (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 1077E1D934C for ; Wed, 11 Dec 2024 16:07:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733933244; cv=none; b=WO3xqGmkZ8poTt9HVKvVcEsnmwuk215hevp/1YRnlyHDmAgy9kx3/ApRejYBNQBVBcG9002XAoRfM2IOKZR4xW6iW0jrJNRIZhvPs2mMIQP4y+S2g9tipdjhQt5JOQWDDnq5E9a7hMqgyNkoOBXXNIPRcqggl5txRDRrQOET3v4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733933244; c=relaxed/simple; bh=TqounAX+K+Jxvi8T1JjQIXGiJfX2iNkecKUSnEv++60=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Z2l3N80JECG1fnNPfztvM3dRLClPh/tEYq71yKpwDv8NqJcG+DkPmUDQ9MJzVhcymFlCK41HiCsNJFng4A5WF/Bz4guwsYg6N+JnDCatz2PMm+0DjlV1NOT3dgTo+pbIAYJppJN/f6x+zCGxcrv9lV77k/JiNkacqHthF0BgQao= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=TV7WAq36; arc=none smtp.client-ip=209.85.219.54 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="TV7WAq36" Received: by mail-qv1-f54.google.com with SMTP id 6a1803df08f44-6d8f916b40bso59096026d6.3 for ; Wed, 11 Dec 2024 08:07:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1733933242; x=1734538042; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=FNCYhbk8lfVWYHW/bT6mgb7P6pux9ucX6tRFgaMr2JY=; b=TV7WAq36l2J4CLk/dFnHX8wh3ZUukZ3LYP6ajlFKBGN7dolw8PRkdnv0TFJzzwWF+I ca5TrlBrOmTPh/G7gK60T5cKylMc55Gi+A5PjrNJ87apC0yqT5YCe+ib9gfmmmQUjQsZ mIbC4jsMBOv7LSRVOQgSSfNyhPIhOyiQcjpnM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733933242; x=1734538042; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FNCYhbk8lfVWYHW/bT6mgb7P6pux9ucX6tRFgaMr2JY=; b=VhR/cYtq7cJa77uaX5GCL9tLaGAHE4FTwvdNnQ4z71vEluz5ITYEolHQASdqhJjZkE +lpwJw+emq15DN10+HjN9/dhPLplAmmHfw8tkDD8HzBfO/umqMr1/7hgv3G4qCvesOWc fqBw9GRgWwHtoQ2f1TKWiTscVI9AIgEXWq/21Gnl4ALgNklr/fCyM7RrNHEBViCHRR0/ I88sS1Y4NtODEV1fOuiCQo5lT4P9AaOTDnz6vemYlfKbuwG5P4m+q5bugoWYR57i/GDK rNGh0Nv55I+tjMj1emPwbXuRkfHwKVDnXbbI0BfacBq/m/ycIQKUDzLg6fodO9GDA3ys 6SBw== X-Forwarded-Encrypted: i=1; AJvYcCUoBmbnd/r2TxkR1U7XAzeFW+4Ori+t9fUiTtiBu+Tl1ftvXs3buWQGwiA1Loc548YWWOZ+gF3XKpTB@vger.kernel.org X-Gm-Message-State: AOJu0YxH1v1AdiVHD38sqJm3IidYCHYFJ/c12Qn4QXUuhl4y3oFq2Ea+ I9UfwY1r4JPmFvTcW/t8NO4Xc2Lk/Oxll+H4BpHNikJIkh8FsLtGBcTMx8HP3w== X-Gm-Gg: ASbGncvoF5Qepspg4C0/gJ1TDIcq3jcZN3qBy9/oYyjLig5MyoZ3cl0PNIyYsgpbayE FXashgmVYeeFNosNldIFPzp9mYflD6WQvjeCVC6a/aqnN5FXK+YYnjQ4/k8RpSel7oRcpStULwG KRpyL3S/zoryip+ttmLgK/KYpYL0Mk7jAJdqJgYJz/uWZ975BhI0dLBvEH2QioqymG7EcFfGFnP SrsCLLHhbFlr2HRBF6QtTOJVLTP84ybGTVaQWrBlgzUi8XZ6N8VxrxjccC+TYLCoDLVOCXdFDIS A5FvGPASVGozxliIlEx6dTku8Y+N X-Google-Smtp-Source: AGHT+IGcc3JlLT/wu+C4rWFjGmYrf64CYVGHb0Do566/dBbbYn4TQZbAD2UV6tNA4A7JWCGBQjJOYA== X-Received: by 2002:ad4:5f8f:0:b0:6d3:b636:eccc with SMTP id 6a1803df08f44-6d934b1cbc1mr64900806d6.21.1733933241771; Wed, 11 Dec 2024 08:07:21 -0800 (PST) Received: from denia.c.googlers.com (5.236.236.35.bc.googleusercontent.com. [35.236.236.5]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6d8daa00671sm71484946d6.88.2024.12.11.08.07.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2024 08:07:21 -0800 (PST) From: Ricardo Ribalda Date: Wed, 11 Dec 2024 16:07:17 +0000 Subject: [PATCH v4 1/6] ACPI: bus: implement for_each_acpi_dev_match when !ACPI Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241211-fix-ipu-v4-1-4102e97aceb6@chromium.org> References: <20241211-fix-ipu-v4-0-4102e97aceb6@chromium.org> In-Reply-To: <20241211-fix-ipu-v4-0-4102e97aceb6@chromium.org> To: "Rafael J. Wysocki" , Len Brown , Robert Moore , "Rafael J. Wysocki" Cc: Sakari Ailus , Dan Carpenter , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev, Ricardo Ribalda , Mauro Carvalho Chehab X-Mailer: b4 0.13.0 Provide an implementation of for_each_acpi_dev_match that can be used when CONFIG_ACPI is not set. The condition `false && hid && uid && hrv` is used to avoid "variable not used" warnings. Reviewed-by: Sakari Ailus Acked-by: Mauro Carvalho Chehab Signed-off-by: Ricardo Ribalda --- include/acpi/acpi_bus.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index b2e377b7f337..2b09e513ecf3 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -1003,6 +1003,9 @@ static inline int unregister_acpi_bus_type(void *bus) { return 0; } static inline int acpi_wait_for_acpi_ipmi(void) { return 0; } +#define for_each_acpi_dev_match(adev, hid, uid, hrv) \ + for (adev = NULL; false && (hid) && (uid) && (hrv); ) + #endif /* CONFIG_ACPI */ #endif /*__ACPI_BUS_H__*/ From patchwork Wed Dec 11 16:07:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 849769 Received: from mail-qv1-f49.google.com (mail-qv1-f49.google.com [209.85.219.49]) (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 9D7311D9A50 for ; Wed, 11 Dec 2024 16:07:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733933245; cv=none; b=BnUC7paAbvYHsRChcZJj0GflkbZmoVup2/pZet1xojUiA8TfhuJPmf0FJFZ3e/bQRDQ9jBwPFr/q2YnHYAL59zt5B9Ue3cf/PR2EQB9tW3xr2UwsGIhQYkO30QXu2dX1PhmD9fW6pGUTApVn9JGkNXviET/7dpQpUaNAOyGKqbQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733933245; c=relaxed/simple; bh=Kqe+G/l8nHfp8psC13t6cysIquELOSvwbRiUrehr9ww=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=MVj9jLcgSJ/lPY9XmJL11+VCRKIPAyX3xA3okgBMO1Z/HW1cmAeJAZmQnu2d5drJ4lJGLn6wSkiH8LQKgYiaVf0zQ9wh9p5SQrC7oArHpo8f5ST2vgPlphx1owouP015iLE+8QP19VFdMjhjIhiByrqrYTSKKdf5atCwsE8IIoU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=l5TS8ffB; arc=none smtp.client-ip=209.85.219.49 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="l5TS8ffB" Received: by mail-qv1-f49.google.com with SMTP id 6a1803df08f44-6d88d3d1eb6so7994856d6.0 for ; Wed, 11 Dec 2024 08:07:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1733933242; x=1734538042; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=RT3f5Gb/3D2wa9sLrS99ud+PgqVP7v8K52z7Rn+R4vA=; b=l5TS8ffBdfP1JSSz98T1X9wrtUMJYH89rkasMjLAv+aJQ+MyEBSWmYEdTWKlXOtRRU VXAGVR2hzdYTgl73KDLBaDvOHHb6zDegiRtCNVb7k30SbTNDTGjZ9calhKeYhm15T5OA c5bOlgVxxNnKgstRaDKyX92W15MxKsq5OsDxo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733933242; x=1734538042; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RT3f5Gb/3D2wa9sLrS99ud+PgqVP7v8K52z7Rn+R4vA=; b=rwWy2gypnAKcc7KKOkC5UE0XT3wxDE7DPCfn9hhxqjN/iCvdotMyWH9ghmUFTJkGnE yMaOf51sJkdhF66RDniCFow1bGZNTywCOv1mn/JbcscN6EAuCtcbUPwYZOswIozu8rql Yt5Fj+8yRsnoE6JGVudOZFLHzqqwouhsJqGbQeAdkIoHn1RQ0UhtSJjUB7nCI+VakZIz RCROD8b3l+2IHKZJ5WT0XhXR/WVqrPasCjttOXELsKNUZGc3VQiainO0BZACw0lUodMG FXj7HnzvNGAi8XJ0wlI8q5ALlfZxALhenPjmmnTPWKnf/DT0xZ/V18IO2XWKToPboThd Nx7Q== X-Forwarded-Encrypted: i=1; AJvYcCWB9hnakeZOnoAj/s2Gk1lGE6GLcO2ASOzi9IR62vtPFItpzgXkYat3FqCXDrIaizVAat84kX5OzWZL@vger.kernel.org X-Gm-Message-State: AOJu0YwKKPDzc8/a7tvD1ySDfwMqbyFboqlW/oKm8AkKoE0sq5lRsvZk wquqOQ9mV2mvx4SWY3vAx4+6+qYd7BKkZCNTcYXMx1GtjDrro/l7iYbwFiAW9g== X-Gm-Gg: ASbGncvuPiCkbV2HsCCTPcl4J3PO91UrKiyx3aPANgPT/rGNdIYVYXF0krqaCMi0KJA ekGEITRHbkMy+A3EJM3YevU1nIeqYeSfjGEffL8DYu8MAxSaZGBOTke4/gA6nXiiURSpZm0l3jX 5wqsKlG81/EQcQ+/AZe2lk0TyDXukU9Vt/j8hzXHDdcHKDwrTKbWl0kuGT+mx9RBfcRNaYpnrzZ rTcOyP8h5dkNIAYhS2sZqbUFtvhlWe+ARGYRfbC+NqCHz5b0H3AHEDT2rnmtA89nEqRWMOSMxNp cWQ7y84Uw2pp9XPUBrkQUOImFs0AyCg= X-Google-Smtp-Source: AGHT+IEtktKFv3qaTtZ9OL5m9Tz4Oa3HoUJP5EJ7WrirQArVIj8ul98ZYjRW1cJOo6oehSupJehWdQ== X-Received: by 2002:a05:6214:21cc:b0:6d8:b5dd:7699 with SMTP id 6a1803df08f44-6d9352f1ce0mr58803916d6.17.1733933242384; Wed, 11 Dec 2024 08:07:22 -0800 (PST) Received: from denia.c.googlers.com (5.236.236.35.bc.googleusercontent.com. [35.236.236.5]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6d8daa00671sm71484946d6.88.2024.12.11.08.07.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2024 08:07:22 -0800 (PST) From: Ricardo Ribalda Date: Wed, 11 Dec 2024 16:07:18 +0000 Subject: [PATCH v4 2/6] ACPI: bus: implement acpi_get_physical_device_location when !ACPI Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241211-fix-ipu-v4-2-4102e97aceb6@chromium.org> References: <20241211-fix-ipu-v4-0-4102e97aceb6@chromium.org> In-Reply-To: <20241211-fix-ipu-v4-0-4102e97aceb6@chromium.org> To: "Rafael J. Wysocki" , Len Brown , Robert Moore , "Rafael J. Wysocki" Cc: Sakari Ailus , Dan Carpenter , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev, Ricardo Ribalda , Mauro Carvalho Chehab X-Mailer: b4 0.13.0 Provide an implementation of acpi_get_physical_device_location that can be used when CONFIG_ACPI is not set. Reviewed-by: Sakari Ailus Acked-by: Mauro Carvalho Chehab Signed-off-by: Ricardo Ribalda --- include/acpi/acpi_bus.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 2b09e513ecf3..b312a72f48ad 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -43,9 +43,6 @@ acpi_status acpi_evaluate_ost(acpi_handle handle, u32 source_event, u32 status_code, struct acpi_buffer *status_buf); -acpi_status -acpi_get_physical_device_location(acpi_handle handle, struct acpi_pld_info **pld); - bool acpi_has_method(acpi_handle handle, char *name); acpi_status acpi_execute_simple_method(acpi_handle handle, char *method, u64 arg); @@ -60,6 +57,9 @@ bool acpi_check_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 funcs); union acpi_object *acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 func, union acpi_object *argv4); #ifdef CONFIG_ACPI +acpi_status +acpi_get_physical_device_location(acpi_handle handle, struct acpi_pld_info **pld); + static inline union acpi_object * acpi_evaluate_dsm_typed(acpi_handle handle, const guid_t *guid, u64 rev, u64 func, union acpi_object *argv4, @@ -1003,6 +1003,12 @@ static inline int unregister_acpi_bus_type(void *bus) { return 0; } static inline int acpi_wait_for_acpi_ipmi(void) { return 0; } +static inline acpi_status +acpi_get_physical_device_location(acpi_handle handle, struct acpi_pld_info **pld) +{ + return AE_ERROR; +} + #define for_each_acpi_dev_match(adev, hid, uid, hrv) \ for (adev = NULL; false && (hid) && (uid) && (hrv); ) From patchwork Wed Dec 11 16:07:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 849339 Received: from mail-qv1-f51.google.com (mail-qv1-f51.google.com [209.85.219.51]) (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 69AB81DA11B for ; Wed, 11 Dec 2024 16:07:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733933245; cv=none; b=OlHcE7uKCpePaOOpuq/cc3U3gUK1HTgRlHH0YGxEjW64wF07eCbNZJzhknjCeJuvF1beFldeJB1+cxt8xFh0l3SBj9MeL9IpZIKBU2vdzELXlVvaSZN1TWqEicyRgRN+sZ5nSCkvklV3qyBFW2eCbCb7z2yQ3h7OjBuCNLKagVg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733933245; c=relaxed/simple; bh=Al9wzob7Lhv6GfLgpukZha8snPi/gtMWzqmI5Nh5O0s=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=fTYrTmLAJIcdqVHxfWmAt5yHiSNd9evVNj+QkvrTs1aVtlfoCJW91IiME02FWpgAb20xiuX332drZgic3jiBUKcADJRDe34rNzzQQeKJ/wCsGPPa93TF350pkbbqTozuKFvd4el5RbCuvrsL76afzYLX5iG9vj0UeWnXt5qDhPo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=HO/qY15m; arc=none smtp.client-ip=209.85.219.51 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="HO/qY15m" Received: by mail-qv1-f51.google.com with SMTP id 6a1803df08f44-6d8fa32d3d6so56514026d6.2 for ; Wed, 11 Dec 2024 08:07:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1733933243; x=1734538043; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=gTwO2nGd6wIbXXez+6l1I38nMUW2rTd+Ao412JHVCs4=; b=HO/qY15moLUF1pboU2g8cZo0H+/lhuE9UZA7CGcSY054umih7oTbcygFUhw1QVlWzQ Iv3IFyxSHLsZS70V5cWDrnBNm34AM4ZjKmhEuZo9fZ1PCaHx2O7nfdNf/EnLyzq8beUo pRt+3LzSpvt/h5NVyJ0dPRzQ1cV/cq3KbK730= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733933243; x=1734538043; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gTwO2nGd6wIbXXez+6l1I38nMUW2rTd+Ao412JHVCs4=; b=F/JUpUo+YX0AYueFgXQwp+7bEP9bXGCqC0yxRng/lGxevyxUcbpXx06gbBGz8yPZ6Q uOksaresxb+gt1S7VcWH5vWlcHRxC08blnqAfp850Go450wLzVH+Zyd00GYFHMseUcAx DgvxP+zZ/7U3MNLMsXm7pa2LnDfomjbXu2RlZDmZwo42sIYnX5CVifHW6+HEayZSkypH EoJEE/mAcG0T6cXM6VasyqwN+IeonaiFczUJfrlgHynt+16XF3XzNWYYUsSIH0sd0Nf6 nbBvPfy0r/EqTIV7RlFLg5jnYqqj5BWZT5tyS6TQQDwEDobbDh3F23kbeHC5DYP0uYGi UeLQ== X-Forwarded-Encrypted: i=1; AJvYcCVX9tKRZ9OA5fT7/kXU+jRPWbw7R46oLXVFPjyBIGb1/NbSBUC9zXk0xbLkEvUwLAXvU3wElBoCDDjm@vger.kernel.org X-Gm-Message-State: AOJu0YwFsVIjlsdxd6KG7rWUfcFPFH1otifEFMERzyiA2GcL6vsT0b7W ByY5WZ3Fdd8D8ZLre2d9xc61LTKFd49b8NZS4N6dwthUFznhs2QkC5wuORbf9OyQF34i/eVfAtw = X-Gm-Gg: ASbGncvvZiKIeVdG2DeqiB/HJ9IVD42n6qk0PS1CgwH84pSoBNSczTVE9AsPyuBk9Jw 6ymDIfNbXoE1IMrZY7RpRF2sPM+oMQHHZEj0p/ne1yFMNCRqNn1dCeDuR2dgqxn0WC49D4YeYbE g+BbSGMbpsbYLMlsa9ZBktCBfj9vn7vj7wBQl8jsP61LNidFK6isPciOloWMbuBRpLpFq6/4xrM ZMrIpy/NYbgROvhq9YutuLzBTSsfnnlEBzzwkHLhzPHZAfP5gPfqsT5YNtJxsN+ksalMSRT8DMt HjiI0R9dpbI/bHpfAhM4kseL/AJe X-Google-Smtp-Source: AGHT+IHNI8I7kNh1BQAzlY9E5JVcbcVT91dIbzXQpJE1CHokvbatsoZUS9G+d6jIEJjgxda5ooPoQg== X-Received: by 2002:ad4:5c42:0:b0:6d8:8f14:2f5d with SMTP id 6a1803df08f44-6d934b2d7f1mr64995796d6.28.1733933243062; Wed, 11 Dec 2024 08:07:23 -0800 (PST) Received: from denia.c.googlers.com (5.236.236.35.bc.googleusercontent.com. [35.236.236.5]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6d8daa00671sm71484946d6.88.2024.12.11.08.07.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2024 08:07:22 -0800 (PST) From: Ricardo Ribalda Date: Wed, 11 Dec 2024 16:07:19 +0000 Subject: [PATCH v4 3/6] ACPI: header: implement acpi_device_handle when !ACPI Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241211-fix-ipu-v4-3-4102e97aceb6@chromium.org> References: <20241211-fix-ipu-v4-0-4102e97aceb6@chromium.org> In-Reply-To: <20241211-fix-ipu-v4-0-4102e97aceb6@chromium.org> To: "Rafael J. Wysocki" , Len Brown , Robert Moore , "Rafael J. Wysocki" Cc: Sakari Ailus , Dan Carpenter , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev, Ricardo Ribalda , Mauro Carvalho Chehab X-Mailer: b4 0.13.0 Provide an implementation of acpi_device_handle that can be used when CONFIG_ACPI is not set. Reviewed-by: Sakari Ailus Acked-by: Mauro Carvalho Chehab Signed-off-by: Ricardo Ribalda --- include/linux/acpi.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 05f39fbfa485..fb88f21bffb2 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -854,6 +854,11 @@ static inline struct fwnode_handle *acpi_fwnode_handle(struct acpi_device *adev) return NULL; } +static inline acpi_handle acpi_device_handle(struct acpi_device *adev) +{ + return NULL; +} + static inline bool has_acpi_companion(struct device *dev) { return false; From patchwork Wed Dec 11 16:07:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 849767 Received: from mail-qv1-f53.google.com (mail-qv1-f53.google.com [209.85.219.53]) (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 5F03A1DDC19 for ; Wed, 11 Dec 2024 16:07:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733933249; cv=none; b=FljOMlWWvmm964Q5fSeVcC9glNs/j0xO0CPBa1/8ggyD4INQ23tKwVTte9RGStL76GVTgVEAKXhsT/2oyU9eF8lgn3691snDdWCyJArZN3fQhJFJ1kEm8r7pKVmryptYMVqdCHHYwxhL8mpzJ5+hM5bGuL8BN/tr5b6kOrIBfKk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733933249; c=relaxed/simple; bh=9zHOmlSE2lBt2Rpl8UOox++hLCi27/TryYwCxVSnPew=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=n4vSJlO8I0A+4B2sE4/HfWEK2L+ZGrGRcklLi6msyPGEpK20+KL3U0Ntl+z6lxONE8bLFdFHvnSAEKVapGb43tM9Z/vaaEJtkgNEflQWXDcJ2zqz7YHlr8PG4nVP+z/C8K8efZoFNS2/y3/D/DjwDwzQUlL3UoNeMpy5uUBIKkM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=ggZxrwYf; arc=none smtp.client-ip=209.85.219.53 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="ggZxrwYf" Received: by mail-qv1-f53.google.com with SMTP id 6a1803df08f44-6d8adbda583so77046466d6.0 for ; Wed, 11 Dec 2024 08:07:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1733933245; x=1734538045; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=MMK9uUImiu6io0KCKsugDZpWMzJZHLlDJZIO+NA/9Ro=; b=ggZxrwYfYxo8MedkfkE5GyjXE2AUWIFdBn+/HP2yQfTAZkVKbw7d2VZjsqpsQg3oav 0QWMr3/r52j8KVpHqkV9cANK4UiIr/6BWS3uu7y59ly8gVMawscV2Ss5z4iVbmq5u9Hx VkRJjaK6tR8lUphGE4aJHXyeAm1TmKP7SihpY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733933245; x=1734538045; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MMK9uUImiu6io0KCKsugDZpWMzJZHLlDJZIO+NA/9Ro=; b=j/Io/C5C/5rFf0Kw+7O7bYQW5P5ACIrWAHe42veIIaOhD3hg9RHPQ0Tho9tR4o4+L4 TDVSjtGUmZmi7cfxKJ1Q/M326B64S/Y6XOF/fH6ruEgHezrSXWdI3ZKKORtWu3sn5h3M ON5mX1PIna7zrjaQQs9qFIbGzGGY9Dv/9vPx6C8TbMnUP6FmlD9Mg/hLjzgNxdQi4GHi T3eOZEXlrW+12e2mjvnMzMZ3vQiqh5wZ0EmsFVJGmGUGENKKwjyz1RCTQN60eAraPEi9 FSNshjmZpYWvrm2FzJu0rXawIYJrhdMvbXzLHIbFocrboI+mvRodmy/bd1Ex5Py7odYf 6G1A== X-Forwarded-Encrypted: i=1; AJvYcCVL2pq4fb1Jk+Cj4AkRqcKThYjFOSmbXTcK7LcCx4Umcb4UuYmX581adO5xnu3D29OljLOx+iQLl4tw@vger.kernel.org X-Gm-Message-State: AOJu0YyZahkgonrAnSOnGfJbyMk2dgzLwDPeVVYo1yod2GdfMA+fMHUv Qsv5sYsjcDczajpiA9pcLso8V0IJtwEwOV4CIkeECuj927ho+po9Yd1oLYdaH07g9qbC9fJjDJA = X-Gm-Gg: ASbGncsh92AI5rnE+Wg13b1us94uBs4TUs+u/D1ROIg7jZTom41qEmXqZIMxa/IAp9g UfotjoEXttwGzUly51Y9M5Qq5CXXVyvZy6Uwc65BZfBJrG8vq6L2EI/35113GBvpYamMtYeuRuD NqtJLNIYcRPjvAbNJGe5Z4DNeyuHD8xAcdsWHol/W7zXkP0iiyxnjgbFiH+Yt+/VtZa5mY4/hvE IhpHfZ+RUhYUt6NLgNMjl2JAdVPSC6e4w1o/wHcKTGUKmPdZ6pcM7aehaM2ZpVarfvJqHTjCN1A 9ZrMOKkU6i81fLodnjXa8Qmljn0p X-Google-Smtp-Source: AGHT+IHPKXKsI2zaWBcy93AAaoxDDsJF4jn7MhbcckWqatjm8Z8ybpD/fk9DT9vAC4RVxmtKnQPx9A== X-Received: by 2002:a05:6214:4106:b0:6d4:dae:6250 with SMTP id 6a1803df08f44-6d934be3d2bmr58201826d6.34.1733933243809; Wed, 11 Dec 2024 08:07:23 -0800 (PST) Received: from denia.c.googlers.com (5.236.236.35.bc.googleusercontent.com. [35.236.236.5]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6d8daa00671sm71484946d6.88.2024.12.11.08.07.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2024 08:07:23 -0800 (PST) From: Ricardo Ribalda Date: Wed, 11 Dec 2024 16:07:20 +0000 Subject: [PATCH v4 4/6] ACPI: bus: implement for_each_acpi_consumer_dev when !ACPI Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241211-fix-ipu-v4-4-4102e97aceb6@chromium.org> References: <20241211-fix-ipu-v4-0-4102e97aceb6@chromium.org> In-Reply-To: <20241211-fix-ipu-v4-0-4102e97aceb6@chromium.org> To: "Rafael J. Wysocki" , Len Brown , Robert Moore , "Rafael J. Wysocki" Cc: Sakari Ailus , Dan Carpenter , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev, Ricardo Ribalda , Mauro Carvalho Chehab X-Mailer: b4 0.13.0 Provide an implementation of for_each_acpi_consumer_dev that can be use used when CONFIG_ACPI is not set. The expression `false && supplier` is used to avoid "variable not used" warnings. Reviewed-by: Sakari Ailus Acked-by: Mauro Carvalho Chehab Signed-off-by: Ricardo Ribalda --- include/acpi/acpi_bus.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index b312a72f48ad..80ddd76b3a6a 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -1009,6 +1009,9 @@ acpi_get_physical_device_location(acpi_handle handle, struct acpi_pld_info **pld return AE_ERROR; } +#define for_each_acpi_consumer_dev(supplier, consumer) \ + for (consumer = NULL; false && (supplier);) + #define for_each_acpi_dev_match(adev, hid, uid, hrv) \ for (adev = NULL; false && (hid) && (uid) && (hrv); ) From patchwork Wed Dec 11 16:07:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 849768 Received: from mail-qv1-f47.google.com (mail-qv1-f47.google.com [209.85.219.47]) (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 5FC111DB55C for ; Wed, 11 Dec 2024 16:07:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733933246; cv=none; b=uhcyGaP2vG1f6Uz/4RRhcxZqveABpCeSO81rPtMzTOJyfP07vcKp62rgLU0OEKmADaWJ9if77hnUX5ARmVdzX6WzzXgjP/McgAF7TibqaadYgnqrHz2FsfAGTSTnshg8CVJWl7NnXfE+xQFEDjYMKg/N0LnmAlUyIOdEVKNcShI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733933246; c=relaxed/simple; bh=Q0tZOYhuY3Ey0IPHXjXrOvps1QIhlGU9kBOlggkrfY4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=nLzXGOCrL9gIbVwhJ+7alp0JVsRMIHddDJN0sntVI6g5dWTLWhZgmMS0Rga8Mgs2guJKfvT0VCQs24U8hgxfQTmWncMC7aLvwM4CO32ZD+rNHtktM+nFiOk4zk8EHfvk10upa+AlPOADpZET4X0NHAEYs2O6CTYv0KbVEMtEZ/o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=F5Dat/X0; arc=none smtp.client-ip=209.85.219.47 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="F5Dat/X0" Received: by mail-qv1-f47.google.com with SMTP id 6a1803df08f44-6d8f544d227so29626726d6.1 for ; Wed, 11 Dec 2024 08:07:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1733933244; x=1734538044; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=9aEfR/qabxahuoJOZlYtnmnLnWgQnj7Jexuo0meaq20=; b=F5Dat/X0wqCmvAIHzvdm2dKozxp4NjsqpyVj26QvOSwBDhlpolJCgOjhDmFhOG7OQr v1O68cIx9CuhilfX3HuspiJOraUOO1cOjdh+R2vJjwYzyPCoNLvf8bJDMwSlI++l8Mw0 q65oQSNU5HovOoIk4eIM4BfOJKREMvdKA4xdU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733933244; x=1734538044; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9aEfR/qabxahuoJOZlYtnmnLnWgQnj7Jexuo0meaq20=; b=hv/wuUBtWa7ekN3P+oecFkdB7lFuAIWXqWtf0hgbM0n01KI4a/cYNQDCx1gYg2kklU PIrxHy0hiVvb2Wwnp+RhOoRa1b1Rt4phEVUg4yZGcQEOKXEct3cRSQWHjK4fV/Q1lxUz jnhlHfCf7PEea0Ve8u8C+kowEidE6XT8QIf3b0MvBVKUEm66OYp56996HykV4A/U+zGf s0eMEqbTUFR/MnEBrtZXoDCICWvMP7XBey/p9A30JtA1Xqg6xJo8zxa8i39Rmv/HEGAV 1PGhQROikB0y5o3VIWi2uDUSV1zJvjXAIGfm/2yissROgNhK+tWmH8eGDT/fW2OHhAVD jUyw== X-Forwarded-Encrypted: i=1; AJvYcCVgkDT+km2waEBFU4b2D7iIKQg9oH9tS3p0cOpatdcXR5d+PL0ErQDI1L9cZaPiCnz4lrbEfhYNXLfa@vger.kernel.org X-Gm-Message-State: AOJu0YxrXqrU4epoNEgJ/5qnOvYqfV3e+nEfeZgbQVl7pP9po5OJXAEV 0aswMi4jMwWKHWkflY2Bmn6SN8IKYjWCix5DX6B4F9A+cQsr7Vgg3scM7Di4Vw== X-Gm-Gg: ASbGnctRUNgbTfptzWiHXVsXZWZwp3lATCC35EOgklJhy54RFvnl31gtAg5QDhLu3O5 INX54lWUDMwVpco0mZhisNcaF/hrF5wZ3kMxlNQ+KxBPmF16WvIapXtHehIUGcVN6dXyaPC6tk8 bcwM7de64xg7eHc05/9fxppSOeOrg8kTSx7zUOKrzW6eUkz3WlABLogTRufdBWoL0fbWCUxNpw/ d3S7xpQSzStExf+xz3XvtB7hETU5UefdjzhhWwiFlWoAIC6X7kF2rVwLuyy6ViujTo5hpV6qxs5 ubwgA9ceKLiM80Q8op4CtLPmPy9v X-Google-Smtp-Source: AGHT+IF87GwFnPD41KxfMUhVnNyyBe54GEcWZX003dqF5ZJl5NACMpzgazmytTFC9qeLl+gKHOK6SA== X-Received: by 2002:ad4:4809:0:b0:6da:dc79:a3c9 with SMTP id 6a1803df08f44-6dae29c181cmr3825226d6.9.1733933244430; Wed, 11 Dec 2024 08:07:24 -0800 (PST) Received: from denia.c.googlers.com (5.236.236.35.bc.googleusercontent.com. [35.236.236.5]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6d8daa00671sm71484946d6.88.2024.12.11.08.07.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2024 08:07:24 -0800 (PST) From: Ricardo Ribalda Date: Wed, 11 Dec 2024 16:07:21 +0000 Subject: [PATCH v4 5/6] ACPI: bus: implement acpi_device_hid when !ACPI Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241211-fix-ipu-v4-5-4102e97aceb6@chromium.org> References: <20241211-fix-ipu-v4-0-4102e97aceb6@chromium.org> In-Reply-To: <20241211-fix-ipu-v4-0-4102e97aceb6@chromium.org> To: "Rafael J. Wysocki" , Len Brown , Robert Moore , "Rafael J. Wysocki" Cc: Sakari Ailus , Dan Carpenter , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev, Ricardo Ribalda , Mauro Carvalho Chehab X-Mailer: b4 0.13.0 Provide an implementation of acpi_device_hid that can be used when CONFIG_ACPI is not set. Reviewed-by: Sakari Ailus Acked-by: Mauro Carvalho Chehab Signed-off-by: Ricardo Ribalda --- include/acpi/acpi_bus.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 80ddd76b3a6a..b6b86acd1d9d 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -1003,6 +1003,11 @@ static inline int unregister_acpi_bus_type(void *bus) { return 0; } static inline int acpi_wait_for_acpi_ipmi(void) { return 0; } +static inline const char *acpi_device_hid(struct acpi_device *device) +{ + return ""; +} + static inline acpi_status acpi_get_physical_device_location(acpi_handle handle, struct acpi_pld_info **pld) { From patchwork Wed Dec 11 16:07:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 849338 Received: from mail-qv1-f48.google.com (mail-qv1-f48.google.com [209.85.219.48]) (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 2B4191DD0F6 for ; Wed, 11 Dec 2024 16:07:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733933247; cv=none; b=t0mkYiwhuOL3lbaJKtQa2gzmmw+UV7y/9s0kB5BOCFmKTDpIqGQdoiU6Paf5N6zc5CzKJFwIDrz20/TM3yw44yxbapkjwdzOFKEwJ4wG2W5W4k/7AoApzJS2QxdZ7KoNaqCenfWEDBI3Z0j6nOe+4cL2rs0u3gH+Gaz2aSl8KHQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733933247; c=relaxed/simple; bh=Rthe3LzHY0QJPosKabOqFJY90O39hBmNGtzh12F+k2M=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TV/RHDNocGLt7VP/prnJp+Y+jsZoPxfXdnBpahR250VXLk85rmK0BmKXh7Eqy+TO7D5qD84I+lxUi5OAsvSYV+OAvBUEbSTpI0umliYmyn1CEaeY6zMRMaS1fPFdXWS8lz2xWZnwQkJWzMUkTmtkKtp9UR5X8UvB1iWGss0jtq8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=lL97qsk1; arc=none smtp.client-ip=209.85.219.48 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="lL97qsk1" Received: by mail-qv1-f48.google.com with SMTP id 6a1803df08f44-6d933736380so14269256d6.1 for ; Wed, 11 Dec 2024 08:07:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1733933245; x=1734538045; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Essqe2WEjNsh1+1eTJTpKRXpLjov7BKteAS8plE/7UE=; b=lL97qsk1wI9Y7/MtqAZcUwUeRNSY/gsIPCf1JH1M2Bb8Rh1KttDMR4rp6aTx+MAoCl d9PxQfqX/GZeUaYQXENGtFbyD85QkwrgnY/SqKLtt3lMojMEB8NWZ34MbXSsnCV6mi8U GCTdDdJYK+0I7z/5KD/1PCXOcnW76grJYhXPg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733933245; x=1734538045; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Essqe2WEjNsh1+1eTJTpKRXpLjov7BKteAS8plE/7UE=; b=WUdynajg1tdlkhanmoZbt6P5KKUeh3ckxb4Sscus1KN5MLfvlOOxjdt06DZHHQA/EG HFCeQcPnoeRxq1UI4oMqZqAViiIlGB+xa8q0r4gSXyvFEEemQXTAnJOt9tdzJODA1C4u Obg8qNgysKdnUW11VmQxZhhHWstO6ZmNwLXwiuI1XkSjpnmOC4UdS+WjI+YSGYd8Ybg+ khJYOdRoD89RiZKFDiGUJ73cBXrOQDqXw/KeTBwMdWTne388n9/joAJvOJP36acsDLZ7 coCNqw+Ufs2iEq/vQRsCgGGW3yPFGlErsXEDwmSsZwYzxQLkh7vwpk17zbpSVoC8YPKH pkMA== X-Forwarded-Encrypted: i=1; AJvYcCV8QN5fDYTZukb31fiS40mQgBJ3ieWbnDhJpJGX2HLezB6EqFJiTvqYGPYYaYn4z9H8T4JD0Vwznouw@vger.kernel.org X-Gm-Message-State: AOJu0Ywxj1zQAS54MkCErg/Z7Utnp+bFiNk2TKSzFs77iLHtTX3/zEAj 4uzD5dtFWxRUUoPUN1wxdqcmLvnvpOk2ES0NCYNmzbRUdnnbDI8JjB2fQ7WRLA== X-Gm-Gg: ASbGnct+PedZ4pJ5GxXfeIbfjnFKQ7z0/+WeUygkE/wZwlbpbCGu6SaXdUB9Vpbx89A HVNBqRJipLJENCPcrAQjpRjWDfSRqDwOwbdGEmAZetlAjAvxDkM/qXhhSR99DOp7yQ/YMtnmr7m X4dBjr4sRgl1t976w+JVk9hDKs1yHRtNFTIWQDSeAbSj0A8AlbDjpwVnU24j3sJkebqtR0Bqf+9 sJlcuAfnh8r0Irr2+zEkEqVIecSEnzJJzt6eNmTMbwMOqdcsRSDgO+//tnP9huYXCPzCKJWclGs V44egzfssqV9tWT9JQHWh+/VttHj X-Google-Smtp-Source: AGHT+IE2ZjzhhF3KT4N00BscK7M3J3K9+kILugqUUTPdX4rGdXCCT0e/jhysbXYNIB+9mUv7WWWTlg== X-Received: by 2002:ad4:5962:0:b0:6d8:8e0f:8c03 with SMTP id 6a1803df08f44-6d934aec01cmr68660266d6.18.1733933245095; Wed, 11 Dec 2024 08:07:25 -0800 (PST) Received: from denia.c.googlers.com (5.236.236.35.bc.googleusercontent.com. [35.236.236.5]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6d8daa00671sm71484946d6.88.2024.12.11.08.07.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2024 08:07:24 -0800 (PST) From: Ricardo Ribalda Date: Wed, 11 Dec 2024 16:07:22 +0000 Subject: [PATCH v4 6/6] media: ipu-bridge: Remove unneeded conditional compilations Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241211-fix-ipu-v4-6-4102e97aceb6@chromium.org> References: <20241211-fix-ipu-v4-0-4102e97aceb6@chromium.org> In-Reply-To: <20241211-fix-ipu-v4-0-4102e97aceb6@chromium.org> To: "Rafael J. Wysocki" , Len Brown , Robert Moore , "Rafael J. Wysocki" Cc: Sakari Ailus , Dan Carpenter , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev, Ricardo Ribalda , Mauro Carvalho Chehab X-Mailer: b4 0.13.0 The ACPI headers have introduced implementations for some of their functions when the kernel is not configured with ACPI. Let's use them instead of our conditional compilation. It is easier to maintain and less prone to errors. Reviewed-by: Mauro Carvalho Chehab Fixes: 8810e055b575 ("media: intel/ipu6: Fix build with !ACPI") Acked-by: Mauro Carvalho Chehab Signed-off-by: Ricardo Ribalda --- drivers/media/pci/intel/ipu-bridge.c | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c index a0e9a71580b5..1db994338fdf 100644 --- a/drivers/media/pci/intel/ipu-bridge.c +++ b/drivers/media/pci/intel/ipu-bridge.c @@ -2,6 +2,7 @@ /* Author: Dan Scally */ #include +#include #include #include #include @@ -107,7 +108,6 @@ static const char * const ipu_vcm_types[] = { "lc898212axb", }; -#if IS_ENABLED(CONFIG_ACPI) /* * Used to figure out IVSC acpi device by ipu_bridge_get_ivsc_acpi_dev() * instead of device and driver match to probe IVSC device. @@ -127,11 +127,11 @@ static struct acpi_device *ipu_bridge_get_ivsc_acpi_dev(struct acpi_device *adev const struct acpi_device_id *acpi_id = &ivsc_acpi_ids[i]; struct acpi_device *consumer, *ivsc_adev; - acpi_handle handle = acpi_device_handle(adev); + acpi_handle handle = acpi_device_handle(ACPI_PTR(adev)); for_each_acpi_dev_match(ivsc_adev, acpi_id->id, NULL, -1) /* camera sensor depends on IVSC in DSDT if exist */ for_each_acpi_consumer_dev(ivsc_adev, consumer) - if (consumer->handle == handle) { + if (ACPI_PTR(consumer->handle) == handle) { acpi_dev_put(consumer); return ivsc_adev; } @@ -139,12 +139,6 @@ static struct acpi_device *ipu_bridge_get_ivsc_acpi_dev(struct acpi_device *adev return NULL; } -#else -static struct acpi_device *ipu_bridge_get_ivsc_acpi_dev(struct acpi_device *adev) -{ - return NULL; -} -#endif static int ipu_bridge_match_ivsc_dev(struct device *dev, const void *adev) { @@ -261,9 +255,8 @@ static enum v4l2_fwnode_orientation ipu_bridge_parse_orientation(struct acpi_dev struct acpi_pld_info *pld = NULL; acpi_status status = AE_ERROR; -#if IS_ENABLED(CONFIG_ACPI) - status = acpi_get_physical_device_location(adev->handle, &pld); -#endif + status = acpi_get_physical_device_location(ACPI_PTR(adev->handle), + &pld); if (ACPI_FAILURE(status)) { dev_warn(ADEV_DEV(adev), "_PLD call failed, using default orientation\n"); return V4L2_FWNODE_ORIENTATION_EXTERNAL; @@ -498,9 +491,7 @@ static void ipu_bridge_create_connection_swnodes(struct ipu_bridge *bridge, if (sensor->csi_dev) { const char *device_hid = ""; -#if IS_ENABLED(CONFIG_ACPI) device_hid = acpi_device_hid(sensor->ivsc_adev); -#endif snprintf(sensor->ivsc_name, sizeof(sensor->ivsc_name), "%s-%u", device_hid, sensor->link); @@ -671,11 +662,7 @@ static int ipu_bridge_connect_sensor(const struct ipu_sensor_config *cfg, struct acpi_device *adev = NULL; int ret; -#if IS_ENABLED(CONFIG_ACPI) for_each_acpi_dev_match(adev, cfg->hid, NULL, -1) { -#else - while (true) { -#endif if (!ACPI_PTR(adev->status.enabled)) continue; @@ -768,15 +755,10 @@ static int ipu_bridge_ivsc_is_ready(void) unsigned int i; for (i = 0; i < ARRAY_SIZE(ipu_supported_sensors); i++) { -#if IS_ENABLED(CONFIG_ACPI) const struct ipu_sensor_config *cfg = &ipu_supported_sensors[i]; for_each_acpi_dev_match(sensor_adev, cfg->hid, NULL, -1) { -#else - while (true) { - sensor_adev = NULL; -#endif if (!ACPI_PTR(sensor_adev->status.enabled)) continue;