Lines Matching refs:stmfx

10 #include <linux/mfd/stmfx.h>
84 struct stmfx *stmfx;
112 ret = regmap_read(pctl->stmfx->map, reg, &value);
123 regmap_write_bits(pctl->stmfx->map, reg + get_reg(offset),
135 ret = regmap_read(pctl->stmfx->map, reg, &val);
137 * On stmfx, gpio pins direction is (0)input, (1)output.
154 return regmap_write_bits(pctl->stmfx->map, reg, mask, 0);
166 return regmap_write_bits(pctl->stmfx->map, reg, mask, mask);
176 ret = regmap_read(pctl->stmfx->map, reg, &pupd);
189 return regmap_write_bits(pctl->stmfx->map, reg, mask, pupd ? mask : 0);
199 ret = regmap_read(pctl->stmfx->map, reg, &type);
212 return regmap_write_bits(pctl->stmfx->map, reg, mask, type ? mask : 0);
508 regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_EVT,
510 regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_TYPE,
512 regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_SRC,
553 regmap_write_bits(pctl->stmfx->map,
559 regmap_write_bits(pctl->stmfx->map,
574 ret = regmap_bulk_read(pctl->stmfx->map, STMFX_REG_IRQ_GPI_PENDING,
579 regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_SRC,
590 regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_SRC,
636 return stmfx_function_enable(pctl->stmfx, func);
641 struct stmfx *stmfx = dev_get_drvdata(pdev->dev.parent);
647 pctl = devm_kzalloc(stmfx->dev, sizeof(*pctl), GFP_KERNEL);
654 pctl->stmfx = stmfx;
668 pctl->pctl_desc.name = "stmfx-pinctrl";
690 pctl->gpio_chip.label = "stmfx-gpio";
739 struct stmfx *stmfx = dev_get_drvdata(pdev->dev.parent);
741 return stmfx_function_disable(stmfx,
752 ret = regmap_bulk_read(pctl->stmfx->map, STMFX_REG_GPIO_STATE,
756 ret = regmap_bulk_read(pctl->stmfx->map, STMFX_REG_GPIO_DIR,
760 ret = regmap_bulk_read(pctl->stmfx->map, STMFX_REG_GPIO_TYPE,
764 ret = regmap_bulk_read(pctl->stmfx->map, STMFX_REG_GPIO_PUPD,
776 ret = regmap_bulk_write(pctl->stmfx->map, STMFX_REG_GPIO_DIR,
780 ret = regmap_bulk_write(pctl->stmfx->map, STMFX_REG_GPIO_TYPE,
784 ret = regmap_bulk_write(pctl->stmfx->map, STMFX_REG_GPIO_PUPD,
788 ret = regmap_bulk_write(pctl->stmfx->map, STMFX_REG_GPO_SET,
792 ret = regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_EVT,
796 ret = regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_TYPE,
800 ret = regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_SRC,
841 { .compatible = "st,stmfx-0300-pinctrl", },
848 .name = "stmfx-pinctrl",