]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
platform/chrome: cros_ec_proto: Allow to build as module
authorSlawomir Rosek <srosek@chromium.org>
Fri, 28 Mar 2025 13:26:12 +0000 (13:26 +0000)
committerTzung-Bi Shih <tzungbi@kernel.org>
Mon, 7 Apr 2025 02:51:00 +0000 (02:51 +0000)
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>
drivers/platform/chrome/Kconfig
drivers/platform/chrome/Makefile
drivers/platform/chrome/cros_ec_proto.c

index 1b2f2bd096622f985ac223dc70dde0a8f3a6cb89..f523ae3d3be040390392f67cff9fc245ce698daf 100644 (file)
@@ -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.
 
index 1a5a484563cc1300c6d20f08d6fc127a9a6b3e34..b981a1bb5bd807382d468b556d6698808bf64a02 100644 (file)
@@ -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
index 586358fbf9819d539b21fbe947bced6c42e5991e..3e94a0a82173dbedef8807d18c65ece87ab820d1 100644 (file)
@@ -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");