From 43343f8d804a84db9b671c95fa253fc1793bf34a Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Sun, 19 Apr 2015 15:34:19 +0900 Subject: regulator: Fix the function name in documentation The function name in kernel-doc for regulator_map_voltage_linear_range() was wrong. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Mark Brown --- drivers/regulator/helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/regulator') 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 -- cgit v1.2.3 From e4e8ccccf314eacc935e699073575de7816338e4 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Mon, 20 Apr 2015 16:19:01 -0300 Subject: regulator: max77686: Fix typo in email address Fix typo in the samsung email address. Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown --- drivers/regulator/max77686.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/regulator') diff --git a/drivers/regulator/max77686.c b/drivers/regulator/max77686.c index 15fb1416bfbd..23b7c06d30ba 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 + * Chiwoong Byun * Jonghwa Lee * * This program is free software; you can redistribute it and/or modify -- cgit v1.2.3 From c53403a37cf083ce85da720f18918f73580d0064 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Mon, 18 May 2015 10:01:03 -0700 Subject: regulator: max77686: fix gpio_enabled shift wrapping bug The code should handle more than 32 bits here because "id" can be a value up to MAX77686_REGULATORS (currently 34). Convert the gpio_enabled type to DECLARE_BITMAP and use test_bit/set_bit. Fixes: 3307e9025d29 ("regulator: max77686: Add GPIO control") Reported-by: Dan Carpenter Signed-off-by: Joe Perches Reviewed-by: Krzysztof Kozlowski Signed-off-by: Mark Brown Cc: stable@vger.kernel.org --- drivers/regulator/max77686.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/regulator') diff --git a/drivers/regulator/max77686.c b/drivers/regulator/max77686.c index 23b7c06d30ba..17ccf365a9c0 100644 --- a/drivers/regulator/max77686.c +++ b/drivers/regulator/max77686.c @@ -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, -- cgit v1.2.3 From 29454738f96233466d5bfacf86c7a8d49f79ae27 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Mon, 1 Jun 2015 22:33:53 -0300 Subject: regulator: wm831x: Pass the IRQF_ONESHOT flag Since commit 1c6c69525b40 ("genirq: Reject bogus threaded irq requests") threaded IRQs without a primary handler need to be requested with IRQF_ONESHOT, otherwise the request will fail. So pass the IRQF_ONESHOT flag in this case. The semantic patch that makes this change is available in scripts/coccinelle/misc/irqf_oneshot.cocci. Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown --- drivers/regulator/wm831x-dcdc.c | 12 ++++++++---- drivers/regulator/wm831x-isink.c | 3 ++- drivers/regulator/wm831x-ldo.c | 6 ++++-- 3 files changed, 14 insertions(+), 7 deletions(-) (limited to 'drivers/regulator') 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); -- cgit v1.2.3