linux/drivers/iio/proximity/cros_ec_mkbp_proximity.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Driver for cros-ec proximity sensor exposed through MKBP switch
 *
 * Copyright 2021 Google LLC.
 */

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/notifier.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/types.h>

#include <linux/platform_data/cros_ec_commands.h>
#include <linux/platform_data/cros_ec_proto.h>

#include <linux/iio/events.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>

#include <asm/unaligned.h>

struct cros_ec_mkbp_proximity_data {};

static const struct iio_event_spec cros_ec_mkbp_proximity_events[] =;

static const struct iio_chan_spec cros_ec_mkbp_proximity_chan_spec[] =;

static int cros_ec_mkbp_proximity_parse_state(const void *data)
{}

static int cros_ec_mkbp_proximity_query(struct cros_ec_device *ec_dev,
					int *state)
{}

static void cros_ec_mkbp_proximity_push_event(struct cros_ec_mkbp_proximity_data *data, int state)
{}

static int cros_ec_mkbp_proximity_notify(struct notifier_block *nb,
					 unsigned long queued_during_suspend,
					 void *_ec)
{}

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

static int cros_ec_mkbp_proximity_read_event_config(struct iio_dev *indio_dev,
				    const struct iio_chan_spec *chan,
				    enum iio_event_type type,
				    enum iio_event_direction dir)
{}

static int cros_ec_mkbp_proximity_write_event_config(struct iio_dev *indio_dev,
				     const struct iio_chan_spec *chan,
				     enum iio_event_type type,
				     enum iio_event_direction dir, int state)
{}

static const struct iio_info cros_ec_mkbp_proximity_info =;

static int cros_ec_mkbp_proximity_resume(struct device *dev)
{}

static DEFINE_SIMPLE_DEV_PM_OPS(cros_ec_mkbp_proximity_pm_ops, NULL,
				cros_ec_mkbp_proximity_resume);

static int cros_ec_mkbp_proximity_probe(struct platform_device *pdev)
{}

static void cros_ec_mkbp_proximity_remove(struct platform_device *pdev)
{}

static const struct of_device_id cros_ec_mkbp_proximity_of_match[] =;
MODULE_DEVICE_TABLE(of, cros_ec_mkbp_proximity_of_match);

static struct platform_driver cros_ec_mkbp_proximity_driver =;
module_platform_driver();

MODULE_LICENSE();
MODULE_DESCRIPTION();