stmfx             116 drivers/mfd/stmfx.c int stmfx_function_enable(struct stmfx *stmfx, u32 func)
stmfx             122 drivers/mfd/stmfx.c 	ret = regmap_read(stmfx->map, STMFX_REG_SYS_CTRL, &sys_ctrl);
stmfx             134 drivers/mfd/stmfx.c 		dev_err(stmfx->dev, "ALTGPIO function already enabled\n");
stmfx             141 drivers/mfd/stmfx.c 		dev_err(stmfx->dev, "TS in use, aGPIO[3:0] unavailable\n");
stmfx             148 drivers/mfd/stmfx.c 		dev_err(stmfx->dev, "IDD in use, aGPIO[7:4] unavailable\n");
stmfx             154 drivers/mfd/stmfx.c 	return regmap_update_bits(stmfx->map, STMFX_REG_SYS_CTRL, mask, mask);
stmfx             158 drivers/mfd/stmfx.c int stmfx_function_disable(struct stmfx *stmfx, u32 func)
stmfx             162 drivers/mfd/stmfx.c 	return regmap_update_bits(stmfx->map, STMFX_REG_SYS_CTRL, mask, 0);
stmfx             168 drivers/mfd/stmfx.c 	struct stmfx *stmfx = irq_data_get_irq_chip_data(data);
stmfx             170 drivers/mfd/stmfx.c 	mutex_lock(&stmfx->lock);
stmfx             175 drivers/mfd/stmfx.c 	struct stmfx *stmfx = irq_data_get_irq_chip_data(data);
stmfx             177 drivers/mfd/stmfx.c 	regmap_write(stmfx->map, STMFX_REG_IRQ_SRC_EN, stmfx->irq_src);
stmfx             179 drivers/mfd/stmfx.c 	mutex_unlock(&stmfx->lock);
stmfx             184 drivers/mfd/stmfx.c 	struct stmfx *stmfx = irq_data_get_irq_chip_data(data);
stmfx             186 drivers/mfd/stmfx.c 	stmfx->irq_src &= ~BIT(data->hwirq % 8);
stmfx             191 drivers/mfd/stmfx.c 	struct stmfx *stmfx = irq_data_get_irq_chip_data(data);
stmfx             193 drivers/mfd/stmfx.c 	stmfx->irq_src |= BIT(data->hwirq % 8);
stmfx             206 drivers/mfd/stmfx.c 	struct stmfx *stmfx = data;
stmfx             211 drivers/mfd/stmfx.c 	ret = regmap_read(stmfx->map, STMFX_REG_IRQ_PENDING, &pending);
stmfx             221 drivers/mfd/stmfx.c 		ret = regmap_write(stmfx->map, STMFX_REG_IRQ_ACK, ack);
stmfx             228 drivers/mfd/stmfx.c 		handle_nested_irq(irq_find_mapping(stmfx->irq_domain, n));
stmfx             257 drivers/mfd/stmfx.c 	struct stmfx *stmfx = i2c_get_clientdata(client);
stmfx             261 drivers/mfd/stmfx.c 		irq_dispose_mapping(irq_find_mapping(stmfx->irq_domain, hwirq));
stmfx             263 drivers/mfd/stmfx.c 	irq_domain_remove(stmfx->irq_domain);
stmfx             268 drivers/mfd/stmfx.c 	struct stmfx *stmfx = i2c_get_clientdata(client);
stmfx             272 drivers/mfd/stmfx.c 	stmfx->irq_domain = irq_domain_add_simple(stmfx->dev->of_node,
stmfx             274 drivers/mfd/stmfx.c 						  &stmfx_irq_ops, stmfx);
stmfx             275 drivers/mfd/stmfx.c 	if (!stmfx->irq_domain) {
stmfx             276 drivers/mfd/stmfx.c 		dev_err(stmfx->dev, "Failed to create IRQ domain\n");
stmfx             280 drivers/mfd/stmfx.c 	if (!of_property_read_bool(stmfx->dev->of_node, "drive-open-drain"))
stmfx             288 drivers/mfd/stmfx.c 	ret = regmap_write(stmfx->map, STMFX_REG_IRQ_OUT_PIN, irqoutpin);
stmfx             292 drivers/mfd/stmfx.c 	ret = devm_request_threaded_irq(stmfx->dev, client->irq,
stmfx             295 drivers/mfd/stmfx.c 					"stmfx", stmfx);
stmfx             302 drivers/mfd/stmfx.c static int stmfx_chip_reset(struct stmfx *stmfx)
stmfx             306 drivers/mfd/stmfx.c 	ret = regmap_write(stmfx->map, STMFX_REG_SYS_CTRL,
stmfx             318 drivers/mfd/stmfx.c 	struct stmfx *stmfx = i2c_get_clientdata(client);
stmfx             323 drivers/mfd/stmfx.c 	stmfx->vdd = devm_regulator_get_optional(&client->dev, "vdd");
stmfx             324 drivers/mfd/stmfx.c 	ret = PTR_ERR_OR_ZERO(stmfx->vdd);
stmfx             326 drivers/mfd/stmfx.c 		stmfx->vdd = NULL;
stmfx             334 drivers/mfd/stmfx.c 	if (stmfx->vdd) {
stmfx             335 drivers/mfd/stmfx.c 		ret = regulator_enable(stmfx->vdd);
stmfx             342 drivers/mfd/stmfx.c 	ret = regmap_read(stmfx->map, STMFX_REG_CHIP_ID, &id);
stmfx             365 drivers/mfd/stmfx.c 	ret = regmap_bulk_read(stmfx->map, STMFX_REG_FW_VERSION_MSB,
stmfx             375 drivers/mfd/stmfx.c 	ret = stmfx_chip_reset(stmfx);
stmfx             384 drivers/mfd/stmfx.c 	if (stmfx->vdd)
stmfx             385 drivers/mfd/stmfx.c 		return regulator_disable(stmfx->vdd);
stmfx             392 drivers/mfd/stmfx.c 	struct stmfx *stmfx = i2c_get_clientdata(client);
stmfx             394 drivers/mfd/stmfx.c 	regmap_write(stmfx->map, STMFX_REG_IRQ_SRC_EN, 0);
stmfx             395 drivers/mfd/stmfx.c 	regmap_write(stmfx->map, STMFX_REG_SYS_CTRL, 0);
stmfx             397 drivers/mfd/stmfx.c 	if (stmfx->vdd)
stmfx             398 drivers/mfd/stmfx.c 		return regulator_disable(stmfx->vdd);
stmfx             407 drivers/mfd/stmfx.c 	struct stmfx *stmfx;
stmfx             410 drivers/mfd/stmfx.c 	stmfx = devm_kzalloc(dev, sizeof(*stmfx), GFP_KERNEL);
stmfx             411 drivers/mfd/stmfx.c 	if (!stmfx)
stmfx             414 drivers/mfd/stmfx.c 	i2c_set_clientdata(client, stmfx);
stmfx             416 drivers/mfd/stmfx.c 	stmfx->dev = dev;
stmfx             418 drivers/mfd/stmfx.c 	stmfx->map = devm_regmap_init_i2c(client, &stmfx_regmap_config);
stmfx             419 drivers/mfd/stmfx.c 	if (IS_ERR(stmfx->map)) {
stmfx             420 drivers/mfd/stmfx.c 		ret = PTR_ERR(stmfx->map);
stmfx             425 drivers/mfd/stmfx.c 	mutex_init(&stmfx->lock);
stmfx             446 drivers/mfd/stmfx.c 				   0, stmfx->irq_domain);
stmfx             470 drivers/mfd/stmfx.c 	struct stmfx *stmfx = dev_get_drvdata(dev);
stmfx             473 drivers/mfd/stmfx.c 	ret = regmap_raw_read(stmfx->map, STMFX_REG_SYS_CTRL,
stmfx             474 drivers/mfd/stmfx.c 			      &stmfx->bkp_sysctrl, sizeof(stmfx->bkp_sysctrl));
stmfx             478 drivers/mfd/stmfx.c 	ret = regmap_raw_read(stmfx->map, STMFX_REG_IRQ_OUT_PIN,
stmfx             479 drivers/mfd/stmfx.c 			      &stmfx->bkp_irqoutpin,
stmfx             480 drivers/mfd/stmfx.c 			      sizeof(stmfx->bkp_irqoutpin));
stmfx             484 drivers/mfd/stmfx.c 	if (stmfx->vdd)
stmfx             485 drivers/mfd/stmfx.c 		return regulator_disable(stmfx->vdd);
stmfx             492 drivers/mfd/stmfx.c 	struct stmfx *stmfx = dev_get_drvdata(dev);
stmfx             495 drivers/mfd/stmfx.c 	if (stmfx->vdd) {
stmfx             496 drivers/mfd/stmfx.c 		ret = regulator_enable(stmfx->vdd);
stmfx             498 drivers/mfd/stmfx.c 			dev_err(stmfx->dev,
stmfx             504 drivers/mfd/stmfx.c 	ret = regmap_raw_write(stmfx->map, STMFX_REG_SYS_CTRL,
stmfx             505 drivers/mfd/stmfx.c 			       &stmfx->bkp_sysctrl, sizeof(stmfx->bkp_sysctrl));
stmfx             509 drivers/mfd/stmfx.c 	ret = regmap_raw_write(stmfx->map, STMFX_REG_IRQ_OUT_PIN,
stmfx             510 drivers/mfd/stmfx.c 			       &stmfx->bkp_irqoutpin,
stmfx             511 drivers/mfd/stmfx.c 			       sizeof(stmfx->bkp_irqoutpin));
stmfx             515 drivers/mfd/stmfx.c 	ret = regmap_raw_write(stmfx->map, STMFX_REG_IRQ_SRC_EN,
stmfx             516 drivers/mfd/stmfx.c 			       &stmfx->irq_src, sizeof(stmfx->irq_src));
stmfx              82 drivers/pinctrl/pinctrl-stmfx.c 	struct stmfx *stmfx;
stmfx             111 drivers/pinctrl/pinctrl-stmfx.c 	ret = regmap_read(pctl->stmfx->map, reg, &value);
stmfx             122 drivers/pinctrl/pinctrl-stmfx.c 	regmap_write_bits(pctl->stmfx->map, reg + get_reg(offset),
stmfx             134 drivers/pinctrl/pinctrl-stmfx.c 	ret = regmap_read(pctl->stmfx->map, reg, &val);
stmfx             149 drivers/pinctrl/pinctrl-stmfx.c 	return regmap_write_bits(pctl->stmfx->map, reg, mask, 0);
stmfx             161 drivers/pinctrl/pinctrl-stmfx.c 	return regmap_write_bits(pctl->stmfx->map, reg, mask, mask);
stmfx             171 drivers/pinctrl/pinctrl-stmfx.c 	ret = regmap_read(pctl->stmfx->map, reg, &pupd);
stmfx             184 drivers/pinctrl/pinctrl-stmfx.c 	return regmap_write_bits(pctl->stmfx->map, reg, mask, pupd ? mask : 0);
stmfx             194 drivers/pinctrl/pinctrl-stmfx.c 	ret = regmap_read(pctl->stmfx->map, reg, &type);
stmfx             207 drivers/pinctrl/pinctrl-stmfx.c 	return regmap_write_bits(pctl->stmfx->map, reg, mask, type ? mask : 0);
stmfx             498 drivers/pinctrl/pinctrl-stmfx.c 	regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_EVT,
stmfx             500 drivers/pinctrl/pinctrl-stmfx.c 	regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_TYPE,
stmfx             502 drivers/pinctrl/pinctrl-stmfx.c 	regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_SRC,
stmfx             524 drivers/pinctrl/pinctrl-stmfx.c 		regmap_write_bits(pctl->stmfx->map,
stmfx             530 drivers/pinctrl/pinctrl-stmfx.c 		regmap_write_bits(pctl->stmfx->map,
stmfx             545 drivers/pinctrl/pinctrl-stmfx.c 	ret = regmap_bulk_read(pctl->stmfx->map, STMFX_REG_IRQ_GPI_PENDING,
stmfx             550 drivers/pinctrl/pinctrl-stmfx.c 	regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_SRC,
stmfx             559 drivers/pinctrl/pinctrl-stmfx.c 	regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_SRC,
stmfx             585 drivers/pinctrl/pinctrl-stmfx.c 	return stmfx_function_enable(pctl->stmfx, func);
stmfx             590 drivers/pinctrl/pinctrl-stmfx.c 	struct stmfx *stmfx = dev_get_drvdata(pdev->dev.parent);
stmfx             595 drivers/pinctrl/pinctrl-stmfx.c 	pctl = devm_kzalloc(stmfx->dev, sizeof(*pctl), GFP_KERNEL);
stmfx             602 drivers/pinctrl/pinctrl-stmfx.c 	pctl->stmfx = stmfx;
stmfx             694 drivers/pinctrl/pinctrl-stmfx.c 	struct stmfx *stmfx = dev_get_drvdata(pdev->dev.parent);
stmfx             696 drivers/pinctrl/pinctrl-stmfx.c 	return stmfx_function_disable(stmfx,
stmfx             707 drivers/pinctrl/pinctrl-stmfx.c 	ret = regmap_bulk_read(pctl->stmfx->map, STMFX_REG_GPIO_STATE,
stmfx             711 drivers/pinctrl/pinctrl-stmfx.c 	ret = regmap_bulk_read(pctl->stmfx->map, STMFX_REG_GPIO_DIR,
stmfx             715 drivers/pinctrl/pinctrl-stmfx.c 	ret = regmap_bulk_read(pctl->stmfx->map, STMFX_REG_GPIO_TYPE,
stmfx             719 drivers/pinctrl/pinctrl-stmfx.c 	ret = regmap_bulk_read(pctl->stmfx->map, STMFX_REG_GPIO_PUPD,
stmfx             731 drivers/pinctrl/pinctrl-stmfx.c 	ret = regmap_bulk_write(pctl->stmfx->map, STMFX_REG_GPIO_DIR,
stmfx             735 drivers/pinctrl/pinctrl-stmfx.c 	ret = regmap_bulk_write(pctl->stmfx->map, STMFX_REG_GPIO_TYPE,
stmfx             739 drivers/pinctrl/pinctrl-stmfx.c 	ret = regmap_bulk_write(pctl->stmfx->map, STMFX_REG_GPIO_PUPD,
stmfx             743 drivers/pinctrl/pinctrl-stmfx.c 	ret = regmap_bulk_write(pctl->stmfx->map, STMFX_REG_GPO_SET,
stmfx             747 drivers/pinctrl/pinctrl-stmfx.c 	ret = regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_EVT,
stmfx             751 drivers/pinctrl/pinctrl-stmfx.c 	ret = regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_TYPE,
stmfx             755 drivers/pinctrl/pinctrl-stmfx.c 	ret = regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_SRC,
stmfx             121 include/linux/mfd/stmfx.h int stmfx_function_enable(struct stmfx *stmfx, u32 func);
stmfx             122 include/linux/mfd/stmfx.h int stmfx_function_disable(struct stmfx *stmfx, u32 func);