Lines Matching +full:high +full:- +full:impedance
1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (C) 2013 ST-Ericsson SA
6 * Written on behalf of Linaro for ST-Ericsson
22 * This driver can only access the non-USB portions of STw4811, the register
23 * range 0x00-0x10 dealing with USB is bound to the two special I2C pins used
33 * stw481x_get_pctl_reg() - get a power control register
37 * The power control registers is a set of one-time-programmable registers
52 ret = regmap_write(stw481x->map, STW_PCTL_REG_HI, msb); in stw481x_get_pctl_reg()
55 ret = regmap_write(stw481x->map, STW_PCTL_REG_LO, lsb); in stw481x_get_pctl_reg()
58 ret = regmap_read(stw481x->map, STW_PCTL_REG_HI, &val); in stw481x_get_pctl_reg()
62 ret = regmap_read(stw481x->map, STW_PCTL_REG_LO, &val); in stw481x_get_pctl_reg()
67 return -EIO; in stw481x_get_pctl_reg()
89 ret = regmap_read(stw481x->map, STW_CONF1, &val); in stw481x_startup()
95 dev_info(&stw481x->client->dev, "voltages %s\n", in stw481x_startup()
97 dev_info(&stw481x->client->dev, "MMC level shifter %s\n", in stw481x_startup()
98 (val & STW_CONF1_MMC_LS_STATUS) ? "high impedance" : "ON"); in stw481x_startup()
99 dev_info(&stw481x->client->dev, "VMMC: %s\n", in stw481x_startup()
102 dev_info(&stw481x->client->dev, "STw481x power control registers:\n"); in stw481x_startup()
120 dev_info(&stw481x->client->dev, "VCORE: %u.%uV %s\n", in stw481x_startup()
124 dev_info(&stw481x->client->dev, "VPLL: %u.%uV %s\n", in stw481x_startup()
128 dev_info(&stw481x->client->dev, "VAUX: %u.%uV %s\n", in stw481x_startup()
132 ret = regmap_read(stw481x->map, STW_CONF2, &val); in stw481x_startup()
136 dev_info(&stw481x->client->dev, "TWARN: %s threshold, %s\n", in stw481x_startup()
140 dev_info(&stw481x->client->dev, "VMMC: %s\n", in stw481x_startup()
142 dev_info(&stw481x->client->dev, "IT WAKE UP: %s\n", in stw481x_startup()
144 dev_info(&stw481x->client->dev, "GPO1: %s\n", in stw481x_startup()
145 (val & STW_CONF2_GPO1) ? "low" : "high impedance"); in stw481x_startup()
146 dev_info(&stw481x->client->dev, "GPO2: %s\n", in stw481x_startup()
147 (val & STW_CONF2_GPO2) ? "low" : "high impedance"); in stw481x_startup()
149 ret = regmap_read(stw481x->map, STW_VCORE_SLEEP, &val); in stw481x_startup()
153 dev_info(&stw481x->client->dev, "VCORE SLEEP: %u.%uV\n", in stw481x_startup()
160 * MFD cells - we have one cell which is selected operation
165 .of_compatible = "st,stw481x-vmmc",
166 .name = "stw481x-vmmc-regulator",
167 .id = -1,
182 stw481x = devm_kzalloc(&client->dev, sizeof(*stw481x), GFP_KERNEL); in stw481x_probe()
184 return -ENOMEM; in stw481x_probe()
187 stw481x->client = client; in stw481x_probe()
188 stw481x->map = devm_regmap_init_i2c(client, &stw481x_regmap_config); in stw481x_probe()
189 if (IS_ERR(stw481x->map)) { in stw481x_probe()
190 ret = PTR_ERR(stw481x->map); in stw481x_probe()
191 dev_err(&client->dev, "Failed to allocate register map: %d\n", in stw481x_probe()
198 dev_err(&client->dev, "chip initialization failed\n"); in stw481x_probe()
209 ret = devm_mfd_add_devices(&client->dev, 0, stw481x_cells, in stw481x_probe()
214 dev_info(&client->dev, "initialized STw481x device\n"); in stw481x_probe()
221 * device-tree probed driver, but it has to be here due to