Pin control fixes for the v5.17 series:
- Fix some drive strength and pull-up code in the K210 driver. - Add the Alder Lake-M ACPI ID so it starts to work properly. - Use a static name for the StarFive GPIO irq_chip, forestalling an upcoming fixes series from Marc Zyngier. - Fix an ages old bug in the Tegra 186 driver where we were indexing at random into struct and being lucky getting the right member. -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEElDRnuGcz/wPCXQWMQRCzN7AZXXMFAmIaztAACgkQQRCzN7AZ XXOp+xAAvF525eqPH/wAvoj0p7KbpQQJ9gYpqCL4FNp+t/Wj3q+7ihgy/Y4iQ6wC vU72M8OQ+i7t/5R8l1cJUj/f/OA2+icNeD5L1+DD+4RB52wQvdbjz7XDqVqEHSFG YnV9YJFGQ3Tr62HU2MrWUCxsY13J6YHlRWHTcMoM0/fcRSHaDYU5mlgGPQV6fb94 WViv+PZncebY9PeyNm/wIpqL/VHqLI5fcaHz+0u6ppNTF7rGRBv7La/Du0mTbmlw rofbc2ynv+gIERyZBZ26UepBid2ZY4qaBzNy5S4srNeY8odlE+C9qCi/UcC3j3aM 1UgsiuZKvn7arR7uR6cKPQSeIEHS25zxbL+FXPa5wtg9KrNhZUG7LG1IB3M7jcK4 CiNj7zm9Zuy/qGGbMNWmmqpFk8ueL2fq7oE6K8oQa9HxzMFd48sB0Ckhyt5PCOEV zcLEo/WeIp3BqOJ4vZQquWO0lcEZr+2SeiGUaUJYwfZI7K2Myrc66hxKVUzBB+EK QWOQj+2W15qBkZd49ygQMJK5D8CQPBkT66AjqtZHr/7jk5H4S0oyyhJHyEWMPcSW oEk7UxKGfULG+zPfg6tCKQSN/QEyF9V2DZ5Ve13klWYZwR6uTZIGhQ2ZVWhJH7DN KXmTGOLGKUp1xR17t8hrAg60WPRoltofY21U/XiABDMGHgLmyYk= =es6M -----END PGP SIGNATURE----- Merge tag 'pinctrl-v5-17-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: - Fix some drive strength and pull-up code in the K210 driver. - Add the Alder Lake-M ACPI ID so it starts to work properly. - Use a static name for the StarFive GPIO irq_chip, forestalling an upcoming fixes series from Marc Zyngier. - Fix an ages old bug in the Tegra 186 driver where we were indexing at random into struct and being lucky getting the right member. * tag 'pinctrl-v5-17-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: gpio: tegra186: Fix chip_data type confusion pinctrl: starfive: Use a static name for the GPIO irq_chip pinctrl: tigerlake: Revert "Add Alder Lake-M ACPI ID" pinctrl: k210: Fix bias-pull-up pinctrl: fix loop in k210_pinconf_get_drive()
This commit is contained in:
commit
6676ba2a6d
@ -343,9 +343,12 @@ static int tegra186_gpio_of_xlate(struct gpio_chip *chip,
|
||||
return offset + pin;
|
||||
}
|
||||
|
||||
#define to_tegra_gpio(x) container_of((x), struct tegra_gpio, gpio)
|
||||
|
||||
static void tegra186_irq_ack(struct irq_data *data)
|
||||
{
|
||||
struct tegra_gpio *gpio = irq_data_get_irq_chip_data(data);
|
||||
struct gpio_chip *gc = irq_data_get_irq_chip_data(data);
|
||||
struct tegra_gpio *gpio = to_tegra_gpio(gc);
|
||||
void __iomem *base;
|
||||
|
||||
base = tegra186_gpio_get_base(gpio, data->hwirq);
|
||||
@ -357,7 +360,8 @@ static void tegra186_irq_ack(struct irq_data *data)
|
||||
|
||||
static void tegra186_irq_mask(struct irq_data *data)
|
||||
{
|
||||
struct tegra_gpio *gpio = irq_data_get_irq_chip_data(data);
|
||||
struct gpio_chip *gc = irq_data_get_irq_chip_data(data);
|
||||
struct tegra_gpio *gpio = to_tegra_gpio(gc);
|
||||
void __iomem *base;
|
||||
u32 value;
|
||||
|
||||
@ -372,7 +376,8 @@ static void tegra186_irq_mask(struct irq_data *data)
|
||||
|
||||
static void tegra186_irq_unmask(struct irq_data *data)
|
||||
{
|
||||
struct tegra_gpio *gpio = irq_data_get_irq_chip_data(data);
|
||||
struct gpio_chip *gc = irq_data_get_irq_chip_data(data);
|
||||
struct tegra_gpio *gpio = to_tegra_gpio(gc);
|
||||
void __iomem *base;
|
||||
u32 value;
|
||||
|
||||
@ -387,7 +392,8 @@ static void tegra186_irq_unmask(struct irq_data *data)
|
||||
|
||||
static int tegra186_irq_set_type(struct irq_data *data, unsigned int type)
|
||||
{
|
||||
struct tegra_gpio *gpio = irq_data_get_irq_chip_data(data);
|
||||
struct gpio_chip *gc = irq_data_get_irq_chip_data(data);
|
||||
struct tegra_gpio *gpio = to_tegra_gpio(gc);
|
||||
void __iomem *base;
|
||||
u32 value;
|
||||
|
||||
|
@ -749,7 +749,6 @@ static const struct acpi_device_id tgl_pinctrl_acpi_match[] = {
|
||||
{ "INT34C5", (kernel_ulong_t)&tgllp_soc_data },
|
||||
{ "INT34C6", (kernel_ulong_t)&tglh_soc_data },
|
||||
{ "INTC1055", (kernel_ulong_t)&tgllp_soc_data },
|
||||
{ "INTC1057", (kernel_ulong_t)&tgllp_soc_data },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(acpi, tgl_pinctrl_acpi_match);
|
||||
|
@ -482,7 +482,7 @@ static int k210_pinconf_get_drive(unsigned int max_strength_ua)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = K210_PC_DRIVE_MAX; i; i--) {
|
||||
for (i = K210_PC_DRIVE_MAX; i >= 0; i--) {
|
||||
if (k210_pinconf_drive_strength[i] <= max_strength_ua)
|
||||
return i;
|
||||
}
|
||||
@ -527,7 +527,7 @@ static int k210_pinconf_set_param(struct pinctrl_dev *pctldev,
|
||||
case PIN_CONFIG_BIAS_PULL_UP:
|
||||
if (!arg)
|
||||
return -EINVAL;
|
||||
val |= K210_PC_PD;
|
||||
val |= K210_PC_PU;
|
||||
break;
|
||||
case PIN_CONFIG_DRIVE_STRENGTH:
|
||||
arg *= 1000;
|
||||
|
@ -1164,6 +1164,7 @@ static int starfive_irq_set_type(struct irq_data *d, unsigned int trigger)
|
||||
}
|
||||
|
||||
static struct irq_chip starfive_irq_chip = {
|
||||
.name = "StarFive GPIO",
|
||||
.irq_ack = starfive_irq_ack,
|
||||
.irq_mask = starfive_irq_mask,
|
||||
.irq_mask_ack = starfive_irq_mask_ack,
|
||||
@ -1308,7 +1309,6 @@ static int starfive_probe(struct platform_device *pdev)
|
||||
sfp->gc.ngpio = NR_GPIOS;
|
||||
|
||||
starfive_irq_chip.parent_device = dev;
|
||||
starfive_irq_chip.name = sfp->gc.label;
|
||||
|
||||
sfp->gc.irq.chip = &starfive_irq_chip;
|
||||
sfp->gc.irq.parent_handler = starfive_gpio_irq_handler;
|
||||
|
Loading…
Reference in New Issue
Block a user