From patchwork Wed May 1 13:08:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 794786 Received: from mail-qk1-f180.google.com (mail-qk1-f180.google.com [209.85.222.180]) (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 9948112DDA5 for ; Wed, 1 May 2024 13:08:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714568897; cv=none; b=hcCSpmoDi9C1bVlhQdyH0ER0TG8jzgds3qJ5VeiTwD/MrxVi3RFySfj8VosnUl6iUoJ+FXZH9NzwCwOvG0Si46vJQWuL6evFi69vQ5bIXoINksHof66I6Y4MngzroQW6NY6cofp/ltmXXkbRohxzhLCtVpQLxt3xtcpCFUYzyRo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714568897; c=relaxed/simple; bh=gc/o9u8NzZx22ClHEHIcXqgu1FhcRGTyvSqOBDjqUBQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=okBgvqpjUUXDB9ESfOvP39AcykToi8WrGs8j4nMgmQUqGaNEcG+3qCPqFqL+8cGCh0189wwthXR3R8PKIdOHiKsApYSmfDUGfd9KcVXzemjhVgPB1btm0mX7v4yiWEXNJTOn7Pzn6Ci7ooCNczpxmiRkoWBLkL5G8SdmXe+Che8= 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=akejBctd; arc=none smtp.client-ip=209.85.222.180 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="akejBctd" Received: by mail-qk1-f180.google.com with SMTP id af79cd13be357-790605809cbso594263285a.3 for ; Wed, 01 May 2024 06:08:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714568894; x=1715173694; 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=t4YWfk8RHGxp4UPGDejpf4mUjri4mE+IBxPLABnVZ8s=; b=akejBctd/CkzebKoqH2XuIVrO5JDVC8MnCdM24KlXWdWRd+yToOTeBxcpTGFanCLxw EVCb6R9Ddam/ewiL4VuVWIWC7NQcwJ/8zJxLsQhoY42wHqN8IrR2Zhp4BerIiM+3lhBC WfaoBVIWOc04Zu6AzeYI7ueUyKShuskeQdZj4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714568894; x=1715173694; 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=t4YWfk8RHGxp4UPGDejpf4mUjri4mE+IBxPLABnVZ8s=; b=kAjzrwFLvFTjD/fGpUHt1mI2hH8ihdo+K5lZwFX5myrycQVcO0JJ57mrgc0xYcQO4C r3eQh6gVDkIsRiZWe7DRDLka9a+O7OKBinqbtBePdh1Hh3GpB1TsIbbtAUmEWLLKMIcZ 6CBkWjZ8Psp0CEtD61cOBaLREEXNpQVtSusqovCheYDH9DfJLiJSW2h5y5xxZS2JWl1+ AEOsVj/1YHhTguVKeTTw4SsgvjlG1EQ6IUqoylY/jxgO5QyxVEtAOwZM/hKsa3loYrBa BFYtyLUaQe8C5ydZ0hK9TR0LICzms1rNH56KJR8/tRjSJ1ClVphPSu8zL41ugDm4ax9X jppw== X-Gm-Message-State: AOJu0YwY6+TLrS5AVST+q/bXLNCNnK7JD8nq38ZS/he3VOOFRVlBiRob PaGsqYcvt6/aUkNH/ClmogEhSmWxE2nUtyTir9kfsp5rFkUEIqa/L1z2cLqFIg== X-Google-Smtp-Source: AGHT+IGq5qL9sa8p5ZZp4PD7t6F2nP9QMolqC/miQC8Zec7V4HBvxkYsOoa5pPf0S1YbJ4PC1AiGEA== X-Received: by 2002:a05:6214:c8d:b0:6a0:caba:7e36 with SMTP id r13-20020a0562140c8d00b006a0caba7e36mr2957189qvr.29.1714568894525; Wed, 01 May 2024 06:08:14 -0700 (PDT) Received: from denia.c.googlers.com (114.152.245.35.bc.googleusercontent.com. [35.245.152.114]) by smtp.gmail.com with ESMTPSA id l26-20020a0c979a000000b0069b10d78445sm12430971qvd.142.2024.05.01.06.08.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 06:08:13 -0700 (PDT) From: Ricardo Ribalda Date: Wed, 01 May 2024 13:08:09 +0000 Subject: [PATCH v2 1/5] media: bcm2835-unicam: Fix build with !PM Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240501-fix-ipu6-v2-1-a5629a37a0fb@chromium.org> References: <20240501-fix-ipu6-v2-0-a5629a37a0fb@chromium.org> In-Reply-To: <20240501-fix-ipu6-v2-0-a5629a37a0fb@chromium.org> To: Mauro Carvalho Chehab , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Sakari Ailus , Bingbu Cao , Tianshu Qiu Cc: linux-media@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Hans Verkuil , Ricardo Ribalda X-Mailer: b4 0.12.4 The driver can only match the device vide the DT table, so the table should always be used, of_match_ptr does not make sense here. Fixes: drivers/media/platform/broadcom/bcm2835-unicam.c:2724:34: warning: ‘unicam_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Ricardo Ribalda --- drivers/media/platform/broadcom/bcm2835-unicam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/broadcom/bcm2835-unicam.c b/drivers/media/platform/broadcom/bcm2835-unicam.c index bd2bbb53070e..c590e26fe2cf 100644 --- a/drivers/media/platform/broadcom/bcm2835-unicam.c +++ b/drivers/media/platform/broadcom/bcm2835-unicam.c @@ -2733,7 +2733,7 @@ static struct platform_driver unicam_driver = { .driver = { .name = UNICAM_MODULE_NAME, .pm = pm_ptr(&unicam_pm_ops), - .of_match_table = of_match_ptr(unicam_of_match), + .of_match_table = unicam_of_match, }, }; From patchwork Wed May 1 13:08:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 793925 Received: from mail-oi1-f179.google.com (mail-oi1-f179.google.com [209.85.167.179]) (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 F285F12E1C2 for ; Wed, 1 May 2024 13:08:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714568898; cv=none; b=GMBnhZEK7CtmFbiPilVfkX3wPUuNPXU0e+4hYRellQOxZ75cpPqIaG631Z6WtatPhQQFzfeaxOVxXABwK3JqUH12G8svuelyyTvT6dRBRv08D+WEeE+86DXgwMgZx+qgdJl73jovyFfSZtupl+S8F+JwWe6CipubJ0xYYXsBsOc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714568898; c=relaxed/simple; bh=ty6e+rZ6GfQw+9UJTsa9bqwh25nZoUPmXmJtIfp/dG0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=oZuRL0O81OtUcX7hO1cws2z0ZxaFL/nKUFZN9dCzlQnouXAi7qEGxjcBiC8XPsSbQ5/M3+hHnqEVMQu5peHXR7wC+vYAnrRUaSGAZ0KVeaUEQmyHFYkt2XAfo+k3+8TAAswNKUScRExqx9pIz8rcUU0bmDHCWoFcM7p0Mv5HTcw= 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=DdzAlgRS; arc=none smtp.client-ip=209.85.167.179 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="DdzAlgRS" Received: by mail-oi1-f179.google.com with SMTP id 5614622812f47-3c74b643aebso3986435b6e.0 for ; Wed, 01 May 2024 06:08:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714568896; x=1715173696; 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=yIqrh9vxITy1BabNVOF1UFebsQdvmndT0UdjTkJUAiM=; b=DdzAlgRSg1QWkrM7Y8iwDp2fz5/CexfcilPCZnBuCj2u8oQOzrkrYydOLeijtla92M FIgr/ypssI0Yvs0zOMNndJhCtVq0W/PPfXmxrG9xezCcANVX4OaNDFS9c6ftINvIGTUI fekMPWICsu8Tc4e0w+zEo6cYuHMbewsQHmNBI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714568896; x=1715173696; 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=yIqrh9vxITy1BabNVOF1UFebsQdvmndT0UdjTkJUAiM=; b=royNrLAypTvcs8kX/gBL+IIIafB0D41wf7nDHy1Je3Loy/ZzO7CQbRwu2VOovRXK0Y B49wcM2QhuKGyTaGDg6G98MY2Edxz9u7u71kJvGE9X2AE+EILAkpyr6x//1cBW1MPO4N cCn2x/YyC3Z5hfMijsTodzkbadmE3PKC2N7hRDanNEBVQ0AkGNLjPFkJ4Wpq2zRq2lRr z1sUnOIyVGy7x3odcEuFCcGzUAnwdasqpA1DUiPEjm5ExtqRPrnQpe7pJ9unqzWsIOhE aCKjDmRmbGRodwXqzYa3JwpPAI9QL2tJwqg3EPRibexuNRmhYwdPnNYMvleya6cQQGZ9 8itg== X-Gm-Message-State: AOJu0YwndItG2FXfaTO40H2+Ce6O941/mALpXkmbzuQ3nvb4HYKRT7Ze E73lhwo9GwnL869gtaA2Ev6rTlE4KPei3+cVKXJDAO1tI0S/hXKrQyS9zhtvOg== X-Google-Smtp-Source: AGHT+IGFB0XhtvNukEJCBP+GoB2QKQrdFJkNpDYdG7PKY86Xxuy4bsWI+JUYUd6ulPAr6zKIgAEWsA== X-Received: by 2002:a05:6808:14d2:b0:3c6:1510:f35a with SMTP id f18-20020a05680814d200b003c61510f35amr3484615oiw.9.1714568896002; Wed, 01 May 2024 06:08:16 -0700 (PDT) Received: from denia.c.googlers.com (114.152.245.35.bc.googleusercontent.com. [35.245.152.114]) by smtp.gmail.com with ESMTPSA id l26-20020a0c979a000000b0069b10d78445sm12430971qvd.142.2024.05.01.06.08.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 06:08:14 -0700 (PDT) From: Ricardo Ribalda Date: Wed, 01 May 2024 13:08:10 +0000 Subject: [PATCH v2 2/5] media: bcm2835-unicam: Include v4l2-subdev.h Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240501-fix-ipu6-v2-2-a5629a37a0fb@chromium.org> References: <20240501-fix-ipu6-v2-0-a5629a37a0fb@chromium.org> In-Reply-To: <20240501-fix-ipu6-v2-0-a5629a37a0fb@chromium.org> To: Mauro Carvalho Chehab , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Sakari Ailus , Bingbu Cao , Tianshu Qiu Cc: linux-media@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Hans Verkuil , Ricardo Ribalda , Laurent Pinchart , kernel test robot X-Mailer: b4 0.12.4 From: Laurent Pinchart The unicam driver uses the v4l2_subdev structure. Include the corresponding header instead of relying on indirect includes. Signed-off-by: Laurent Pinchart Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202404302324.8aTC84kE-lkp@intel.com/ Reviewed-by: Ricardo Ribalda --- drivers/media/platform/broadcom/bcm2835-unicam.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/broadcom/bcm2835-unicam.c b/drivers/media/platform/broadcom/bcm2835-unicam.c index c590e26fe2cf..3c7878d8d79b 100644 --- a/drivers/media/platform/broadcom/bcm2835-unicam.c +++ b/drivers/media/platform/broadcom/bcm2835-unicam.c @@ -55,6 +55,7 @@ #include #include #include +#include #include #include "bcm2835-unicam-regs.h" From patchwork Wed May 1 13:08:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 794785 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 D653D12EBDF for ; Wed, 1 May 2024 13:08:18 +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=1714568900; cv=none; b=L8ZbsZGHxSCUbGd1dl7XX3riaMAfAM5YoKIZWdlTVaPDzO5UMTtEfsMIolX69bjZZmTogS31E1W1apsGVuzIZnwImz8tpAbWd2g/823vSUFMgKWLTPKyfGJKZ9LR/HRp6QlrutezlA2gaa8cK51XkN7NafCaCdMC8hjtavJepQU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714568900; c=relaxed/simple; bh=8+k4R0J4GKcNe8Lj0qIl9PpvkxpwHa0NvERQqlYiLVI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=gwMTSF0OdrBGdBlZE+FRPu+JKEgHw82mHwQSzifI6/ahMq6NgLCjF25R4SBdmED9ZaxwwP204bzwW5MlzRoO9X/iFlqnCRsr6volNsMQYlolQ5JGYjhuWLXvM6fvKc8wNak9WGe+A44uv0hiz+CdIP0BUmJ+CX/2QsSzQ7JZzwY= 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=iQNhMe8u; 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="iQNhMe8u" Received: by mail-qv1-f53.google.com with SMTP id 6a1803df08f44-6a0a7cf89deso20644346d6.0 for ; Wed, 01 May 2024 06:08:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714568898; x=1715173698; 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=MGnbq45Q3aIVVsIxi/7+e6D9e9h4LgaesLx5MBsPbWY=; b=iQNhMe8urehCy3hFd1LglxlZKYcfkxKh/EC7hyt860/yzYJ/5NTqhlyFJo1b4pvQpe skL82GyUShx7rUK7FRi+EaLACVX1qzg4ffQFAAVTOAZjgLTefO3xyKMOxikBuGDgz/+Q qSxG+FfP3p3ymQbsPbHau2jsn8W4380dFfb3w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714568898; x=1715173698; 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=MGnbq45Q3aIVVsIxi/7+e6D9e9h4LgaesLx5MBsPbWY=; b=jsx4bROvNZMxpLw0HkbY/Ow+B0XnqBFl/ekElonfPga3ZMQFHhnJyniypoxOo1TWBw 9B/JWRdF7EydS1x2Gq/dsEYG+NnfGK88vcnAwYUvUk/hrRh8cKW0sjqOq617RhpSNa14 7iLUJpuGjeiTdrFwo2NrL88LpMKB1zuKyu4mBghuCDojtXcPDOC7Vkr2d3r/k8CGV7Tt WRdFaSE4KkDprVeruXap0fW3Y5rfp3fy0MnI/ggCqyJel1ahgtzrOKW6x5B+B/WPn76V LI41idGL9AwtTSykvaZOTWib1NMvGnQ2Pnf0VZ1rt/U4MiWcr72+QWtJQYxU2ShUKBm5 1ldA== X-Gm-Message-State: AOJu0YzQPIFhhynEaATEY0tyhfvs4N9PTnyy51Pa+18QV7pwiGZpMRe0 AWEYlDu78/Nd/7rVvrxEII01q9aswv3Aex0onkNYeJ9z175/Nvi8AnfRcRFmNQ== X-Google-Smtp-Source: AGHT+IGUk7F34auoiq/zONzAUqrqK5yTPvc/Cyz94Sk8XJVQJ4h13ALDlS5aFFnC8XNMPBZjW49Tng== X-Received: by 2002:a05:6214:258b:b0:6a0:9361:f988 with SMTP id fq11-20020a056214258b00b006a09361f988mr2350953qvb.30.1714568897459; Wed, 01 May 2024 06:08:17 -0700 (PDT) Received: from denia.c.googlers.com (114.152.245.35.bc.googleusercontent.com. [35.245.152.114]) by smtp.gmail.com with ESMTPSA id l26-20020a0c979a000000b0069b10d78445sm12430971qvd.142.2024.05.01.06.08.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 06:08:16 -0700 (PDT) From: Ricardo Ribalda Date: Wed, 01 May 2024 13:08:11 +0000 Subject: [PATCH v2 3/5] media: intel/ipu6: Switch to RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240501-fix-ipu6-v2-3-a5629a37a0fb@chromium.org> References: <20240501-fix-ipu6-v2-0-a5629a37a0fb@chromium.org> In-Reply-To: <20240501-fix-ipu6-v2-0-a5629a37a0fb@chromium.org> To: Mauro Carvalho Chehab , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Sakari Ailus , Bingbu Cao , Tianshu Qiu Cc: linux-media@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Hans Verkuil , Ricardo Ribalda X-Mailer: b4 0.12.4 Replace the old helpers with its modern alternative. Now we do not need to set '__maybe_unused' annotations when we are not enabling the PM configurations. Fixes: drivers/media/pci/intel/ipu6/ipu6.c:841:12: warning: ‘ipu6_runtime_resume’ defined but not used [-Wunused-function] drivers/media/pci/intel/ipu6/ipu6.c:806:12: warning: ‘ipu6_resume’ defined but not used [-Wunused-function] drivers/media/pci/intel/ipu6/ipu6.c:801:12: warning: ‘ipu6_suspend’ defined but not used [-Wunused-function] Signed-off-by: Ricardo Ribalda --- drivers/media/pci/intel/ipu6/ipu6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/pci/intel/ipu6/ipu6.c b/drivers/media/pci/intel/ipu6/ipu6.c index 4b1f69d14d71..7bcd9c5a381a 100644 --- a/drivers/media/pci/intel/ipu6/ipu6.c +++ b/drivers/media/pci/intel/ipu6/ipu6.c @@ -860,8 +860,8 @@ static int ipu6_runtime_resume(struct device *dev) } static const struct dev_pm_ops ipu6_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(&ipu6_suspend, &ipu6_resume) - SET_RUNTIME_PM_OPS(&ipu6_suspend, &ipu6_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(&ipu6_suspend, &ipu6_resume) + RUNTIME_PM_OPS(&ipu6_suspend, &ipu6_runtime_resume, NULL) }; MODULE_DEVICE_TABLE(pci, ipu6_pci_tbl); From patchwork Wed May 1 13:08:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 793924 Received: from mail-qv1-f43.google.com (mail-qv1-f43.google.com [209.85.219.43]) (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 706B712EBF5 for ; Wed, 1 May 2024 13:08:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714568900; cv=none; b=kE3d0pmgQtKFGcxt6meAlLuwzxYXVkOJtCA+alMir1ExSnqY4GBa6J3lDSSJLw8q34TXN6+2hfWWdyDEoPw4OfJEx2WKCcRn3unfetMXO3AYR0ScOq5LpK2Wj+TgBvLX/2RJtRvsE273JN8138G/A4f2ilHGMfB+rgWoyVVl1ik= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714568900; c=relaxed/simple; bh=3qd79c0fqWNL/kV7Ki9qUJH7w3sWSFSFrsByKnimP58=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=i2c5Bubxkb/Y5NDcegTJvpEROMTtlEwHYyUSL8D8w3K71WICH8AaijLSKBNbRaoVhpQHeeoZJCZXyn3W0HQeFZ/J+ynvx6YvyfJGntRclPbHxzIiL7qCfjYhAPsHDOSSh0PZi8UzkVxFVeDXzowdciRC+tM58NHq21C/PQrtR5w= 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=jtBk73Ws; arc=none smtp.client-ip=209.85.219.43 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="jtBk73Ws" Received: by mail-qv1-f43.google.com with SMTP id 6a1803df08f44-6a0b4622ea0so22235216d6.2 for ; Wed, 01 May 2024 06:08:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714568898; x=1715173698; 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=iJYWApOjcQI3DrHx79IErrCVRj1fLUdwiqYEPr5bQYw=; b=jtBk73WsghL8bZUaxeVw5X3mG1DUh5NsT6qqKA65W/pe0x9WSpT8C6gTUduWaFFiUq j2CsfzwrHKYtHOE6qvc3YLr3gaz3zk3lMVj2nGZlBDecMM36tiG4UoLtjWMUH+gK0/XD k036uyi/dkPm5TygolK8HXCUwh+qf92AKWWw0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714568898; x=1715173698; 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=iJYWApOjcQI3DrHx79IErrCVRj1fLUdwiqYEPr5bQYw=; b=nN4Zjrn9DCtDSgB7Bzh2yzAj/mKZOJiFYZruvuc+jBKJ07DxQ+ytIf0tkh+nWlRrVB AgArWF8BNYuS/0Ex+zj8hr2iFQb3Utdnabmu54orFCs9TZU5Eems0jB+61L4UyGOgcrC 71o6FCaRmm1BecmderM/i+w1oBOrgwhKH4bYMOGfIocNdD984SodlUr6x6bNcH7bjIno NWKkvpHuGNonHxu/WEDTK/A5PCnJh1xcBcR2gqDEkpAuZffWh76ycuPxGcKezBK8yiNo 5c20wt99KYK1MBzqlytryaNBCO7+kx5CJbggxv/6sfKGpkZppkDJvd9KY0FPfttJlWTv CO4Q== X-Gm-Message-State: AOJu0YwIyWR5Cwb8/Mb0bG3HeZotVmBgWiCuGFzDVuSXLzNYKgXgBPyc wEcifD+7S009P8v9MXWtjSFuhbePRgJNxSK7C4EpF1IZh2TTwYlkrbVeu/VInQ== X-Google-Smtp-Source: AGHT+IFO+hJ+WIBkK0RGSj2Imq1aY8WSC2eYIFUm01h6JFLPZZsleUnwhnZo+GaOxy6bd3ozLRUOHg== X-Received: by 2002:a05:6214:21e8:b0:6a0:cd98:5ad2 with SMTP id p8-20020a05621421e800b006a0cd985ad2mr3144776qvj.58.1714568898113; Wed, 01 May 2024 06:08:18 -0700 (PDT) Received: from denia.c.googlers.com (114.152.245.35.bc.googleusercontent.com. [35.245.152.114]) by smtp.gmail.com with ESMTPSA id l26-20020a0c979a000000b0069b10d78445sm12430971qvd.142.2024.05.01.06.08.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 06:08:17 -0700 (PDT) From: Ricardo Ribalda Date: Wed, 01 May 2024 13:08:12 +0000 Subject: [PATCH v2 4/5] media: intel/ipu6: Fix direct dependency Kconfig error Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240501-fix-ipu6-v2-4-a5629a37a0fb@chromium.org> References: <20240501-fix-ipu6-v2-0-a5629a37a0fb@chromium.org> In-Reply-To: <20240501-fix-ipu6-v2-0-a5629a37a0fb@chromium.org> To: Mauro Carvalho Chehab , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Sakari Ailus , Bingbu Cao , Tianshu Qiu Cc: linux-media@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Hans Verkuil , Ricardo Ribalda X-Mailer: b4 0.12.4 VIDEO_INTEL_IPU6 selects IPU6_BRIDGE, but they have different set of dependencies. Fixes: WARNING: unmet direct dependencies detected for IPU_BRIDGE Depends on [n]: MEDIA_SUPPORT [=y] && PCI [=y] && MEDIA_PCI_SUPPORT [=y] && I2C [=y] && ACPI [=n] Selected by [y]: - VIDEO_INTEL_IPU6 [=y] && MEDIA_SUPPORT [=y] && PCI [=y] && MEDIA_PCI_SUPPORT [=y] && (ACPI [=n] || COMPILE_TEST [=y]) && VIDEO_DEV [=y] && X86 [=y] && X86_64 [=y] && HAS_DMA [=y] Signed-off-by: Ricardo Ribalda --- drivers/media/pci/intel/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/pci/intel/Kconfig b/drivers/media/pci/intel/Kconfig index 04cb3d253486..d9fcddce028b 100644 --- a/drivers/media/pci/intel/Kconfig +++ b/drivers/media/pci/intel/Kconfig @@ -6,7 +6,8 @@ source "drivers/media/pci/intel/ivsc/Kconfig" config IPU_BRIDGE tristate "Intel IPU Bridge" - depends on I2C && ACPI + depends on ACPI || COMPILE_TEST + depends on I2C help The IPU bridge is a helper library for Intel IPU drivers to function on systems shipped with Windows. From patchwork Wed May 1 13:08:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 794784 Received: from mail-qv1-f43.google.com (mail-qv1-f43.google.com [209.85.219.43]) (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 84B5412F37B for ; Wed, 1 May 2024 13:08:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714568902; cv=none; b=D4CXdacHQ9upLvBiWYJLfbBNKO70MGmBcqfj9JAUfSnJdz1rUTI+anfRdBcUye1RA100SaIvRj2I23gWUIjoAgTa6d4SK7qHLlnfugaZY9bCXUcRB7RWR9Tg2vmmhe8uOehWMcOPRRyKFF2zGafmFZQwCYk7EJGV0t1eZ0/C1MI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714568902; c=relaxed/simple; bh=yyqc5fgSD9exFQ4GhDz78AnhyoMaV08hu504NdFrDGM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=lUFJUCRQ5kH4/Xt3xExc66c1q/OP3D9F+KbGLnrRODP/T4+Jjc7i8ou+ZhkXAvIzLIBQ06kVUUqo9/0vedpwzby+2bMfNy5l1zS7Gfpywg9VPVpTvk1+plAPuytJ6e7gpfr46D2WFe9zuNWug+kZQdPcTPM/HBpn5qdOL+JI9+E= 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=AP+GYNNX; arc=none smtp.client-ip=209.85.219.43 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="AP+GYNNX" Received: by mail-qv1-f43.google.com with SMTP id 6a1803df08f44-69b782287f9so32382426d6.0 for ; Wed, 01 May 2024 06:08:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714568899; x=1715173699; 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=fuTS2475wBKHSkCVqPTkc/u+zH5CwzTowAsuQdTWDz8=; b=AP+GYNNXAgZLw9bxXhVAyM5NBVR/a4LCCgFMupqzOOlS3a+tJfzes+J2ZP18kvnHXR mWzt66wHne0vPyaxyU24WDO2vGRhe7S6QKgtMeUTSf4Wp+rJZcg/jWx/4GfDJnmXcJoU gjSQ+VOX6V7Sh5J8vFk/Ni1RcsOtQGyKmPxj8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714568899; x=1715173699; 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=fuTS2475wBKHSkCVqPTkc/u+zH5CwzTowAsuQdTWDz8=; b=FEvEJVTN5fhzoHrCyRuJWdkUw0dCAlDDoL8bQh1/S+NtbUDCumnvncGAnPfG5ITW70 YdpreSsFYN1ZBlkx6rrvGbhVJtk/+Rqki3roN4Ue9dgVqL4nIY7WDKB+TUH0woR9IkPi U63YGIzkeB6I35oLjym2T65cZ18Bftqijc5Zcphw1gAMQgCO/FCGo3aDoLvg7goAlKrJ Rlr2kZCk4pMKZntuH8LeJekBSN8KRMPLADPgaFbzo4A6HVUgbL7bL3FP5+h4FdJ2dEFR w/4Az6Dvrq/E2WhXa+CKOK8PMNeXeGzdrFpHPyOki1oZlAI9y+JJkZKYx1Ofr0bC6ZsU Jkaw== X-Gm-Message-State: AOJu0Yz6818ihjwLrD4ATtHWcoQQjRN0X4PCLJlJCuhYElczWd71lDo6 GIQQDr2pWGxw8Pg5vJsco2pfjaCClS3WTiY7STY3jlR5O3h7XgbwjbU8Xbmtyg== X-Google-Smtp-Source: AGHT+IGxtLuMsV5IT224KA2ifYps0IBof8gR94o8Jv8PY5+SVS3jtjRCG5zyAZxhnmApUmcG9XpHAg== X-Received: by 2002:ad4:5cc7:0:b0:6a0:c933:4d7d with SMTP id iu7-20020ad45cc7000000b006a0c9334d7dmr2626974qvb.48.1714568899557; Wed, 01 May 2024 06:08:19 -0700 (PDT) Received: from denia.c.googlers.com (114.152.245.35.bc.googleusercontent.com. [35.245.152.114]) by smtp.gmail.com with ESMTPSA id l26-20020a0c979a000000b0069b10d78445sm12430971qvd.142.2024.05.01.06.08.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 06:08:18 -0700 (PDT) From: Ricardo Ribalda Date: Wed, 01 May 2024 13:08:13 +0000 Subject: [PATCH v2 5/5] media: intel/ipu6: Fix build with !ACPI Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240501-fix-ipu6-v2-5-a5629a37a0fb@chromium.org> References: <20240501-fix-ipu6-v2-0-a5629a37a0fb@chromium.org> In-Reply-To: <20240501-fix-ipu6-v2-0-a5629a37a0fb@chromium.org> To: Mauro Carvalho Chehab , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Sakari Ailus , Bingbu Cao , Tianshu Qiu Cc: linux-media@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Hans Verkuil , Ricardo Ribalda X-Mailer: b4 0.12.4 Modify the code so it can be compiled tested in configurations that do not have ACPI enabled. Fixes: drivers/media/pci/intel/ipu-bridge.c:103:30: error: implicit declaration of function ‘acpi_device_handle’; did you mean ‘acpi_fwnode_handle’? [-Werror=implicit-function-declaration] drivers/media/pci/intel/ipu-bridge.c:103:30: warning: initialization of ‘acpi_handle’ {aka ‘void *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion] drivers/media/pci/intel/ipu-bridge.c:110:17: error: implicit declaration of function ‘for_each_acpi_dev_match’ [-Werror=implicit-function-declaration] drivers/media/pci/intel/ipu-bridge.c:110:74: error: expected ‘;’ before ‘for_each_acpi_consumer_dev’ drivers/media/pci/intel/ipu-bridge.c:104:29: warning: unused variable ‘consumer’ [-Wunused-variable] drivers/media/pci/intel/ipu-bridge.c:103:21: warning: unused variable ‘handle’ [-Wunused-variable] drivers/media/pci/intel/ipu-bridge.c:166:38: error: invalid use of undefined type ‘struct acpi_device’ drivers/media/pci/intel/ipu-bridge.c:185:43: error: invalid use of undefined type ‘struct acpi_device’ drivers/media/pci/intel/ipu-bridge.c:191:30: error: invalid use of undefined type ‘struct acpi_device’ drivers/media/pci/intel/ipu-bridge.c:196:30: error: invalid use of undefined type ‘struct acpi_device’ drivers/media/pci/intel/ipu-bridge.c:202:30: error: invalid use of undefined type ‘struct acpi_device’ drivers/media/pci/intel/ipu-bridge.c:223:31: error: invalid use of undefined type ‘struct acpi_device’ drivers/media/pci/intel/ipu-bridge.c:236:18: error: implicit declaration of function ‘acpi_get_physical_device_location’ [-Werror=implicit-function-declaration] drivers/media/pci/intel/ipu-bridge.c:236:56: error: invalid use of undefined type ‘struct acpi_device’ drivers/media/pci/intel/ipu-bridge.c:238:31: error: invalid use of undefined type ‘struct acpi_device’ drivers/media/pci/intel/ipu-bridge.c:256:31: error: invalid use of undefined type ‘struct acpi_device’ drivers/media/pci/intel/ipu-bridge.c:275:31: error: invalid use of undefined type ‘struct acpi_device’ drivers/media/pci/intel/ipu-bridge.c:280:30: error: invalid use of undefined type ‘struct acpi_device’ drivers/media/pci/intel/ipu-bridge.c:469:26: error: implicit declaration of function ‘acpi_device_hid’; did you mean ‘dmi_device_id’? [-Werror=implicit-function-declaration] drivers/media/pci/intel/ipu-bridge.c:468:74: warning: format ‘%s’ expects argument of type ‘char *’, but argument 4 has type ‘int’ [-Wformat=] drivers/media/pci/intel/ipu-bridge.c:637:58: error: expected ‘;’ before ‘{’ token drivers/media/pci/intel/ipu-bridge.c:696:1: warning: label ‘err_put_adev’ defined but not used [-Wunused-label] drivers/media/pci/intel/ipu-bridge.c:693:1: warning: label ‘err_put_ivsc’ defined but not used [-Wunused-label] drivers/media/pci/intel/ipu-bridge.c:691:1: warning: label ‘err_free_swnodes’ defined but not used [-Wunused-label] drivers/media/pci/intel/ipu-bridge.c:632:40: warning: unused variable ‘primary’ [-Wunused-variable] drivers/media/pci/intel/ipu-bridge.c:632:31: warning: unused variable ‘fwnode’ [-Wunused-variable] drivers/media/pci/intel/ipu-bridge.c:733:73: error: expected ‘;’ before ‘{’ token drivers/media/pci/intel/ipu-bridge.c:725:24: warning: unused variable ‘csi_dev’ [-Wunused-variable] drivers/media/pci/intel/ipu-bridge.c:724:43: warning: unused variable ‘adev’ [-Wunused-variable] drivers/media/pci/intel/ipu-bridge.c:599:12: warning: ‘ipu_bridge_instantiate_ivsc’ defined but not used [-Wunused-function] drivers/media/pci/intel/ipu-bridge.c:444:13: warning: ‘ipu_bridge_create_connection_swnodes’ defined but not used [-Wunused-function] drivers/media/pci/intel/ipu-bridge.c:297:13: warning: ‘ipu_bridge_create_fwnode_properties’ defined but not used [-Wunused-function] drivers/media/pci/intel/ipu-bridge.c:155:12: warning: ‘ipu_bridge_check_ivsc_dev’ defined but not used [-Wunused-function] Signed-off-by: Ricardo Ribalda --- drivers/media/pci/intel/ipu-bridge.c | 66 +++++++++++++++++++++++++----------- 1 file changed, 47 insertions(+), 19 deletions(-) diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c index e994db4f4d91..61750cc98d70 100644 --- a/drivers/media/pci/intel/ipu-bridge.c +++ b/drivers/media/pci/intel/ipu-bridge.c @@ -15,6 +15,8 @@ #include #include +#define ADEV_DEV(adev) ACPI_PTR(&((adev)->dev)) + /* * 92335fcf-3203-4472-af93-7b4453ac29da * @@ -87,6 +89,7 @@ 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. @@ -100,13 +103,13 @@ static const struct acpi_device_id ivsc_acpi_ids[] = { static struct acpi_device *ipu_bridge_get_ivsc_acpi_dev(struct acpi_device *adev) { - acpi_handle handle = acpi_device_handle(adev); - struct acpi_device *consumer, *ivsc_adev; unsigned int i; for (i = 0; i < ARRAY_SIZE(ivsc_acpi_ids); i++) { const struct acpi_device_id *acpi_id = &ivsc_acpi_ids[i]; + struct acpi_device *consumer, *ivsc_adev; + acpi_handle handle = acpi_device_handle(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) @@ -118,6 +121,12 @@ 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) { @@ -163,7 +172,7 @@ static int ipu_bridge_check_ivsc_dev(struct ipu_sensor *sensor, csi_dev = ipu_bridge_get_ivsc_csi_dev(adev); if (!csi_dev) { acpi_dev_put(adev); - dev_err(&adev->dev, "Failed to find MEI CSI dev\n"); + dev_err(ADEV_DEV(adev), "Failed to find MEI CSI dev\n"); return -ENODEV; } @@ -182,24 +191,25 @@ static int ipu_bridge_read_acpi_buffer(struct acpi_device *adev, char *id, acpi_status status; int ret = 0; - status = acpi_evaluate_object(adev->handle, id, NULL, &buffer); + status = acpi_evaluate_object(ACPI_PTR(adev->handle), + id, NULL, &buffer); if (ACPI_FAILURE(status)) return -ENODEV; obj = buffer.pointer; if (!obj) { - dev_err(&adev->dev, "Couldn't locate ACPI buffer\n"); + dev_err(ADEV_DEV(adev), "Couldn't locate ACPI buffer\n"); return -ENODEV; } if (obj->type != ACPI_TYPE_BUFFER) { - dev_err(&adev->dev, "Not an ACPI buffer\n"); + dev_err(ADEV_DEV(adev), "Not an ACPI buffer\n"); ret = -ENODEV; goto out_free_buff; } if (obj->buffer.length > size) { - dev_err(&adev->dev, "Given buffer is too small\n"); + dev_err(ADEV_DEV(adev), "Given buffer is too small\n"); ret = -EINVAL; goto out_free_buff; } @@ -220,7 +230,7 @@ static u32 ipu_bridge_parse_rotation(struct acpi_device *adev, case IPU_SENSOR_ROTATION_INVERTED: return 180; default: - dev_warn(&adev->dev, + dev_warn(ADEV_DEV(adev), "Unknown rotation %d. Assume 0 degree rotation\n", ssdb->degree); return 0; @@ -230,12 +240,14 @@ static u32 ipu_bridge_parse_rotation(struct acpi_device *adev, static enum v4l2_fwnode_orientation ipu_bridge_parse_orientation(struct acpi_device *adev) { enum v4l2_fwnode_orientation orientation; - struct acpi_pld_info *pld; - acpi_status status; + 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 if (ACPI_FAILURE(status)) { - dev_warn(&adev->dev, "_PLD call failed, using default orientation\n"); + dev_warn(ADEV_DEV(adev), "_PLD call failed, using default orientation\n"); return V4L2_FWNODE_ORIENTATION_EXTERNAL; } @@ -253,7 +265,8 @@ static enum v4l2_fwnode_orientation ipu_bridge_parse_orientation(struct acpi_dev orientation = V4L2_FWNODE_ORIENTATION_EXTERNAL; break; default: - dev_warn(&adev->dev, "Unknown _PLD panel val %d\n", pld->panel); + dev_warn(ADEV_DEV(adev), "Unknown _PLD panel val %d\n", + pld->panel); orientation = V4L2_FWNODE_ORIENTATION_EXTERNAL; break; } @@ -272,12 +285,12 @@ int ipu_bridge_parse_ssdb(struct acpi_device *adev, struct ipu_sensor *sensor) return ret; if (ssdb.vcmtype > ARRAY_SIZE(ipu_vcm_types)) { - dev_warn(&adev->dev, "Unknown VCM type %d\n", ssdb.vcmtype); + dev_warn(ADEV_DEV(adev), "Unknown VCM type %d\n", ssdb.vcmtype); ssdb.vcmtype = 0; } if (ssdb.lanes > IPU_MAX_LANES) { - dev_err(&adev->dev, "Number of lanes in SSDB is invalid\n"); + dev_err(ADEV_DEV(adev), "Number of lanes in SSDB is invalid\n"); return -EINVAL; } @@ -465,8 +478,14 @@ static void ipu_bridge_create_connection_swnodes(struct ipu_bridge *bridge, sensor->ipu_properties); 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", - acpi_device_hid(sensor->ivsc_adev), sensor->link); + device_hid, sensor->link); nodes[SWNODE_IVSC_HID] = NODE_SENSOR(sensor->ivsc_name, sensor->ivsc_properties); @@ -631,11 +650,15 @@ static int ipu_bridge_connect_sensor(const struct ipu_sensor_config *cfg, { struct fwnode_handle *fwnode, *primary; struct ipu_sensor *sensor; - struct acpi_device *adev; + struct acpi_device *adev = NULL; int ret; +#if IS_ENABLED(CONFIG_ACPI) for_each_acpi_dev_match(adev, cfg->hid, NULL, -1) { - if (!adev->status.enabled) +#else + while (true) { +#endif + if (!ACPI_PTR(adev->status.enabled)) continue; if (bridge->n_sensors >= IPU_MAX_PORTS) { @@ -671,7 +694,7 @@ static int ipu_bridge_connect_sensor(const struct ipu_sensor_config *cfg, goto err_free_swnodes; } - sensor->adev = acpi_dev_get(adev); + sensor->adev = ACPI_PTR(acpi_dev_get(adev)); primary = acpi_fwnode_handle(adev); primary->secondary = fwnode; @@ -727,11 +750,16 @@ 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) { - if (!sensor_adev->status.enabled) +#else + while (true) { + sensor_adev = NULL; +#endif + if (!ACPI_PTR(sensor_adev->status.enabled)) continue; adev = ipu_bridge_get_ivsc_acpi_dev(sensor_adev);