linux/drivers/platform/chrome/chromeos_privacy_screen.c

// SPDX-License-Identifier: GPL-2.0

/*
 *  ChromeOS Privacy Screen support
 *
 * Copyright (C) 2022 Google LLC
 *
 * This is the Chromeos privacy screen provider, present on certain chromebooks,
 * represented by a GOOG0010 device in the ACPI. This ACPI device, if present,
 * will cause the i915 drm driver to probe defer until this driver registers
 * the privacy-screen.
 */

#include <linux/acpi.h>
#include <drm/drm_privacy_screen_driver.h>

/*
 * The DSM (Device Specific Method) constants below are the agreed API with
 * the firmware team, on how to control privacy screen using ACPI methods.
 */
#define PRIV_SCRN_DSM_REVID
#define PRIV_SCRN_DSM_FN_GET_STATUS
#define PRIV_SCRN_DSM_FN_ENABLE
#define PRIV_SCRN_DSM_FN_DISABLE

static const guid_t chromeos_privacy_screen_dsm_guid =;

static void
chromeos_privacy_screen_get_hw_state(struct drm_privacy_screen
				     *drm_privacy_screen)
{}

static int
chromeos_privacy_screen_set_sw_state(struct drm_privacy_screen
				     *drm_privacy_screen,
				     enum drm_privacy_screen_status state)
{}

static const struct drm_privacy_screen_ops chromeos_privacy_screen_ops =;

static int chromeos_privacy_screen_add(struct acpi_device *adev)
{}

static void chromeos_privacy_screen_remove(struct acpi_device *adev)
{}

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

static struct acpi_driver chromeos_privacy_screen_driver =;

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