![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0-only */ 0002 /* 0003 * Per-device information from the pin control system. 0004 * This is the stuff that get included into the device 0005 * core. 0006 * 0007 * Copyright (C) 2012 ST-Ericsson SA 0008 * Written on behalf of Linaro for ST-Ericsson 0009 * This interface is used in the core to keep track of pins. 0010 * 0011 * Author: Linus Walleij <linus.walleij@linaro.org> 0012 */ 0013 0014 #ifndef PINCTRL_DEVINFO_H 0015 #define PINCTRL_DEVINFO_H 0016 0017 #ifdef CONFIG_PINCTRL 0018 0019 /* The device core acts as a consumer toward pinctrl */ 0020 #include <linux/pinctrl/consumer.h> 0021 0022 /** 0023 * struct dev_pin_info - pin state container for devices 0024 * @p: pinctrl handle for the containing device 0025 * @default_state: the default state for the handle, if found 0026 * @init_state: the state at probe time, if found 0027 * @sleep_state: the state at suspend time, if found 0028 * @idle_state: the state at idle (runtime suspend) time, if found 0029 */ 0030 struct dev_pin_info { 0031 struct pinctrl *p; 0032 struct pinctrl_state *default_state; 0033 struct pinctrl_state *init_state; 0034 #ifdef CONFIG_PM 0035 struct pinctrl_state *sleep_state; 0036 struct pinctrl_state *idle_state; 0037 #endif 0038 }; 0039 0040 extern int pinctrl_bind_pins(struct device *dev); 0041 extern int pinctrl_init_done(struct device *dev); 0042 0043 #else 0044 0045 struct device; 0046 0047 /* Stubs if we're not using pinctrl */ 0048 0049 static inline int pinctrl_bind_pins(struct device *dev) 0050 { 0051 return 0; 0052 } 0053 0054 static inline int pinctrl_init_done(struct device *dev) 0055 { 0056 return 0; 0057 } 0058 0059 #endif /* CONFIG_PINCTRL */ 0060 #endif /* PINCTRL_DEVINFO_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |