linux/drivers/hid/surface-hid/surface_hid_core.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Common/core components for the Surface System Aggregator Module (SSAM) HID
 * transport driver. Provides support for integrated HID devices on Microsoft
 * Surface models.
 *
 * Copyright (C) 2019-2021 Maximilian Luz <[email protected]>
 */

#include <asm/unaligned.h>
#include <linux/hid.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/usb/ch9.h>

#include <linux/surface_aggregator/controller.h>

#include "surface_hid_core.h"


/* -- Utility functions. ---------------------------------------------------- */

static bool surface_hid_is_hot_removed(struct surface_hid_device *shid)
{}


/* -- Device descriptor access. --------------------------------------------- */

static int surface_hid_load_hid_descriptor(struct surface_hid_device *shid)
{}

static int surface_hid_load_device_attributes(struct surface_hid_device *shid)
{}


/* -- Transport driver (common). -------------------------------------------- */

static int surface_hid_start(struct hid_device *hid)
{}

static void surface_hid_stop(struct hid_device *hid)
{}

static int surface_hid_open(struct hid_device *hid)
{}

static void surface_hid_close(struct hid_device *hid)
{}

static int surface_hid_parse(struct hid_device *hid)
{}

static int surface_hid_raw_request(struct hid_device *hid, unsigned char reportnum, u8 *buf,
				   size_t len, unsigned char rtype, int reqtype)
{}

static const struct hid_ll_driver surface_hid_ll_driver =;


/* -- Common device setup. -------------------------------------------------- */

int surface_hid_device_add(struct surface_hid_device *shid)
{}
EXPORT_SYMBOL_GPL();

void surface_hid_device_destroy(struct surface_hid_device *shid)
{}
EXPORT_SYMBOL_GPL();


/* -- PM ops. --------------------------------------------------------------- */

#ifdef CONFIG_PM_SLEEP

static int surface_hid_suspend(struct device *dev)
{}

static int surface_hid_resume(struct device *dev)
{}

static int surface_hid_freeze(struct device *dev)
{}

static int surface_hid_poweroff(struct device *dev)
{}

static int surface_hid_restore(struct device *dev)
{}

const struct dev_pm_ops surface_hid_pm_ops =;
EXPORT_SYMBOL_GPL();

#else /* CONFIG_PM_SLEEP */

const struct dev_pm_ops surface_hid_pm_ops = { };
EXPORT_SYMBOL_GPL(surface_hid_pm_ops);

#endif /* CONFIG_PM_SLEEP */

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