diff options
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/da9052-regulator.c | 5 | ||||
-rw-r--r-- | drivers/regulator/helpers.c | 2 | ||||
-rw-r--r-- | drivers/regulator/max77686.c | 8 | ||||
-rw-r--r-- | drivers/regulator/wm831x-dcdc.c | 12 | ||||
-rw-r--r-- | drivers/regulator/wm831x-isink.c | 3 | ||||
-rw-r--r-- | drivers/regulator/wm831x-ldo.c | 6 |
6 files changed, 22 insertions, 14 deletions
diff --git a/drivers/regulator/da9052-regulator.c b/drivers/regulator/da9052-regulator.c index 8a4df7a1f2ee..e628d4c2f2ae 100644 --- a/drivers/regulator/da9052-regulator.c +++ b/drivers/regulator/da9052-regulator.c @@ -394,6 +394,7 @@ static inline struct da9052_regulator_info *find_regulator_info(u8 chip_id, static int da9052_regulator_probe(struct platform_device *pdev) { + const struct mfd_cell *cell = mfd_get_cell(pdev); struct regulator_config config = { }; struct da9052_regulator *regulator; struct da9052 *da9052; @@ -409,7 +410,7 @@ static int da9052_regulator_probe(struct platform_device *pdev) regulator->da9052 = da9052; regulator->info = find_regulator_info(regulator->da9052->chip_id, - pdev->id); + cell->id); if (regulator->info == NULL) { dev_err(&pdev->dev, "invalid regulator ID specified\n"); return -EINVAL; @@ -419,7 +420,7 @@ static int da9052_regulator_probe(struct platform_device *pdev) config.driver_data = regulator; config.regmap = da9052->regmap; if (pdata && pdata->regulators) { - config.init_data = pdata->regulators[pdev->id]; + config.init_data = pdata->regulators[cell->id]; } else { #ifdef CONFIG_OF struct device_node *nproot = da9052->dev->of_node; diff --git a/drivers/regulator/helpers.c b/drivers/regulator/helpers.c index cbc39096c78d..3bbb32680a94 100644 --- a/drivers/regulator/helpers.c +++ b/drivers/regulator/helpers.c @@ -275,7 +275,7 @@ int regulator_map_voltage_linear(struct regulator_dev *rdev, EXPORT_SYMBOL_GPL(regulator_map_voltage_linear); /** - * regulator_map_voltage_linear - map_voltage() for multiple linear ranges + * regulator_map_voltage_linear_range - map_voltage() for multiple linear ranges * * @rdev: Regulator to operate on * @min_uV: Lower bound for voltage diff --git a/drivers/regulator/max77686.c b/drivers/regulator/max77686.c index 15fb1416bfbd..17ccf365a9c0 100644 --- a/drivers/regulator/max77686.c +++ b/drivers/regulator/max77686.c @@ -2,7 +2,7 @@ * max77686.c - Regulator driver for the Maxim 77686 * * Copyright (C) 2012 Samsung Electronics - * Chiwoong Byun <woong.byun@smasung.com> + * Chiwoong Byun <woong.byun@samsung.com> * Jonghwa Lee <jonghwa3.lee@samsung.com> * * This program is free software; you can redistribute it and/or modify @@ -88,7 +88,7 @@ enum max77686_ramp_rate { }; struct max77686_data { - u64 gpio_enabled:MAX77686_REGULATORS; + DECLARE_BITMAP(gpio_enabled, MAX77686_REGULATORS); /* Array indexed by regulator id */ unsigned int opmode[MAX77686_REGULATORS]; @@ -121,7 +121,7 @@ static unsigned int max77686_map_normal_mode(struct max77686_data *max77686, case MAX77686_BUCK8: case MAX77686_BUCK9: case MAX77686_LDO20 ... MAX77686_LDO22: - if (max77686->gpio_enabled & (1 << id)) + if (test_bit(id, max77686->gpio_enabled)) return MAX77686_GPIO_CONTROL; } @@ -277,7 +277,7 @@ static int max77686_of_parse_cb(struct device_node *np, } if (gpio_is_valid(config->ena_gpio)) { - max77686->gpio_enabled |= (1 << desc->id); + set_bit(desc->id, max77686->gpio_enabled); return regmap_update_bits(config->regmap, desc->enable_reg, desc->enable_mask, diff --git a/drivers/regulator/wm831x-dcdc.c b/drivers/regulator/wm831x-dcdc.c index 0d7e164a5e76..8cbb82ceec40 100644 --- a/drivers/regulator/wm831x-dcdc.c +++ b/drivers/regulator/wm831x-dcdc.c @@ -533,7 +533,8 @@ static int wm831x_buckv_probe(struct platform_device *pdev) irq = wm831x_irq(wm831x, platform_get_irq_byname(pdev, "UV")); ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, wm831x_dcdc_uv_irq, - IRQF_TRIGGER_RISING, dcdc->name, dcdc); + IRQF_TRIGGER_RISING | IRQF_ONESHOT, + dcdc->name, dcdc); if (ret != 0) { dev_err(&pdev->dev, "Failed to request UV IRQ %d: %d\n", irq, ret); @@ -543,7 +544,8 @@ static int wm831x_buckv_probe(struct platform_device *pdev) irq = wm831x_irq(wm831x, platform_get_irq_byname(pdev, "HC")); ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, wm831x_dcdc_oc_irq, - IRQF_TRIGGER_RISING, dcdc->name, dcdc); + IRQF_TRIGGER_RISING | IRQF_ONESHOT, + dcdc->name, dcdc); if (ret != 0) { dev_err(&pdev->dev, "Failed to request HC IRQ %d: %d\n", irq, ret); @@ -669,7 +671,8 @@ static int wm831x_buckp_probe(struct platform_device *pdev) irq = wm831x_irq(wm831x, platform_get_irq_byname(pdev, "UV")); ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, wm831x_dcdc_uv_irq, - IRQF_TRIGGER_RISING, dcdc->name, dcdc); + IRQF_TRIGGER_RISING | IRQF_ONESHOT, + dcdc->name, dcdc); if (ret != 0) { dev_err(&pdev->dev, "Failed to request UV IRQ %d: %d\n", irq, ret); @@ -785,7 +788,8 @@ static int wm831x_boostp_probe(struct platform_device *pdev) irq = wm831x_irq(wm831x, platform_get_irq_byname(pdev, "UV")); ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, wm831x_dcdc_uv_irq, - IRQF_TRIGGER_RISING, dcdc->name, + IRQF_TRIGGER_RISING | IRQF_ONESHOT, + dcdc->name, dcdc); if (ret != 0) { dev_err(&pdev->dev, "Failed to request UV IRQ %d: %d\n", diff --git a/drivers/regulator/wm831x-isink.c b/drivers/regulator/wm831x-isink.c index 1e88391a1628..1442828fcd9a 100644 --- a/drivers/regulator/wm831x-isink.c +++ b/drivers/regulator/wm831x-isink.c @@ -204,7 +204,8 @@ static int wm831x_isink_probe(struct platform_device *pdev) irq = wm831x_irq(wm831x, platform_get_irq(pdev, 0)); ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, wm831x_isink_irq, - IRQF_TRIGGER_RISING, isink->name, + IRQF_TRIGGER_RISING | IRQF_ONESHOT, + isink->name, isink); if (ret != 0) { dev_err(&pdev->dev, "Failed to request ISINK IRQ %d: %d\n", diff --git a/drivers/regulator/wm831x-ldo.c b/drivers/regulator/wm831x-ldo.c index 7ae2dc82f636..5a7b65e8a529 100644 --- a/drivers/regulator/wm831x-ldo.c +++ b/drivers/regulator/wm831x-ldo.c @@ -287,7 +287,8 @@ static int wm831x_gp_ldo_probe(struct platform_device *pdev) irq = wm831x_irq(wm831x, platform_get_irq_byname(pdev, "UV")); ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, wm831x_ldo_uv_irq, - IRQF_TRIGGER_RISING, ldo->name, + IRQF_TRIGGER_RISING | IRQF_ONESHOT, + ldo->name, ldo); if (ret != 0) { dev_err(&pdev->dev, "Failed to request UV IRQ %d: %d\n", @@ -496,7 +497,8 @@ static int wm831x_aldo_probe(struct platform_device *pdev) irq = wm831x_irq(wm831x, platform_get_irq_byname(pdev, "UV")); ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, wm831x_ldo_uv_irq, - IRQF_TRIGGER_RISING, ldo->name, ldo); + IRQF_TRIGGER_RISING | IRQF_ONESHOT, + ldo->name, ldo); if (ret != 0) { dev_err(&pdev->dev, "Failed to request UV IRQ %d: %d\n", irq, ret); |