Kernel for Galaxy S24, rebased on CLO sources (WIP)
Go to file
mariotesi d51f3298c0 drivers:iio:stm:imu:st_lsm6dso16is: rework self-test procedure
After enabling the sensor discard the first sample
because it could be prior to the activation of the
self-test procedure.
With this reworking the procedure is now faithful
to the application note.

Signed-off-by: mariotesi <mario.tesi@st.com>
Change-Id: I30aa6c34575ed346dc4e3e34aa283721650ab4b9
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/336875
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
2023-11-02 11:09:20 +01:00
Documentation/devicetree/bindings/iio/stm drivers:iio:stm:imu:st_asm330lxxh: add support to ASM330LHHXG1 2023-10-13 17:14:07 +02:00
drivers/iio/stm drivers:iio:stm:imu:st_lsm6dso16is: rework self-test procedure 2023-11-02 11:09:20 +01:00
include/linux/platform_data/stm include:linux:p_d:stm: add missing platform data file for ism303dac driver 2022-05-17 10:26:14 -07:00
stm_iio_configs drivers:iio:stm:imu:st_lsm6dso16is: add lsm6dso16is device to kernel build 2023-09-14 17:26:12 +02:00
stm_iio_patches stm: move kernel 6.1.y stm patches out of WIP stage 2023-10-12 18:09:37 +02:00
README.md stm: Removed support for LTS kernel (4.9) EOL 2023-09-14 20:15:40 +02:00

Introduction

This repository contains STMicroelectronics MEMS IIO drivers for the following LTS Linux/Android kernels:

  • 4.9 (EOL)
  • 4.14
  • 4.19
  • 5.4
  • 5.10
  • 5.15
  • 6.1 (WIP)

For EOL kernel the maintenance has been discontinued and is strongly discouraged from using it for new developments.

Source code integration

From your kernel source code directory add the git remote (i.e. stmems_iio_github) for this repository:

git remote add stmems_iio_github \
               https://github.com/STMicroelectronics/st-mems-android-linux-drivers-iio.git

Fetch the just added remote:

git fetch stmems_iio_github

There are now two ways to integrate the drivers code into the kernel target branch:

  • merge (suggested strategy)
  • rebase

merge

Merge the stmems_iio_github/master with your target kernel source branch (i.e branch linux-5.4.y):

git merge --allow-unrelated-histories \
          linux-5.4.y \
          stmems_iio_github/master

rebase

Rebase the stmems_iio_github/master on top of your target kernel source branch (i.e branch linux-5.4.y):

git rebase --no-fork-point \
           linux-5.4.y \
           stmems_iio_github/master

Note: older git versions (i.e.: 2.7.4) would require to use sligthly different options:

git merge --no-fork-point \
          linux-5.4.y \
          stmems_iio_github/master
git rebase -Xno-renames \
           --no-fork-point \
           linux-5.4.y \
           stmems_iio_github/master

Apply patches

Now that drivers code has been added to the target kernel branch, few patches needs to be added in order to:

  • add STM drivers into Kconfig & Makefile systems
  • patch IIO framework with custom events with custom events, channels and devices

Apply the patches available in the just added repository (i.e branch linux-5.4.y):

git am stm_iio_patches/5.4.y/*-stm-*.patch

Configuration

A folder named stm_iio_configs should now be available with the default configs for the supported drivers.

Modify target defconfig

Sensors defconfig can be appended to the board defconfig (i.e. if your current configuration file is arch/arm/configs/stm32_defconfig):

cat stm_iio_configs/lsm6dsm_defconfig >> arch/arm/configs/stm32_defconfig

Alternatively, it can be done at build time without altering the board config file, as follow.

Merge configuration

Driver config can be merged into current target pre-configured kernel using a script available in the kernel itself:

export ARCH=arm
export CROSS_COMPILE=arm-linux-gnu-
scripts/kconfig/merge_config.sh -n .config stm_iio_configs/lsm6dsm_defconfig