Symbol: stmfx
drivers/mfd/stmfx.c
116
int stmfx_function_enable(struct stmfx *stmfx, u32 func)
drivers/mfd/stmfx.c
122
ret = regmap_read(stmfx->map, STMFX_REG_SYS_CTRL, &sys_ctrl);
drivers/mfd/stmfx.c
134
dev_err(stmfx->dev, "ALTGPIO function already enabled\n");
drivers/mfd/stmfx.c
141
dev_err(stmfx->dev, "TS in use, aGPIO[3:0] unavailable\n");
drivers/mfd/stmfx.c
148
dev_err(stmfx->dev, "IDD in use, aGPIO[7:4] unavailable\n");
drivers/mfd/stmfx.c
154
return regmap_update_bits(stmfx->map, STMFX_REG_SYS_CTRL, mask, mask);
drivers/mfd/stmfx.c
158
int stmfx_function_disable(struct stmfx *stmfx, u32 func)
drivers/mfd/stmfx.c
162
return regmap_update_bits(stmfx->map, STMFX_REG_SYS_CTRL, mask, 0);
drivers/mfd/stmfx.c
168
struct stmfx *stmfx = irq_data_get_irq_chip_data(data);
drivers/mfd/stmfx.c
170
mutex_lock(&stmfx->lock);
drivers/mfd/stmfx.c
175
struct stmfx *stmfx = irq_data_get_irq_chip_data(data);
drivers/mfd/stmfx.c
177
regmap_write(stmfx->map, STMFX_REG_IRQ_SRC_EN, stmfx->irq_src);
drivers/mfd/stmfx.c
179
mutex_unlock(&stmfx->lock);
drivers/mfd/stmfx.c
184
struct stmfx *stmfx = irq_data_get_irq_chip_data(data);
drivers/mfd/stmfx.c
186
stmfx->irq_src &= ~BIT(data->hwirq % 8);
drivers/mfd/stmfx.c
191
struct stmfx *stmfx = irq_data_get_irq_chip_data(data);
drivers/mfd/stmfx.c
193
stmfx->irq_src |= BIT(data->hwirq % 8);
drivers/mfd/stmfx.c
206
struct stmfx *stmfx = data;
drivers/mfd/stmfx.c
211
ret = regmap_read(stmfx->map, STMFX_REG_IRQ_PENDING, &pending);
drivers/mfd/stmfx.c
221
ret = regmap_write(stmfx->map, STMFX_REG_IRQ_ACK, ack);
drivers/mfd/stmfx.c
228
handle_nested_irq(irq_find_mapping(stmfx->irq_domain, n));
drivers/mfd/stmfx.c
257
struct stmfx *stmfx = i2c_get_clientdata(client);
drivers/mfd/stmfx.c
261
irq_dispose_mapping(irq_find_mapping(stmfx->irq_domain, hwirq));
drivers/mfd/stmfx.c
263
irq_domain_remove(stmfx->irq_domain);
drivers/mfd/stmfx.c
268
struct stmfx *stmfx = i2c_get_clientdata(client);
drivers/mfd/stmfx.c
272
stmfx->irq_domain = irq_domain_create_simple(dev_fwnode(stmfx->dev), STMFX_REG_IRQ_SRC_MAX,
drivers/mfd/stmfx.c
273
0, &stmfx_irq_ops, stmfx);
drivers/mfd/stmfx.c
274
if (!stmfx->irq_domain) {
drivers/mfd/stmfx.c
275
dev_err(stmfx->dev, "Failed to create IRQ domain\n");
drivers/mfd/stmfx.c
279
if (!of_property_read_bool(stmfx->dev->of_node, "drive-open-drain"))
drivers/mfd/stmfx.c
287
ret = regmap_write(stmfx->map, STMFX_REG_IRQ_OUT_PIN, irqoutpin);
drivers/mfd/stmfx.c
291
ret = devm_request_threaded_irq(stmfx->dev, client->irq,
drivers/mfd/stmfx.c
294
"stmfx", stmfx);
drivers/mfd/stmfx.c
298
stmfx->irq = client->irq;
drivers/mfd/stmfx.c
308
static int stmfx_chip_reset(struct stmfx *stmfx)
drivers/mfd/stmfx.c
312
ret = regmap_write(stmfx->map, STMFX_REG_SYS_CTRL,
drivers/mfd/stmfx.c
324
struct stmfx *stmfx = i2c_get_clientdata(client);
drivers/mfd/stmfx.c
329
stmfx->vdd = devm_regulator_get_optional(&client->dev, "vdd");
drivers/mfd/stmfx.c
330
ret = PTR_ERR_OR_ZERO(stmfx->vdd);
drivers/mfd/stmfx.c
332
stmfx->vdd = NULL;
drivers/mfd/stmfx.c
337
if (stmfx->vdd) {
drivers/mfd/stmfx.c
338
ret = regulator_enable(stmfx->vdd);
drivers/mfd/stmfx.c
345
ret = regmap_read(stmfx->map, STMFX_REG_CHIP_ID, &id);
drivers/mfd/stmfx.c
368
ret = regmap_bulk_read(stmfx->map, STMFX_REG_FW_VERSION_MSB,
drivers/mfd/stmfx.c
378
ret = stmfx_chip_reset(stmfx);
drivers/mfd/stmfx.c
387
if (stmfx->vdd)
drivers/mfd/stmfx.c
388
regulator_disable(stmfx->vdd);
drivers/mfd/stmfx.c
395
struct stmfx *stmfx = i2c_get_clientdata(client);
drivers/mfd/stmfx.c
397
regmap_write(stmfx->map, STMFX_REG_IRQ_SRC_EN, 0);
drivers/mfd/stmfx.c
398
regmap_write(stmfx->map, STMFX_REG_SYS_CTRL, 0);
drivers/mfd/stmfx.c
400
if (stmfx->vdd) {
drivers/mfd/stmfx.c
403
ret = regulator_disable(stmfx->vdd);
drivers/mfd/stmfx.c
414
struct stmfx *stmfx;
drivers/mfd/stmfx.c
417
stmfx = devm_kzalloc(dev, sizeof(*stmfx), GFP_KERNEL);
drivers/mfd/stmfx.c
418
if (!stmfx)
drivers/mfd/stmfx.c
421
i2c_set_clientdata(client, stmfx);
drivers/mfd/stmfx.c
423
stmfx->dev = dev;
drivers/mfd/stmfx.c
425
stmfx->map = devm_regmap_init_i2c(client, &stmfx_regmap_config);
drivers/mfd/stmfx.c
426
if (IS_ERR(stmfx->map)) {
drivers/mfd/stmfx.c
427
ret = PTR_ERR(stmfx->map);
drivers/mfd/stmfx.c
432
mutex_init(&stmfx->lock);
drivers/mfd/stmfx.c
453
0, stmfx->irq_domain);
drivers/mfd/stmfx.c
476
struct stmfx *stmfx = dev_get_drvdata(dev);
drivers/mfd/stmfx.c
479
ret = regmap_raw_read(stmfx->map, STMFX_REG_SYS_CTRL,
drivers/mfd/stmfx.c
480
&stmfx->bkp_sysctrl, sizeof(stmfx->bkp_sysctrl));
drivers/mfd/stmfx.c
484
ret = regmap_raw_read(stmfx->map, STMFX_REG_IRQ_OUT_PIN,
drivers/mfd/stmfx.c
485
&stmfx->bkp_irqoutpin,
drivers/mfd/stmfx.c
486
sizeof(stmfx->bkp_irqoutpin));
drivers/mfd/stmfx.c
490
disable_irq(stmfx->irq);
drivers/mfd/stmfx.c
492
if (stmfx->vdd)
drivers/mfd/stmfx.c
493
return regulator_disable(stmfx->vdd);
drivers/mfd/stmfx.c
500
struct stmfx *stmfx = dev_get_drvdata(dev);
drivers/mfd/stmfx.c
503
if (stmfx->vdd) {
drivers/mfd/stmfx.c
504
ret = regulator_enable(stmfx->vdd);
drivers/mfd/stmfx.c
506
dev_err(stmfx->dev,
drivers/mfd/stmfx.c
513
ret = stmfx_chip_reset(stmfx);
drivers/mfd/stmfx.c
515
dev_err(stmfx->dev, "Failed to reset chip: %d\n", ret);
drivers/mfd/stmfx.c
519
ret = regmap_raw_write(stmfx->map, STMFX_REG_SYS_CTRL,
drivers/mfd/stmfx.c
520
&stmfx->bkp_sysctrl, sizeof(stmfx->bkp_sysctrl));
drivers/mfd/stmfx.c
524
ret = regmap_raw_write(stmfx->map, STMFX_REG_IRQ_OUT_PIN,
drivers/mfd/stmfx.c
525
&stmfx->bkp_irqoutpin,
drivers/mfd/stmfx.c
526
sizeof(stmfx->bkp_irqoutpin));
drivers/mfd/stmfx.c
530
ret = regmap_raw_write(stmfx->map, STMFX_REG_IRQ_SRC_EN,
drivers/mfd/stmfx.c
531
&stmfx->irq_src, sizeof(stmfx->irq_src));
drivers/mfd/stmfx.c
535
enable_irq(stmfx->irq);
drivers/pinctrl/pinctrl-stmfx.c
113
ret = regmap_read(pctl->stmfx->map, reg, &value);
drivers/pinctrl/pinctrl-stmfx.c
124
return regmap_write_bits(pctl->stmfx->map, reg + get_reg(offset),
drivers/pinctrl/pinctrl-stmfx.c
136
ret = regmap_read(pctl->stmfx->map, reg, &val);
drivers/pinctrl/pinctrl-stmfx.c
155
return regmap_write_bits(pctl->stmfx->map, reg, mask, 0);
drivers/pinctrl/pinctrl-stmfx.c
170
return regmap_write_bits(pctl->stmfx->map, reg, mask, mask);
drivers/pinctrl/pinctrl-stmfx.c
180
ret = regmap_read(pctl->stmfx->map, reg, &pupd);
drivers/pinctrl/pinctrl-stmfx.c
193
return regmap_write_bits(pctl->stmfx->map, reg, mask, pupd ? mask : 0);
drivers/pinctrl/pinctrl-stmfx.c
203
ret = regmap_read(pctl->stmfx->map, reg, &type);
drivers/pinctrl/pinctrl-stmfx.c
216
return regmap_write_bits(pctl->stmfx->map, reg, mask, type ? mask : 0);
drivers/pinctrl/pinctrl-stmfx.c
512
regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_EVT,
drivers/pinctrl/pinctrl-stmfx.c
514
regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_TYPE,
drivers/pinctrl/pinctrl-stmfx.c
516
regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_SRC,
drivers/pinctrl/pinctrl-stmfx.c
557
regmap_write_bits(pctl->stmfx->map,
drivers/pinctrl/pinctrl-stmfx.c
563
regmap_write_bits(pctl->stmfx->map,
drivers/pinctrl/pinctrl-stmfx.c
578
ret = regmap_bulk_read(pctl->stmfx->map, STMFX_REG_IRQ_GPI_PENDING,
drivers/pinctrl/pinctrl-stmfx.c
583
regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_SRC,
drivers/pinctrl/pinctrl-stmfx.c
594
regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_SRC,
drivers/pinctrl/pinctrl-stmfx.c
640
return stmfx_function_enable(pctl->stmfx, func);
drivers/pinctrl/pinctrl-stmfx.c
645
struct stmfx *stmfx = dev_get_drvdata(pdev->dev.parent);
drivers/pinctrl/pinctrl-stmfx.c
651
pctl = devm_kzalloc(stmfx->dev, sizeof(*pctl), GFP_KERNEL);
drivers/pinctrl/pinctrl-stmfx.c
658
pctl->stmfx = stmfx;
drivers/pinctrl/pinctrl-stmfx.c
743
struct stmfx *stmfx = dev_get_drvdata(pdev->dev.parent);
drivers/pinctrl/pinctrl-stmfx.c
746
ret = stmfx_function_disable(stmfx,
drivers/pinctrl/pinctrl-stmfx.c
760
ret = regmap_bulk_read(pctl->stmfx->map, STMFX_REG_GPIO_STATE,
drivers/pinctrl/pinctrl-stmfx.c
764
ret = regmap_bulk_read(pctl->stmfx->map, STMFX_REG_GPIO_DIR,
drivers/pinctrl/pinctrl-stmfx.c
768
ret = regmap_bulk_read(pctl->stmfx->map, STMFX_REG_GPIO_TYPE,
drivers/pinctrl/pinctrl-stmfx.c
772
ret = regmap_bulk_read(pctl->stmfx->map, STMFX_REG_GPIO_PUPD,
drivers/pinctrl/pinctrl-stmfx.c
784
ret = regmap_bulk_write(pctl->stmfx->map, STMFX_REG_GPIO_DIR,
drivers/pinctrl/pinctrl-stmfx.c
788
ret = regmap_bulk_write(pctl->stmfx->map, STMFX_REG_GPIO_TYPE,
drivers/pinctrl/pinctrl-stmfx.c
792
ret = regmap_bulk_write(pctl->stmfx->map, STMFX_REG_GPIO_PUPD,
drivers/pinctrl/pinctrl-stmfx.c
796
ret = regmap_bulk_write(pctl->stmfx->map, STMFX_REG_GPO_SET,
drivers/pinctrl/pinctrl-stmfx.c
800
ret = regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_EVT,
drivers/pinctrl/pinctrl-stmfx.c
804
ret = regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_TYPE,
drivers/pinctrl/pinctrl-stmfx.c
808
ret = regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_SRC,
drivers/pinctrl/pinctrl-stmfx.c
85
struct stmfx *stmfx;
include/linux/mfd/stmfx.h
120
int stmfx_function_enable(struct stmfx *stmfx, u32 func);
include/linux/mfd/stmfx.h
121
int stmfx_function_disable(struct stmfx *stmfx, u32 func);