* [PATCH v1] platform/chrome: cros_ec_proto: allow to build as module
@ 2025-03-28 13:26 Slawomir Rosek
2025-04-02 8:24 ` Tzung-Bi Shih
2025-04-07 2:54 ` Tzung-Bi Shih
0 siblings, 2 replies; 4+ messages in thread
From: Slawomir Rosek @ 2025-03-28 13:26 UTC (permalink / raw)
To: Benson Leung, Tzung-Bi Shih, Guenter Roeck
Cc: chrome-platform, linux-kernel, ukaszb, 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 in gki_defconfig.
Signed-off-by: Slawomir Rosek <srosek@chromium.org>
---
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(-)
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 877b107fee4b..f90d2e7b616c 100644
--- a/drivers/platform/chrome/cros_ec_proto.c
+++ b/drivers/platform/chrome/cros_ec_proto.c
@@ -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");
--
2.49.0.472.ge94155a9ec-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH v1] platform/chrome: cros_ec_proto: allow to build as module
2025-03-28 13:26 [PATCH v1] platform/chrome: cros_ec_proto: allow to build as module Slawomir Rosek
@ 2025-04-02 8:24 ` Tzung-Bi Shih
2025-04-04 11:36 ` Sławomir Rosek
2025-04-07 2:54 ` Tzung-Bi Shih
1 sibling, 1 reply; 4+ messages in thread
From: Tzung-Bi Shih @ 2025-04-02 8:24 UTC (permalink / raw)
To: Slawomir Rosek
Cc: Benson Leung, Guenter Roeck, chrome-platform, linux-kernel,
ukaszb
On Fri, Mar 28, 2025 at 01:26:12PM +0000, Slawomir Rosek wrote:
> This allows to build ChromeOS EC communication protocol helpers as
s/This allows/Allow/.
> 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.
Does it work? CROS_EC_PROTO is "selected" by other Kconfigs. Wouldn't it
be either =y or =n?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1] platform/chrome: cros_ec_proto: allow to build as module
2025-04-02 8:24 ` Tzung-Bi Shih
@ 2025-04-04 11:36 ` Sławomir Rosek
0 siblings, 0 replies; 4+ messages in thread
From: Sławomir Rosek @ 2025-04-04 11:36 UTC (permalink / raw)
To: Tzung-Bi Shih
Cc: Benson Leung, Guenter Roeck, chrome-platform, linux-kernel,
ukaszb
On Wed, Apr 2, 2025 at 10:24 AM Tzung-Bi Shih <tzungbi@kernel.org> wrote:
>
> On Fri, Mar 28, 2025 at 01:26:12PM +0000, Slawomir Rosek wrote:
> > This allows to build ChromeOS EC communication protocol helpers as
>
> s/This allows/Allow/.
I will fix that, thanks.
>
> > 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.
>
> Does it work? CROS_EC_PROTO is "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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1] platform/chrome: cros_ec_proto: allow to build as module
2025-03-28 13:26 [PATCH v1] platform/chrome: cros_ec_proto: allow to build as module Slawomir Rosek
2025-04-02 8:24 ` Tzung-Bi Shih
@ 2025-04-07 2:54 ` Tzung-Bi Shih
1 sibling, 0 replies; 4+ messages in thread
From: Tzung-Bi Shih @ 2025-04-07 2:54 UTC (permalink / raw)
To: Slawomir Rosek
Cc: Benson Leung, Guenter Roeck, chrome-platform, linux-kernel,
ukaszb
On Fri, Mar 28, 2025 at 01:26:12PM +0000, Slawomir Rosek wrote:
> 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.
>
> [...]
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!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-04-07 2:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-28 13:26 [PATCH v1] platform/chrome: cros_ec_proto: allow to build as module Slawomir Rosek
2025-04-02 8:24 ` Tzung-Bi Shih
2025-04-04 11:36 ` Sławomir Rosek
2025-04-07 2:54 ` Tzung-Bi Shih
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox