linux/drivers/platform/chrome/cros_ec_sensorhub.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Sensor HUB driver that discovers sensors behind a ChromeOS Embedded
 * Controller.
 *
 * Copyright 2019 Google LLC
 */

#include <linux/init.h>
#include <linux/device.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_data/cros_ec_commands.h>
#include <linux/platform_data/cros_ec_proto.h>
#include <linux/platform_data/cros_ec_sensorhub.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/types.h>

#define DRV_NAME

static void cros_ec_sensorhub_free_sensor(void *arg)
{}

static int cros_ec_sensorhub_allocate_sensor(struct device *parent,
					     char *sensor_name,
					     int sensor_num)
{}

static int cros_ec_sensorhub_register(struct device *dev,
				      struct cros_ec_sensorhub *sensorhub)
{}

static int cros_ec_sensorhub_probe(struct platform_device *pdev)
{}

#ifdef CONFIG_PM_SLEEP
/*
 * When the EC is suspending, we must stop sending interrupt,
 * we may use the same interrupt line for waking up the device.
 * Tell the EC to stop sending non-interrupt event on the iio ring.
 */
static int cros_ec_sensorhub_suspend(struct device *dev)
{}

static int cros_ec_sensorhub_resume(struct device *dev)
{}
#endif

static SIMPLE_DEV_PM_OPS(cros_ec_sensorhub_pm_ops,
		cros_ec_sensorhub_suspend,
		cros_ec_sensorhub_resume);

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

static struct platform_driver cros_ec_sensorhub_driver =;

module_platform_driver();

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