aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorSlawomir Rosek <srosek@chromium.org>2025-03-28 13:26:12 +0000
committerTzung-Bi Shih <tzungbi@kernel.org>2025-04-07 02:51:00 +0000
commitccf395bde6aeefac139f4f250287feb139e3355d (patch)
tree43b84828ba438ba2a5207e94599c6bd78944c69e
parentplatform/chrome: cros_ec_debugfs: Avoid -Wflex-array-member-not-at-end warnings (diff)
downloadwireguard-linux-ccf395bde6aeefac139f4f250287feb139e3355d.tar.xz
wireguard-linux-ccf395bde6aeefac139f4f250287feb139e3355d.zip
platform/chrome: cros_ec_proto: Allow to build as module
Allow to build ChromeOS EC communication protocol helpers as kernel module which is particularly useful for Android GKI (Generic Kernel Image) configuration. With this change the ChromeOS Platform (CONFIG_CHROME_PLATFORMS=y) can be enabled directly from the vendor kconfig fragment whithout additional configuration in gki_defconfig. Signed-off-by: Slawomir Rosek <srosek@chromium.org> Link: https://lore.kernel.org/r/20250328132612.511471-1-srosek@chromium.org Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
-rw-r--r--drivers/platform/chrome/Kconfig2
-rw-r--r--drivers/platform/chrome/Makefile3
-rw-r--r--drivers/platform/chrome/cros_ec_proto.c3
3 files changed, 6 insertions, 2 deletions
diff --git a/drivers/platform/chrome/Kconfig b/drivers/platform/chrome/Kconfig
index 1b2f2bd09662..f523ae3d3be0 100644
--- a/drivers/platform/chrome/Kconfig
+++ b/drivers/platform/chrome/Kconfig
@@ -155,7 +155,7 @@ config CROS_EC_LPC
module will be called cros_ec_lpcs.
config CROS_EC_PROTO
- bool
+ tristate
help
ChromeOS EC communication protocol helpers.
diff --git a/drivers/platform/chrome/Makefile b/drivers/platform/chrome/Makefile
index 1a5a484563cc..b981a1bb5bd8 100644
--- a/drivers/platform/chrome/Makefile
+++ b/drivers/platform/chrome/Makefile
@@ -25,7 +25,8 @@ endif
obj-$(CONFIG_CROS_EC_TYPEC) += cros-ec-typec.o
obj-$(CONFIG_CROS_EC_LPC) += cros_ec_lpcs.o
-obj-$(CONFIG_CROS_EC_PROTO) += cros_ec_proto.o cros_ec_trace.o
+cros-ec-proto-objs := cros_ec_proto.o cros_ec_trace.o
+obj-$(CONFIG_CROS_EC_PROTO) += cros-ec-proto.o
obj-$(CONFIG_CROS_KBD_LED_BACKLIGHT) += cros_kbd_led_backlight.o
obj-$(CONFIG_CROS_EC_CHARDEV) += cros_ec_chardev.o
obj-$(CONFIG_CROS_EC_LIGHTBAR) += cros_ec_lightbar.o
diff --git a/drivers/platform/chrome/cros_ec_proto.c b/drivers/platform/chrome/cros_ec_proto.c
index 586358fbf981..3e94a0a82173 100644
--- a/drivers/platform/chrome/cros_ec_proto.c
+++ b/drivers/platform/chrome/cros_ec_proto.c
@@ -1152,3 +1152,6 @@ int cros_ec_get_cmd_versions(struct cros_ec_device *ec_dev, u16 cmd)
return resp.version_mask;
}
EXPORT_SYMBOL_GPL(cros_ec_get_cmd_versions);
+
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("ChromeOS EC communication protocol helpers");