Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iio: accel: adxl313: add debug register

Add IIO debug register for general sensor debugging.

Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com>
Link: https://patch.msgid.link/20250601172139.59156-2-l.rubusch@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Lothar Rubusch and committed by
Jonathan Cameron
7b20d517 c430955d

+11
+11
drivers/iio/accel/adxl313_core.c
··· 321 321 } 322 322 } 323 323 324 + static int adxl313_reg_access(struct iio_dev *indio_dev, unsigned int reg, 325 + unsigned int writeval, unsigned int *readval) 326 + { 327 + struct adxl313_data *data = iio_priv(indio_dev); 328 + 329 + if (readval) 330 + return regmap_read(data->regmap, reg, readval); 331 + return regmap_write(data->regmap, reg, writeval); 332 + } 333 + 324 334 static const struct iio_info adxl313_info = { 325 335 .read_raw = adxl313_read_raw, 326 336 .write_raw = adxl313_write_raw, 327 337 .read_avail = adxl313_read_freq_avail, 338 + .debugfs_reg_access = &adxl313_reg_access, 328 339 }; 329 340 330 341 static int adxl313_setup(struct device *dev, struct adxl313_data *data,