platform/chrome: cros_ec_proto: allow to build as module
Subsystems (2)
PATCH 1/1 platform/chrome: cros_ec_proto: allow to build as module
This allows 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.
--- drivers/platform/chrome/Kconfig | 2 +- drivers/platform/chrome/Makefile | 3 ++- drivers/platform/chrome/cros_ec_proto.c | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-)
drivers/platform/chrome/Kconfig +1 -1
@@ -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.
drivers/platform/chrome/Makefile +2 -1
@@ -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
drivers/platform/chrome/cros_ec_proto.c +3 -0
@@ -1157,3 +1157,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" );
Signature · 1 line
2.49.0.472.ge94155a9ec-goog
Tzung-Bi Shih
maintainerQuoted 1 line · Slawomir Rosek
This allows to build ChromeOS EC communication protocol helpers as
s/This allows/Allow/.
Quoted 4 lines
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 ingki_defconfig.
Does it work? CROS_EC_PROTO is "selected" by other Kconfigs. Wouldn't it be either =y or =n?
Quoted 5 lines · Tzung-Bi Shih
Quoted 1 line · Slawomir Rosek
This allows to build ChromeOS EC communication protocol helpers as
s/This allows/Allow/.
I will fix that, thanks.
Quoted 8 lines
Quoted 5 lines
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 ingki_defconfig.Does it work?
CROS_EC_PROTOis "selected" by other Kconfigs. Wouldn't it be either =y or =n?
Yes, it is already used by android 6.6 and 6.12 kernels. The CROS_EC_PROTO is used only by other tristates so =m propagates properly.
Tzung-Bi Shih
maintainerQuoted 7 lines · Slawomir Rosek
This allows 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 ingki_defconfig.[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git for-next
[1/1] platform/chrome: cros_ec_proto: allow to build as module
commit: ccf395bde6aeefac139f4f250287feb139e3355d
Thanks!