mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 22:54:05 +08:00
pinctrl: renesas: Updates for v6.2
- Use dynamic GPIO base on combined pincctrl/gpio controllers on SH/R-Mobile SoCs, - Miscellaneous improvements. -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCY3ddhAAKCRCKwlD9ZEnx cN+KAP9q20FIsSb7wounDiFqtxvzQlxlRZqgrAuYRvB7gIDLIgEA83kVuhkI0+Ap hoTVhQb/waZWKZye7+AaeiWbFCvUDgU= =VLhE -----END PGP SIGNATURE----- Merge tag 'renesas-pinctrl-for-v6.2-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: renesas: Updates for v6.2 - Use dynamic GPIO base on combined pincctrl/gpio controllers on SH/R-Mobile SoCs, - Miscellaneous improvements.
This commit is contained in:
commit
d53f77d77f
@ -135,12 +135,12 @@ static int gpio_pin_request(struct gpio_chip *gc, unsigned offset)
|
||||
if (idx < 0 || pfc->info->pins[idx].enum_id == 0)
|
||||
return -EINVAL;
|
||||
|
||||
return pinctrl_gpio_request(offset);
|
||||
return pinctrl_gpio_request(gc->base + offset);
|
||||
}
|
||||
|
||||
static void gpio_pin_free(struct gpio_chip *gc, unsigned offset)
|
||||
{
|
||||
return pinctrl_gpio_free(offset);
|
||||
return pinctrl_gpio_free(gc->base + offset);
|
||||
}
|
||||
|
||||
static void gpio_pin_set_value(struct sh_pfc_chip *chip, unsigned offset,
|
||||
@ -164,7 +164,7 @@ static void gpio_pin_set_value(struct sh_pfc_chip *chip, unsigned offset,
|
||||
|
||||
static int gpio_pin_direction_input(struct gpio_chip *gc, unsigned offset)
|
||||
{
|
||||
return pinctrl_gpio_direction_input(offset);
|
||||
return pinctrl_gpio_direction_input(gc->base + offset);
|
||||
}
|
||||
|
||||
static int gpio_pin_direction_output(struct gpio_chip *gc, unsigned offset,
|
||||
@ -172,7 +172,7 @@ static int gpio_pin_direction_output(struct gpio_chip *gc, unsigned offset,
|
||||
{
|
||||
gpio_pin_set_value(gpiochip_get_data(gc), offset, value);
|
||||
|
||||
return pinctrl_gpio_direction_output(offset);
|
||||
return pinctrl_gpio_direction_output(gc->base + offset);
|
||||
}
|
||||
|
||||
static int gpio_pin_get(struct gpio_chip *gc, unsigned offset)
|
||||
@ -238,7 +238,7 @@ static int gpio_pin_setup(struct sh_pfc_chip *chip)
|
||||
gc->label = pfc->info->name;
|
||||
gc->parent = pfc->dev;
|
||||
gc->owner = THIS_MODULE;
|
||||
gc->base = 0;
|
||||
gc->base = IS_ENABLED(CONFIG_PINCTRL_SH_FUNC_GPIO) ? 0 : -1;
|
||||
gc->ngpio = pfc->nr_gpio_pins;
|
||||
|
||||
return 0;
|
||||
|
@ -438,8 +438,7 @@ static int rzg2l_dt_node_to_map(struct pinctrl_dev *pctldev,
|
||||
ret = -EINVAL;
|
||||
|
||||
done:
|
||||
if (ret < 0)
|
||||
rzg2l_dt_free_map(pctldev, *map, *num_maps);
|
||||
rzg2l_dt_free_map(pctldev, *map, *num_maps);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -399,8 +399,7 @@ static int rzv2m_dt_node_to_map(struct pinctrl_dev *pctldev,
|
||||
ret = -EINVAL;
|
||||
|
||||
done:
|
||||
if (ret < 0)
|
||||
rzv2m_dt_free_map(pctldev, *map, *num_maps);
|
||||
rzv2m_dt_free_map(pctldev, *map, *num_maps);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user