Symbol: max20411
drivers/regulator/max20411-regulator.c
104
struct max20411 *max20411;
drivers/regulator/max20411-regulator.c
106
max20411 = devm_kzalloc(dev, sizeof(*max20411), GFP_KERNEL);
drivers/regulator/max20411-regulator.c
107
if (!max20411)
drivers/regulator/max20411-regulator.c
110
max20411->regmap = devm_regmap_init_i2c(client, &max20411_regmap_config);
drivers/regulator/max20411-regulator.c
111
if (IS_ERR(max20411->regmap)) {
drivers/regulator/max20411-regulator.c
113
return PTR_ERR(max20411->regmap);
drivers/regulator/max20411-regulator.c
116
max20411->dev = dev;
drivers/regulator/max20411-regulator.c
117
max20411->of_node = dev->of_node;
drivers/regulator/max20411-regulator.c
119
max20411->desc = max20411_desc;
drivers/regulator/max20411-regulator.c
120
init_data = of_get_regulator_init_data(max20411->dev, max20411->of_node, &max20411->desc);
drivers/regulator/max20411-regulator.c
124
cfg.dev = max20411->dev;
drivers/regulator/max20411-regulator.c
126
cfg.of_node = max20411->of_node;
drivers/regulator/max20411-regulator.c
127
cfg.driver_data = max20411;
drivers/regulator/max20411-regulator.c
129
cfg.ena_gpiod = gpiod_get(max20411->dev, "enable", GPIOD_ASIS);
drivers/regulator/max20411-regulator.c
134
max20411->rdev = devm_regulator_register(max20411->dev, &max20411->desc, &cfg);
drivers/regulator/max20411-regulator.c
135
if (IS_ERR(max20411->rdev))
drivers/regulator/max20411-regulator.c
136
dev_err(max20411->dev, "Failed to register regulator\n");
drivers/regulator/max20411-regulator.c
138
return PTR_ERR_OR_ZERO(max20411->rdev);