cancel
Showing results for 
Search instead for 
Did you mean: 

How do i use buffer mode with st_lsm6dsx driver for linux?

takeshi_D
Associate

Hi!

 

In the Linux, I want to use buffer mode with st_lsm6dsx driver.

But there isn't file /sys/bus/iio/devices/iio\:deviceX/buffer/enable. Why?
The chip used is LSM330DLC, linux kernel version is 6.1.55 in nxp's yocto.

 

■log1(there isn't buffer directory)
root@XXX:~# ls /sys/bus/iio/devices/iio\:device0/
current_timestamp_clock in_anglvel_scale_available in_anglvel_y_raw name power sampling_frequency_available uevent
in_anglvel_scale in_anglvel_x_raw in_anglvel_z_raw of_node sampling_frequency subsystem waiting_for_supplier
root@XXX:~# ls /sys/bus/iio/devices/iio\:device1/
current_timestamp_clock in_accel_scale in_accel_y_raw name sampling_frequency uevent
dev in_accel_scale_available in_accel_z_raw of_node sampling_frequency_available waiting_for_supplier
events in_accel_x_raw mount_matrix power subsystem
■log2(latest value can be obtained)

root@XXX:~# cat /sys/bus/iio/devices/iio\:device0/in_anglvel_x_raw
64
■ device tree

&i2c3 {
(omit...)

imu@6a {
compatible = "st,ism330dlc";
reg = <0x6a>;
interrupt-parent = <&gpio1>;
interrupts = <9 IRQ_TYPE_EDGE_RISING>;
};
};

■kernel config

root@XXX:~# zcat /proc/config.gz | grep IIO
# CONFIG_SENSORS_IIO_HWMON is not set
# IIO staging drivers
# end of IIO staging drivers
CONFIG_IIO=y
CONFIG_IIO_BUFFER=y
# CONFIG_IIO_BUFFER_CB is not set
# CONFIG_IIO_BUFFER_DMA is not set
# CONFIG_IIO_BUFFER_DMAENGINE is not set
# CONFIG_IIO_BUFFER_HW_CONSUMER is not set
CONFIG_IIO_KFIFO_BUF=y
CONFIG_IIO_TRIGGERED_BUFFER=y
# CONFIG_IIO_CONFIGFS is not set
CONFIG_IIO_TRIGGER=y
CONFIG_IIO_CONSUMERS_PER_TRIGGER=2
# CONFIG_IIO_SW_DEVICE is not set
# CONFIG_IIO_SW_TRIGGER is not set
# CONFIG_IIO_TRIGGERED_EVENT is not set
# CONFIG_IIO_CROS_EC_ACCEL_LEGACY is not set
CONFIG_IIO_ST_ACCEL_3AXIS=m
CONFIG_IIO_ST_ACCEL_I2C_3AXIS=m
CONFIG_IIO_ST_ACCEL_SPI_3AXIS=m
# CONFIG_IIO_RESCALE is not set
CONFIG_IIO_CROS_EC_SENSORS_CORE=m
CONFIG_IIO_CROS_EC_SENSORS=m
# CONFIG_IIO_CROS_EC_SENSORS_LID_ANGLE is not set
# Hid Sensor IIO Common
# end of Hid Sensor IIO Common
# IIO SCMI Sensors
# CONFIG_IIO_SCMI is not set
# end of IIO SCMI Sensors
# CONFIG_IIO_SSP_SENSORHUB is not set
CONFIG_IIO_ST_SENSORS_I2C=m
CONFIG_IIO_ST_SENSORS_SPI=m
CONFIG_IIO_ST_SENSORS_CORE=m
# IIO dummy driver
# end of IIO dummy driver
CONFIG_IIO_ST_GYRO_3AXIS=m
CONFIG_IIO_ST_GYRO_I2C_3AXIS=m
CONFIG_IIO_ST_GYRO_SPI_3AXIS=m
CONFIG_RPMSG_IIO_PEDOMETER=m
CONFIG_INV_MPU6050_IIO=m
CONFIG_IIO_ST_LSM6DSX=y
CONFIG_IIO_ST_LSM6DSX_I2C=y
CONFIG_IIO_ST_LSM6DSX_SPI=y
CONFIG_IIO_ST_LSM6DSX_I3C=y
# CONFIG_IIO_ST_LSM9DS0 is not set
CONFIG_IIO_CROS_EC_LIGHT_PROX=m
CONFIG_IIO_ST_MAGN_3AXIS=m
CONFIG_IIO_ST_MAGN_I2C_3AXIS=m
CONFIG_IIO_ST_MAGN_SPI_3AXIS=m
# CONFIG_IIO_MUX is not set
# CONFIG_IIO_INTERRUPT_TRIGGER is not set
# CONFIG_IIO_SYSFS_TRIGGER is not set
CONFIG_IIO_CROS_EC_BARO=m
# CONFIG_IIO_ST_PRESS is not set

2 REPLIES 2
takeshi_D
Associate

I set interrupt attrbutes to device tree, but actually interrupt pin in LSM330DLC connect to nothing.
When I remove interrupt attrbutes from device tree, result was same.

■ device tree

&i2c3 {
(omit...)

imu@6a {
compatible = "st,ism330dlc";
reg = <0x6a>;
interrupt-parent = <&gpio1>;★
interrupts = <9 IRQ_TYPE_EDGE_RISING>;★
};
};

Billy OWEN
ST Employee

Hi @takeshi_D 

 

This post has been escalated to the ST Online Support Team for additional assistance.  We'll contact you directly.

 

Regards,

Billy