linux/drivers/platform/chrome/cros_usbpd_notify.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright 2020 Google LLC
 *
 * This driver serves as the receiver of cros_ec PD host events.
 */

#include <linux/acpi.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_data/cros_ec_proto.h>
#include <linux/platform_data/cros_usbpd_notify.h>
#include <linux/platform_device.h>

#define DRV_NAME
#define DRV_NAME_PLAT_ACPI
#define ACPI_DRV_NAME

static BLOCKING_NOTIFIER_HEAD(cros_usbpd_notifier_list);

struct cros_usbpd_notify_data {};

/**
 * cros_usbpd_register_notify - Register a notifier callback for PD events.
 * @nb: Notifier block pointer to register
 *
 * On ACPI platforms this corresponds to host events on the ECPD
 * "GOOG0003" ACPI device. On non-ACPI platforms this will filter mkbp events
 * for USB PD events.
 *
 * Return: 0 on success or negative error code.
 */
int cros_usbpd_register_notify(struct notifier_block *nb)
{}
EXPORT_SYMBOL_GPL();

/**
 * cros_usbpd_unregister_notify - Unregister notifier callback for PD events.
 * @nb: Notifier block pointer to unregister
 *
 * Unregister a notifier callback that was previously registered with
 * cros_usbpd_register_notify().
 */
void cros_usbpd_unregister_notify(struct notifier_block *nb)
{}
EXPORT_SYMBOL_GPL();

static void cros_usbpd_get_event_and_notify(struct device  *dev,
					    struct cros_ec_device *ec_dev)
{}

#ifdef CONFIG_ACPI

static void cros_usbpd_notify_acpi(acpi_handle device, u32 event, void *data)
{}

static int cros_usbpd_notify_probe_acpi(struct platform_device *pdev)
{}

static void cros_usbpd_notify_remove_acpi(struct platform_device *pdev)
{}

static const struct acpi_device_id cros_usbpd_notify_acpi_device_ids[] =;
MODULE_DEVICE_TABLE(acpi, cros_usbpd_notify_acpi_device_ids);

static struct platform_driver cros_usbpd_notify_acpi_driver =;

#endif /* CONFIG_ACPI */

static int cros_usbpd_notify_plat(struct notifier_block *nb,
				  unsigned long queued_during_suspend,
				  void *data)
{}

static int cros_usbpd_notify_probe_plat(struct platform_device *pdev)
{}

static void cros_usbpd_notify_remove_plat(struct platform_device *pdev)
{}

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

static struct platform_driver cros_usbpd_notify_plat_driver =;

static int __init cros_usbpd_notify_init(void)
{}

static void __exit cros_usbpd_notify_exit(void)
{}

module_init();
module_exit(cros_usbpd_notify_exit);

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