From: Jagath Jog J <jagathjog1996@gmail.com>
To: jic23@kernel.org, andriy.shevchenko@linux.intel.com,
u.kleine-koenig@pengutronix.de, lars@metafoo.de,
robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
linus.walleij@linaro.org
Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/2] iio: imu: Add driver and dt-bindings for BMI323
Date: Fri, 13 Oct 2023 09:18:06 +0530 [thread overview]
Message-ID: <20231013034808.8948-1-jagathjog1996@gmail.com> (raw)
Add dt-bindings and IIO driver for Bosch BMI323 a 6 axis IMU.
Complete list of device sysfs files
.
├── buffer
│ ├── data_available
│ ├── direction
│ ├── enable
│ ├── hwfifo_enabled
│ ├── hwfifo_watermark
│ ├── length
│ └── watermark
├── buffer0
│ ├── data_available
│ ├── direction
│ ├── enable
│ ├── hwfifo_enabled
│ ├── hwfifo_watermark
│ ├── in_accel_x_en
│ ├── in_accel_x_index
│ ├── in_accel_x_type
│ ├── in_accel_y_en
│ ├── in_accel_y_index
│ ├── in_accel_y_type
│ ├── in_accel_z_en
│ ├── in_accel_z_index
│ ├── in_accel_z_type
│ ├── in_anglvel_x_en
│ ├── in_anglvel_x_index
│ ├── in_anglvel_x_type
│ ├── in_anglvel_y_en
│ ├── in_anglvel_y_index
│ ├── in_anglvel_y_type
│ ├── in_anglvel_z_en
│ ├── in_anglvel_z_index
│ ├── in_anglvel_z_type
│ ├── in_timestamp_en
│ ├── in_timestamp_index
│ ├── in_timestamp_type
│ ├── length
│ └── watermark
├── current_timestamp_clock
├── dev
├── events
│ ├── in_accel_gesture_doubletap_en
│ ├── in_accel_gesture_doubletap_reset_timeout
│ ├── in_accel_gesture_doubletap_tap2_min_delay
│ ├── in_accel_gesture_doubletap_tap2_min_delay_available
│ ├── in_accel_gesture_doubletap_value
│ ├── in_accel_gesture_singletap_en
│ ├── in_accel_gesture_singletap_reset_timeout
│ ├── in_accel_gesture_singletap_value
│ ├── in_accel_gesture_tap_reset_timeout_available
│ ├── in_accel_gesture_tap_value_available
│ ├── in_accel_gesture_tap_wait_dur
│ ├── in_accel_gesture_tap_wait_dur_available
│ ├── in_accel_gesture_tap_wait_timeout
│ ├── in_accel_mag_falling_en
│ ├── in_accel_mag_falling_hysteresis
│ ├── in_accel_mag_falling_period
│ ├── in_accel_mag_falling_value
│ ├── in_accel_mag_hysteresis_available
│ ├── in_accel_mag_period_available
│ ├── in_accel_mag_rising_en
│ ├── in_accel_mag_rising_hysteresis
│ ├── in_accel_mag_rising_period
│ ├── in_accel_mag_rising_value
│ ├── in_accel_mag_value_available
│ ├── in_steps_change_en
│ └── in_steps_change_value
├── in_accel_mount_matrix
├── in_accel_oversampling_ratio
├── in_accel_oversampling_ratio_available
├── in_accel_sampling_frequency
├── in_accel_sampling_frequency_available
├── in_accel_scale
├── in_accel_scale_available
├── in_accel_x_raw
├── in_accel_y_raw
├── in_accel_z_raw
├── in_anglvel_mount_matrix
├── in_anglvel_oversampling_ratio
├── in_anglvel_oversampling_ratio_available
├── in_anglvel_sampling_frequency
├── in_anglvel_sampling_frequency_available
├── in_anglvel_scale
├── in_anglvel_scale_available
├── in_anglvel_x_raw
├── in_anglvel_y_raw
├── in_anglvel_z_raw
├── in_steps_en
├── in_steps_input
├── in_temp_offset
├── in_temp_raw
├── in_temp_scale
├── name
├── of_node -> ../../../../../../../firmware/devicetree/base/soc/i2c@7e804000/i2c_bmi323@68
├── power
│ ├── autosuspend_delay_ms
│ ├── control
│ ├── runtime_active_time
│ ├── runtime_status
│ └── runtime_suspended_time
├── scan_elements
│ ├── in_accel_x_en
│ ├── in_accel_x_index
│ ├── in_accel_x_type
│ ├── in_accel_y_en
│ ├── in_accel_y_index
│ ├── in_accel_y_type
│ ├── in_accel_z_en
│ ├── in_accel_z_index
│ ├── in_accel_z_type
│ ├── in_anglvel_x_en
│ ├── in_anglvel_x_index
│ ├── in_anglvel_x_type
│ ├── in_anglvel_y_en
│ ├── in_anglvel_y_index
│ ├── in_anglvel_y_type
│ ├── in_anglvel_z_en
│ ├── in_anglvel_z_index
│ ├── in_anglvel_z_type
│ ├── in_timestamp_en
│ ├── in_timestamp_index
│ └── in_timestamp_type
├── subsystem -> ../../../../../../../bus/iio
├── trigger
│ └── current_trigger
├── uevent
└── waiting_for_supplier
Changes from RFC to v2
Review by Andy:
- Sorted header files and added unit.h
- Splitting macro
- Defined new macros and enums to use in place of magic numbers.
- Used KILO instead of large number
- Used guard and scoped_guard from cleanup.h
- Used ARRAY_SIZE() instead of value
- Replaced kstrtoint with kstrtobool
- Used min() and in_range() from minmax.h
- Used GENMASK instead of magic number
- Remove error print from interrupt handler
- Removed casting and le16_to_cpup, used sign_extend32 for getting final value
- Used while loop instead of for
- Remove the check for the return value of 0 from fwnode_irq_get_byname()
- Used dev_err_probe() in all probe paths
- Removed 0 from i2c_ids[]
- Used read_flag_mask for spi regmap configuration
- Dropped blank line
- Used regmap_read_poll_timeout() function instead of while loop
- Applied fixes as per review
Review by Jonathan
- Used oversampling instead of averaging
- Reverse the order of avail_scan_masks
- Use FIELD_PREP() directly in place of set_mask_bits
- Remove irq_type from devm_request_threaded_irq
- Use FIELD_GET() with mask
- Added comment for delay used for feature engine enable
- Use dev_err_probe in all probe paths
- For I2C regmap, allocated memory in device private data
- Use pad_bits=16 for spi regmap_configuration
- Added both interrupts in the dt-bindings
Review by Krzysztof Kozlowski
- Removed duplicated words from subject
- Removed '|'
- Added supplies
- Used generic node name "imu"
- Removed spi example node
Review by Uwe Kleine-König
- Use probe instead of probe_new
- Placed datasheet in driver
Jagath Jog J (2):
dt-bindings: iio: imu: Add Bosch BMI323
iio: imu: Add driver for BMI323 IMU
Documentation/ABI/testing/sysfs-bus-iio | 18 +
.../bindings/iio/imu/bosch,bmi323.yaml | 77 +
MAINTAINERS | 7 +
drivers/iio/imu/Kconfig | 1 +
drivers/iio/imu/Makefile | 1 +
drivers/iio/imu/bmi323/Kconfig | 33 +
drivers/iio/imu/bmi323/Makefile | 7 +
drivers/iio/imu/bmi323/bmi323.h | 209 ++
drivers/iio/imu/bmi323/bmi323_core.c | 2139 +++++++++++++++++
drivers/iio/imu/bmi323/bmi323_i2c.c | 121 +
drivers/iio/imu/bmi323/bmi323_spi.c | 92 +
11 files changed, 2705 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/imu/bosch,bmi323.yaml
create mode 100644 drivers/iio/imu/bmi323/Kconfig
create mode 100644 drivers/iio/imu/bmi323/Makefile
create mode 100644 drivers/iio/imu/bmi323/bmi323.h
create mode 100644 drivers/iio/imu/bmi323/bmi323_core.c
create mode 100644 drivers/iio/imu/bmi323/bmi323_i2c.c
create mode 100644 drivers/iio/imu/bmi323/bmi323_spi.c
--
2.20.1
next reply other threads:[~2023-10-13 3:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-13 3:48 Jagath Jog J [this message]
2023-10-13 3:48 ` [PATCH v2 1/2] dt-bindings: iio: imu: Add Bosch BMI323 Jagath Jog J
2023-10-13 6:55 ` Krzysztof Kozlowski
2023-10-13 3:48 ` [PATCH v2 2/2] iio: imu: Add driver for BMI323 IMU Jagath Jog J
2023-10-14 16:46 ` Jonathan Cameron
2023-10-15 10:30 ` Jagath Jog J
2023-10-18 19:13 ` Jonathan Cameron
2023-10-19 18:22 ` Jagath Jog J
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231013034808.8948-1-jagathjog1996@gmail.com \
--to=jagathjog1996@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lars@metafoo.de \
--cc=linus.walleij@linaro.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).