linux/drivers/platform/x86/nvidia-wmi-ec-backlight.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2020, NVIDIA CORPORATION.  All rights reserved.
 */

#include <linux/acpi.h>
#include <linux/backlight.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_data/x86/nvidia-wmi-ec-backlight.h>
#include <linux/types.h>
#include <linux/wmi.h>
#include <acpi/video.h>

static bool force;
module_param(force, bool, 0444);
MODULE_PARM_DESC();

/**
 * wmi_brightness_notify() - helper function for calling WMI-wrapped ACPI method
 * @w:    Pointer to the struct wmi_device identified by %WMI_BRIGHTNESS_GUID
 * @id:   The WMI method ID to call (e.g. %WMI_BRIGHTNESS_METHOD_LEVEL or
 *        %WMI_BRIGHTNESS_METHOD_SOURCE)
 * @mode: The operation to perform on the method (e.g. %WMI_BRIGHTNESS_MODE_SET
 *        or %WMI_BRIGHTNESS_MODE_GET)
 * @val:  Pointer to a value passed in by the caller when @mode is
 *        %WMI_BRIGHTNESS_MODE_SET, or a value passed out to caller when @mode
 *        is %WMI_BRIGHTNESS_MODE_GET or %WMI_BRIGHTNESS_MODE_GET_MAX_LEVEL.
 *
 * Returns 0 on success, or a negative error number on failure.
 */
static int wmi_brightness_notify(struct wmi_device *w, enum wmi_brightness_method id, enum wmi_brightness_mode mode, u32 *val)
{}

static int nvidia_wmi_ec_backlight_update_status(struct backlight_device *bd)
{}

static int nvidia_wmi_ec_backlight_get_brightness(struct backlight_device *bd)
{}

static const struct backlight_ops nvidia_wmi_ec_backlight_ops =;

static int nvidia_wmi_ec_backlight_probe(struct wmi_device *wdev, const void *ctx)
{}

static const struct wmi_device_id nvidia_wmi_ec_backlight_id_table[] =;
MODULE_DEVICE_TABLE(wmi, nvidia_wmi_ec_backlight_id_table);

static struct wmi_driver nvidia_wmi_ec_backlight_driver =;
module_wmi_driver();

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