linux/drivers/iio/common/cros_ec_sensors/cros_ec_lid_angle.c

// SPDX-License-Identifier: GPL-2.0

/*
 * cros_ec_lid_angle - Driver for CrOS EC lid angle sensor.
 *
 * Copyright 2018 Google, Inc
 *
 * This driver uses the cros-ec interface to communicate with the Chrome OS
 * EC about counter sensors. Counters are presented through
 * iio sysfs.
 */

#include <linux/delay.h>
#include <linux/device.h>
#include <linux/iio/buffer.h>
#include <linux/iio/common/cros_ec_sensors_core.h>
#include <linux/iio/iio.h>
#include <linux/iio/kfifo_buf.h>
#include <linux/iio/trigger.h>
#include <linux/iio/triggered_buffer.h>
#include <linux/iio/trigger_consumer.h>
#include <linux/kernel.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_data/cros_ec_commands.h>
#include <linux/platform_device.h>
#include <linux/slab.h>

#define DRV_NAME

/*
 * One channel for the lid angle, the other for timestamp.
 */
static const struct iio_chan_spec cros_ec_lid_angle_channels[] =;

/* State data for ec_sensors iio driver. */
struct cros_ec_lid_angle_state {};

static int cros_ec_sensors_read_lid_angle(struct iio_dev *indio_dev,
					  unsigned long scan_mask, s16 *data)
{}

static int cros_ec_lid_angle_read(struct iio_dev *indio_dev,
				    struct iio_chan_spec const *chan,
				    int *val, int *val2, long mask)
{}

static const struct iio_info cros_ec_lid_angle_info =;

static int cros_ec_lid_angle_probe(struct platform_device *pdev)
{}

static const struct platform_device_id cros_ec_lid_angle_ids[] =;
MODULE_DEVICE_TABLE(platform, cros_ec_lid_angle_ids);

static struct platform_driver cros_ec_lid_angle_platform_driver =;
module_platform_driver();

MODULE_DESCRIPTION();
MODULE_LICENSE();