diff options
author | Will McVicker <willmcvicker@google.com> | 2022-04-14 12:44:55 -0700 |
---|---|---|
committer | Will McVicker <willmcvicker@google.com> | 2022-04-14 12:45:02 -0700 |
commit | 3dcd56c21e5e45687b7c3917e4ee7e25ba08a575 (patch) | |
tree | 677df7ee290c9cb8af90ac9eb40ab91128474181 | |
parent | 66a68c2656f38dfbbb0f6d51a4b589cc6113300d (diff) | |
parent | d960d05ed7981e3dcba0765c0cb39ac3c24d9d1f (diff) | |
download | broadcom-3dcd56c21e5e45687b7c3917e4ee7e25ba08a575.tar.gz |
Merge 'aosp/android-gs-raviole-mainline' into 'pa/android-gs-pixel-mainline'
* 'mirror-aosp-android-gs-raviole-mainline' of sso://partner-android/kernel/private/google-modules/bluetooth/broadcom:
ANDROID: Replace "PDE_DATA" with "pde_data"
kleaf: //build/kleaf -> //build/kernel/kleaf.
Update path for the SoC project
Update path for the SoC project
Check return value of kfifo_out
Update to support gs/kernel/device-modules as an external module
kleaf: Fix module paths for slider.
Kleaf: add bluetooth kernel module.
Change-Id: Icf32bb62f7576a01948a5f97a3e4a04f559fd929
Signed-off-by: Will McVicker <willmcvicker@google.com>
-rw-r--r-- | BUILD.bazel | 18 | ||||
-rw-r--r-- | Kbuild | 2 | ||||
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | nitrous.c | 11 |
4 files changed, 26 insertions, 10 deletions
diff --git a/BUILD.bazel b/BUILD.bazel index 91f32ce..01126b5 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -6,15 +6,25 @@ # unless you have coordinated with the team managing the Soong to Bazel # migration. -load("//build/kleaf:kernel.bzl", "kernel_module") +load("//build/kernel/kleaf:kernel.bzl", "kernel_module") kernel_module( - name = "broadcom.cloudripper", + name = "broadcom.slider", + srcs = glob([ + "**/*.c", + "**/*.h", + "Kbuild", + ]) + [ + "//gs/google-modules/soc-modules:gs101_soc_headers", + ], outs = [ "nitrous.ko", ], - kernel_build = "//private/gs-google:cloudripper", + kernel_build = "//gs/google-modules/soc-modules:slider", + kernel_module_deps = [ + "//gs/google-modules/soc-modules:gs101_soc", + ], visibility = [ - "//private/gs-google:__pkg__", + "//gs/google-modules/soc-modules:__pkg__", ], ) @@ -1,3 +1 @@ obj-$(CONFIG_NITROUS) := nitrous.o - -ccflags-y += -I$(abspath $(KERNEL_SRC)/$(M)) @@ -3,5 +3,8 @@ M ?= $(shell pwd) KBUILD_OPTIONS := CONFIG_NITROUS=m +include $(KERNEL_SRC)/../gs/google-modules/soc-modules/Makefile.include + modules modules_install clean: - $(MAKE) -C $(KERNEL_SRC) M=$(M) W=1 $(KBUILD_OPTIONS) $(@) + $(MAKE) -C $(KERNEL_SRC) M=$(M) W=1 \ + $(KBUILD_OPTIONS) EXTRA_CFLAGS="$(EXTRA_CFLAGS)" KBUILD_EXTRA_SYMBOLS="$(EXTRA_SYMBOLS)" $(@) @@ -247,6 +247,7 @@ static int nitrous_proc_show(struct seq_file *m, void *v) struct nitrous_lpm_proc *data = m->private; struct nitrous_bt_lpm *lpm = data->lpm; ktime_t timestamp; + unsigned int ret; switch (data->operation) { case PROC_BTWAKE: @@ -264,7 +265,11 @@ static int nitrous_proc_show(struct seq_file *m, void *v) (lpm->is_suspended ? "asleep" : "awake")); break; case PROC_TIMESYNC: - kfifo_out(&lpm->timestamp_queue, ×tamp, sizeof(ktime_t)); + ret = kfifo_out(&lpm->timestamp_queue, ×tamp, sizeof(ktime_t)); + if (ret != sizeof(ktime_t)) { + dev_err(lpm->dev, "failed to get the timestamp, ret=%u\n", ret); + return -EINVAL; + } seq_printf(m, "%lld", ktime_to_us(timestamp)); break; default: @@ -275,13 +280,13 @@ static int nitrous_proc_show(struct seq_file *m, void *v) static int nitrous_proc_open(struct inode *inode, struct file *file) { - return single_open(file, nitrous_proc_show, PDE_DATA(inode)); + return single_open(file, nitrous_proc_show, pde_data(inode)); } static ssize_t nitrous_proc_write(struct file *file, const char *buf, size_t count, loff_t *pos) { - struct nitrous_lpm_proc *data = PDE_DATA(file_inode(file)); + struct nitrous_lpm_proc *data = pde_data(file_inode(file)); struct nitrous_bt_lpm *lpm = data->lpm; struct timespec64 ts; char lbuf[4]; |