Linux Kernel
3.7.1
|
#include <linux/kernel.h>
#include <linux/export.h>
#include <linux/init.h>
#include <linux/device.h>
#include <linux/slab.h>
#include <linux/err.h>
#include <linux/list.h>
#include <linux/sysfs.h>
#include <linux/debugfs.h>
#include <linux/seq_file.h>
#include <linux/pinctrl/consumer.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/machine.h>
#include "core.h"
#include "devicetree.h"
#include "pinmux.h"
#include "pinconf.h"
Go to the source code of this file.
Data Structures | |
struct | pinctrl_maps |
Macros | |
#define | pr_fmt(fmt) "pinctrl core: " fmt |
#define | for_each_maps(_maps_node_, _i_, _map_) |
#define for_each_maps | ( | _maps_node_, | |
_i_, | |||
_map_ | |||
) |
core_initcall | ( | pinctrl_init | ) |
DEFINE_MUTEX | ( | pinctrl_mutex | ) |
struct devm_pinctrl_get() - Resource managed pinctrl_get() : the device to obtain the handle for
If there is a need to explicitly destroy the returned struct pinctrl, devm_pinctrl_put() should be used, rather than plain pinctrl_put().
devm_pinctrl_put() - Resource managed pinctrl_put() : the pinctrl handle to release
Deallocate a struct pinctrl obtained via devm_pinctrl_get(). Normally this function will not need to be called and the resource management code will ensure that the resource is freed.
EXPORT_SYMBOL_GPL | ( | pinctrl_dev_get_name | ) |
EXPORT_SYMBOL_GPL | ( | pinctrl_dev_get_drvdata | ) |
EXPORT_SYMBOL_GPL | ( | pin_is_valid | ) |
EXPORT_SYMBOL_GPL | ( | pinctrl_add_gpio_range | ) |
EXPORT_SYMBOL_GPL | ( | pinctrl_add_gpio_ranges | ) |
EXPORT_SYMBOL_GPL | ( | pinctrl_request_gpio | ) |
EXPORT_SYMBOL_GPL | ( | pinctrl_free_gpio | ) |
EXPORT_SYMBOL_GPL | ( | pinctrl_gpio_direction_input | ) |
EXPORT_SYMBOL_GPL | ( | pinctrl_gpio_direction_output | ) |
EXPORT_SYMBOL_GPL | ( | pinctrl_get | ) |
EXPORT_SYMBOL_GPL | ( | pinctrl_put | ) |
EXPORT_SYMBOL_GPL | ( | pinctrl_lookup_state | ) |
EXPORT_SYMBOL_GPL | ( | pinctrl_select_state | ) |
EXPORT_SYMBOL_GPL | ( | devm_pinctrl_get | ) |
EXPORT_SYMBOL_GPL | ( | devm_pinctrl_put | ) |
EXPORT_SYMBOL_GPL | ( | pinctrl_register | ) |
EXPORT_SYMBOL_GPL | ( | pinctrl_unregister | ) |
|
read |
LIST_HEAD | ( | pinctrldev_list | ) |
int pin_get_from_name | ( | struct pinctrl_dev * | pctldev, |
const char * | name | ||
) |
const char* pin_get_name | ( | struct pinctrl_dev * | pctldev, |
const unsigned | pin | ||
) |
bool pin_is_valid | ( | struct pinctrl_dev * | pctldev, |
int | pin | ||
) |
pin_is_valid() - check if pin exists on controller : the pin control device to check the pin on : pin to check, use the local pin controller index number
This tells us whether a certain pin exist on a certain pin controller or not. Pin lists may be sparse, so some pins may not exist.
void pinctrl_add_gpio_range | ( | struct pinctrl_dev * | pctldev, |
struct pinctrl_gpio_range * | range | ||
) |
pinctrl_add_gpio_range() - register a GPIO range for a controller : pin controller device to add the range to : the GPIO range to add
This adds a range of GPIOs to be handled by a certain pin controller. Call this to register handled ranges after registering your pin controller.
void pinctrl_add_gpio_ranges | ( | struct pinctrl_dev * | pctldev, |
struct pinctrl_gpio_range * | ranges, | ||
unsigned | nranges | ||
) |
void* pinctrl_dev_get_drvdata | ( | struct pinctrl_dev * | pctldev | ) |
const char* pinctrl_dev_get_name | ( | struct pinctrl_dev * | pctldev | ) |
void pinctrl_free_gpio | ( | unsigned | gpio | ) |
pinctrl_free_gpio() - free control on a single pin, currently used as GPIO : the GPIO pin number from the GPIO subsystem number space
This function should ONLY be used from gpiolib-based GPIO drivers, as part of their gpio_free() semantics, platforms and individual drivers shall NOT request GPIO pins to be muxed out.
int pinctrl_get_group_selector | ( | struct pinctrl_dev * | pctldev, |
const char * | pin_group | ||
) |
int pinctrl_gpio_direction_input | ( | unsigned | gpio | ) |
pinctrl_gpio_direction_input() - request a GPIO pin to go into input mode : the GPIO pin number from the GPIO subsystem number space
This function should ONLY be used from gpiolib-based GPIO drivers, as part of their gpio_direction_input() semantics, platforms and individual drivers shall NOT touch pin control GPIO calls.
int pinctrl_gpio_direction_output | ( | unsigned | gpio | ) |
pinctrl_gpio_direction_output() - request a GPIO pin to go into output mode : the GPIO pin number from the GPIO subsystem number space
This function should ONLY be used from gpiolib-based GPIO drivers, as part of their gpio_direction_output() semantics, platforms and individual drivers shall NOT touch pin control GPIO calls.
pinctrl_provide_dummies() - indicate if pinctrl provides dummy state support
Usually this function is called by platforms without pinctrl driver support but run with some shared drivers using pinctrl APIs. After calling this function, the pinctrl core will return successfully with creating a dummy state for the driver to keep going smoothly.
pinctrl_put() - release a previously claimed pinctrl handle : the pinctrl handle to release
|
read |
pinctrl_register() - register a pin controller device : descriptor for this pin controller : parent device for this pin controller : private pin controller data for this pin controller
int pinctrl_register_mappings | ( | struct pinctrl_map const * | maps, |
unsigned | num_maps | ||
) |
pinctrl_register_mappings() - register a set of pin controller mappings : the pincontrol mappings table to register. This should probably be marked with __initdata so it can be discarded after boot. This function will perform a shallow copy for the mapping entries. : the number of maps in the mapping table
int pinctrl_request_gpio | ( | unsigned | gpio | ) |
pinctrl_request_gpio() - request a single pin to be used in as GPIO : the GPIO pin number from the GPIO subsystem number space
This function should ONLY be used from gpiolib-based GPIO drivers, as part of their gpio_request() semantics, platforms and individual drivers shall NOT request GPIO pins to be muxed in.
int pinctrl_select_state | ( | struct pinctrl * | p, |
struct pinctrl_state * | state | ||
) |
void pinctrl_unregister | ( | struct pinctrl_dev * | pctldev | ) |
pinctrl_unregister() - unregister pinmux : pin controller to unregister
Called by pinmux drivers to unregister a pinmux.