Commit 7cc4e6b0 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Linus Walleij

pinctrl: Convert unsigned to unsigned int

Simple type conversion with no functional change implied.
While at it, adjust indentation where it makes sense.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20231129161459.1002323-24-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 26ea8229
...@@ -143,7 +143,7 @@ struct pinctrl_dev *get_pinctrl_dev_from_of_node(struct device_node *np) ...@@ -143,7 +143,7 @@ struct pinctrl_dev *get_pinctrl_dev_from_of_node(struct device_node *np)
*/ */
int pin_get_from_name(struct pinctrl_dev *pctldev, const char *name) int pin_get_from_name(struct pinctrl_dev *pctldev, const char *name)
{ {
unsigned i, pin; unsigned int i, pin;
/* The pin number can be retrived from the pin controller descriptor */ /* The pin number can be retrived from the pin controller descriptor */
for (i = 0; i < pctldev->desc->npins; i++) { for (i = 0; i < pctldev->desc->npins; i++) {
...@@ -164,7 +164,7 @@ int pin_get_from_name(struct pinctrl_dev *pctldev, const char *name) ...@@ -164,7 +164,7 @@ int pin_get_from_name(struct pinctrl_dev *pctldev, const char *name)
* @pctldev: the pin control device to lookup the pin on * @pctldev: the pin control device to lookup the pin on
* @pin: pin number/id to look up * @pin: pin number/id to look up
*/ */
const char *pin_get_name(struct pinctrl_dev *pctldev, const unsigned pin) const char *pin_get_name(struct pinctrl_dev *pctldev, const unsigned int pin)
{ {
const struct pin_desc *desc; const struct pin_desc *desc;
...@@ -182,7 +182,7 @@ EXPORT_SYMBOL_GPL(pin_get_name); ...@@ -182,7 +182,7 @@ EXPORT_SYMBOL_GPL(pin_get_name);
/* Deletes a range of pin descriptors */ /* Deletes a range of pin descriptors */
static void pinctrl_free_pindescs(struct pinctrl_dev *pctldev, static void pinctrl_free_pindescs(struct pinctrl_dev *pctldev,
const struct pinctrl_pin_desc *pins, const struct pinctrl_pin_desc *pins,
unsigned num_pins) unsigned int num_pins)
{ {
int i; int i;
...@@ -250,9 +250,9 @@ static int pinctrl_register_one_pin(struct pinctrl_dev *pctldev, ...@@ -250,9 +250,9 @@ static int pinctrl_register_one_pin(struct pinctrl_dev *pctldev,
static int pinctrl_register_pins(struct pinctrl_dev *pctldev, static int pinctrl_register_pins(struct pinctrl_dev *pctldev,
const struct pinctrl_pin_desc *pins, const struct pinctrl_pin_desc *pins,
unsigned num_descs) unsigned int num_descs)
{ {
unsigned i; unsigned int i;
int ret = 0; int ret = 0;
for (i = 0; i < num_descs; i++) { for (i = 0; i < num_descs; i++) {
...@@ -426,7 +426,7 @@ EXPORT_SYMBOL_GPL(pinctrl_add_gpio_range); ...@@ -426,7 +426,7 @@ EXPORT_SYMBOL_GPL(pinctrl_add_gpio_range);
void pinctrl_add_gpio_ranges(struct pinctrl_dev *pctldev, void pinctrl_add_gpio_ranges(struct pinctrl_dev *pctldev,
struct pinctrl_gpio_range *ranges, struct pinctrl_gpio_range *ranges,
unsigned nranges) unsigned int nranges)
{ {
int i; int i;
...@@ -457,7 +457,7 @@ struct pinctrl_dev *pinctrl_find_and_add_gpio_range(const char *devname, ...@@ -457,7 +457,7 @@ struct pinctrl_dev *pinctrl_find_and_add_gpio_range(const char *devname,
EXPORT_SYMBOL_GPL(pinctrl_find_and_add_gpio_range); EXPORT_SYMBOL_GPL(pinctrl_find_and_add_gpio_range);
int pinctrl_get_group_pins(struct pinctrl_dev *pctldev, const char *pin_group, int pinctrl_get_group_pins(struct pinctrl_dev *pctldev, const char *pin_group,
const unsigned **pins, unsigned *num_pins) const unsigned int **pins, unsigned int *num_pins)
{ {
const struct pinctrl_ops *pctlops = pctldev->desc->pctlops; const struct pinctrl_ops *pctlops = pctldev->desc->pctlops;
int gs; int gs;
...@@ -732,8 +732,8 @@ int pinctrl_get_group_selector(struct pinctrl_dev *pctldev, ...@@ -732,8 +732,8 @@ int pinctrl_get_group_selector(struct pinctrl_dev *pctldev,
const char *pin_group) const char *pin_group)
{ {
const struct pinctrl_ops *pctlops = pctldev->desc->pctlops; const struct pinctrl_ops *pctlops = pctldev->desc->pctlops;
unsigned ngroups = pctlops->get_groups_count(pctldev); unsigned int ngroups = pctlops->get_groups_count(pctldev);
unsigned group_selector = 0; unsigned int group_selector = 0;
while (group_selector < ngroups) { while (group_selector < ngroups) {
const char *gname = pctlops->get_group_name(pctldev, const char *gname = pctlops->get_group_name(pctldev,
...@@ -1430,7 +1430,7 @@ EXPORT_SYMBOL_GPL(devm_pinctrl_put); ...@@ -1430,7 +1430,7 @@ EXPORT_SYMBOL_GPL(devm_pinctrl_put);
* @num_maps: the number of maps in the mapping table * @num_maps: the number of maps in the mapping table
*/ */
int pinctrl_register_mappings(const struct pinctrl_map *maps, int pinctrl_register_mappings(const struct pinctrl_map *maps,
unsigned num_maps) unsigned int num_maps)
{ {
int i, ret; int i, ret;
struct pinctrl_maps *maps_node; struct pinctrl_maps *maps_node;
...@@ -1645,7 +1645,7 @@ static int pinctrl_pins_show(struct seq_file *s, void *what) ...@@ -1645,7 +1645,7 @@ static int pinctrl_pins_show(struct seq_file *s, void *what)
{ {
struct pinctrl_dev *pctldev = s->private; struct pinctrl_dev *pctldev = s->private;
const struct pinctrl_ops *ops = pctldev->desc->pctlops; const struct pinctrl_ops *ops = pctldev->desc->pctlops;
unsigned i, pin; unsigned int i, pin;
#ifdef CONFIG_GPIOLIB #ifdef CONFIG_GPIOLIB
struct gpio_device *gdev __free(gpio_device_put) = NULL; struct gpio_device *gdev __free(gpio_device_put) = NULL;
struct pinctrl_gpio_range *range; struct pinctrl_gpio_range *range;
...@@ -1709,7 +1709,7 @@ static int pinctrl_groups_show(struct seq_file *s, void *what) ...@@ -1709,7 +1709,7 @@ static int pinctrl_groups_show(struct seq_file *s, void *what)
{ {
struct pinctrl_dev *pctldev = s->private; struct pinctrl_dev *pctldev = s->private;
const struct pinctrl_ops *ops = pctldev->desc->pctlops; const struct pinctrl_ops *ops = pctldev->desc->pctlops;
unsigned ngroups, selector = 0; unsigned int ngroups, selector = 0;
mutex_lock(&pctldev->mutex); mutex_lock(&pctldev->mutex);
...@@ -1717,8 +1717,8 @@ static int pinctrl_groups_show(struct seq_file *s, void *what) ...@@ -1717,8 +1717,8 @@ static int pinctrl_groups_show(struct seq_file *s, void *what)
seq_puts(s, "registered pin groups:\n"); seq_puts(s, "registered pin groups:\n");
while (selector < ngroups) { while (selector < ngroups) {
const unsigned *pins = NULL; const unsigned int *pins = NULL;
unsigned num_pins = 0; unsigned int num_pins = 0;
const char *gname = ops->get_group_name(pctldev, selector); const char *gname = ops->get_group_name(pctldev, selector);
const char *pname; const char *pname;
int ret = 0; int ret = 0;
......
...@@ -111,8 +111,8 @@ struct pinctrl_state { ...@@ -111,8 +111,8 @@ struct pinctrl_state {
* @func: the function selector to program * @func: the function selector to program
*/ */
struct pinctrl_setting_mux { struct pinctrl_setting_mux {
unsigned group; unsigned int group;
unsigned func; unsigned int func;
}; };
/** /**
...@@ -124,9 +124,9 @@ struct pinctrl_setting_mux { ...@@ -124,9 +124,9 @@ struct pinctrl_setting_mux {
* @num_configs: the number of entries in array @configs * @num_configs: the number of entries in array @configs
*/ */
struct pinctrl_setting_configs { struct pinctrl_setting_configs {
unsigned group_or_pin; unsigned int group_or_pin;
unsigned long *configs; unsigned long *configs;
unsigned num_configs; unsigned int num_configs;
}; };
/** /**
...@@ -173,7 +173,7 @@ struct pin_desc { ...@@ -173,7 +173,7 @@ struct pin_desc {
void *drv_data; void *drv_data;
/* These fields only added when supporting pinmux drivers */ /* These fields only added when supporting pinmux drivers */
#ifdef CONFIG_PINMUX #ifdef CONFIG_PINMUX
unsigned mux_usecount; unsigned int mux_usecount;
const char *mux_owner; const char *mux_owner;
const struct pinctrl_setting_mux *mux_setting; const struct pinctrl_setting_mux *mux_setting;
const char *gpio_owner; const char *gpio_owner;
...@@ -189,7 +189,7 @@ struct pin_desc { ...@@ -189,7 +189,7 @@ struct pin_desc {
struct pinctrl_maps { struct pinctrl_maps {
struct list_head node; struct list_head node;
const struct pinctrl_map *maps; const struct pinctrl_map *maps;
unsigned num_maps; unsigned int num_maps;
}; };
#ifdef CONFIG_GENERIC_PINCTRL_GROUPS #ifdef CONFIG_GENERIC_PINCTRL_GROUPS
...@@ -232,7 +232,7 @@ int pinctrl_generic_remove_group(struct pinctrl_dev *pctldev, ...@@ -232,7 +232,7 @@ int pinctrl_generic_remove_group(struct pinctrl_dev *pctldev,
struct pinctrl_dev *get_pinctrl_dev_from_devname(const char *dev_name); struct pinctrl_dev *get_pinctrl_dev_from_devname(const char *dev_name);
struct pinctrl_dev *get_pinctrl_dev_from_of_node(struct device_node *np); struct pinctrl_dev *get_pinctrl_dev_from_of_node(struct device_node *np);
int pin_get_from_name(struct pinctrl_dev *pctldev, const char *name); int pin_get_from_name(struct pinctrl_dev *pctldev, const char *name);
const char *pin_get_name(struct pinctrl_dev *pctldev, const unsigned pin); const char *pin_get_name(struct pinctrl_dev *pctldev, const unsigned int pin);
int pinctrl_get_group_selector(struct pinctrl_dev *pctldev, int pinctrl_get_group_selector(struct pinctrl_dev *pctldev,
const char *pin_group); const char *pin_group);
......
...@@ -24,11 +24,11 @@ struct pinctrl_dt_map { ...@@ -24,11 +24,11 @@ struct pinctrl_dt_map {
struct list_head node; struct list_head node;
struct pinctrl_dev *pctldev; struct pinctrl_dev *pctldev;
struct pinctrl_map *map; struct pinctrl_map *map;
unsigned num_maps; unsigned int num_maps;
}; };
static void dt_free_map(struct pinctrl_dev *pctldev, static void dt_free_map(struct pinctrl_dev *pctldev,
struct pinctrl_map *map, unsigned num_maps) struct pinctrl_map *map, unsigned int num_maps)
{ {
int i; int i;
...@@ -64,7 +64,7 @@ void pinctrl_dt_free_maps(struct pinctrl *p) ...@@ -64,7 +64,7 @@ void pinctrl_dt_free_maps(struct pinctrl *p)
static int dt_remember_or_free_map(struct pinctrl *p, const char *statename, static int dt_remember_or_free_map(struct pinctrl *p, const char *statename,
struct pinctrl_dev *pctldev, struct pinctrl_dev *pctldev,
struct pinctrl_map *map, unsigned num_maps) struct pinctrl_map *map, unsigned int num_maps)
{ {
int i; int i;
struct pinctrl_dt_map *dt_map; struct pinctrl_dt_map *dt_map;
...@@ -116,7 +116,7 @@ static int dt_to_map_one_config(struct pinctrl *p, ...@@ -116,7 +116,7 @@ static int dt_to_map_one_config(struct pinctrl *p,
const struct pinctrl_ops *ops; const struct pinctrl_ops *ops;
int ret; int ret;
struct pinctrl_map *map; struct pinctrl_map *map;
unsigned num_maps; unsigned int num_maps;
bool allow_default = false; bool allow_default = false;
/* Find the pin controller containing np_config */ /* Find the pin controller containing np_config */
......
...@@ -57,7 +57,7 @@ static const struct pin_config_item conf_items[] = { ...@@ -57,7 +57,7 @@ static const struct pin_config_item conf_items[] = {
static void pinconf_generic_dump_one(struct pinctrl_dev *pctldev, static void pinconf_generic_dump_one(struct pinctrl_dev *pctldev,
struct seq_file *s, const char *gname, struct seq_file *s, const char *gname,
unsigned pin, unsigned int pin,
const struct pin_config_item *items, const struct pin_config_item *items,
int nitems, int *print_sep) int nitems, int *print_sep)
{ {
...@@ -110,7 +110,7 @@ static void pinconf_generic_dump_one(struct pinctrl_dev *pctldev, ...@@ -110,7 +110,7 @@ static void pinconf_generic_dump_one(struct pinctrl_dev *pctldev,
* to be specified the other can be NULL/0. * to be specified the other can be NULL/0.
*/ */
void pinconf_generic_dump_pins(struct pinctrl_dev *pctldev, struct seq_file *s, void pinconf_generic_dump_pins(struct pinctrl_dev *pctldev, struct seq_file *s,
const char *gname, unsigned pin) const char *gname, unsigned int pin)
{ {
const struct pinconf_ops *ops = pctldev->desc->confops; const struct pinconf_ops *ops = pctldev->desc->confops;
int print_sep = 0; int print_sep = 0;
...@@ -295,15 +295,15 @@ EXPORT_SYMBOL_GPL(pinconf_generic_parse_dt_config); ...@@ -295,15 +295,15 @@ EXPORT_SYMBOL_GPL(pinconf_generic_parse_dt_config);
int pinconf_generic_dt_subnode_to_map(struct pinctrl_dev *pctldev, int pinconf_generic_dt_subnode_to_map(struct pinctrl_dev *pctldev,
struct device_node *np, struct pinctrl_map **map, struct device_node *np, struct pinctrl_map **map,
unsigned *reserved_maps, unsigned *num_maps, unsigned int *reserved_maps, unsigned int *num_maps,
enum pinctrl_map_type type) enum pinctrl_map_type type)
{ {
int ret; int ret;
const char *function; const char *function;
struct device *dev = pctldev->dev; struct device *dev = pctldev->dev;
unsigned long *configs = NULL; unsigned long *configs = NULL;
unsigned num_configs = 0; unsigned int num_configs = 0;
unsigned reserve, strings_count; unsigned int reserve, strings_count;
struct property *prop; struct property *prop;
const char *group; const char *group;
const char *subnode_target_type = "pins"; const char *subnode_target_type = "pins";
...@@ -379,9 +379,9 @@ EXPORT_SYMBOL_GPL(pinconf_generic_dt_subnode_to_map); ...@@ -379,9 +379,9 @@ EXPORT_SYMBOL_GPL(pinconf_generic_dt_subnode_to_map);
int pinconf_generic_dt_node_to_map(struct pinctrl_dev *pctldev, int pinconf_generic_dt_node_to_map(struct pinctrl_dev *pctldev,
struct device_node *np_config, struct pinctrl_map **map, struct device_node *np_config, struct pinctrl_map **map,
unsigned *num_maps, enum pinctrl_map_type type) unsigned int *num_maps, enum pinctrl_map_type type)
{ {
unsigned reserved_maps; unsigned int reserved_maps;
struct device_node *np; struct device_node *np;
int ret; int ret;
...@@ -412,7 +412,7 @@ EXPORT_SYMBOL_GPL(pinconf_generic_dt_node_to_map); ...@@ -412,7 +412,7 @@ EXPORT_SYMBOL_GPL(pinconf_generic_dt_node_to_map);
void pinconf_generic_dt_free_map(struct pinctrl_dev *pctldev, void pinconf_generic_dt_free_map(struct pinctrl_dev *pctldev,
struct pinctrl_map *map, struct pinctrl_map *map,
unsigned num_maps) unsigned int num_maps)
{ {
pinctrl_utils_free_map(pctldev, map, num_maps); pinctrl_utils_free_map(pctldev, map, num_maps);
} }
......
...@@ -55,7 +55,7 @@ int pinconf_validate_map(const struct pinctrl_map *map, int i) ...@@ -55,7 +55,7 @@ int pinconf_validate_map(const struct pinctrl_map *map, int i)
return 0; return 0;
} }
int pin_config_get_for_pin(struct pinctrl_dev *pctldev, unsigned pin, int pin_config_get_for_pin(struct pinctrl_dev *pctldev, unsigned int pin,
unsigned long *config) unsigned long *config)
{ {
const struct pinconf_ops *ops = pctldev->desc->confops; const struct pinconf_ops *ops = pctldev->desc->confops;
...@@ -199,7 +199,7 @@ int pinconf_apply_setting(const struct pinctrl_setting *setting) ...@@ -199,7 +199,7 @@ int pinconf_apply_setting(const struct pinctrl_setting *setting)
return 0; return 0;
} }
int pinconf_set_config(struct pinctrl_dev *pctldev, unsigned pin, int pinconf_set_config(struct pinctrl_dev *pctldev, unsigned int pin,
unsigned long *configs, size_t nconfigs) unsigned long *configs, size_t nconfigs)
{ {
const struct pinconf_ops *ops; const struct pinconf_ops *ops;
...@@ -214,7 +214,7 @@ int pinconf_set_config(struct pinctrl_dev *pctldev, unsigned pin, ...@@ -214,7 +214,7 @@ int pinconf_set_config(struct pinctrl_dev *pctldev, unsigned pin,
#ifdef CONFIG_DEBUG_FS #ifdef CONFIG_DEBUG_FS
static void pinconf_show_config(struct seq_file *s, struct pinctrl_dev *pctldev, static void pinconf_show_config(struct seq_file *s, struct pinctrl_dev *pctldev,
unsigned long *configs, unsigned num_configs) unsigned long *configs, unsigned int num_configs)
{ {
const struct pinconf_ops *confops; const struct pinconf_ops *confops;
int i; int i;
...@@ -304,7 +304,7 @@ static void pinconf_dump_pin(struct pinctrl_dev *pctldev, ...@@ -304,7 +304,7 @@ static void pinconf_dump_pin(struct pinctrl_dev *pctldev,
static int pinconf_pins_show(struct seq_file *s, void *what) static int pinconf_pins_show(struct seq_file *s, void *what)
{ {
struct pinctrl_dev *pctldev = s->private; struct pinctrl_dev *pctldev = s->private;
unsigned i, pin; unsigned int i, pin;
seq_puts(s, "Pin config settings per pin\n"); seq_puts(s, "Pin config settings per pin\n");
seq_puts(s, "Format: pin (name): configs\n"); seq_puts(s, "Format: pin (name): configs\n");
...@@ -333,7 +333,7 @@ static int pinconf_pins_show(struct seq_file *s, void *what) ...@@ -333,7 +333,7 @@ static int pinconf_pins_show(struct seq_file *s, void *what)
} }
static void pinconf_dump_group(struct pinctrl_dev *pctldev, static void pinconf_dump_group(struct pinctrl_dev *pctldev,
struct seq_file *s, unsigned selector, struct seq_file *s, unsigned int selector,
const char *gname) const char *gname)
{ {
const struct pinconf_ops *ops = pctldev->desc->confops; const struct pinconf_ops *ops = pctldev->desc->confops;
...@@ -348,8 +348,8 @@ static int pinconf_groups_show(struct seq_file *s, void *what) ...@@ -348,8 +348,8 @@ static int pinconf_groups_show(struct seq_file *s, void *what)
{ {
struct pinctrl_dev *pctldev = s->private; struct pinctrl_dev *pctldev = s->private;
const struct pinctrl_ops *pctlops = pctldev->desc->pctlops; const struct pinctrl_ops *pctlops = pctldev->desc->pctlops;
unsigned ngroups = pctlops->get_groups_count(pctldev); unsigned int ngroups = pctlops->get_groups_count(pctldev);
unsigned selector = 0; unsigned int selector = 0;
seq_puts(s, "Pin config settings per pin group\n"); seq_puts(s, "Pin config settings per pin group\n");
seq_puts(s, "Format: group (name): configs\n"); seq_puts(s, "Format: group (name): configs\n");
......
...@@ -29,14 +29,14 @@ int pinconf_map_to_setting(const struct pinctrl_map *map, ...@@ -29,14 +29,14 @@ int pinconf_map_to_setting(const struct pinctrl_map *map,
void pinconf_free_setting(const struct pinctrl_setting *setting); void pinconf_free_setting(const struct pinctrl_setting *setting);
int pinconf_apply_setting(const struct pinctrl_setting *setting); int pinconf_apply_setting(const struct pinctrl_setting *setting);
int pinconf_set_config(struct pinctrl_dev *pctldev, unsigned pin, int pinconf_set_config(struct pinctrl_dev *pctldev, unsigned int pin,
unsigned long *configs, size_t nconfigs); unsigned long *configs, size_t nconfigs);
/* /*
* You will only be interested in these if you're using PINCONF * You will only be interested in these if you're using PINCONF
* so don't supply any stubs for these. * so don't supply any stubs for these.
*/ */
int pin_config_get_for_pin(struct pinctrl_dev *pctldev, unsigned pin, int pin_config_get_for_pin(struct pinctrl_dev *pctldev, unsigned int pin,
unsigned long *config); unsigned long *config);
int pin_config_group_get(const char *dev_name, const char *pin_group, int pin_config_group_get(const char *dev_name, const char *pin_group,
unsigned long *config); unsigned long *config);
...@@ -68,7 +68,7 @@ static inline int pinconf_apply_setting(const struct pinctrl_setting *setting) ...@@ -68,7 +68,7 @@ static inline int pinconf_apply_setting(const struct pinctrl_setting *setting)
return 0; return 0;
} }
static inline int pinconf_set_config(struct pinctrl_dev *pctldev, unsigned pin, static inline int pinconf_set_config(struct pinctrl_dev *pctldev, unsigned int pin,
unsigned long *configs, size_t nconfigs) unsigned long *configs, size_t nconfigs)
{ {
return -ENOTSUPP; return -ENOTSUPP;
...@@ -112,7 +112,7 @@ static inline void pinconf_init_device_debugfs(struct dentry *devroot, ...@@ -112,7 +112,7 @@ static inline void pinconf_init_device_debugfs(struct dentry *devroot,
void pinconf_generic_dump_pins(struct pinctrl_dev *pctldev, void pinconf_generic_dump_pins(struct pinctrl_dev *pctldev,
struct seq_file *s, const char *gname, struct seq_file *s, const char *gname,
unsigned pin); unsigned int pin);
void pinconf_generic_dump_config(struct pinctrl_dev *pctldev, void pinconf_generic_dump_config(struct pinctrl_dev *pctldev,
struct seq_file *s, unsigned long config); struct seq_file *s, unsigned long config);
...@@ -120,7 +120,7 @@ void pinconf_generic_dump_config(struct pinctrl_dev *pctldev, ...@@ -120,7 +120,7 @@ void pinconf_generic_dump_config(struct pinctrl_dev *pctldev,
static inline void pinconf_generic_dump_pins(struct pinctrl_dev *pctldev, static inline void pinconf_generic_dump_pins(struct pinctrl_dev *pctldev,
struct seq_file *s, struct seq_file *s,
const char *gname, unsigned pin) const char *gname, unsigned int pin)
{ {
return; return;
} }
......
...@@ -18,11 +18,11 @@ ...@@ -18,11 +18,11 @@
#include "pinctrl-utils.h" #include "pinctrl-utils.h"
int pinctrl_utils_reserve_map(struct pinctrl_dev *pctldev, int pinctrl_utils_reserve_map(struct pinctrl_dev *pctldev,
struct pinctrl_map **map, unsigned *reserved_maps, struct pinctrl_map **map, unsigned int *reserved_maps,
unsigned *num_maps, unsigned reserve) unsigned int *num_maps, unsigned int reserve)
{ {
unsigned old_num = *reserved_maps; unsigned int old_num = *reserved_maps;
unsigned new_num = *num_maps + reserve; unsigned int new_num = *num_maps + reserve;
struct pinctrl_map *new_map; struct pinctrl_map *new_map;
if (old_num >= new_num) if (old_num >= new_num)
...@@ -43,8 +43,8 @@ int pinctrl_utils_reserve_map(struct pinctrl_dev *pctldev, ...@@ -43,8 +43,8 @@ int pinctrl_utils_reserve_map(struct pinctrl_dev *pctldev,
EXPORT_SYMBOL_GPL(pinctrl_utils_reserve_map); EXPORT_SYMBOL_GPL(pinctrl_utils_reserve_map);
int pinctrl_utils_add_map_mux(struct pinctrl_dev *pctldev, int pinctrl_utils_add_map_mux(struct pinctrl_dev *pctldev,
struct pinctrl_map **map, unsigned *reserved_maps, struct pinctrl_map **map, unsigned int *reserved_maps,
unsigned *num_maps, const char *group, unsigned int *num_maps, const char *group,
const char *function) const char *function)
{ {
if (WARN_ON(*num_maps == *reserved_maps)) if (WARN_ON(*num_maps == *reserved_maps))
...@@ -60,9 +60,9 @@ int pinctrl_utils_add_map_mux(struct pinctrl_dev *pctldev, ...@@ -60,9 +60,9 @@ int pinctrl_utils_add_map_mux(struct pinctrl_dev *pctldev,
EXPORT_SYMBOL_GPL(pinctrl_utils_add_map_mux); EXPORT_SYMBOL_GPL(pinctrl_utils_add_map_mux);
int pinctrl_utils_add_map_configs(struct pinctrl_dev *pctldev, int pinctrl_utils_add_map_configs(struct pinctrl_dev *pctldev,
struct pinctrl_map **map, unsigned *reserved_maps, struct pinctrl_map **map, unsigned int *reserved_maps,
unsigned *num_maps, const char *group, unsigned int *num_maps, const char *group,
unsigned long *configs, unsigned num_configs, unsigned long *configs, unsigned int num_configs,
enum pinctrl_map_type type) enum pinctrl_map_type type)
{ {
unsigned long *dup_configs; unsigned long *dup_configs;
...@@ -86,11 +86,11 @@ int pinctrl_utils_add_map_configs(struct pinctrl_dev *pctldev, ...@@ -86,11 +86,11 @@ int pinctrl_utils_add_map_configs(struct pinctrl_dev *pctldev,
EXPORT_SYMBOL_GPL(pinctrl_utils_add_map_configs); EXPORT_SYMBOL_GPL(pinctrl_utils_add_map_configs);
int pinctrl_utils_add_config(struct pinctrl_dev *pctldev, int pinctrl_utils_add_config(struct pinctrl_dev *pctldev,
unsigned long **configs, unsigned *num_configs, unsigned long **configs, unsigned int *num_configs,
unsigned long config) unsigned long config)
{ {
unsigned old_num = *num_configs; unsigned int old_num = *num_configs;
unsigned new_num = old_num + 1; unsigned int new_num = old_num + 1;
unsigned long *new_configs; unsigned long *new_configs;
new_configs = krealloc(*configs, sizeof(*new_configs) * new_num, new_configs = krealloc(*configs, sizeof(*new_configs) * new_num,
...@@ -110,7 +110,7 @@ int pinctrl_utils_add_config(struct pinctrl_dev *pctldev, ...@@ -110,7 +110,7 @@ int pinctrl_utils_add_config(struct pinctrl_dev *pctldev,
EXPORT_SYMBOL_GPL(pinctrl_utils_add_config); EXPORT_SYMBOL_GPL(pinctrl_utils_add_config);
void pinctrl_utils_free_map(struct pinctrl_dev *pctldev, void pinctrl_utils_free_map(struct pinctrl_dev *pctldev,
struct pinctrl_map *map, unsigned num_maps) struct pinctrl_map *map, unsigned int num_maps)
{ {
int i; int i;
......
...@@ -15,21 +15,21 @@ struct pinctrl_dev; ...@@ -15,21 +15,21 @@ struct pinctrl_dev;
struct pinctrl_map; struct pinctrl_map;
int pinctrl_utils_reserve_map(struct pinctrl_dev *pctldev, int pinctrl_utils_reserve_map(struct pinctrl_dev *pctldev,
struct pinctrl_map **map, unsigned *reserved_maps, struct pinctrl_map **map, unsigned int *reserved_maps,
unsigned *num_maps, unsigned reserve); unsigned int *num_maps, unsigned int reserve);
int pinctrl_utils_add_map_mux(struct pinctrl_dev *pctldev, int pinctrl_utils_add_map_mux(struct pinctrl_dev *pctldev,
struct pinctrl_map **map, unsigned *reserved_maps, struct pinctrl_map **map, unsigned int *reserved_maps,
unsigned *num_maps, const char *group, unsigned int *num_maps, const char *group,
const char *function); const char *function);
int pinctrl_utils_add_map_configs(struct pinctrl_dev *pctldev, int pinctrl_utils_add_map_configs(struct pinctrl_dev *pctldev,
struct pinctrl_map **map, unsigned *reserved_maps, struct pinctrl_map **map, unsigned int *reserved_maps,
unsigned *num_maps, const char *group, unsigned int *num_maps, const char *group,
unsigned long *configs, unsigned num_configs, unsigned long *configs, unsigned int num_configs,
enum pinctrl_map_type type); enum pinctrl_map_type type);
int pinctrl_utils_add_config(struct pinctrl_dev *pctldev, int pinctrl_utils_add_config(struct pinctrl_dev *pctldev,
unsigned long **configs, unsigned *num_configs, unsigned long **configs, unsigned int *num_configs,
unsigned long config); unsigned long config);
void pinctrl_utils_free_map(struct pinctrl_dev *pctldev, void pinctrl_utils_free_map(struct pinctrl_dev *pctldev,
struct pinctrl_map *map, unsigned num_maps); struct pinctrl_map *map, unsigned int num_maps);
#endif /* __PINCTRL_UTILS_H__ */ #endif /* __PINCTRL_UTILS_H__ */
...@@ -35,8 +35,8 @@ ...@@ -35,8 +35,8 @@
int pinmux_check_ops(struct pinctrl_dev *pctldev) int pinmux_check_ops(struct pinctrl_dev *pctldev)
{ {
const struct pinmux_ops *ops = pctldev->desc->pmxops; const struct pinmux_ops *ops = pctldev->desc->pmxops;
unsigned nfuncs; unsigned int nfuncs;
unsigned selector = 0; unsigned int selector = 0;
/* Check that we implement required operations */ /* Check that we implement required operations */
if (!ops || if (!ops ||
...@@ -84,7 +84,7 @@ int pinmux_validate_map(const struct pinctrl_map *map, int i) ...@@ -84,7 +84,7 @@ int pinmux_validate_map(const struct pinctrl_map *map, int i)
* Controllers not defined as strict will always return true, * Controllers not defined as strict will always return true,
* menaning that the gpio can be used. * menaning that the gpio can be used.
*/ */
bool pinmux_can_be_used_for_gpio(struct pinctrl_dev *pctldev, unsigned pin) bool pinmux_can_be_used_for_gpio(struct pinctrl_dev *pctldev, unsigned int pin)
{ {
struct pin_desc *desc = pin_desc_get(pctldev, pin); struct pin_desc *desc = pin_desc_get(pctldev, pin);
const struct pinmux_ops *ops = pctldev->desc->pmxops; const struct pinmux_ops *ops = pctldev->desc->pmxops;
...@@ -262,7 +262,7 @@ static const char *pin_free(struct pinctrl_dev *pctldev, int pin, ...@@ -262,7 +262,7 @@ static const char *pin_free(struct pinctrl_dev *pctldev, int pin,
*/ */
int pinmux_request_gpio(struct pinctrl_dev *pctldev, int pinmux_request_gpio(struct pinctrl_dev *pctldev,
struct pinctrl_gpio_range *range, struct pinctrl_gpio_range *range,
unsigned pin, unsigned gpio) unsigned int pin, unsigned int gpio)
{ {
const char *owner; const char *owner;
int ret; int ret;
...@@ -285,7 +285,7 @@ int pinmux_request_gpio(struct pinctrl_dev *pctldev, ...@@ -285,7 +285,7 @@ int pinmux_request_gpio(struct pinctrl_dev *pctldev,
* @pin: the affected currently GPIO-muxed in pin * @pin: the affected currently GPIO-muxed in pin
* @range: applicable GPIO range * @range: applicable GPIO range
*/ */
void pinmux_free_gpio(struct pinctrl_dev *pctldev, unsigned pin, void pinmux_free_gpio(struct pinctrl_dev *pctldev, unsigned int pin,
struct pinctrl_gpio_range *range) struct pinctrl_gpio_range *range)
{ {
const char *owner; const char *owner;
...@@ -303,7 +303,7 @@ void pinmux_free_gpio(struct pinctrl_dev *pctldev, unsigned pin, ...@@ -303,7 +303,7 @@ void pinmux_free_gpio(struct pinctrl_dev *pctldev, unsigned pin,
*/ */
int pinmux_gpio_direction(struct pinctrl_dev *pctldev, int pinmux_gpio_direction(struct pinctrl_dev *pctldev,
struct pinctrl_gpio_range *range, struct pinctrl_gpio_range *range,
unsigned pin, bool input) unsigned int pin, bool input)
{ {
const struct pinmux_ops *ops; const struct pinmux_ops *ops;
int ret; int ret;
...@@ -322,8 +322,8 @@ static int pinmux_func_name_to_selector(struct pinctrl_dev *pctldev, ...@@ -322,8 +322,8 @@ static int pinmux_func_name_to_selector(struct pinctrl_dev *pctldev,
const char *function) const char *function)
{ {
const struct pinmux_ops *ops = pctldev->desc->pmxops; const struct pinmux_ops *ops = pctldev->desc->pmxops;
unsigned nfuncs = ops->get_functions_count(pctldev); unsigned int nfuncs = ops->get_functions_count(pctldev);
unsigned selector = 0; unsigned int selector = 0;
/* See if this pctldev has this function */ /* See if this pctldev has this function */
while (selector < nfuncs) { while (selector < nfuncs) {
...@@ -344,7 +344,7 @@ int pinmux_map_to_setting(const struct pinctrl_map *map, ...@@ -344,7 +344,7 @@ int pinmux_map_to_setting(const struct pinctrl_map *map,
struct pinctrl_dev *pctldev = setting->pctldev; struct pinctrl_dev *pctldev = setting->pctldev;
const struct pinmux_ops *pmxops = pctldev->desc->pmxops; const struct pinmux_ops *pmxops = pctldev->desc->pmxops;
char const * const *groups; char const * const *groups;
unsigned num_groups; unsigned int num_groups;
int ret; int ret;
const char *group; const char *group;
...@@ -409,8 +409,8 @@ int pinmux_enable_setting(const struct pinctrl_setting *setting) ...@@ -409,8 +409,8 @@ int pinmux_enable_setting(const struct pinctrl_setting *setting)
const struct pinctrl_ops *pctlops = pctldev->desc->pctlops; const struct pinctrl_ops *pctlops = pctldev->desc->pctlops;
const struct pinmux_ops *ops = pctldev->desc->pmxops; const struct pinmux_ops *ops = pctldev->desc->pmxops;
int ret = 0; int ret = 0;
const unsigned *pins = NULL; const unsigned int *pins = NULL;
unsigned num_pins = 0; unsigned int num_pins = 0;
int i; int i;
struct pin_desc *desc; struct pin_desc *desc;
...@@ -489,8 +489,8 @@ void pinmux_disable_setting(const struct pinctrl_setting *setting) ...@@ -489,8 +489,8 @@ void pinmux_disable_setting(const struct pinctrl_setting *setting)
struct pinctrl_dev *pctldev = setting->pctldev; struct pinctrl_dev *pctldev = setting->pctldev;
const struct pinctrl_ops *pctlops = pctldev->desc->pctlops; const struct pinctrl_ops *pctlops = pctldev->desc->pctlops;
int ret = 0; int ret = 0;
const unsigned *pins = NULL; const unsigned int *pins = NULL;
unsigned num_pins = 0; unsigned int num_pins = 0;
int i; int i;
struct pin_desc *desc; struct pin_desc *desc;
...@@ -541,8 +541,8 @@ static int pinmux_functions_show(struct seq_file *s, void *what) ...@@ -541,8 +541,8 @@ static int pinmux_functions_show(struct seq_file *s, void *what)
{ {
struct pinctrl_dev *pctldev = s->private; struct pinctrl_dev *pctldev = s->private;
const struct pinmux_ops *pmxops = pctldev->desc->pmxops; const struct pinmux_ops *pmxops = pctldev->desc->pmxops;
unsigned nfuncs; unsigned int nfuncs;
unsigned func_selector = 0; unsigned int func_selector = 0;
if (!pmxops) if (!pmxops)
return 0; return 0;
...@@ -553,7 +553,7 @@ static int pinmux_functions_show(struct seq_file *s, void *what) ...@@ -553,7 +553,7 @@ static int pinmux_functions_show(struct seq_file *s, void *what)
const char *func = pmxops->get_function_name(pctldev, const char *func = pmxops->get_function_name(pctldev,
func_selector); func_selector);
const char * const *groups; const char * const *groups;
unsigned num_groups; unsigned int num_groups;
int ret; int ret;
int i; int i;
...@@ -584,7 +584,7 @@ static int pinmux_pins_show(struct seq_file *s, void *what) ...@@ -584,7 +584,7 @@ static int pinmux_pins_show(struct seq_file *s, void *what)
struct pinctrl_dev *pctldev = s->private; struct pinctrl_dev *pctldev = s->private;
const struct pinctrl_ops *pctlops = pctldev->desc->pctlops; const struct pinctrl_ops *pctlops = pctldev->desc->pctlops;
const struct pinmux_ops *pmxops = pctldev->desc->pmxops; const struct pinmux_ops *pmxops = pctldev->desc->pmxops;
unsigned i, pin; unsigned int i, pin;
if (!pmxops) if (!pmxops)
return 0; return 0;
...@@ -818,7 +818,7 @@ EXPORT_SYMBOL_GPL(pinmux_generic_get_function_name); ...@@ -818,7 +818,7 @@ EXPORT_SYMBOL_GPL(pinmux_generic_get_function_name);
int pinmux_generic_get_function_groups(struct pinctrl_dev *pctldev, int pinmux_generic_get_function_groups(struct pinctrl_dev *pctldev,
unsigned int selector, unsigned int selector,
const char * const **groups, const char * const **groups,
unsigned * const num_groups) unsigned int * const num_groups)
{ {
struct function_desc *function; struct function_desc *function;
......
...@@ -26,16 +26,16 @@ int pinmux_check_ops(struct pinctrl_dev *pctldev); ...@@ -26,16 +26,16 @@ int pinmux_check_ops(struct pinctrl_dev *pctldev);
int pinmux_validate_map(const struct pinctrl_map *map, int i); int pinmux_validate_map(const struct pinctrl_map *map, int i);
bool pinmux_can_be_used_for_gpio(struct pinctrl_dev *pctldev, unsigned pin); bool pinmux_can_be_used_for_gpio(struct pinctrl_dev *pctldev, unsigned int pin);
int pinmux_request_gpio(struct pinctrl_dev *pctldev, int pinmux_request_gpio(struct pinctrl_dev *pctldev,
struct pinctrl_gpio_range *range, struct pinctrl_gpio_range *range,
unsigned pin, unsigned gpio); unsigned int pin, unsigned int gpio);
void pinmux_free_gpio(struct pinctrl_dev *pctldev, unsigned pin, void pinmux_free_gpio(struct pinctrl_dev *pctldev, unsigned int pin,
struct pinctrl_gpio_range *range); struct pinctrl_gpio_range *range);
int pinmux_gpio_direction(struct pinctrl_dev *pctldev, int pinmux_gpio_direction(struct pinctrl_dev *pctldev,
struct pinctrl_gpio_range *range, struct pinctrl_gpio_range *range,
unsigned pin, bool input); unsigned int pin, bool input);
int pinmux_map_to_setting(const struct pinctrl_map *map, int pinmux_map_to_setting(const struct pinctrl_map *map,
struct pinctrl_setting *setting); struct pinctrl_setting *setting);
...@@ -56,27 +56,27 @@ static inline int pinmux_validate_map(const struct pinctrl_map *map, int i) ...@@ -56,27 +56,27 @@ static inline int pinmux_validate_map(const struct pinctrl_map *map, int i)
} }
static inline bool pinmux_can_be_used_for_gpio(struct pinctrl_dev *pctldev, static inline bool pinmux_can_be_used_for_gpio(struct pinctrl_dev *pctldev,
unsigned pin) unsigned int pin)
{ {
return true; return true;
} }
static inline int pinmux_request_gpio(struct pinctrl_dev *pctldev, static inline int pinmux_request_gpio(struct pinctrl_dev *pctldev,
struct pinctrl_gpio_range *range, struct pinctrl_gpio_range *range,
unsigned pin, unsigned gpio) unsigned int pin, unsigned int gpio)
{ {
return 0; return 0;
} }
static inline void pinmux_free_gpio(struct pinctrl_dev *pctldev, static inline void pinmux_free_gpio(struct pinctrl_dev *pctldev,
unsigned pin, unsigned int pin,
struct pinctrl_gpio_range *range) struct pinctrl_gpio_range *range)
{ {
} }
static inline int pinmux_gpio_direction(struct pinctrl_dev *pctldev, static inline int pinmux_gpio_direction(struct pinctrl_dev *pctldev,
struct pinctrl_gpio_range *range, struct pinctrl_gpio_range *range,
unsigned pin, bool input) unsigned int pin, bool input)
{ {
return 0; return 0;
} }
...@@ -154,7 +154,7 @@ pinmux_generic_get_function_name(struct pinctrl_dev *pctldev, ...@@ -154,7 +154,7 @@ pinmux_generic_get_function_name(struct pinctrl_dev *pctldev,
int pinmux_generic_get_function_groups(struct pinctrl_dev *pctldev, int pinmux_generic_get_function_groups(struct pinctrl_dev *pctldev,
unsigned int selector, unsigned int selector,
const char * const **groups, const char * const **groups,
unsigned * const num_groups); unsigned int * const num_groups);
struct function_desc *pinmux_generic_get_function(struct pinctrl_dev *pctldev, struct function_desc *pinmux_generic_get_function(struct pinctrl_dev *pctldev,
unsigned int selector); unsigned int selector);
...@@ -162,7 +162,7 @@ struct function_desc *pinmux_generic_get_function(struct pinctrl_dev *pctldev, ...@@ -162,7 +162,7 @@ struct function_desc *pinmux_generic_get_function(struct pinctrl_dev *pctldev,
int pinmux_generic_add_function(struct pinctrl_dev *pctldev, int pinmux_generic_add_function(struct pinctrl_dev *pctldev,
const char *name, const char *name,
const char * const *groups, const char * const *groups,
unsigned const num_groups, unsigned int const num_groups,
void *data); void *data);
int pinmux_generic_remove_function(struct pinctrl_dev *pctldev, int pinmux_generic_remove_function(struct pinctrl_dev *pctldev,
......
...@@ -47,7 +47,7 @@ struct pinctrl_map_mux { ...@@ -47,7 +47,7 @@ struct pinctrl_map_mux {
struct pinctrl_map_configs { struct pinctrl_map_configs {
const char *group_or_pin; const char *group_or_pin;
unsigned long *configs; unsigned long *configs;
unsigned num_configs; unsigned int num_configs;
}; };
/** /**
...@@ -154,13 +154,13 @@ struct pinctrl_map; ...@@ -154,13 +154,13 @@ struct pinctrl_map;
#ifdef CONFIG_PINCTRL #ifdef CONFIG_PINCTRL
extern int pinctrl_register_mappings(const struct pinctrl_map *map, extern int pinctrl_register_mappings(const struct pinctrl_map *map,
unsigned num_maps); unsigned int num_maps);
extern void pinctrl_unregister_mappings(const struct pinctrl_map *map); extern void pinctrl_unregister_mappings(const struct pinctrl_map *map);
extern void pinctrl_provide_dummies(void); extern void pinctrl_provide_dummies(void);
#else #else
static inline int pinctrl_register_mappings(const struct pinctrl_map *map, static inline int pinctrl_register_mappings(const struct pinctrl_map *map,
unsigned num_maps) unsigned int num_maps)
{ {
return 0; return 0;
} }
......
...@@ -193,17 +193,17 @@ struct pinconf_generic_params { ...@@ -193,17 +193,17 @@ struct pinconf_generic_params {
int pinconf_generic_dt_subnode_to_map(struct pinctrl_dev *pctldev, int pinconf_generic_dt_subnode_to_map(struct pinctrl_dev *pctldev,
struct device_node *np, struct pinctrl_map **map, struct device_node *np, struct pinctrl_map **map,
unsigned *reserved_maps, unsigned *num_maps, unsigned int *reserved_maps, unsigned int *num_maps,
enum pinctrl_map_type type); enum pinctrl_map_type type);
int pinconf_generic_dt_node_to_map(struct pinctrl_dev *pctldev, int pinconf_generic_dt_node_to_map(struct pinctrl_dev *pctldev,
struct device_node *np_config, struct pinctrl_map **map, struct device_node *np_config, struct pinctrl_map **map,
unsigned *num_maps, enum pinctrl_map_type type); unsigned int *num_maps, enum pinctrl_map_type type);
void pinconf_generic_dt_free_map(struct pinctrl_dev *pctldev, void pinconf_generic_dt_free_map(struct pinctrl_dev *pctldev,
struct pinctrl_map *map, unsigned num_maps); struct pinctrl_map *map, unsigned int num_maps);
static inline int pinconf_generic_dt_node_to_map_group(struct pinctrl_dev *pctldev, static inline int pinconf_generic_dt_node_to_map_group(struct pinctrl_dev *pctldev,
struct device_node *np_config, struct pinctrl_map **map, struct device_node *np_config, struct pinctrl_map **map,
unsigned *num_maps) unsigned int *num_maps)
{ {
return pinconf_generic_dt_node_to_map(pctldev, np_config, map, num_maps, return pinconf_generic_dt_node_to_map(pctldev, np_config, map, num_maps,
PIN_MAP_TYPE_CONFIGS_GROUP); PIN_MAP_TYPE_CONFIGS_GROUP);
...@@ -211,7 +211,7 @@ static inline int pinconf_generic_dt_node_to_map_group(struct pinctrl_dev *pctld ...@@ -211,7 +211,7 @@ static inline int pinconf_generic_dt_node_to_map_group(struct pinctrl_dev *pctld
static inline int pinconf_generic_dt_node_to_map_pin(struct pinctrl_dev *pctldev, static inline int pinconf_generic_dt_node_to_map_pin(struct pinctrl_dev *pctldev,
struct device_node *np_config, struct pinctrl_map **map, struct device_node *np_config, struct pinctrl_map **map,
unsigned *num_maps) unsigned int *num_maps)
{ {
return pinconf_generic_dt_node_to_map(pctldev, np_config, map, num_maps, return pinconf_generic_dt_node_to_map(pctldev, np_config, map, num_maps,
PIN_MAP_TYPE_CONFIGS_PIN); PIN_MAP_TYPE_CONFIGS_PIN);
......
...@@ -40,25 +40,25 @@ struct pinconf_ops { ...@@ -40,25 +40,25 @@ struct pinconf_ops {
bool is_generic; bool is_generic;
#endif #endif
int (*pin_config_get) (struct pinctrl_dev *pctldev, int (*pin_config_get) (struct pinctrl_dev *pctldev,
unsigned pin, unsigned int pin,
unsigned long *config); unsigned long *config);
int (*pin_config_set) (struct pinctrl_dev *pctldev, int (*pin_config_set) (struct pinctrl_dev *pctldev,
unsigned pin, unsigned int pin,
unsigned long *configs, unsigned long *configs,
unsigned num_configs); unsigned int num_configs);
int (*pin_config_group_get) (struct pinctrl_dev *pctldev, int (*pin_config_group_get) (struct pinctrl_dev *pctldev,
unsigned selector, unsigned int selector,
unsigned long *config); unsigned long *config);
int (*pin_config_group_set) (struct pinctrl_dev *pctldev, int (*pin_config_group_set) (struct pinctrl_dev *pctldev,
unsigned selector, unsigned int selector,
unsigned long *configs, unsigned long *configs,
unsigned num_configs); unsigned int num_configs);
void (*pin_config_dbg_show) (struct pinctrl_dev *pctldev, void (*pin_config_dbg_show) (struct pinctrl_dev *pctldev,
struct seq_file *s, struct seq_file *s,
unsigned offset); unsigned int offset);
void (*pin_config_group_dbg_show) (struct pinctrl_dev *pctldev, void (*pin_config_group_dbg_show) (struct pinctrl_dev *pctldev,
struct seq_file *s, struct seq_file *s,
unsigned selector); unsigned int selector);
void (*pin_config_config_dbg_show) (struct pinctrl_dev *pctldev, void (*pin_config_config_dbg_show) (struct pinctrl_dev *pctldev,
struct seq_file *s, struct seq_file *s,
unsigned long config); unsigned long config);
......
...@@ -54,7 +54,7 @@ struct pingroup { ...@@ -54,7 +54,7 @@ struct pingroup {
* @drv_data: driver-defined per-pin data. pinctrl core does not touch this * @drv_data: driver-defined per-pin data. pinctrl core does not touch this
*/ */
struct pinctrl_pin_desc { struct pinctrl_pin_desc {
unsigned number; unsigned int number;
const char *name; const char *name;
void *drv_data; void *drv_data;
}; };
...@@ -82,7 +82,7 @@ struct pinctrl_gpio_range { ...@@ -82,7 +82,7 @@ struct pinctrl_gpio_range {
unsigned int base; unsigned int base;
unsigned int pin_base; unsigned int pin_base;
unsigned int npins; unsigned int npins;
unsigned const *pins; unsigned int const *pins;
struct gpio_chip *gc; struct gpio_chip *gc;
}; };
...@@ -108,18 +108,18 @@ struct pinctrl_gpio_range { ...@@ -108,18 +108,18 @@ struct pinctrl_gpio_range {
struct pinctrl_ops { struct pinctrl_ops {
int (*get_groups_count) (struct pinctrl_dev *pctldev); int (*get_groups_count) (struct pinctrl_dev *pctldev);
const char *(*get_group_name) (struct pinctrl_dev *pctldev, const char *(*get_group_name) (struct pinctrl_dev *pctldev,
unsigned selector); unsigned int selector);
int (*get_group_pins) (struct pinctrl_dev *pctldev, int (*get_group_pins) (struct pinctrl_dev *pctldev,
unsigned selector, unsigned int selector,
const unsigned **pins, const unsigned int **pins,
unsigned *num_pins); unsigned int *num_pins);
void (*pin_dbg_show) (struct pinctrl_dev *pctldev, struct seq_file *s, void (*pin_dbg_show) (struct pinctrl_dev *pctldev, struct seq_file *s,
unsigned offset); unsigned int offset);
int (*dt_node_to_map) (struct pinctrl_dev *pctldev, int (*dt_node_to_map) (struct pinctrl_dev *pctldev,
struct device_node *np_config, struct device_node *np_config,
struct pinctrl_map **map, unsigned *num_maps); struct pinctrl_map **map, unsigned int *num_maps);
void (*dt_free_map) (struct pinctrl_dev *pctldev, void (*dt_free_map) (struct pinctrl_dev *pctldev,
struct pinctrl_map *map, unsigned num_maps); struct pinctrl_map *map, unsigned int num_maps);
}; };
/** /**
...@@ -193,7 +193,7 @@ extern void pinctrl_add_gpio_range(struct pinctrl_dev *pctldev, ...@@ -193,7 +193,7 @@ extern void pinctrl_add_gpio_range(struct pinctrl_dev *pctldev,
struct pinctrl_gpio_range *range); struct pinctrl_gpio_range *range);
extern void pinctrl_add_gpio_ranges(struct pinctrl_dev *pctldev, extern void pinctrl_add_gpio_ranges(struct pinctrl_dev *pctldev,
struct pinctrl_gpio_range *ranges, struct pinctrl_gpio_range *ranges,
unsigned nranges); unsigned int nranges);
extern void pinctrl_remove_gpio_range(struct pinctrl_dev *pctldev, extern void pinctrl_remove_gpio_range(struct pinctrl_dev *pctldev,
struct pinctrl_gpio_range *range); struct pinctrl_gpio_range *range);
...@@ -203,8 +203,8 @@ extern struct pinctrl_gpio_range * ...@@ -203,8 +203,8 @@ extern struct pinctrl_gpio_range *
pinctrl_find_gpio_range_from_pin(struct pinctrl_dev *pctldev, pinctrl_find_gpio_range_from_pin(struct pinctrl_dev *pctldev,
unsigned int pin); unsigned int pin);
extern int pinctrl_get_group_pins(struct pinctrl_dev *pctldev, extern int pinctrl_get_group_pins(struct pinctrl_dev *pctldev,
const char *pin_group, const unsigned **pins, const char *pin_group, const unsigned int **pins,
unsigned *num_pins); unsigned int *num_pins);
/** /**
* struct pinfunction - Description about a function * struct pinfunction - Description about a function
......
...@@ -57,26 +57,26 @@ struct pinctrl_gpio_range; ...@@ -57,26 +57,26 @@ struct pinctrl_gpio_range;
* the pin request. * the pin request.
*/ */
struct pinmux_ops { struct pinmux_ops {
int (*request) (struct pinctrl_dev *pctldev, unsigned offset); int (*request) (struct pinctrl_dev *pctldev, unsigned int offset);
int (*free) (struct pinctrl_dev *pctldev, unsigned offset); int (*free) (struct pinctrl_dev *pctldev, unsigned int offset);
int (*get_functions_count) (struct pinctrl_dev *pctldev); int (*get_functions_count) (struct pinctrl_dev *pctldev);
const char *(*get_function_name) (struct pinctrl_dev *pctldev, const char *(*get_function_name) (struct pinctrl_dev *pctldev,
unsigned selector); unsigned int selector);
int (*get_function_groups) (struct pinctrl_dev *pctldev, int (*get_function_groups) (struct pinctrl_dev *pctldev,
unsigned selector, unsigned int selector,
const char * const **groups, const char * const **groups,
unsigned *num_groups); unsigned int *num_groups);
int (*set_mux) (struct pinctrl_dev *pctldev, unsigned func_selector, int (*set_mux) (struct pinctrl_dev *pctldev, unsigned int func_selector,
unsigned group_selector); unsigned int group_selector);
int (*gpio_request_enable) (struct pinctrl_dev *pctldev, int (*gpio_request_enable) (struct pinctrl_dev *pctldev,
struct pinctrl_gpio_range *range, struct pinctrl_gpio_range *range,
unsigned offset); unsigned int offset);
void (*gpio_disable_free) (struct pinctrl_dev *pctldev, void (*gpio_disable_free) (struct pinctrl_dev *pctldev,
struct pinctrl_gpio_range *range, struct pinctrl_gpio_range *range,
unsigned offset); unsigned int offset);
int (*gpio_set_direction) (struct pinctrl_dev *pctldev, int (*gpio_set_direction) (struct pinctrl_dev *pctldev,
struct pinctrl_gpio_range *range, struct pinctrl_gpio_range *range,
unsigned offset, unsigned int offset,
bool input); bool input);
bool strict; bool strict;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment