From patchwork Fri Mar 29 07:56:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 13610275 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 8140B3B78E; Fri, 29 Mar 2024 07:57:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699038; cv=none; b=mI9KGVRQgLXYherBOaQwiqx/z8X8S8BKp9TGYuwKc3HaauNBKDM6sZEpBEmEbRFAg+jM2h/kTtBn6vu+2HaUUo1mZyyQq8oKUbbLBSG51SFZi9PzAvGVBSNbHu9zx56pQiTMFOx+VulaYVIxDWA2tlmwmkhtzSLixPSi+6Y7qlY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699038; c=relaxed/simple; bh=rYj4oByNDWSNNv8deLJRnMMa9IMZFSG3YNnpzY4T5ds=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LLRE5HgMQmqyT0qKDju3Ulz1YScm9P0g702YIR8ZUGukSyWezELzgb+gXdCk+TFHeZOOeVF2mWt+9RQ6WSCqmEvB3W8FVvyqmnH7MtSGYzBMjYBIBhItyk9ASsNstEmSS9xETQFhfIk/LG+k8+pu+4z6/pqAIpaFt1qkD32TsWM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=sSw0TcbA; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="sSw0TcbA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A9483C433A6; Fri, 29 Mar 2024 07:57:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711699038; bh=rYj4oByNDWSNNv8deLJRnMMa9IMZFSG3YNnpzY4T5ds=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sSw0TcbAmrkw0IVVPBM+6Xb00vXRMrrkPRxwhXo+SWmEp9geg2jy74+FkG9UDt1H2 FQqeZ8Y+IDVij/AMfEm1gYMMWgofQEpF8bFN97vxvVtSGas/NJtBjN/RdMRAaXk/l7 o1Kr5HwT9buz1Cj6kHgsBcP/3QFOSZMdi63x9JX4CiM7jbuFgBrMRVSzl662X2bv9v 2oAs3fTaUog2/um27x06mMcBCNBpk8R7gddsF/rOQZ5TrJdLptC5wp4IQYzqT4J7nU ZMgqzomA3BpbA/9RowBzCeEpwOjIOwV+2I//5V+APXQGduMMX+pgSXQpkTVMkKjLRX 8JEpWp5cxFFhw== From: Tzung-Bi Shih To: bleung@chromium.org, groeck@chromium.org, linus.walleij@linaro.org, brgl@bgdev.pl, hverkuil-cisco@xs4all.nl, mchehab@kernel.org, sre@kernel.org, alexandre.belloni@bootlin.com Cc: tzungbi@kernel.org, chrome-platform@lists.linux.dev, pmalani@chromium.org, linux-gpio@vger.kernel.org, linux-media@vger.kernel.org, linux-pm@vger.kernel.org, linux-rtc@vger.kernel.org, krzk@kernel.org Subject: [PATCH 01/18] media: platform: cros-ec: provide ID table for avoiding fallback match Date: Fri, 29 Mar 2024 15:56:13 +0800 Message-ID: <20240329075630.2069474-2-tzungbi@kernel.org> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog In-Reply-To: <20240329075630.2069474-1-tzungbi@kernel.org> References: <20240329075630.2069474-1-tzungbi@kernel.org> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Instead of using fallback driver name match, provide ID table[1] for the primary match. [1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353 Signed-off-by: Tzung-Bi Shih Reviewed-by: Krzysztof Kozlowski Reviewed-by: Benson Leung --- drivers/media/cec/platform/cros-ec/cros-ec-cec.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/media/cec/platform/cros-ec/cros-ec-cec.c b/drivers/media/cec/platform/cros-ec/cros-ec-cec.c index 48ed2993d2f0..8fbbb4091455 100644 --- a/drivers/media/cec/platform/cros-ec/cros-ec-cec.c +++ b/drivers/media/cec/platform/cros-ec/cros-ec-cec.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -573,6 +574,12 @@ static void cros_ec_cec_remove(struct platform_device *pdev) } } +static const struct platform_device_id cros_ec_cec_id[] = { + { DRV_NAME, 0 }, + {} +}; +MODULE_DEVICE_TABLE(platform, cros_ec_cec_id); + static struct platform_driver cros_ec_cec_driver = { .probe = cros_ec_cec_probe, .remove_new = cros_ec_cec_remove, @@ -580,6 +587,7 @@ static struct platform_driver cros_ec_cec_driver = { .name = DRV_NAME, .pm = &cros_ec_cec_pm_ops, }, + .id_table = cros_ec_cec_id, }; module_platform_driver(cros_ec_cec_driver); @@ -587,4 +595,3 @@ module_platform_driver(cros_ec_cec_driver); MODULE_DESCRIPTION("CEC driver for ChromeOS ECs"); MODULE_AUTHOR("Neil Armstrong "); MODULE_LICENSE("GPL"); -MODULE_ALIAS("platform:" DRV_NAME); From patchwork Fri Mar 29 07:56:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 13610276 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 4191144C6A; Fri, 29 Mar 2024 07:57:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699041; cv=none; b=JaEOMIbX8hHcR+Ilw42gtoGDwjuJBiyr/oenDPouh3Y47rZuSuxJhRPTx6sVOT3YUkxnhwixzzy9xNTe7Ope7bDdt3eRCvtpHkrZgOWRwmDhX5nCrh7mc96Qa+OfG7s96GjCEN2lWSI6qhS2Nbq+hZ1LWEv/uSXXsW7vltZTDys= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699041; c=relaxed/simple; bh=plNjzkSRLh/DaGoqAsb+jmxTjdZudYWUD5TO+9J6Chg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fkTL6HUuEmqDVsdUUWvoQYWhSe3fOXal4cmMUk7QFPhe010yZiWLNlHNlZewfxSMSTjKtoCR7ku83609ZxtDU61h3mOFrPyMCo8Ou9GwazMXrljhjNtAw5iw/IBgBw5+YplxlfW7JHYT8/79HiDdN2v+OjusNrMcF3nPWnUl3GI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Sg998GEA; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Sg998GEA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 70149C433B1; Fri, 29 Mar 2024 07:57:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711699040; bh=plNjzkSRLh/DaGoqAsb+jmxTjdZudYWUD5TO+9J6Chg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Sg998GEAAcB1ZsXJ363xiPAGlBhLGCaCP4KUhipxtOn5JoggHXQFZqd4PElb2mYG5 oNc9EQAMyglU4P7wHFtIz+G14jCCPs14YuAwhSbVRkgqWSfApgrx/mizP47BkRVafR LOIREYTr7CjgepPz8f5e8TmXHeonYneA7jzLMOyt43SStxTa04tAay5GQnCY6RHmhF Bn4pCyZMVbCM4DuzhQtEN9SHvku3rA+7YJoiBTqoRSxBf4MTzq+REOjGQKUaOnHzQR GbcgcifTh6HvrsHy9G5QZNaY4TP7YnABlGgHI7qlm//kIBfRDV/GI4Qu83ZKWbW/QW 4mKN6EjCBGWtQ== From: Tzung-Bi Shih To: bleung@chromium.org, groeck@chromium.org, linus.walleij@linaro.org, brgl@bgdev.pl, hverkuil-cisco@xs4all.nl, mchehab@kernel.org, sre@kernel.org, alexandre.belloni@bootlin.com Cc: tzungbi@kernel.org, chrome-platform@lists.linux.dev, pmalani@chromium.org, linux-gpio@vger.kernel.org, linux-media@vger.kernel.org, linux-pm@vger.kernel.org, linux-rtc@vger.kernel.org, krzk@kernel.org Subject: [PATCH 02/18] gpio: cros-ec: provide ID table for avoiding fallback match Date: Fri, 29 Mar 2024 15:56:14 +0800 Message-ID: <20240329075630.2069474-3-tzungbi@kernel.org> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog In-Reply-To: <20240329075630.2069474-1-tzungbi@kernel.org> References: <20240329075630.2069474-1-tzungbi@kernel.org> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Instead of using fallback driver name match, provide ID table[1] for the primary match. Also allow automatic module loading by adding MODULE_DEVICE_TABLE(). [1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353 Signed-off-by: Tzung-Bi Shih Reviewed-by: Krzysztof Kozlowski Reviewed-by: Benson Leung Acked-by: Linus Walleij --- drivers/gpio/gpio-cros-ec.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpio/gpio-cros-ec.c b/drivers/gpio/gpio-cros-ec.c index 842e1c060414..0c09bb54dc0c 100644 --- a/drivers/gpio/gpio-cros-ec.c +++ b/drivers/gpio/gpio-cros-ec.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -197,11 +198,18 @@ static int cros_ec_gpio_probe(struct platform_device *pdev) return devm_gpiochip_add_data(dev, gc, cros_ec); } +static const struct platform_device_id cros_ec_gpio_id[] = { + { "cros-ec-gpio", 0 }, + {} +}; +MODULE_DEVICE_TABLE(platform, cros_ec_gpio_id); + static struct platform_driver cros_ec_gpio_driver = { .probe = cros_ec_gpio_probe, .driver = { .name = "cros-ec-gpio", }, + .id_table = cros_ec_gpio_id, }; module_platform_driver(cros_ec_gpio_driver); From patchwork Fri Mar 29 07:56:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 13610277 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 B4F4447F6B; Fri, 29 Mar 2024 07:57:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699043; cv=none; b=f8LYeOmbXPHbgNWnh0kHuUupzz2S0Jn0Mi0rswfhZRbkT8vhIaADdtUMdRykOv/1g3BoZ9jYVgSgRh4U+Agx2Lp+qixCc4Rj4ua5TpRTYRyXMrD1tKXmUOGAQbohbZwPKphEpxbkiKEjkJey6gPkOLFI1A2nYqb4YEEpz4JlEMw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699043; c=relaxed/simple; bh=xytDYpuJuP97x2NJwYryd3hBs9cZP32C1tuDo6lNnCM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HkYtvZ5U9ap3SKO+jxQCwR5F9TvEv/kkEHaef4BOZOW0Tbeim3k7huPziLbrx+smwORd4ynYY1jTifYZKbXevpp/YEQjWRVP+6ED7E+XHma+ym2ums0CksT6Dam0xUu9U6UrRzIhSC339FmlRpFMzXMYTEt+Q1hhlYHgezgLDvM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OEh8Iftz; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OEh8Iftz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3483DC43394; Fri, 29 Mar 2024 07:57:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711699043; bh=xytDYpuJuP97x2NJwYryd3hBs9cZP32C1tuDo6lNnCM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OEh8IftzEnkGCe0GsGZofX85ARuQQ05ZWeRlb+6dp5DGjyeGGPq55ITUputUB+Mx/ DmS9WqunINKr+DehB3hzsmj3Z5oYaczmCtwO7aJoh0J/2ulMiEzchYyKSsjgxytDS6 Vics/arAvLb2SSMw9AgjsKVO8NnySl/NmZ781obPTuuy0PqxirVlBSTLAoEqRmaJ9/ 3k/roWuXyTZFZlzT95xbXK/GuwR6rTtazDPkWvDjNA9lb/DBjXnCcOLOVTPf3eZcKW B9UE0A2vvs9fqSJFYWtGcknvz4lTLyDpq5PReS5E0CScOl90iJJv+ov+gm8RyQbwoo AKUUUkrS8wIYw== From: Tzung-Bi Shih To: bleung@chromium.org, groeck@chromium.org, linus.walleij@linaro.org, brgl@bgdev.pl, hverkuil-cisco@xs4all.nl, mchehab@kernel.org, sre@kernel.org, alexandre.belloni@bootlin.com Cc: tzungbi@kernel.org, chrome-platform@lists.linux.dev, pmalani@chromium.org, linux-gpio@vger.kernel.org, linux-media@vger.kernel.org, linux-pm@vger.kernel.org, linux-rtc@vger.kernel.org, krzk@kernel.org Subject: [PATCH 03/18] rtc: cros-ec: provide ID table for avoiding fallback match Date: Fri, 29 Mar 2024 15:56:15 +0800 Message-ID: <20240329075630.2069474-4-tzungbi@kernel.org> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog In-Reply-To: <20240329075630.2069474-1-tzungbi@kernel.org> References: <20240329075630.2069474-1-tzungbi@kernel.org> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Instead of using fallback driver name match, provide ID table[1] for the primary match. [1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353 Signed-off-by: Tzung-Bi Shih Reviewed-by: Krzysztof Kozlowski Reviewed-by: Benson Leung --- drivers/rtc/rtc-cros-ec.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-cros-ec.c b/drivers/rtc/rtc-cros-ec.c index 0cd397c04ff0..f57462c7b2c6 100644 --- a/drivers/rtc/rtc-cros-ec.c +++ b/drivers/rtc/rtc-cros-ec.c @@ -5,6 +5,7 @@ // Author: Stephen Barber #include +#include #include #include #include @@ -392,6 +393,12 @@ static void cros_ec_rtc_remove(struct platform_device *pdev) dev_err(dev, "failed to unregister notifier\n"); } +static const struct platform_device_id cros_ec_rtc_id[] = { + { DRV_NAME, 0 }, + {} +}; +MODULE_DEVICE_TABLE(platform, cros_ec_rtc_id); + static struct platform_driver cros_ec_rtc_driver = { .probe = cros_ec_rtc_probe, .remove_new = cros_ec_rtc_remove, @@ -399,6 +406,7 @@ static struct platform_driver cros_ec_rtc_driver = { .name = DRV_NAME, .pm = &cros_ec_rtc_pm_ops, }, + .id_table = cros_ec_rtc_id, }; module_platform_driver(cros_ec_rtc_driver); @@ -406,4 +414,3 @@ module_platform_driver(cros_ec_rtc_driver); MODULE_DESCRIPTION("RTC driver for Chrome OS ECs"); MODULE_AUTHOR("Stephen Barber "); MODULE_LICENSE("GPL v2"); -MODULE_ALIAS("platform:" DRV_NAME); From patchwork Fri Mar 29 07:56:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 13610278 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 D8F494207A; Fri, 29 Mar 2024 07:57:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699047; cv=none; b=h1vw4IKH4+nRMEAbYiNJvIuoPq8ghXlR+vI1AORtHl1PH+kBW3m0uoQaAARxOSOVvpluIqsZKjKzB/zgaRq7gGKgbq+Thn5zd7ZvE6BhL4yF90LpZHXvJ3ihtt96fDlFBMWc3e8122X2w/sia94etzfaf3LA7v2sptcGZdfAu60= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699047; c=relaxed/simple; bh=w3WDie7qLPtYs8itn1a7yDwph7TvM2GRvT4tTmDak7U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EfErylVqPyHDXTVRosieG8fk67bIt6fELIN/4azK+/4Oea+ByWPRKU3CuVSCEnH13UB/vuTXI3ovJZAtYvi3ywTw03LIKm0tETL+5PYzMHsc3vcg5FnhCJBH2MyneDsR9w77vG0WuXECywLctnUwSy35gIeORmWanZUMQUQncXU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dosEoWd6; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dosEoWd6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id ED746C433C7; Fri, 29 Mar 2024 07:57:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711699046; bh=w3WDie7qLPtYs8itn1a7yDwph7TvM2GRvT4tTmDak7U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dosEoWd658JBPAMadC3CzDn1Xjxo96AiEVnjtrl15VpVRJ0ZUBSMSLKkki2mV0X3X zaCNYNRDd8TWHBqdfGTneLxGOEKK97xJ32NJZYzD1cYMJEMvTqjnFlXCigqVQRInPX cZt3R9LSyscfKPvUEQRJDiup38C8wjX10w1kCJx/KK1zoJ79Ez842wgP4nVXrrOSt1 SX9p7rNFNFcnjWUOBoniCMW/vFesNwPoi3i5IpeY/BnA9+ch9Ch0WteqeFzM1Z87ln jgmAMM/3uuDhbuCbp7L/nfMmyU/nH56VCl4/Gfrpkgnsl1/UTMZ26ci/OrUyJvrQMA 1j9ADRx7EENbw== From: Tzung-Bi Shih To: bleung@chromium.org, groeck@chromium.org, linus.walleij@linaro.org, brgl@bgdev.pl, hverkuil-cisco@xs4all.nl, mchehab@kernel.org, sre@kernel.org, alexandre.belloni@bootlin.com Cc: tzungbi@kernel.org, chrome-platform@lists.linux.dev, pmalani@chromium.org, linux-gpio@vger.kernel.org, linux-media@vger.kernel.org, linux-pm@vger.kernel.org, linux-rtc@vger.kernel.org, krzk@kernel.org Subject: [PATCH 04/18] platform/chrome: cros_ec_sensorhub: provide ID table for avoiding fallback match Date: Fri, 29 Mar 2024 15:56:16 +0800 Message-ID: <20240329075630.2069474-5-tzungbi@kernel.org> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog In-Reply-To: <20240329075630.2069474-1-tzungbi@kernel.org> References: <20240329075630.2069474-1-tzungbi@kernel.org> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Instead of using fallback driver name match, provide ID table[1] for the primary match. [1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353 Signed-off-by: Tzung-Bi Shih Reviewed-by: Krzysztof Kozlowski Reviewed-by: Benson Leung --- drivers/platform/chrome/cros_ec_sensorhub.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/platform/chrome/cros_ec_sensorhub.c b/drivers/platform/chrome/cros_ec_sensorhub.c index 31fb8bdaad5a..50cdae67fa32 100644 --- a/drivers/platform/chrome/cros_ec_sensorhub.c +++ b/drivers/platform/chrome/cros_ec_sensorhub.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -247,17 +248,23 @@ static SIMPLE_DEV_PM_OPS(cros_ec_sensorhub_pm_ops, cros_ec_sensorhub_suspend, cros_ec_sensorhub_resume); +static const struct platform_device_id cros_ec_sensorhub_id[] = { + { DRV_NAME, 0 }, + {} +}; +MODULE_DEVICE_TABLE(platform, cros_ec_sensorhub_id); + static struct platform_driver cros_ec_sensorhub_driver = { .driver = { .name = DRV_NAME, .pm = &cros_ec_sensorhub_pm_ops, }, .probe = cros_ec_sensorhub_probe, + .id_table = cros_ec_sensorhub_id, }; module_platform_driver(cros_ec_sensorhub_driver); -MODULE_ALIAS("platform:" DRV_NAME); MODULE_AUTHOR("Gwendal Grignou "); MODULE_DESCRIPTION("ChromeOS EC MEMS Sensor Hub Driver"); MODULE_LICENSE("GPL"); From patchwork Fri Mar 29 07:56:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 13610279 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 9E3A53C466; Fri, 29 Mar 2024 07:57:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699049; cv=none; b=HBH7LYsGo/RDqAJ5iXdBwnVAvqdMQq5IHykeM1aljUJwrPhsVFBU7w4FDrcFNb1VK1IoBgJCpQrLSqwgB9yEQIGfjZyYsTuvYkK/MMx08tgyW6azxyIIE5sBiZtiL4gpzgSf9CaT08W9CMFbMe/gcCPDKhdoNW69om0TgrRxQrw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699049; c=relaxed/simple; bh=PMydpdwXkX2S8GFW09p1L1gawoJinB3dIyCrvfl03lE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=r1lE8MH2JR8uWGM08A6v5xWApeYPpVyRsxFSOOxc6x6xfC3dkZnxoywXVciFsRGqSoQaSGbnMbAQkUmz9GLxp3H9f5Ad45XxAlENmEjzRfVlz9pzn6wr8UbVctGy7vkMTKkfFcgYjFdgd+DA7jjXCz1kjo+MWohG0fWbSmQNIYI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=c7nVqqqD; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="c7nVqqqD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B6445C433B1; Fri, 29 Mar 2024 07:57:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711699049; bh=PMydpdwXkX2S8GFW09p1L1gawoJinB3dIyCrvfl03lE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c7nVqqqDKe6Rb4gHJVQZSQZZ6McgSYRqfFJyHxJByCa6jpcuE9yXcbZkqpJHp9qDN dZy+aX1PhekQWGg9zXSi2OWWhs5qyKGoB+8Zhr185TaxLdDQHsXaRiufwT3tIbufyN XK49Eby8VK6eoe8wLiExY0k5812hBtAk9pG1OXbByxe6iq94JMo0PfUF4IjCbY8ZXE RU0XkpjRejGlkAnOQH7M8aVTVqvzZL9d6ekYC7Ix9ERPyuc3qdFpo+5cggw2afQuy6 4z8Ho8fwWjX9YSf/xQCIr7SzSHFlhEmxhA1eYWQFqD78blzX0gchcy0AwXEqmaJdWs 3R1Rq7I8W52eg== From: Tzung-Bi Shih To: bleung@chromium.org, groeck@chromium.org, linus.walleij@linaro.org, brgl@bgdev.pl, hverkuil-cisco@xs4all.nl, mchehab@kernel.org, sre@kernel.org, alexandre.belloni@bootlin.com Cc: tzungbi@kernel.org, chrome-platform@lists.linux.dev, pmalani@chromium.org, linux-gpio@vger.kernel.org, linux-media@vger.kernel.org, linux-pm@vger.kernel.org, linux-rtc@vger.kernel.org, krzk@kernel.org Subject: [PATCH 05/18] power: supply: cros_usbpd: provide ID table for avoiding fallback match Date: Fri, 29 Mar 2024 15:56:17 +0800 Message-ID: <20240329075630.2069474-6-tzungbi@kernel.org> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog In-Reply-To: <20240329075630.2069474-1-tzungbi@kernel.org> References: <20240329075630.2069474-1-tzungbi@kernel.org> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Instead of using fallback driver name match, provide ID table[1] for the primary match. [1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353 Signed-off-by: Tzung-Bi Shih Reviewed-by: Krzysztof Kozlowski Reviewed-by: Benson Leung Reviewed-by: Prashant Malani --- drivers/power/supply/cros_usbpd-charger.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/power/supply/cros_usbpd-charger.c b/drivers/power/supply/cros_usbpd-charger.c index b6c96376776a..8008e31c0c09 100644 --- a/drivers/power/supply/cros_usbpd-charger.c +++ b/drivers/power/supply/cros_usbpd-charger.c @@ -5,6 +5,7 @@ * Copyright (c) 2014 - 2018 Google, Inc */ +#include #include #include #include @@ -711,16 +712,22 @@ static int cros_usbpd_charger_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(cros_usbpd_charger_pm_ops, NULL, cros_usbpd_charger_resume); +static const struct platform_device_id cros_usbpd_charger_id[] = { + { DRV_NAME, 0 }, + {} +}; +MODULE_DEVICE_TABLE(platform, cros_usbpd_charger_id); + static struct platform_driver cros_usbpd_charger_driver = { .driver = { .name = DRV_NAME, .pm = &cros_usbpd_charger_pm_ops, }, - .probe = cros_usbpd_charger_probe + .probe = cros_usbpd_charger_probe, + .id_table = cros_usbpd_charger_id, }; module_platform_driver(cros_usbpd_charger_driver); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("ChromeOS EC USBPD charger"); -MODULE_ALIAS("platform:" DRV_NAME); From patchwork Fri Mar 29 07:56:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 13610280 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 595B14087D; Fri, 29 Mar 2024 07:57:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699052; cv=none; b=UFiioGBcrh7gKn0d11R3rhmguns0u6ZJz5/DwTGuQP3YAvZaZ2I6FrO8zW31Bfk/IG/1GDmyVBz5sNNFDZCMnMqQQtuf9Ci8jsqbdCh9FpSSKtT16LZu8AyelUelDrLlNB2N5w103KjEU9JeOwKtwaaHdmONmq26tEJBlc0MAw0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699052; c=relaxed/simple; bh=czC94b4Twsr7/x4CY2fDtnSsNR3c5nsq3qe0GMVI8mY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Qrn7yU3+8x26/Xp8O7/fscfNJZKGmETu+j3TTQipauXzRKSAmHyalaRKh+wQ3Zhp4474dDZEgXsRv+lNEb9H0LCbFFryQ7wAFDS1vZBmm5pGdjy6LiIjJbI2vwVT01ldX6B2kUlNjCU6Crltjwm+f/LK2nMpMbjbBUlarBfoQlo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZKZK8dYf; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZKZK8dYf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8248FC433A6; Fri, 29 Mar 2024 07:57:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711699052; bh=czC94b4Twsr7/x4CY2fDtnSsNR3c5nsq3qe0GMVI8mY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZKZK8dYfV7Rh+EyDYPTDY5PO8mGM2jximwTKmYff7/vsQW43r/7h6cGUYITHBJHSO cS0NZGuGiVU6bepokvFCLyOec826KuzMniBsrlkCsw5mkA0FEv3nwq7Jh6RrPob4Bk XOy7VN3DO3312H278PmiRPAKHXbNOU+kSTa3unWYMReHVYLIjR3cAlZ0PX6sPmPLvn BujOwT5jE3DycxoNvd+Bf4rusAUQIfE9EoJP+a1KVvQ7SJek/TmXEnWTuY5ZXKkB5m MLsFxHK2X5pe1+zbJNU6ypQhFEeyfc9ah79jzPryPL4Syw7E0qsS7OaeU0lPemEj85 ahGWETmbPfw9w== From: Tzung-Bi Shih To: bleung@chromium.org, groeck@chromium.org, linus.walleij@linaro.org, brgl@bgdev.pl, hverkuil-cisco@xs4all.nl, mchehab@kernel.org, sre@kernel.org, alexandre.belloni@bootlin.com Cc: tzungbi@kernel.org, chrome-platform@lists.linux.dev, pmalani@chromium.org, linux-gpio@vger.kernel.org, linux-media@vger.kernel.org, linux-pm@vger.kernel.org, linux-rtc@vger.kernel.org, krzk@kernel.org Subject: [PATCH 06/18] platform/chrome: cros_usbpd_logger: provide ID table for avoiding fallback match Date: Fri, 29 Mar 2024 15:56:18 +0800 Message-ID: <20240329075630.2069474-7-tzungbi@kernel.org> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog In-Reply-To: <20240329075630.2069474-1-tzungbi@kernel.org> References: <20240329075630.2069474-1-tzungbi@kernel.org> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Instead of using fallback driver name match, provide ID table[1] for the primary match. [1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353 Signed-off-by: Tzung-Bi Shih Reviewed-by: Krzysztof Kozlowski Reviewed-by: Benson Leung --- drivers/platform/chrome/cros_usbpd_logger.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/platform/chrome/cros_usbpd_logger.c b/drivers/platform/chrome/cros_usbpd_logger.c index f618757f8b32..930c2f47269f 100644 --- a/drivers/platform/chrome/cros_usbpd_logger.c +++ b/drivers/platform/chrome/cros_usbpd_logger.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -249,6 +250,12 @@ static int __maybe_unused cros_usbpd_logger_suspend(struct device *dev) static SIMPLE_DEV_PM_OPS(cros_usbpd_logger_pm_ops, cros_usbpd_logger_suspend, cros_usbpd_logger_resume); +static const struct platform_device_id cros_usbpd_logger_id[] = { + { DRV_NAME, 0 }, + {} +}; +MODULE_DEVICE_TABLE(platform, cros_usbpd_logger_id); + static struct platform_driver cros_usbpd_logger_driver = { .driver = { .name = DRV_NAME, @@ -256,10 +263,10 @@ static struct platform_driver cros_usbpd_logger_driver = { }, .probe = cros_usbpd_logger_probe, .remove_new = cros_usbpd_logger_remove, + .id_table = cros_usbpd_logger_id, }; module_platform_driver(cros_usbpd_logger_driver); MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("Logging driver for ChromeOS EC USBPD Charger."); -MODULE_ALIAS("platform:" DRV_NAME); From patchwork Fri Mar 29 07:56:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 13610281 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 D96CF446B3; Fri, 29 Mar 2024 07:57:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699055; cv=none; b=caangYbkDhgWFt4K7/ghMqST93IcQkPBuKjrgYF2IdM9yG9Re1iAjSTGfMLiood427moEhW1DWbr+as2/GvYXNAqdTtoo2iDYYmEbhZPz/xNeswXWd+YeyUa4hy4Uhpuo1FGxo2HAsQHbsFxYEhttavM12Qr0f5DssxdWgE6Ayg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699055; c=relaxed/simple; bh=QA/VEwsMDJYJl/wcNQFK+4ALan5uuRiCuOFDMWE5qh4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fqvrto86i6rt2q6Mzzn0F+sPmqPJDkvsQq+nkpk8vjXc18cHH4i5CL3zTR16LTHyiT+5+lhS2w88NEEJGfz3I2YBAqemINC1PMuWnJefA4iJvjK+pktVYKewhGwNi6tp/t+HoNIhRzzya7DoOGDCh8Ln9Mk+tdZnPeYO2iFaucM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FHd9wuV7; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FHd9wuV7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5357BC433F1; Fri, 29 Mar 2024 07:57:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711699054; bh=QA/VEwsMDJYJl/wcNQFK+4ALan5uuRiCuOFDMWE5qh4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FHd9wuV7mQFb6M8tPNRM4/QQvzNNwy4QeYf6cMzilbdAUxyagKZ3s0oSAdhaPvlYH XAPs5GNMlWKy+xMayw5NP/jsKAu9vmcmhViClgXd7lvsPn/6d7VvK7fyByT5xRrsI2 OX/TvDOFfeE1/rDN6sx7O3LmOEtIWte2kMaSGFfF6mmEqLaZRBcBdGpbgPF0jLoZdo +zzIWFBJ073emiK/bDCJZR7RNL8mvWmCqWA5hje3v5nAhZeFjRztzYWKLEo7Mop5I5 1OPDEPV+WjsOLzQWjQ94CnQvCSNMGzx3YCpDDueeeh8FCJUcI++AruussJnIXPuBvh XZDsM+e2HpqRg== From: Tzung-Bi Shih To: bleung@chromium.org, groeck@chromium.org, linus.walleij@linaro.org, brgl@bgdev.pl, hverkuil-cisco@xs4all.nl, mchehab@kernel.org, sre@kernel.org, alexandre.belloni@bootlin.com Cc: tzungbi@kernel.org, chrome-platform@lists.linux.dev, pmalani@chromium.org, linux-gpio@vger.kernel.org, linux-media@vger.kernel.org, linux-pm@vger.kernel.org, linux-rtc@vger.kernel.org, krzk@kernel.org Subject: [PATCH 07/18] platform/chrome: cros_usbpd_notify: provide ID table for avoiding fallback match Date: Fri, 29 Mar 2024 15:56:19 +0800 Message-ID: <20240329075630.2069474-8-tzungbi@kernel.org> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog In-Reply-To: <20240329075630.2069474-1-tzungbi@kernel.org> References: <20240329075630.2069474-1-tzungbi@kernel.org> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Instead of using fallback driver name match, provide ID table[1] for the primary match. [1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353 Signed-off-by: Tzung-Bi Shih Reviewed-by: Krzysztof Kozlowski Reviewed-by: Benson Leung Acked-by: Prashant Malani --- drivers/platform/chrome/cros_usbpd_notify.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/platform/chrome/cros_usbpd_notify.c b/drivers/platform/chrome/cros_usbpd_notify.c index aacad022f21d..c83f81d86483 100644 --- a/drivers/platform/chrome/cros_usbpd_notify.c +++ b/drivers/platform/chrome/cros_usbpd_notify.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include @@ -218,12 +219,19 @@ static void cros_usbpd_notify_remove_plat(struct platform_device *pdev) &pdnotify->nb); } +static const struct platform_device_id cros_usbpd_notify_id[] = { + { DRV_NAME, 0 }, + {} +}; +MODULE_DEVICE_TABLE(platform, cros_usbpd_notify_id); + static struct platform_driver cros_usbpd_notify_plat_driver = { .driver = { .name = DRV_NAME, }, .probe = cros_usbpd_notify_probe_plat, .remove_new = cros_usbpd_notify_remove_plat, + .id_table = cros_usbpd_notify_id, }; static int __init cros_usbpd_notify_init(void) @@ -258,4 +266,3 @@ module_exit(cros_usbpd_notify_exit); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("ChromeOS power delivery notifier device"); MODULE_AUTHOR("Jon Flatley "); -MODULE_ALIAS("platform:" DRV_NAME); From patchwork Fri Mar 29 07:56:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 13610282 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 E320D42A89; Fri, 29 Mar 2024 07:57:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699058; cv=none; b=OMg1jF9dnaKQcAcT6mIvs7peeEXWUzzlKuxve4rb1qW6E6oBUNutr9L7xtEqsMwfnwEwel45vVRosPIaAOlEVZSogwBYirLhoLZHmXBA9nxHcfCp4OC+++UwuUlGItAvdCiODAjICPALsDQWzf6bsWZUQ0YNyWyB8pH4cajwUMk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699058; c=relaxed/simple; bh=naQ4XLQ0Lyzu8tBIZlJX0LmtXIL5RjubTvqFMDzZDwQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Fyt2W+3JCa/j55zJk9eCQppNxNDHC6n1odSdvbhiy3xjwNihCbm06nxetNKSk3vXgLBbOhT2PUu8x32Dgo8QaOAPEn0DsRLR270EDlkOYe8wq9Ba7z4DOYsA59ghFhBWGLk/3CZqDQJAesyOpAiru5GoHgW26WsuxfaXCmyMNYs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Rkrc1jBx; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Rkrc1jBx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D08AC433B2; Fri, 29 Mar 2024 07:57:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711699057; bh=naQ4XLQ0Lyzu8tBIZlJX0LmtXIL5RjubTvqFMDzZDwQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Rkrc1jBxDhJzBE8lP3MrwstyEhXWeYtaF7VTiIJcLyQNw0fJsQoFuIZmgGZ4cVP39 9If8YZv3cIXZdGeJ0/T4wFoOdNGfSSkpbeCESMqmrhPIXhbLZK8ZpisPzXlrDVz8FA RFVXX8VLoceDlXrNW9I8ScqxiaLsE0aNbLYcsihoi1aYvWyYLYeNZK62VFZkbrb/hJ 3yH0G7AzXkTVPjkERWPipYkMDnDM1ibAcRgQrBrNTDd6MT/eA3xgj6Ua/m1+riXkre FYBv1DuuzwiRDMVq18Yy7Mynf9wHqhJJAQ7LMo05SnYkfCcZA1m68lvcyKQ4Pa4VUn Eku9n6HkPaPnQ== From: Tzung-Bi Shih To: bleung@chromium.org, groeck@chromium.org, linus.walleij@linaro.org, brgl@bgdev.pl, hverkuil-cisco@xs4all.nl, mchehab@kernel.org, sre@kernel.org, alexandre.belloni@bootlin.com Cc: tzungbi@kernel.org, chrome-platform@lists.linux.dev, pmalani@chromium.org, linux-gpio@vger.kernel.org, linux-media@vger.kernel.org, linux-pm@vger.kernel.org, linux-rtc@vger.kernel.org, krzk@kernel.org Subject: [PATCH 08/18] platform/chrome: cros_ec_chardev: provide ID table for avoiding fallback match Date: Fri, 29 Mar 2024 15:56:20 +0800 Message-ID: <20240329075630.2069474-9-tzungbi@kernel.org> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog In-Reply-To: <20240329075630.2069474-1-tzungbi@kernel.org> References: <20240329075630.2069474-1-tzungbi@kernel.org> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Instead of using fallback driver name match, provide ID table[1] for the primary match. [1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353 Signed-off-by: Tzung-Bi Shih Reviewed-by: Krzysztof Kozlowski Reviewed-by: Benson Leung --- drivers/platform/chrome/cros_ec_chardev.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/platform/chrome/cros_ec_chardev.c b/drivers/platform/chrome/cros_ec_chardev.c index 81950bb2c6da..7f034ead7ae4 100644 --- a/drivers/platform/chrome/cros_ec_chardev.c +++ b/drivers/platform/chrome/cros_ec_chardev.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -403,17 +404,23 @@ static void cros_ec_chardev_remove(struct platform_device *pdev) misc_deregister(&data->misc); } +static const struct platform_device_id cros_ec_chardev_id[] = { + { DRV_NAME, 0 }, + {} +}; +MODULE_DEVICE_TABLE(platform, cros_ec_chardev_id); + static struct platform_driver cros_ec_chardev_driver = { .driver = { .name = DRV_NAME, }, .probe = cros_ec_chardev_probe, .remove_new = cros_ec_chardev_remove, + .id_table = cros_ec_chardev_id, }; module_platform_driver(cros_ec_chardev_driver); -MODULE_ALIAS("platform:" DRV_NAME); MODULE_AUTHOR("Enric Balletbo i Serra "); MODULE_DESCRIPTION("ChromeOS EC Miscellaneous Character Driver"); MODULE_LICENSE("GPL"); From patchwork Fri Mar 29 07:56:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 13610283 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 C6A7A44C6E; Fri, 29 Mar 2024 07:57:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699060; cv=none; b=Q3yEgmMn9+krYAVMAoWs2zQBKI4BM4pALQENJFagxGpaS24HWfMj1Mo6VcCFfautuz+NSwHdHVQ30oscj90g9qTWYYzjAENjLlALDxK0E3Jllk7u7Daf7UixTii4bP9zFKH4T+Kel6hyyx6RpNnS79KTmVB0PECf4Tx1RV1lLJ0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699060; c=relaxed/simple; bh=M+NHbhc/maaG6/S40kpqOW0Ck2sbT8PDO3AsjSVfB9A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ojZbpnO5LIhRX4Zwk/ZKji0k0+E38U7Ti2FFDEOBicA40DfaX1VtnlQQnCop8eNTNOgQKShnwPueuIV/VAYICNwRvVff2QjRC/AVyx4EaWwKO8IzTiloyz0EyJWNRAoo57lprjzd7PCHqD1yottjeV6zc1QQO0xSPadbXECcwwk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nSOxjVBS; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nSOxjVBS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DBA79C43399; Fri, 29 Mar 2024 07:57:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711699060; bh=M+NHbhc/maaG6/S40kpqOW0Ck2sbT8PDO3AsjSVfB9A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nSOxjVBSJjriBM9WOQX006hm1khF69+mtE7sl9LOh9d8YFYwES2rvQNqKpGuN+3Ur sTHBTBeeiU52M9fyLVF24JXhOhE9ymqUUZYFGqiJ+ir84WJdV5w361FF3XciYnUWbb lYa+tHF7cf06BN/COqf1D04J4YQF6IYwVuNKZtqB1pZ9xH31PSVeapFJiZWyBpJ+eJ PeX4FwEJ02ywlWi2zCloEyeW3Nd58oZiph7cTOqksTUHFnzRgN4Ckuz8deRbQQ0spB PCkTl5MSf1tdrIlk9nN+3M4/vtWmxqrZvdHy8+4pJPRPG8LWkQ3mG8waKMY7aURtQA pZpTn4T+G4AMQ== From: Tzung-Bi Shih To: bleung@chromium.org, groeck@chromium.org, linus.walleij@linaro.org, brgl@bgdev.pl, hverkuil-cisco@xs4all.nl, mchehab@kernel.org, sre@kernel.org, alexandre.belloni@bootlin.com Cc: tzungbi@kernel.org, chrome-platform@lists.linux.dev, pmalani@chromium.org, linux-gpio@vger.kernel.org, linux-media@vger.kernel.org, linux-pm@vger.kernel.org, linux-rtc@vger.kernel.org, krzk@kernel.org Subject: [PATCH 09/18] platform/chrome: cros_ec_debugfs: provide ID table for avoiding fallback match Date: Fri, 29 Mar 2024 15:56:21 +0800 Message-ID: <20240329075630.2069474-10-tzungbi@kernel.org> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog In-Reply-To: <20240329075630.2069474-1-tzungbi@kernel.org> References: <20240329075630.2069474-1-tzungbi@kernel.org> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Instead of using fallback driver name match, provide ID table[1] for the primary match. [1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353 Signed-off-by: Tzung-Bi Shih Reviewed-by: Krzysztof Kozlowski Reviewed-by: Benson Leung --- drivers/platform/chrome/cros_ec_debugfs.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/platform/chrome/cros_ec_debugfs.c b/drivers/platform/chrome/cros_ec_debugfs.c index 6bf6f0e7b597..e1d313246beb 100644 --- a/drivers/platform/chrome/cros_ec_debugfs.c +++ b/drivers/platform/chrome/cros_ec_debugfs.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -564,6 +565,12 @@ static int __maybe_unused cros_ec_debugfs_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(cros_ec_debugfs_pm_ops, cros_ec_debugfs_suspend, cros_ec_debugfs_resume); +static const struct platform_device_id cros_ec_debugfs_id[] = { + { DRV_NAME, 0 }, + {} +}; +MODULE_DEVICE_TABLE(platform, cros_ec_debugfs_id); + static struct platform_driver cros_ec_debugfs_driver = { .driver = { .name = DRV_NAME, @@ -572,10 +579,10 @@ static struct platform_driver cros_ec_debugfs_driver = { }, .probe = cros_ec_debugfs_probe, .remove_new = cros_ec_debugfs_remove, + .id_table = cros_ec_debugfs_id, }; module_platform_driver(cros_ec_debugfs_driver); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("Debug logs for ChromeOS EC"); -MODULE_ALIAS("platform:" DRV_NAME); From patchwork Fri Mar 29 07:56:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 13610284 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 4582F44C6E; Fri, 29 Mar 2024 07:57:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699063; cv=none; b=sbWNFbO9+s+AtKLWNXIHePvKIUZYJJgGfd/YiQKKQpTwGUegeaTsXx2UMi/tUN8T2ZXvvAbbb8ZPKgjZVQySpGl8cU91wYH7lW3lNtAgp3asBJ82smxwUJ6IBX1lqDfoIv1JcHRy5KADLVYHVCkSMKu6JLLdDiecoQM5JX1aSWc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699063; c=relaxed/simple; bh=kFeF0LIiPjmeikl5k/sexOPFplEdBUjUHzmZqIW6TVc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=b1raPjIl5C7Vv9lAzjpxyYHu9cBL+aWpbdqC6KyosOcqG2y99jZChZPzR3G62NQ300/yL1H+guuCnORRhP1U9jT/XT4f0NgbBMNdJUxqYSpk8cmX9hNPCby8eW6ybB3T4R3GBRjQI6+2B3l0Rq7eZwsjpRnRnlhi+F6mt1il4PU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ONa31BvK; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ONa31BvK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A9144C433B2; Fri, 29 Mar 2024 07:57:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711699063; bh=kFeF0LIiPjmeikl5k/sexOPFplEdBUjUHzmZqIW6TVc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ONa31BvKgAZzxdkWcrHr0H1WYMXtVhm71J2TqovxHmi5u8oA8B8MnD21JDbpvb77q h7W3JDqrDxP1Chw8CRGHaH9zpLiuR/omBK19RMnY7frU7je9MdhJIin44aLets6Df1 VNaHQ/aXZsKsz18Cih5j1qACN5DLCG7IU9APPGlChbsvjC5j+gTT8rfoowtriODdgD kSbF6M8wpvUAzqleq3UjIHFktKBlmuhrA+fKNKdbNG2RVzwrxXC4ridT7GxhtMwbJV n59nFT549HsQy/osgijjCFaUtsfwNvj7rNGwvYnLpd7m2CHvzl5uhNFSBaZUG2H8Om jOz0q1vZN6+fQ== From: Tzung-Bi Shih To: bleung@chromium.org, groeck@chromium.org, linus.walleij@linaro.org, brgl@bgdev.pl, hverkuil-cisco@xs4all.nl, mchehab@kernel.org, sre@kernel.org, alexandre.belloni@bootlin.com Cc: tzungbi@kernel.org, chrome-platform@lists.linux.dev, pmalani@chromium.org, linux-gpio@vger.kernel.org, linux-media@vger.kernel.org, linux-pm@vger.kernel.org, linux-rtc@vger.kernel.org, krzk@kernel.org Subject: [PATCH 10/18] platform/chrome: cros_ec_sysfs: provide ID table for avoiding fallback match Date: Fri, 29 Mar 2024 15:56:22 +0800 Message-ID: <20240329075630.2069474-11-tzungbi@kernel.org> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog In-Reply-To: <20240329075630.2069474-1-tzungbi@kernel.org> References: <20240329075630.2069474-1-tzungbi@kernel.org> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Instead of using fallback driver name match, provide ID table[1] for the primary match. [1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353 Signed-off-by: Tzung-Bi Shih Reviewed-by: Krzysztof Kozlowski Reviewed-by: Benson Leung --- drivers/platform/chrome/cros_ec_sysfs.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/platform/chrome/cros_ec_sysfs.c b/drivers/platform/chrome/cros_ec_sysfs.c index 93e67ab4af06..9c944146ee50 100644 --- a/drivers/platform/chrome/cros_ec_sysfs.c +++ b/drivers/platform/chrome/cros_ec_sysfs.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -347,16 +348,22 @@ static void cros_ec_sysfs_remove(struct platform_device *pd) sysfs_remove_group(&ec_dev->class_dev.kobj, &cros_ec_attr_group); } +static const struct platform_device_id cros_ec_sysfs_id[] = { + { DRV_NAME, 0 }, + {} +}; +MODULE_DEVICE_TABLE(platform, cros_ec_sysfs_id); + static struct platform_driver cros_ec_sysfs_driver = { .driver = { .name = DRV_NAME, }, .probe = cros_ec_sysfs_probe, .remove_new = cros_ec_sysfs_remove, + .id_table = cros_ec_sysfs_id, }; module_platform_driver(cros_ec_sysfs_driver); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("Expose the ChromeOS EC through sysfs"); -MODULE_ALIAS("platform:" DRV_NAME); From patchwork Fri Mar 29 07:56:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 13610285 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 0A99942A89; Fri, 29 Mar 2024 07:57:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699066; cv=none; b=e1QB1uI+dQmd42IO6ui3ShNn7ja0B3+DWNx6KaDjkFbBP+yJt4y+8bAXEhGZKNfk8Dub7w/9uGVhNLy3i5NKL9TwwEtNKBeYa0IVFR5r6hro8iQ2yAIt34FejyjC8kJwfK9RdOZWsbty+MLMAtPcveHqA9zb56ztgUtCmweKNak= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699066; c=relaxed/simple; bh=Vm6g+x6wCDY55Aqkfud76EpsXl8ECuaMa6XmXenymoo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qIAbMFF2B1JFR/SzPXL+feY40QOGM88cHifhg2sfgJrfnyFXeUlF3eTTKQGCyNQntsVD5FT8lhG/RO+ElkBDi+8TF7mUc7xdMXQP/s4pGNxgEEk+TUAV8CTI0ruYT3is8DkltXLMIc1m67F+5UUFQ1u8OKwCbhBz0SLld2rim4Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=VpEIwaDH; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="VpEIwaDH" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7352EC433C7; Fri, 29 Mar 2024 07:57:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711699065; bh=Vm6g+x6wCDY55Aqkfud76EpsXl8ECuaMa6XmXenymoo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VpEIwaDHfUuhv3t7+Y+HJGU+KQFrya5tsamaiMTd1n9VMD4ygWrdV21sfjFsFNkE6 9juwVX7JoEtiZ2ZrE2sjiuiYA2R/e2W7kKDXrevEIl/x5BupDVUjNYG7sVnsCN8ur2 shoTnfuTEmGx31oYqXbZy9e7M65Dpe0cV3Ilcq4d5scqdQcVva2hN4UmjzzITvVcy3 PR6OHvlSeP/AzWPxJ/8+QUSXubX/80ZWZdy6cb6WWjNF7yqPAFqejWiyR8dxl47/Lt uWygFTbWe59Ipmy+lBShANg7ZoVraiqbPJ9llkY+vgazgxyrT38yNz+46LE51wQ3wE PlV9a04IHqRhg== From: Tzung-Bi Shih To: bleung@chromium.org, groeck@chromium.org, linus.walleij@linaro.org, brgl@bgdev.pl, hverkuil-cisco@xs4all.nl, mchehab@kernel.org, sre@kernel.org, alexandre.belloni@bootlin.com Cc: tzungbi@kernel.org, chrome-platform@lists.linux.dev, pmalani@chromium.org, linux-gpio@vger.kernel.org, linux-media@vger.kernel.org, linux-pm@vger.kernel.org, linux-rtc@vger.kernel.org, krzk@kernel.org Subject: [PATCH 11/18] power: supply: cros_pchg: provide ID table for avoiding fallback match Date: Fri, 29 Mar 2024 15:56:23 +0800 Message-ID: <20240329075630.2069474-12-tzungbi@kernel.org> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog In-Reply-To: <20240329075630.2069474-1-tzungbi@kernel.org> References: <20240329075630.2069474-1-tzungbi@kernel.org> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Instead of using fallback driver name match, provide ID table[1] for the primary match. [1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353 Signed-off-by: Tzung-Bi Shih Reviewed-by: Krzysztof Kozlowski Reviewed-by: Benson Leung --- drivers/power/supply/cros_peripheral_charger.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/power/supply/cros_peripheral_charger.c b/drivers/power/supply/cros_peripheral_charger.c index a204f2355be4..d406f2a78449 100644 --- a/drivers/power/supply/cros_peripheral_charger.c +++ b/drivers/power/supply/cros_peripheral_charger.c @@ -5,6 +5,7 @@ * Copyright 2020 Google LLC. */ +#include #include #include #include @@ -367,16 +368,22 @@ static int __maybe_unused cros_pchg_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(cros_pchg_pm_ops, NULL, cros_pchg_resume); +static const struct platform_device_id cros_pchg_id[] = { + { DRV_NAME, 0 }, + {} +}; +MODULE_DEVICE_TABLE(platform, cros_pchg_id); + static struct platform_driver cros_pchg_driver = { .driver = { .name = DRV_NAME, .pm = &cros_pchg_pm_ops, }, - .probe = cros_pchg_probe + .probe = cros_pchg_probe, + .id_table = cros_pchg_id, }; module_platform_driver(cros_pchg_driver); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("ChromeOS EC peripheral device charger"); -MODULE_ALIAS("platform:" DRV_NAME); From patchwork Fri Mar 29 07:56:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 13610286 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 C1B594596C; Fri, 29 Mar 2024 07:57:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699068; cv=none; b=jSzsdLWsXASiAf9I5l4sD1KNYk4v9Smv/MX6mojCIrArKbjPtKPLrbrAZzI/L/TXb1fgtoBy2hRnv3BWB0UdIRc1J6MffkaLUIO/oqS4nVTG2+05+MdHonTtGaqolJgw0w0nnaHRH8m1DoRrbcuS0dmLT7FXFVVMDm6Wwbwez44= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699068; c=relaxed/simple; bh=KKHQzxGzOFug2U4pQlP8FzTiyW4FgKwsmWbgaFAKMaM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MrscGShWpmXk7q+BZYniTa+tnDSV4Ow2+MjqCh7zFjPNjbBb3hHYQ6LdMxYh8mpYI9TjZa6s6xdPi3ySZOJxLCSyxn7h87KovduJt01WT38b5XbnPAQLMFqp9P2LffNv4e+LmazzTugNQOTQ/dN1hh2pdDDy0Zxoq3n/4eVUImQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JucFa9+I; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JucFa9+I" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3CA71C433F1; Fri, 29 Mar 2024 07:57:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711699068; bh=KKHQzxGzOFug2U4pQlP8FzTiyW4FgKwsmWbgaFAKMaM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JucFa9+IGlANxRGZfbjh9YL65VO8TYQw7o5mpMf9Lnt4UD/GyIGEzyZYXTcOY51/R VhUZ3wKQbFOfc6GCQ2SIzQ135zErSmcNOgysLws4XcMFBi4JCK6envUBzSFPhWYbVk q5zUZcH+xUsCNQzZSakmVHEjkhhpCxiP0n1ZZuHoxBSgfWJN9ofUQuIT7Hq9hMq+YQ nukR4lVxcvrL9qxjm/gsjXweno2pve4gPcb8gwOFpsppi/LOER8k/W0+8O5xNs1nKk MiKC8Ml9f5tWMZMbpFOF+cDaYZw4+8dnacCyExQ/t9KpRO5IAW+cBXdR7mntUXVrBE OjMWu7CHkwymQ== From: Tzung-Bi Shih To: bleung@chromium.org, groeck@chromium.org, linus.walleij@linaro.org, brgl@bgdev.pl, hverkuil-cisco@xs4all.nl, mchehab@kernel.org, sre@kernel.org, alexandre.belloni@bootlin.com Cc: tzungbi@kernel.org, chrome-platform@lists.linux.dev, pmalani@chromium.org, linux-gpio@vger.kernel.org, linux-media@vger.kernel.org, linux-pm@vger.kernel.org, linux-rtc@vger.kernel.org, krzk@kernel.org Subject: [PATCH 12/18] platform/chrome: cros_ec_lightbar: provide ID table for avoiding fallback match Date: Fri, 29 Mar 2024 15:56:24 +0800 Message-ID: <20240329075630.2069474-13-tzungbi@kernel.org> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog In-Reply-To: <20240329075630.2069474-1-tzungbi@kernel.org> References: <20240329075630.2069474-1-tzungbi@kernel.org> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Instead of using fallback driver name match, provide ID table[1] for the primary match. [1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353 Signed-off-by: Tzung-Bi Shih Reviewed-by: Krzysztof Kozlowski Reviewed-by: Benson Leung --- drivers/platform/chrome/cros_ec_lightbar.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/platform/chrome/cros_ec_lightbar.c b/drivers/platform/chrome/cros_ec_lightbar.c index 6677cc6c4984..1e69f61115a4 100644 --- a/drivers/platform/chrome/cros_ec_lightbar.c +++ b/drivers/platform/chrome/cros_ec_lightbar.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -594,6 +595,12 @@ static int __maybe_unused cros_ec_lightbar_suspend(struct device *dev) static SIMPLE_DEV_PM_OPS(cros_ec_lightbar_pm_ops, cros_ec_lightbar_suspend, cros_ec_lightbar_resume); +static const struct platform_device_id cros_ec_lightbar_id[] = { + { DRV_NAME, 0 }, + {} +}; +MODULE_DEVICE_TABLE(platform, cros_ec_lightbar_id); + static struct platform_driver cros_ec_lightbar_driver = { .driver = { .name = DRV_NAME, @@ -602,10 +609,10 @@ static struct platform_driver cros_ec_lightbar_driver = { }, .probe = cros_ec_lightbar_probe, .remove_new = cros_ec_lightbar_remove, + .id_table = cros_ec_lightbar_id, }; module_platform_driver(cros_ec_lightbar_driver); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("Expose the Chromebook Pixel's lightbar to userspace"); -MODULE_ALIAS("platform:" DRV_NAME); From patchwork Fri Mar 29 07:56:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 13610287 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 D546147F48; Fri, 29 Mar 2024 07:57:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699072; cv=none; b=fedXY0qkCQxBcP2ia9OhOTwJ0KHePVJG2WzMGbyormWmhpJr1+vPqdVT6N6xjaom2rfNF8vMaJjhXhcswxP4sfbaTMCwGTH7jaeYTorlZcf+brWvg66Fu9e3e5DwJR4Jsdk+FErWYbOLp8k34tCLtEqYNsYuIBd8PKPQSQDApQU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699072; c=relaxed/simple; bh=4e4mdaC9+ut9ho/8Cbu6zu6HdmLrwy31JPW9A85whXg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XDIHyz3Em9McEBDTOg9SUToPUdjgHW/aiEsaJMmS9NX3gx8c2oMekp6ZJL9JpE1qLExI5PQvxxLEp8EvW3SzXWM2TTHm8YoMqK3X+VYXfjpHz4yV0LscGQq7DYlmeSHaTIjmaCFv1Ff9KLowMZSq76gF8Mdn+++O+dJilKC4MX8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qf7ugtGc; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qf7ugtGc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 061B2C43390; Fri, 29 Mar 2024 07:57:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711699071; bh=4e4mdaC9+ut9ho/8Cbu6zu6HdmLrwy31JPW9A85whXg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qf7ugtGcSXi7b6itGxoljjpdciz+grtZPYJTpnDg19QfoFkX83p45SJBRxQI64aEr AlAHdBslS/zFwGzC3Kvpnvsm3l8JBZz74xwdF6tuRCEfqb7VHiuAt37wjnYEjGXblr 4g5+pDQwdwuWrMs3Wlm20Lh/FQTk6arbWYJq2y31Qi7p9U2M3yc275hlppDqWAHvz9 2ex/Qu++fw50q6NPAt+2fA9oHM0bQfNZ/NSTFhe5BbokERNwMWB3Um0i8MsLt0ga7U fYRJo8zhUl3VR5/DgDrfTNtWYW4wcZ7o8G0lqLzO+9J28GpQOeIYPkeMhiYakwYnSk u6+Wi4ml0FnIg== From: Tzung-Bi Shih To: bleung@chromium.org, groeck@chromium.org, linus.walleij@linaro.org, brgl@bgdev.pl, hverkuil-cisco@xs4all.nl, mchehab@kernel.org, sre@kernel.org, alexandre.belloni@bootlin.com Cc: tzungbi@kernel.org, chrome-platform@lists.linux.dev, pmalani@chromium.org, linux-gpio@vger.kernel.org, linux-media@vger.kernel.org, linux-pm@vger.kernel.org, linux-rtc@vger.kernel.org, krzk@kernel.org Subject: [PATCH 13/18] platform/chrome: cros_ec_vbc: provide ID table for avoiding fallback match Date: Fri, 29 Mar 2024 15:56:25 +0800 Message-ID: <20240329075630.2069474-14-tzungbi@kernel.org> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog In-Reply-To: <20240329075630.2069474-1-tzungbi@kernel.org> References: <20240329075630.2069474-1-tzungbi@kernel.org> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Instead of using fallback driver name match, provide ID table[1] for the primary match. [1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353 Signed-off-by: Tzung-Bi Shih Reviewed-by: Krzysztof Kozlowski Reviewed-by: Benson Leung --- drivers/platform/chrome/cros_ec_vbc.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/platform/chrome/cros_ec_vbc.c b/drivers/platform/chrome/cros_ec_vbc.c index 274ea0c64b33..787a19db4911 100644 --- a/drivers/platform/chrome/cros_ec_vbc.c +++ b/drivers/platform/chrome/cros_ec_vbc.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -133,16 +134,22 @@ static void cros_ec_vbc_remove(struct platform_device *pd) &cros_ec_vbc_attr_group); } +static const struct platform_device_id cros_ec_vbc_id[] = { + { DRV_NAME, 0 }, + {} +}; +MODULE_DEVICE_TABLE(platform, cros_ec_vbc_id); + static struct platform_driver cros_ec_vbc_driver = { .driver = { .name = DRV_NAME, }, .probe = cros_ec_vbc_probe, .remove_new = cros_ec_vbc_remove, + .id_table = cros_ec_vbc_id, }; module_platform_driver(cros_ec_vbc_driver); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("Expose the vboot context nvram to userspace"); -MODULE_ALIAS("platform:" DRV_NAME); From patchwork Fri Mar 29 07:56:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 13610288 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 4ED9C47F48; Fri, 29 Mar 2024 07:57:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699074; cv=none; b=CMWJ1dMZK46z/T6gTKotRjIWXCyvsyuiirTVNLdvRCesgZfx6rW+wwRcRgQH8k0qsRfE25dmG5+OGRclHbUDX5iTg78OS3lN8GKw8BbTDPuIs+5jVPrNAvKG9PAfsVas8q3/kA3ShnMxvytRlnHl8KuDcEVqzBKSv67shnii7YY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699074; c=relaxed/simple; bh=BgH88cOuBsp6Rcb7sjqjNz25lxzGf0AS7L5d/j/jfdE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mA5Xmvml6a0pV+THM/SHuj7/lQKZYytfofP+Tdkt/MtkBsVwJei69y4r1fTX0tcDBfBb1tenRC0vlQQ6kLufQfydT/U5AC/ish95sttulsEv+Q1NtKuwLM5j4q4vxAr+CsURTyhy95wSA7KwSKkVimSTHzogEmAz4jECRWMZ+AI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Y+fwJdaq; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Y+fwJdaq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C13CFC433A6; Fri, 29 Mar 2024 07:57:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711699074; bh=BgH88cOuBsp6Rcb7sjqjNz25lxzGf0AS7L5d/j/jfdE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y+fwJdaqBx1Cy0+jCAhuQGnps1JLB82nxhdBDvMlQfNVPCrSVz6XclD7+80AclNsl dWxWiB4hk8B5JeScudXSp9lQ+20sQ0q5Ba8o/9OXrO/2MEhRAu2OtheAmbfu0xLDiO ggQGUw0QOPeNtnL6rvZMy3lLa2q+FZI4D9ur6h+fkYpmLBfzR9/tS2YR1MrL8mR7W0 Iu0EJaNQcSBYqgyBI26LV7E0thnRzemNBqqtVR9cWObR/DnLytnauD7LK6rhHmXBLW 9THgDc2HBAJY9IvHz+eM5IVYSN/8jROJY3cdQ1xJ7JXNZak5gzd+Qv0PhDYnf09ZCB zpLyrtc1Zx9pw== From: Tzung-Bi Shih To: bleung@chromium.org, groeck@chromium.org, linus.walleij@linaro.org, brgl@bgdev.pl, hverkuil-cisco@xs4all.nl, mchehab@kernel.org, sre@kernel.org, alexandre.belloni@bootlin.com Cc: tzungbi@kernel.org, chrome-platform@lists.linux.dev, pmalani@chromium.org, linux-gpio@vger.kernel.org, linux-media@vger.kernel.org, linux-pm@vger.kernel.org, linux-rtc@vger.kernel.org, krzk@kernel.org Subject: [PATCH 14/18] platform/chrome: cros_kbd_led_backlight: provide ID table for avoiding fallback match Date: Fri, 29 Mar 2024 15:56:26 +0800 Message-ID: <20240329075630.2069474-15-tzungbi@kernel.org> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog In-Reply-To: <20240329075630.2069474-1-tzungbi@kernel.org> References: <20240329075630.2069474-1-tzungbi@kernel.org> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Instead of using fallback driver name match, provide ID table[1] for the primary match. Also shrink the name for fitting to [2]. [1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353 [2]: https://elixir.bootlin.com/linux/v6.8/source/include/linux/mod_devicetable.h#L608 Signed-off-by: Tzung-Bi Shih Reviewed-by: Benson Leung --- drivers/platform/chrome/cros_kbd_led_backlight.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/platform/chrome/cros_kbd_led_backlight.c b/drivers/platform/chrome/cros_kbd_led_backlight.c index 793fd3f1015d..b83e4f328620 100644 --- a/drivers/platform/chrome/cros_kbd_led_backlight.c +++ b/drivers/platform/chrome/cros_kbd_led_backlight.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -247,17 +248,23 @@ static const struct of_device_id keyboard_led_of_match[] = { MODULE_DEVICE_TABLE(of, keyboard_led_of_match); #endif +static const struct platform_device_id keyboard_led_id[] = { + { "cros-keyboard-leds", 0 }, + {} +}; +MODULE_DEVICE_TABLE(platform, keyboard_led_id); + static struct platform_driver keyboard_led_driver = { .driver = { - .name = "chromeos-keyboard-leds", + .name = "cros-keyboard-leds", .acpi_match_table = ACPI_PTR(keyboard_led_acpi_match), .of_match_table = of_match_ptr(keyboard_led_of_match), }, .probe = keyboard_led_probe, + .id_table = keyboard_led_id, }; module_platform_driver(keyboard_led_driver); MODULE_AUTHOR("Simon Que "); MODULE_DESCRIPTION("ChromeOS Keyboard backlight LED Driver"); MODULE_LICENSE("GPL"); -MODULE_ALIAS("platform:chromeos-keyboard-leds"); From patchwork Fri Mar 29 07:56:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 13610289 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 1579E4120C; Fri, 29 Mar 2024 07:57:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699077; cv=none; b=Ld/IBH989UXnQfR5Sh0FrVMjDJ/c2JwW0JkTTTCCdEo0deU48WX7E+NXkqKbyLJbpsQDA9eFrXVfmAcvhAHWsVMO+RbyWRt9zpv1rJIToC4h8fLFf80j/ynRBEu6C+ayVuA/ZvanYb7+fuiYlRaJ/evbRoW/+7/c7a3b9OO3T84= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699077; c=relaxed/simple; bh=lFOw5fKzQhBabthihGEd61vuz/8D+4zofg3e9FaPBrk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qQomGRYlhEZN5SB+ln/9cl1MgEfWI8B2G1ovMYgMhveOIvTgLgb4zn+Yr/BrWyJNCtrOwheo6Z+AfivC1g/PuEur2R7qtGFjt67DTPtVe7nSy2HqnonlYXtex1osPCxqurWA8hxi/AynlJ8ctYdcxibZQcYV4n+5OK203evrE20= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MxvNTi1o; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="MxvNTi1o" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 88BFCC433B1; Fri, 29 Mar 2024 07:57:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711699077; bh=lFOw5fKzQhBabthihGEd61vuz/8D+4zofg3e9FaPBrk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MxvNTi1ownDZ5TzUHkN3QCd8SFD8/TxANda/qG6OBvO59Vxyo6R6O73lCB2CYkKAM Uaf3toEyBj9bS4IC419SCis7teVFTWMsBd2YlnUdSy9xETWFRvBMPEgu/6ilMjjVIN jz193RqkjQLxBsgeLAeGSqkVglCqDzzcaPNQzc5SERm2sXGdhHWpSQyW/S0of8vho2 DIMX9wcQkNnySop02WqMDErdGKoVkvnd9WGjhNnsUVkVpVRuRqjiMUyufmJ4AI6WOD 04LXQ+xaXWlKxI5/GqArZRJRa8yLdwMboH0aeeCkMuXB3I7kImjqXZD7rRmJJTtPFr skHqNZjLUDB2A== From: Tzung-Bi Shih To: bleung@chromium.org, groeck@chromium.org, linus.walleij@linaro.org, brgl@bgdev.pl, hverkuil-cisco@xs4all.nl, mchehab@kernel.org, sre@kernel.org, alexandre.belloni@bootlin.com Cc: tzungbi@kernel.org, chrome-platform@lists.linux.dev, pmalani@chromium.org, linux-gpio@vger.kernel.org, linux-media@vger.kernel.org, linux-pm@vger.kernel.org, linux-rtc@vger.kernel.org, krzk@kernel.org Subject: [PATCH 15/18] platform/chrome: wilco_ec: telemetry: provide ID table for avoiding fallback match Date: Fri, 29 Mar 2024 15:56:27 +0800 Message-ID: <20240329075630.2069474-16-tzungbi@kernel.org> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog In-Reply-To: <20240329075630.2069474-1-tzungbi@kernel.org> References: <20240329075630.2069474-1-tzungbi@kernel.org> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Instead of using fallback driver name match, provide ID table[1] for the primary match. [1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353 Signed-off-by: Tzung-Bi Shih Reviewed-by: Krzysztof Kozlowski Reviewed-by: Benson Leung --- drivers/platform/chrome/wilco_ec/telemetry.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/platform/chrome/wilco_ec/telemetry.c b/drivers/platform/chrome/wilco_ec/telemetry.c index b7c616f3d179..21d4cbbb009a 100644 --- a/drivers/platform/chrome/wilco_ec/telemetry.c +++ b/drivers/platform/chrome/wilco_ec/telemetry.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -409,12 +410,19 @@ static void telem_device_remove(struct platform_device *pdev) put_device(&dev_data->dev); } +static const struct platform_device_id telem_id[] = { + { DRV_NAME, 0 }, + {} +}; +MODULE_DEVICE_TABLE(platform, telem_id); + static struct platform_driver telem_driver = { .probe = telem_device_probe, .remove_new = telem_device_remove, .driver = { .name = DRV_NAME, }, + .id_table = telem_id, }; static int __init telem_module_init(void) @@ -466,4 +474,3 @@ module_exit(telem_module_exit); MODULE_AUTHOR("Nick Crews "); MODULE_DESCRIPTION("Wilco EC telemetry driver"); MODULE_LICENSE("GPL"); -MODULE_ALIAS("platform:" DRV_NAME); From patchwork Fri Mar 29 07:56:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 13610290 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 D836D481DF; Fri, 29 Mar 2024 07:57:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699080; cv=none; b=COV5ZGhcu8fZkX128sPcnROKoL72fLtz0YTY6ROeGlv9LeVcXfAijFQPi2t8yNn+EYuzlOeZ1RsbtAhMDmVH9yc4RoAQFj4ov78VkEXqUpJj9iWRN0KvDbPovpZ2eITkY2amfHlKQEBVMqvr5Clrmid56rmtXJSr6yNK97cJQ6c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699080; c=relaxed/simple; bh=aGfaQOx1BwBsZYBo3nJwWSfL7KIuqoNe+5Rb0dp4jDE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iJXKykAxxj+u6cC3tTzSQnEdZ9UwKSVAQUZ5WHevvE3Oteg6+kDl8VKBSjar90LPbnidYcW9tdjLwXQ4Y/7GnOUb8LUrOeI0L+w5tuJq/jpmhn9aW8w2fs5QL9BYDLK3v57YQcC0PXYBXA9C7iPcSU7DaytnqYOHaNU5TEsoo4Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bJs1zzf5; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bJs1zzf5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F830C433A6; Fri, 29 Mar 2024 07:57:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711699079; bh=aGfaQOx1BwBsZYBo3nJwWSfL7KIuqoNe+5Rb0dp4jDE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bJs1zzf5Gw4KtZsf96BiLjR8qz5rVVMpnQ6kKQV8SpSPNoaFjeqpz/rjkK8zLd7bn dj0Vz0Hyf4aF0dVt01H04OSHxPeYzODAlLzsJblWLn476VcRJ5ryM4b+Fc8ijOB0v7 w1p4f7gG3DO9d9tufxhuw7e9ij5brqQKQQyQrUd6vqhANg0WEVkTHw2Xem86a9vJrV co1IfOQmF2zjlpgTh5o6oEfZ5794RED55OKO+Mb7alSBaa8aYDr1JGaq3zxoU5IwHS P9jeohzugn/IjHEIxjuH8ffzbML6Ecl0jV3GdAW7N3JfiCA30+ga+OvgvOgqn2IsF2 XmTbHD+ynVy3w== From: Tzung-Bi Shih To: bleung@chromium.org, groeck@chromium.org, linus.walleij@linaro.org, brgl@bgdev.pl, hverkuil-cisco@xs4all.nl, mchehab@kernel.org, sre@kernel.org, alexandre.belloni@bootlin.com Cc: tzungbi@kernel.org, chrome-platform@lists.linux.dev, pmalani@chromium.org, linux-gpio@vger.kernel.org, linux-media@vger.kernel.org, linux-pm@vger.kernel.org, linux-rtc@vger.kernel.org, krzk@kernel.org Subject: [PATCH 16/18] platform/chrome: wilco_ec: debugfs: provide ID table for avoiding fallback match Date: Fri, 29 Mar 2024 15:56:28 +0800 Message-ID: <20240329075630.2069474-17-tzungbi@kernel.org> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog In-Reply-To: <20240329075630.2069474-1-tzungbi@kernel.org> References: <20240329075630.2069474-1-tzungbi@kernel.org> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Instead of using fallback driver name match, provide ID table[1] for the primary match. [1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353 Signed-off-by: Tzung-Bi Shih Reviewed-by: Krzysztof Kozlowski Reviewed-by: Benson Leung --- drivers/platform/chrome/wilco_ec/debugfs.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/platform/chrome/wilco_ec/debugfs.c b/drivers/platform/chrome/wilco_ec/debugfs.c index 93c11f81ca45..983f2fa44ba5 100644 --- a/drivers/platform/chrome/wilco_ec/debugfs.c +++ b/drivers/platform/chrome/wilco_ec/debugfs.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -265,17 +266,23 @@ static void wilco_ec_debugfs_remove(struct platform_device *pdev) debugfs_remove_recursive(debug_info->dir); } +static const struct platform_device_id wilco_ec_debugfs_id[] = { + { DRV_NAME, 0 }, + {} +}; +MODULE_DEVICE_TABLE(platform, wilco_ec_debugfs_id); + static struct platform_driver wilco_ec_debugfs_driver = { .driver = { .name = DRV_NAME, }, .probe = wilco_ec_debugfs_probe, .remove_new = wilco_ec_debugfs_remove, + .id_table = wilco_ec_debugfs_id, }; module_platform_driver(wilco_ec_debugfs_driver); -MODULE_ALIAS("platform:" DRV_NAME); MODULE_AUTHOR("Nick Crews "); MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("Wilco EC debugfs driver"); From patchwork Fri Mar 29 07:56:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 13610291 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 EF8C242061; Fri, 29 Mar 2024 07:58:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699083; cv=none; b=npzLya764qDk1bivT4a2xN7NGIjSd8bYk3KZsxG2NwzXQVv07A2AOInnQ9abznYMujT7yZohtx9peA4yB+9Za5fO223addB70VAdY+Rrva7XgSIBr0JqRq1AlyGB9+RlwluOxI7Ow/wcmJUoET+5tk/dVj/FUeNGuCHja0tHoU8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699083; c=relaxed/simple; bh=7zbqN1PmApdafn8fGnIdSZWQ0JXrI9ad9f7LLt8QxJg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=djmfLapsz/adkmheP/eAoy8PdLbzmBTZjtqoBEnswvyGKJJ+XBzE5deTlQkD4VodKEX+chebUORiIkDPzz/lojCO/yMHObjieP42Z5voWLir66EUUtG5v6jZXIoA2FJl1jwIufSPJV+cD9MbmU52UapnXoX+ZLHfNjjN0RrstO8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BBRezgRH; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BBRezgRH" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 153B6C433B1; Fri, 29 Mar 2024 07:57:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711699082; bh=7zbqN1PmApdafn8fGnIdSZWQ0JXrI9ad9f7LLt8QxJg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BBRezgRHSoHbJ80y8A7pdHtqE1jZ4t19ISuKnDBe/Th1QptvbVvS7KiQNMFI1eLWl RZ3OB5D0dFQpV4YlSIBkwi7Kx5e45xeSy9fCeJ0/X3qLJZO7uRvcBvh5TQEGchyc2J S76F5S3Wid2nT0n+D535PMjutWm7NPlG4U4fuJWzrQE3vYrf2QRix5w73g0UgHtLO6 K6mjBZvoH+jPsxZeUbs7DkPRblCtNd88GTK2qrnrALerfdUvluW01KZzK8Io2+/6Qa QvvdP+XB0l9ay/b7rZDRckDYyUfPoYGEqWRtulimk6v6A7hitrCBHlXCIH57O353XR 60bzXLb38DQfQ== From: Tzung-Bi Shih To: bleung@chromium.org, groeck@chromium.org, linus.walleij@linaro.org, brgl@bgdev.pl, hverkuil-cisco@xs4all.nl, mchehab@kernel.org, sre@kernel.org, alexandre.belloni@bootlin.com Cc: tzungbi@kernel.org, chrome-platform@lists.linux.dev, pmalani@chromium.org, linux-gpio@vger.kernel.org, linux-media@vger.kernel.org, linux-pm@vger.kernel.org, linux-rtc@vger.kernel.org, krzk@kernel.org Subject: [PATCH 17/18] platform/chrome: wilco_ec: event: remove redundant MODULE_ALIAS Date: Fri, 29 Mar 2024 15:56:29 +0800 Message-ID: <20240329075630.2069474-18-tzungbi@kernel.org> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog In-Reply-To: <20240329075630.2069474-1-tzungbi@kernel.org> References: <20240329075630.2069474-1-tzungbi@kernel.org> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 There is no platform driver in the file. Remove the redundant MODULE_ALIAS(). Signed-off-by: Tzung-Bi Shih Reviewed-by: Krzysztof Kozlowski Reviewed-by: Benson Leung --- drivers/platform/chrome/wilco_ec/event.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/platform/chrome/wilco_ec/event.c b/drivers/platform/chrome/wilco_ec/event.c index 13291fb4214e..49043c644572 100644 --- a/drivers/platform/chrome/wilco_ec/event.c +++ b/drivers/platform/chrome/wilco_ec/event.c @@ -575,4 +575,3 @@ module_exit(event_module_exit); MODULE_AUTHOR("Nick Crews "); MODULE_DESCRIPTION("Wilco EC ACPI event driver"); MODULE_LICENSE("GPL"); -MODULE_ALIAS("platform:" DRV_NAME); From patchwork Fri Mar 29 07:56:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 13610292 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 B695142A89; Fri, 29 Mar 2024 07:58:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699085; cv=none; b=W5z8j+YJEAGMSUziOkpEMi0WA0VbHM4Io+KFhr1f/L04CIn5hrH9DiUU+1CRW+xX7HKwmhFYqP3kYTk/YjNi6HO31DZ7W1pS8hFt7DRwbigR1myhgdqKYx0l1yEUUWduF95tHN1MsWAlqQozltP3X/Ay+XY38hR66MPkp7T2YOw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711699085; c=relaxed/simple; bh=/0ERKwQzbBcB03sGj+BkH3NQoyRfCHwh6GJ4EJSb/CY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IteTTMdtt33yvJUZ5vsr5/AqXjCAOTVjTRKiteTbqk2oC5JK2r4msrS72Xiwoai/2ltelwrGRMxH4fkzqEJsds+96QYdEimvjIlXEWu65aTO22opG5sqHAUXRqBxLoLeU2Fmzy0p1+vbPm6rusvBHS4TpsYVTdBN37zaf8FJj0U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=W6Ro7Iyp; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="W6Ro7Iyp" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D88EAC433A6; Fri, 29 Mar 2024 07:58:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711699085; bh=/0ERKwQzbBcB03sGj+BkH3NQoyRfCHwh6GJ4EJSb/CY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W6Ro7IypfmmWT7+JB6cNSgt06PrnA0g9HQADZagCxBLlztHncSV7w6D4WThSgswst /cEg1NxBMmp/JmhYRSnp1pMsjTMEepimEnC4gLM6i5hDunE+9FThU2Nemev6020fZG FvYHgFezABxppwogbspyV0tRUzxgV6r1zb+gdyrZGGhNunruycYy4zphPgyFWdvXIv 6CsMxQKPtVANGXFdlnOae7pCC0ujLvp84US4cghLp8CVfzRtFY9AIlxxgyvYHFSS+E bNgcf/igsA8CEvB2UnIv7BRu8Res/4KuF4JNjH/lw+sErxxaI0qID3tC4Vj62vxwBw lycphMMQ1P1/Q== From: Tzung-Bi Shih To: bleung@chromium.org, groeck@chromium.org, linus.walleij@linaro.org, brgl@bgdev.pl, hverkuil-cisco@xs4all.nl, mchehab@kernel.org, sre@kernel.org, alexandre.belloni@bootlin.com Cc: tzungbi@kernel.org, chrome-platform@lists.linux.dev, pmalani@chromium.org, linux-gpio@vger.kernel.org, linux-media@vger.kernel.org, linux-pm@vger.kernel.org, linux-rtc@vger.kernel.org, krzk@kernel.org Subject: [PATCH 18/18] platform/chrome/wilco_ec: core: provide ID table for avoiding fallback match Date: Fri, 29 Mar 2024 15:56:30 +0800 Message-ID: <20240329075630.2069474-19-tzungbi@kernel.org> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog In-Reply-To: <20240329075630.2069474-1-tzungbi@kernel.org> References: <20240329075630.2069474-1-tzungbi@kernel.org> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Instead of using fallback driver name match, provide ID table[1] for the primary match. [1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353 Signed-off-by: Tzung-Bi Shih Reviewed-by: Krzysztof Kozlowski Reviewed-by: Benson Leung --- drivers/platform/chrome/wilco_ec/core.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/platform/chrome/wilco_ec/core.c b/drivers/platform/chrome/wilco_ec/core.c index 9b59a1bed286..3e6b6cd81a9b 100644 --- a/drivers/platform/chrome/wilco_ec/core.c +++ b/drivers/platform/chrome/wilco_ec/core.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -150,6 +151,12 @@ static const struct acpi_device_id wilco_ec_acpi_device_ids[] = { }; MODULE_DEVICE_TABLE(acpi, wilco_ec_acpi_device_ids); +static const struct platform_device_id wilco_ec_id[] = { + { DRV_NAME, 0 }, + {} +}; +MODULE_DEVICE_TABLE(platform, wilco_ec_id); + static struct platform_driver wilco_ec_driver = { .driver = { .name = DRV_NAME, @@ -157,6 +164,7 @@ static struct platform_driver wilco_ec_driver = { }, .probe = wilco_ec_probe, .remove_new = wilco_ec_remove, + .id_table = wilco_ec_id, }; module_platform_driver(wilco_ec_driver); @@ -165,4 +173,3 @@ MODULE_AUTHOR("Nick Crews "); MODULE_AUTHOR("Duncan Laurie "); MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("ChromeOS Wilco Embedded Controller driver"); -MODULE_ALIAS("platform:" DRV_NAME);