Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: sensor: add bosch bmm350 driver #85174

Merged
merged 1 commit into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions drivers/sensor/bosch/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ add_subdirectory_ifdef(CONFIG_BMI160 bmi160)
add_subdirectory_ifdef(CONFIG_BMI270 bmi270)
add_subdirectory_ifdef(CONFIG_BMI323 bmi323)
add_subdirectory_ifdef(CONFIG_BMM150 bmm150)
add_subdirectory_ifdef(CONFIG_BMM350 bmm350)
add_subdirectory_ifdef(CONFIG_BMP180 bmp180)
add_subdirectory_ifdef(CONFIG_BMP388 bmp388)
add_subdirectory_ifdef(CONFIG_BMP581 bmp581)
Expand Down
1 change: 1 addition & 0 deletions drivers/sensor/bosch/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ source "drivers/sensor/bosch/bmi160/Kconfig"
source "drivers/sensor/bosch/bmi270/Kconfig"
source "drivers/sensor/bosch/bmi323/Kconfig"
source "drivers/sensor/bosch/bmm150/Kconfig"
source "drivers/sensor/bosch/bmm350/Kconfig"
source "drivers/sensor/bosch/bmp180/Kconfig"
source "drivers/sensor/bosch/bmp388/Kconfig"
source "drivers/sensor/bosch/bmp581/Kconfig"
Expand Down
7 changes: 7 additions & 0 deletions drivers/sensor/bosch/bmm350/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Copyright (c) 2024 Bosch Sensortec GmbH
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update the copyright year

Suggested change
# Copyright (c) 2024 Bosch Sensortec GmbH
# Copyright (c) 2025 Bosch Sensortec GmbH

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not working for Bosch, I'm just integrating their code. Not sure if that's something I'm allowed to do.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean with "their code", if you copied code then you should adhere to the original code's copyright. Otherwise if you produced this code, you shouldn't be putting Bosch's copyright, but your own.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bosch wrote this code, including the copyright headers and sent it to me. I was told it's okay to share, so I'm doing that here.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is OK? @carlescufi

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bosch needs to clarify this directly I guess.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kegov Could you confirm?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maxd-nordic & @gmarull , I confirm.


# SPDX-License-Identifier: Apache-2.0

zephyr_library()
zephyr_library_sources(bmm350.c bmm350_i2c.c)
zephyr_library_sources_ifdef(CONFIG_BMM350_TRIGGER bmm350_trigger.c)
22 changes: 22 additions & 0 deletions drivers/sensor/bosch/bmm350/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# BMM350 Geomagnetic sensor configuration options

# Copyright (c) 2024 Bosch Sensortec GmbH

# SPDX-License-Identifier: Apache-2.0

menuconfig BMM350
bool "BMM350 I2C Geomagnetic Chip"
default y
depends on DT_HAS_BOSCH_BMM350_ENABLED
select I2C
help
Enable driver for BMM350 I2C-based Geomagnetic sensor.

if BMM350

module = BMM350
thread_priority = 10
thread_stack_size = 1024
source "drivers/sensor/Kconfig.trigger_template"

endif # BMM350
Loading
Loading