regulator: Convert WM831x regulators to genirq
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>wifi-calibration
parent
23c2f041ef
commit
dfda9c27ba
|
@ -565,9 +565,8 @@ static __devinit int wm831x_buckv_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
irq = platform_get_irq_byname(pdev, "UV");
|
irq = platform_get_irq_byname(pdev, "UV");
|
||||||
ret = wm831x_request_irq(wm831x, irq, wm831x_dcdc_uv_irq,
|
ret = request_threaded_irq(irq, NULL, wm831x_dcdc_uv_irq,
|
||||||
IRQF_TRIGGER_RISING, dcdc->name,
|
IRQF_TRIGGER_RISING, dcdc->name, dcdc);
|
||||||
dcdc);
|
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
dev_err(&pdev->dev, "Failed to request UV IRQ %d: %d\n",
|
dev_err(&pdev->dev, "Failed to request UV IRQ %d: %d\n",
|
||||||
irq, ret);
|
irq, ret);
|
||||||
|
@ -575,9 +574,8 @@ static __devinit int wm831x_buckv_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
irq = platform_get_irq_byname(pdev, "HC");
|
irq = platform_get_irq_byname(pdev, "HC");
|
||||||
ret = wm831x_request_irq(wm831x, irq, wm831x_dcdc_oc_irq,
|
ret = request_threaded_irq(irq, NULL, wm831x_dcdc_oc_irq,
|
||||||
IRQF_TRIGGER_RISING, dcdc->name,
|
IRQF_TRIGGER_RISING, dcdc->name, dcdc);
|
||||||
dcdc);
|
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
dev_err(&pdev->dev, "Failed to request HC IRQ %d: %d\n",
|
dev_err(&pdev->dev, "Failed to request HC IRQ %d: %d\n",
|
||||||
irq, ret);
|
irq, ret);
|
||||||
|
@ -589,7 +587,7 @@ static __devinit int wm831x_buckv_probe(struct platform_device *pdev)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_uv:
|
err_uv:
|
||||||
wm831x_free_irq(wm831x, platform_get_irq_byname(pdev, "UV"), dcdc);
|
free_irq(platform_get_irq_byname(pdev, "UV"), dcdc);
|
||||||
err_regulator:
|
err_regulator:
|
||||||
regulator_unregister(dcdc->regulator);
|
regulator_unregister(dcdc->regulator);
|
||||||
err:
|
err:
|
||||||
|
@ -756,9 +754,8 @@ static __devinit int wm831x_buckp_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
irq = platform_get_irq_byname(pdev, "UV");
|
irq = platform_get_irq_byname(pdev, "UV");
|
||||||
ret = wm831x_request_irq(wm831x, irq, wm831x_dcdc_uv_irq,
|
ret = request_threaded_irq(irq, NULL, wm831x_dcdc_uv_irq,
|
||||||
IRQF_TRIGGER_RISING, dcdc->name,
|
IRQF_TRIGGER_RISING, dcdc->name, dcdc);
|
||||||
dcdc);
|
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
dev_err(&pdev->dev, "Failed to request UV IRQ %d: %d\n",
|
dev_err(&pdev->dev, "Failed to request UV IRQ %d: %d\n",
|
||||||
irq, ret);
|
irq, ret);
|
||||||
|
@ -885,9 +882,9 @@ static __devinit int wm831x_boostp_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
irq = platform_get_irq_byname(pdev, "UV");
|
irq = platform_get_irq_byname(pdev, "UV");
|
||||||
ret = wm831x_request_irq(wm831x, irq, wm831x_dcdc_uv_irq,
|
ret = request_threaded_irq(irq, NULL, wm831x_dcdc_uv_irq,
|
||||||
IRQF_TRIGGER_RISING, dcdc->name,
|
IRQF_TRIGGER_RISING, dcdc->name,
|
||||||
dcdc);
|
dcdc);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
dev_err(&pdev->dev, "Failed to request UV IRQ %d: %d\n",
|
dev_err(&pdev->dev, "Failed to request UV IRQ %d: %d\n",
|
||||||
irq, ret);
|
irq, ret);
|
||||||
|
@ -908,11 +905,10 @@ err:
|
||||||
static __devexit int wm831x_boostp_remove(struct platform_device *pdev)
|
static __devexit int wm831x_boostp_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct wm831x_dcdc *dcdc = platform_get_drvdata(pdev);
|
struct wm831x_dcdc *dcdc = platform_get_drvdata(pdev);
|
||||||
struct wm831x *wm831x = dcdc->wm831x;
|
|
||||||
|
|
||||||
platform_set_drvdata(pdev, NULL);
|
platform_set_drvdata(pdev, NULL);
|
||||||
|
|
||||||
wm831x_free_irq(wm831x, platform_get_irq_byname(pdev, "UV"), dcdc);
|
free_irq(platform_get_irq_byname(pdev, "UV"), dcdc);
|
||||||
regulator_unregister(dcdc->regulator);
|
regulator_unregister(dcdc->regulator);
|
||||||
kfree(dcdc);
|
kfree(dcdc);
|
||||||
|
|
||||||
|
|
|
@ -198,9 +198,8 @@ static __devinit int wm831x_isink_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
irq = platform_get_irq(pdev, 0);
|
irq = platform_get_irq(pdev, 0);
|
||||||
ret = wm831x_request_irq(wm831x, irq, wm831x_isink_irq,
|
ret = request_threaded_irq(irq, NULL, wm831x_isink_irq,
|
||||||
IRQF_TRIGGER_RISING, isink->name,
|
IRQF_TRIGGER_RISING, isink->name, isink);
|
||||||
isink);
|
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
dev_err(&pdev->dev, "Failed to request ISINK IRQ %d: %d\n",
|
dev_err(&pdev->dev, "Failed to request ISINK IRQ %d: %d\n",
|
||||||
irq, ret);
|
irq, ret);
|
||||||
|
@ -221,11 +220,10 @@ err:
|
||||||
static __devexit int wm831x_isink_remove(struct platform_device *pdev)
|
static __devexit int wm831x_isink_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct wm831x_isink *isink = platform_get_drvdata(pdev);
|
struct wm831x_isink *isink = platform_get_drvdata(pdev);
|
||||||
struct wm831x *wm831x = isink->wm831x;
|
|
||||||
|
|
||||||
platform_set_drvdata(pdev, NULL);
|
platform_set_drvdata(pdev, NULL);
|
||||||
|
|
||||||
wm831x_free_irq(wm831x, platform_get_irq(pdev, 0), isink);
|
free_irq(platform_get_irq(pdev, 0), isink);
|
||||||
|
|
||||||
regulator_unregister(isink->regulator);
|
regulator_unregister(isink->regulator);
|
||||||
kfree(isink);
|
kfree(isink);
|
||||||
|
|
|
@ -354,9 +354,9 @@ static __devinit int wm831x_gp_ldo_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
irq = platform_get_irq_byname(pdev, "UV");
|
irq = platform_get_irq_byname(pdev, "UV");
|
||||||
ret = wm831x_request_irq(wm831x, irq, wm831x_ldo_uv_irq,
|
ret = request_threaded_irq(irq, NULL, wm831x_ldo_uv_irq,
|
||||||
IRQF_TRIGGER_RISING, ldo->name,
|
IRQF_TRIGGER_RISING, ldo->name,
|
||||||
ldo);
|
ldo);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
dev_err(&pdev->dev, "Failed to request UV IRQ %d: %d\n",
|
dev_err(&pdev->dev, "Failed to request UV IRQ %d: %d\n",
|
||||||
irq, ret);
|
irq, ret);
|
||||||
|
@ -377,11 +377,10 @@ err:
|
||||||
static __devexit int wm831x_gp_ldo_remove(struct platform_device *pdev)
|
static __devexit int wm831x_gp_ldo_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct wm831x_ldo *ldo = platform_get_drvdata(pdev);
|
struct wm831x_ldo *ldo = platform_get_drvdata(pdev);
|
||||||
struct wm831x *wm831x = ldo->wm831x;
|
|
||||||
|
|
||||||
platform_set_drvdata(pdev, NULL);
|
platform_set_drvdata(pdev, NULL);
|
||||||
|
|
||||||
wm831x_free_irq(wm831x, platform_get_irq_byname(pdev, "UV"), ldo);
|
free_irq(platform_get_irq_byname(pdev, "UV"), ldo);
|
||||||
regulator_unregister(ldo->regulator);
|
regulator_unregister(ldo->regulator);
|
||||||
kfree(ldo);
|
kfree(ldo);
|
||||||
|
|
||||||
|
@ -619,9 +618,8 @@ static __devinit int wm831x_aldo_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
irq = platform_get_irq_byname(pdev, "UV");
|
irq = platform_get_irq_byname(pdev, "UV");
|
||||||
ret = wm831x_request_irq(wm831x, irq, wm831x_ldo_uv_irq,
|
ret = request_threaded_irq(irq, NULL, wm831x_ldo_uv_irq,
|
||||||
IRQF_TRIGGER_RISING, ldo->name,
|
IRQF_TRIGGER_RISING, ldo->name, ldo);
|
||||||
ldo);
|
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
dev_err(&pdev->dev, "Failed to request UV IRQ %d: %d\n",
|
dev_err(&pdev->dev, "Failed to request UV IRQ %d: %d\n",
|
||||||
irq, ret);
|
irq, ret);
|
||||||
|
@ -642,9 +640,8 @@ err:
|
||||||
static __devexit int wm831x_aldo_remove(struct platform_device *pdev)
|
static __devexit int wm831x_aldo_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct wm831x_ldo *ldo = platform_get_drvdata(pdev);
|
struct wm831x_ldo *ldo = platform_get_drvdata(pdev);
|
||||||
struct wm831x *wm831x = ldo->wm831x;
|
|
||||||
|
|
||||||
wm831x_free_irq(wm831x, platform_get_irq_byname(pdev, "UV"), ldo);
|
free_irq(platform_get_irq_byname(pdev, "UV"), ldo);
|
||||||
regulator_unregister(ldo->regulator);
|
regulator_unregister(ldo->regulator);
|
||||||
kfree(ldo);
|
kfree(ldo);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue