stw481x
dev_info(&stw481x->client->dev, "STw481x power control registers:\n");
ret = stw481x_get_pctl_reg(stw481x, STW_PC_VCORE_SEL);
ret = stw481x_get_pctl_reg(stw481x, STW_PC_VAUX_SEL);
ret = stw481x_get_pctl_reg(stw481x, STW_PC_VPLL_SEL);
dev_info(&stw481x->client->dev, "VCORE: %u.%uV %s\n",
dev_info(&stw481x->client->dev, "VPLL: %u.%uV %s\n",
dev_info(&stw481x->client->dev, "VAUX: %u.%uV %s\n",
ret = regmap_read(stw481x->map, STW_CONF2, &val);
dev_info(&stw481x->client->dev, "TWARN: %s threshold, %s\n",
dev_info(&stw481x->client->dev, "VMMC: %s\n",
dev_info(&stw481x->client->dev, "IT WAKE UP: %s\n",
dev_info(&stw481x->client->dev, "GPO1: %s\n",
dev_info(&stw481x->client->dev, "GPO2: %s\n",
ret = regmap_read(stw481x->map, STW_VCORE_SLEEP, &val);
dev_info(&stw481x->client->dev, "VCORE SLEEP: %u.%uV\n",
struct stw481x *stw481x;
stw481x = devm_kzalloc(&client->dev, sizeof(*stw481x), GFP_KERNEL);
if (!stw481x)
i2c_set_clientdata(client, stw481x);
stw481x->client = client;
stw481x->map = devm_regmap_init_i2c(client, &stw481x_regmap_config);
if (IS_ERR(stw481x->map)) {
ret = PTR_ERR(stw481x->map);
ret = stw481x_startup(stw481x);
stw481x_cells[i].platform_data = stw481x;
stw481x_cells[i].pdata_size = sizeof(*stw481x);
static int stw481x_get_pctl_reg(struct stw481x *stw481x, u8 reg)
ret = regmap_write(stw481x->map, STW_PCTL_REG_HI, msb);
ret = regmap_write(stw481x->map, STW_PCTL_REG_LO, lsb);
ret = regmap_read(stw481x->map, STW_PCTL_REG_HI, &val);
ret = regmap_read(stw481x->map, STW_PCTL_REG_LO, &val);
static int stw481x_startup(struct stw481x *stw481x)
ret = regmap_read(stw481x->map, STW_CONF1, &val);
dev_info(&stw481x->client->dev, "voltages %s\n",
dev_info(&stw481x->client->dev, "MMC level shifter %s\n",
dev_info(&stw481x->client->dev, "VMMC: %s\n",
struct stw481x *stw481x = dev_get_platdata(&pdev->dev);
ret = regmap_update_bits(stw481x->map, STW_CONF2,
config.driver_data = stw481x;
config.regmap = stw481x->map;