linux/drivers/iio/common/st_sensors/st_sensors_core.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * STMicroelectronics sensors core library driver
 *
 * Copyright 2012-2013 STMicroelectronics Inc.
 *
 * Denis Ciocca <[email protected]>
 */

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/iio/iio.h>
#include <linux/mutex.h>
#include <linux/property.h>
#include <linux/regulator/consumer.h>
#include <linux/regmap.h>
#include <linux/unaligned.h>
#include <linux/iio/common/st_sensors.h>

#include "st_sensors_core.h"

int st_sensors_write_data_with_mask(struct iio_dev *indio_dev,
				    u8 reg_addr, u8 mask, u8 data)
{}

int st_sensors_debugfs_reg_access(struct iio_dev *indio_dev,
				  unsigned reg, unsigned writeval,
				  unsigned *readval)
{}
EXPORT_SYMBOL_NS();

static int st_sensors_match_odr(struct st_sensor_settings *sensor_settings,
			unsigned int odr, struct st_sensor_odr_avl *odr_out)
{}

int st_sensors_set_odr(struct iio_dev *indio_dev, unsigned int odr)
{}
EXPORT_SYMBOL_NS();

static int st_sensors_match_fs(struct st_sensor_settings *sensor_settings,
					unsigned int fs, int *index_fs_avl)
{}

static int st_sensors_set_fullscale(struct iio_dev *indio_dev, unsigned int fs)
{}

int st_sensors_set_enable(struct iio_dev *indio_dev, bool enable)
{}
EXPORT_SYMBOL_NS();

int st_sensors_set_axis_enable(struct iio_dev *indio_dev, u8 axis_enable)
{}
EXPORT_SYMBOL_NS();


int st_sensors_power_enable(struct iio_dev *indio_dev)
{}
EXPORT_SYMBOL_NS();

static int st_sensors_set_drdy_int_pin(struct iio_dev *indio_dev,
					struct st_sensors_platform_data *pdata)
{}

static struct st_sensors_platform_data *st_sensors_dev_probe(struct device *dev,
		struct st_sensors_platform_data *defdata)
{}

/**
 * st_sensors_dev_name_probe() - device probe for ST sensor name
 * @dev: driver model representation of the device.
 * @name: device name buffer reference.
 * @len: device name buffer length.
 *
 * In effect this function matches an ID to an internal kernel
 * name for a certain sensor device, so that the rest of the autodetection can
 * rely on that name from this point on. I2C/SPI devices will be renamed
 * to match the internal kernel convention.
 */
void st_sensors_dev_name_probe(struct device *dev, char *name, int len)
{}
EXPORT_SYMBOL_NS();

int st_sensors_init_sensor(struct iio_dev *indio_dev,
					struct st_sensors_platform_data *pdata)
{}
EXPORT_SYMBOL_NS();

int st_sensors_set_dataready_irq(struct iio_dev *indio_dev, bool enable)
{}
EXPORT_SYMBOL_NS();

int st_sensors_set_fullscale_by_gain(struct iio_dev *indio_dev, int scale)
{}
EXPORT_SYMBOL_NS();

static int st_sensors_read_axis_data(struct iio_dev *indio_dev,
				     struct iio_chan_spec const *ch, int *data)
{}

int st_sensors_read_info_raw(struct iio_dev *indio_dev,
				struct iio_chan_spec const *ch, int *val)
{}
EXPORT_SYMBOL_NS();

/*
 * st_sensors_get_settings_index() - get index of the sensor settings for a
 *				     specific device from list of settings
 * @name: device name buffer reference.
 * @list: sensor settings list.
 * @list_length: length of sensor settings list.
 *
 * Return: non negative number on success (valid index),
 *	   negative error code otherwise.
 */
int st_sensors_get_settings_index(const char *name,
				  const struct st_sensor_settings *list,
				  const int list_length)
{}
EXPORT_SYMBOL_NS();

/*
 * st_sensors_verify_id() - verify sensor ID (WhoAmI) is matching with the
 *			    expected value
 * @indio_dev: IIO device reference.
 *
 * Return: 0 on success (valid sensor ID), else a negative error code.
 */
int st_sensors_verify_id(struct iio_dev *indio_dev)
{}
EXPORT_SYMBOL_NS();

ssize_t st_sensors_sysfs_sampling_frequency_avail(struct device *dev,
				struct device_attribute *attr, char *buf)
{}
EXPORT_SYMBOL_NS();

ssize_t st_sensors_sysfs_scale_avail(struct device *dev,
				struct device_attribute *attr, char *buf)
{}
EXPORT_SYMBOL_NS();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();