Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Slawomir Rosek and committed by
Tzung-Bi Shih
ccf395bd da90147b

+6 -2
+1 -1
drivers/platform/chrome/Kconfig
··· 155 155 module will be called cros_ec_lpcs. 156 156 157 157 config CROS_EC_PROTO 158 - bool 158 + tristate 159 159 help 160 160 ChromeOS EC communication protocol helpers. 161 161
+2 -1
drivers/platform/chrome/Makefile
··· 25 25 obj-$(CONFIG_CROS_EC_TYPEC) += cros-ec-typec.o 26 26 27 27 obj-$(CONFIG_CROS_EC_LPC) += cros_ec_lpcs.o 28 - obj-$(CONFIG_CROS_EC_PROTO) += cros_ec_proto.o cros_ec_trace.o 28 + cros-ec-proto-objs := cros_ec_proto.o cros_ec_trace.o 29 + obj-$(CONFIG_CROS_EC_PROTO) += cros-ec-proto.o 29 30 obj-$(CONFIG_CROS_KBD_LED_BACKLIGHT) += cros_kbd_led_backlight.o 30 31 obj-$(CONFIG_CROS_EC_CHARDEV) += cros_ec_chardev.o 31 32 obj-$(CONFIG_CROS_EC_LIGHTBAR) += cros_ec_lightbar.o
+3
drivers/platform/chrome/cros_ec_proto.c
··· 1152 1152 return resp.version_mask; 1153 1153 } 1154 1154 EXPORT_SYMBOL_GPL(cros_ec_get_cmd_versions); 1155 + 1156 + MODULE_LICENSE("GPL"); 1157 + MODULE_DESCRIPTION("ChromeOS EC communication protocol helpers");