Skip to content

Commit ccf395b

Browse files
Slawomir RosekTzung-Bi Shih
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Tzung-Bi Shih <[email protected]>
1 parent da90147 commit ccf395b

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

drivers/platform/chrome/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ config CROS_EC_LPC
155155
module will be called cros_ec_lpcs.
156156

157157
config CROS_EC_PROTO
158-
bool
158+
tristate
159159
help
160160
ChromeOS EC communication protocol helpers.
161161

drivers/platform/chrome/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ endif
2525
obj-$(CONFIG_CROS_EC_TYPEC) += cros-ec-typec.o
2626

2727
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
2930
obj-$(CONFIG_CROS_KBD_LED_BACKLIGHT) += cros_kbd_led_backlight.o
3031
obj-$(CONFIG_CROS_EC_CHARDEV) += cros_ec_chardev.o
3132
obj-$(CONFIG_CROS_EC_LIGHTBAR) += cros_ec_lightbar.o

drivers/platform/chrome/cros_ec_proto.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,3 +1152,6 @@ int cros_ec_get_cmd_versions(struct cros_ec_device *ec_dev, u16 cmd)
11521152
return resp.version_mask;
11531153
}
11541154
EXPORT_SYMBOL_GPL(cros_ec_get_cmd_versions);
1155+
1156+
MODULE_LICENSE("GPL");
1157+
MODULE_DESCRIPTION("ChromeOS EC communication protocol helpers");

0 commit comments

Comments
 (0)