Lines Matching full:madera
3 * GPIO support for Cirrus Logic Madera codecs
13 #include <linux/mfd/madera/core.h>
14 #include <linux/mfd/madera/pdata.h>
15 #include <linux/mfd/madera/registers.h>
18 struct madera *madera; member
27 struct madera *madera = madera_gpio->madera; in madera_gpio_get_direction() local
32 ret = regmap_read(madera->regmap, MADERA_GPIO1_CTRL_2 + reg_offset, in madera_gpio_get_direction()
46 struct madera *madera = madera_gpio->madera; in madera_gpio_direction_in() local
49 return regmap_update_bits(madera->regmap, in madera_gpio_direction_in()
57 struct madera *madera = madera_gpio->madera; in madera_gpio_get() local
62 ret = regmap_read(madera->regmap, MADERA_GPIO1_CTRL_1 + reg_offset, in madera_gpio_get()
74 struct madera *madera = madera_gpio->madera; in madera_gpio_direction_out() local
79 ret = regmap_update_bits(madera->regmap, in madera_gpio_direction_out()
85 return regmap_update_bits(madera->regmap, in madera_gpio_direction_out()
94 struct madera *madera = madera_gpio->madera; in madera_gpio_set() local
99 ret = regmap_update_bits(madera->regmap, in madera_gpio_set()
105 dev_warn(madera->dev, "Failed to write to 0x%x (%d)\n", in madera_gpio_set()
110 .label = "madera",
125 struct madera *madera = dev_get_drvdata(pdev->dev.parent); in madera_gpio_probe() local
126 struct madera_pdata *pdata = &madera->pdata; in madera_gpio_probe()
135 madera_gpio->madera = madera; in madera_gpio_probe()
141 switch (madera->type) { in madera_gpio_probe()
162 dev_err(&pdev->dev, "Unknown chip variant %d\n", madera->type); in madera_gpio_probe()
189 ret = gpiochip_add_pin_range(&madera_gpio->gpio_chip, "madera-pinctrl", in madera_gpio_probe()
201 .name = "madera-gpio",
208 MODULE_SOFTDEP("pre: pinctrl-madera");
209 MODULE_DESCRIPTION("GPIO interface for Madera codecs");
213 MODULE_ALIAS("platform:madera-gpio");