intel_pstate: Set turbo VID for BayTrail
[deliverable/linux.git] / drivers / gpio / gpiolib.h
CommitLineData
664e3e5a
MW
1/*
2 * Internal GPIO functions.
3 *
4 * Copyright (C) 2013, Intel Corporation
5 * Author: Mika Westerberg <mika.westerberg@linux.intel.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#ifndef GPIOLIB_H
13#define GPIOLIB_H
14
5ccff852
MW
15#include <linux/err.h>
16#include <linux/device.h>
17
18/**
19 * struct acpi_gpio_info - ACPI GPIO specific information
20 * @gpioint: if %true this GPIO is of type GpioInt otherwise type is GpioIo
21 * @active_low: in case of @gpioint, the pin is active low
22 */
23struct acpi_gpio_info {
24 bool gpioint;
25 bool active_low;
26};
27
664e3e5a
MW
28#ifdef CONFIG_ACPI
29void acpi_gpiochip_add(struct gpio_chip *chip);
30void acpi_gpiochip_remove(struct gpio_chip *chip);
5ccff852
MW
31
32struct gpio_desc *acpi_get_gpiod_by_index(struct device *dev, int index,
33 struct acpi_gpio_info *info);
664e3e5a
MW
34#else
35static inline void acpi_gpiochip_add(struct gpio_chip *chip) { }
36static inline void acpi_gpiochip_remove(struct gpio_chip *chip) { }
5ccff852
MW
37
38static inline struct gpio_desc *
39acpi_get_gpiod_by_index(struct device *dev, int index,
40 struct acpi_gpio_info *info)
41{
42 return ERR_PTR(-ENOSYS);
43}
664e3e5a
MW
44#endif
45
77c2d792
MW
46int gpiochip_request_own_desc(struct gpio_desc *desc, const char *label);
47void gpiochip_free_own_desc(struct gpio_desc *desc);
48
664e3e5a 49#endif /* GPIOLIB_H */
This page took 0.04418 seconds and 5 git commands to generate.