mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 07:48:58 +07:00
5ccff85276
Now that all users of acpi_gpio.h have been moved to use either the GPIO descriptor interface or to the internal gpiolib.h we can get rid of acpi_gpio.h entirely. Once this is done the only interface to get GPIOs to drivers enumerated from ACPI namespace is the descriptor based interface. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
47 lines
1.2 KiB
C
47 lines
1.2 KiB
C
/*
|
|
* Internal GPIO functions.
|
|
*
|
|
* Copyright (C) 2013, Intel Corporation
|
|
* Author: Mika Westerberg <mika.westerberg@linux.intel.com>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*/
|
|
|
|
#ifndef GPIOLIB_H
|
|
#define GPIOLIB_H
|
|
|
|
#include <linux/err.h>
|
|
#include <linux/device.h>
|
|
|
|
/**
|
|
* struct acpi_gpio_info - ACPI GPIO specific information
|
|
* @gpioint: if %true this GPIO is of type GpioInt otherwise type is GpioIo
|
|
* @active_low: in case of @gpioint, the pin is active low
|
|
*/
|
|
struct acpi_gpio_info {
|
|
bool gpioint;
|
|
bool active_low;
|
|
};
|
|
|
|
#ifdef CONFIG_ACPI
|
|
void acpi_gpiochip_add(struct gpio_chip *chip);
|
|
void acpi_gpiochip_remove(struct gpio_chip *chip);
|
|
|
|
struct gpio_desc *acpi_get_gpiod_by_index(struct device *dev, int index,
|
|
struct acpi_gpio_info *info);
|
|
#else
|
|
static inline void acpi_gpiochip_add(struct gpio_chip *chip) { }
|
|
static inline void acpi_gpiochip_remove(struct gpio_chip *chip) { }
|
|
|
|
static inline struct gpio_desc *
|
|
acpi_get_gpiod_by_index(struct device *dev, int index,
|
|
struct acpi_gpio_info *info)
|
|
{
|
|
return ERR_PTR(-ENOSYS);
|
|
}
|
|
#endif
|
|
|
|
#endif /* GPIOLIB_H */
|