Lines Matching refs:stmfx
10 #include <linux/mfd/stmfx.h>
82 struct stmfx *stmfx;
111 ret = regmap_read(pctl->stmfx->map, reg, &value);
122 regmap_write_bits(pctl->stmfx->map, reg + get_reg(offset),
134 ret = regmap_read(pctl->stmfx->map, reg, &val);
136 * On stmfx, gpio pins direction is (0)input, (1)output.
153 return regmap_write_bits(pctl->stmfx->map, reg, mask, 0);
165 return regmap_write_bits(pctl->stmfx->map, reg, mask, mask);
175 ret = regmap_read(pctl->stmfx->map, reg, &pupd);
188 return regmap_write_bits(pctl->stmfx->map, reg, mask, pupd ? mask : 0);
198 ret = regmap_read(pctl->stmfx->map, reg, &type);
211 return regmap_write_bits(pctl->stmfx->map, reg, mask, type ? mask : 0);
505 regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_EVT,
507 regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_TYPE,
509 regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_SRC,
550 regmap_write_bits(pctl->stmfx->map,
556 regmap_write_bits(pctl->stmfx->map,
571 ret = regmap_bulk_read(pctl->stmfx->map, STMFX_REG_IRQ_GPI_PENDING,
576 regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_SRC,
587 regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_SRC,
613 return stmfx_function_enable(pctl->stmfx, func);
618 struct stmfx *stmfx = dev_get_drvdata(pdev->dev.parent);
624 pctl = devm_kzalloc(stmfx->dev, sizeof(*pctl), GFP_KERNEL);
631 pctl->stmfx = stmfx;
645 pctl->pctl_desc.name = "stmfx-pinctrl";
667 pctl->gpio_chip.label = "stmfx-gpio";
726 struct stmfx *stmfx = dev_get_drvdata(pdev->dev.parent);
728 return stmfx_function_disable(stmfx,
739 ret = regmap_bulk_read(pctl->stmfx->map, STMFX_REG_GPIO_STATE,
743 ret = regmap_bulk_read(pctl->stmfx->map, STMFX_REG_GPIO_DIR,
747 ret = regmap_bulk_read(pctl->stmfx->map, STMFX_REG_GPIO_TYPE,
751 ret = regmap_bulk_read(pctl->stmfx->map, STMFX_REG_GPIO_PUPD,
763 ret = regmap_bulk_write(pctl->stmfx->map, STMFX_REG_GPIO_DIR,
767 ret = regmap_bulk_write(pctl->stmfx->map, STMFX_REG_GPIO_TYPE,
771 ret = regmap_bulk_write(pctl->stmfx->map, STMFX_REG_GPIO_PUPD,
775 ret = regmap_bulk_write(pctl->stmfx->map, STMFX_REG_GPO_SET,
779 ret = regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_EVT,
783 ret = regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_TYPE,
787 ret = regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_SRC,
828 { .compatible = "st,stmfx-0300-pinctrl", },
835 .name = "stmfx-pinctrl",