linux/drivers/platform/x86/intel/atomisp2/led.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Driver for controlling LEDs for cameras connected to the Intel atomisp2
 * The main purpose of this driver is to turn off LEDs which are on at boot.
 *
 * Copyright (C) 2020 Hans de Goede <[email protected]>
 */

#include <linux/dmi.h>
#include <linux/gpio/consumer.h>
#include <linux/gpio/machine.h>
#include <linux/leds.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/platform_device.h>
#include <linux/workqueue.h>

/* This must be leds-gpio as the leds-gpio driver binds to the name */
#define DEV_NAME

static const struct gpio_led atomisp2_leds[] =;

static const struct gpio_led_platform_data atomisp2_leds_pdata =;

static struct gpiod_lookup_table asus_t100ta_lookup =;

static struct gpiod_lookup_table asus_t100chi_lookup =;

static const struct dmi_system_id atomisp2_led_systems[] __initconst =;
MODULE_DEVICE_TABLE(dmi, atomisp2_led_systems);

static struct gpiod_lookup_table *gpio_lookup;
static struct platform_device *pdev;

static int __init atomisp2_led_init(void)
{}

static void __exit atomisp2_led_cleanup(void)
{}

module_init();
module_exit(atomisp2_led_cleanup);

/*
 * The ACPI INIT method from Asus WMI's code on the T100TA and T200TA turns the
 * LED on (without the WMI interface allowing further control over the LED).
 * Ensure we are loaded after asus-nb-wmi so that we turn the LED off again.
 */
MODULE_SOFTDEP();
MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();