~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/iio/common/ssp_sensors.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-or-later */
  2 /*
  3  *  Copyright (C) 2014, Samsung Electronics Co. Ltd. All Rights Reserved.
  4  */
  5 #ifndef _SSP_SENSORS_H_
  6 #define _SSP_SENSORS_H_
  7 
  8 #include <linux/iio/iio.h>
  9 
 10 #define SSP_TIME_SIZE                           4
 11 #define SSP_ACCELEROMETER_SIZE                  6
 12 #define SSP_GYROSCOPE_SIZE                      6
 13 #define SSP_BIO_HRM_RAW_SIZE                    8
 14 #define SSP_BIO_HRM_RAW_FAC_SIZE                36
 15 #define SSP_BIO_HRM_LIB_SIZE                    8
 16 
 17 /**
 18  * enum ssp_sensor_type - SSP sensor type
 19  */
 20 enum ssp_sensor_type {
 21         SSP_ACCELEROMETER_SENSOR = 0,
 22         SSP_GYROSCOPE_SENSOR,
 23         SSP_GEOMAGNETIC_UNCALIB_SENSOR,
 24         SSP_GEOMAGNETIC_RAW,
 25         SSP_GEOMAGNETIC_SENSOR,
 26         SSP_PRESSURE_SENSOR,
 27         SSP_GESTURE_SENSOR,
 28         SSP_PROXIMITY_SENSOR,
 29         SSP_TEMPERATURE_HUMIDITY_SENSOR,
 30         SSP_LIGHT_SENSOR,
 31         SSP_PROXIMITY_RAW,
 32         SSP_ORIENTATION_SENSOR,
 33         SSP_STEP_DETECTOR,
 34         SSP_SIG_MOTION_SENSOR,
 35         SSP_GYRO_UNCALIB_SENSOR,
 36         SSP_GAME_ROTATION_VECTOR,
 37         SSP_ROTATION_VECTOR,
 38         SSP_STEP_COUNTER,
 39         SSP_BIO_HRM_RAW,
 40         SSP_BIO_HRM_RAW_FAC,
 41         SSP_BIO_HRM_LIB,
 42         SSP_SENSOR_MAX,
 43 };
 44 
 45 struct ssp_data;
 46 
 47 /**
 48  * struct ssp_sensor_data - Sensor object
 49  * @process_data:       Callback to feed sensor data.
 50  * @type:               Used sensor type.
 51  * @buffer:             Received data buffer.
 52  */
 53 struct ssp_sensor_data {
 54         int (*process_data)(struct iio_dev *indio_dev, void *buf,
 55                             int64_t timestamp);
 56         enum ssp_sensor_type type;
 57         u8 *buffer;
 58 };
 59 
 60 void ssp_register_consumer(struct iio_dev *indio_dev,
 61                            enum ssp_sensor_type type);
 62 
 63 int ssp_enable_sensor(struct ssp_data *data, enum ssp_sensor_type type,
 64                       u32 delay);
 65 
 66 int ssp_disable_sensor(struct ssp_data *data, enum ssp_sensor_type type);
 67 
 68 u32 ssp_get_sensor_delay(struct ssp_data *data, enum ssp_sensor_type);
 69 
 70 int ssp_change_delay(struct ssp_data *data, enum ssp_sensor_type type,
 71                      u32 delay);
 72 #endif /* _SSP_SENSORS_H_ */
 73 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php