Kernel for Galaxy S24, rebased on CLO sources (WIP)
Go to file
Mario Tesi 52224a7247 drivers:iio:stm:accel: Add support to LIS2DUXS12 STMEMS accel
Added support to STMEMS acc LIS2DUXS12 sensor.
The following features has been included:
 - Acc, Temp and QVAR sensors in FIFO
 - Self Test
 - Embedded features event detection supported:
   - Wake-up
   - Free fall
   - Single Tap
   - Double Tap
   - Triple Tap
   - 6D orientation
   - Sleep change
   - Step Counter
   - Step Detection
   - Significant Motion
   - Tilt
 - MLC and FSM configuration
 - I2C / SPI / I3C interfaces through regmap
 - Multi kernel version support up to v5.15
 - Preload MLC/FSM presence detection using QVAR

Signed-off-by: Mario Tesi <mario.tesi@st.com>
Change-Id: I014d990f55c178f15a4a087a897d7eb8ed17ed8f
Reviewed-on: https://gerrit.st.com/c/linuxandroidopen/stm-ldd-iio/+/261051
Tested-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
Reviewed-by: Matteo DAMENO <matteo.dameno@st.com>
2023-05-24 17:17:55 +02:00
Documentation/devicetree/bindings/iio/stm drivers:iio:stm:accel: Add support to LIS2DUXS12 STMEMS accel 2023-05-24 17:17:55 +02:00
drivers/iio/stm drivers:iio:stm:accel: Add support to LIS2DUXS12 STMEMS accel 2023-05-24 17:17:55 +02: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:accel: Add support to LIS2DUXS12 STMEMS accel 2023-05-24 17:17:55 +02:00
stm_iio_patches stm: move kernel 5.15.y stm patches out of WIP stage 2022-10-10 18:05:11 +02:00
README.md stm: update README.md with options for recent gits 2022-10-14 09:31:11 +02:00

Introduction

This repository contains STMicroelectronics MEMS IIO drivers for Linux/Android kernels.

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