mfd: da9052-core: Use regmap_irq_get_virq() and fix the probe
Subsystems (5)
PATCH 3/6 Input: da9052_tsi.c: Fix interrupt handling
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
Currently da9062_tsi does not probe and it fails as follows:
da9052 1-0048: Unable to determine device interrupts
Use the new da9052 irq functions and allow the driver to probe and operate correctly.
Tested on mx53qsb board using 'evtest' tool.
--- drivers/input/touchscreen/da9052_tsi.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-)
drivers/input/touchscreen/da9052_tsi.c +8 -9
@@ -274,16 +274,16 @@ static int __devinit da9052_ts_probe(struct platform_device *pdev)/* Disable ADC */ da9052_ts_adc_toggle (tsi, false); - error =da9052_request_irq (tsi->da9052,DA9052_IRQ_PENDOWN ,"pendown-irq" , - da9052_ts_pendwn_irq, tsi); + error =da9052_request_irq (tsi->da9052,DA9052_IRQ_PENDOWN , +"pendown-irq" , da9052_ts_pendwn_irq, tsi);if (error) {dev_err (tsi->da9052->dev,"Failed to register PENDWN IRQ: %d\n" , error); goto err_free_mem; } - error =da9052_request_irq (tsi->da9052,DA9052_IRQ_TSIREADY ,"tsiready-irq" , - da9052_ts_datardy_irq, tsi); + error =da9052_request_irq (tsi->da9052,DA9052_IRQ_TSIREADY , +"tsiready-irq" , da9052_ts_datardy_irq, tsi);if (error) {dev_err (tsi->da9052->dev,"Failed to register TSIRDY IRQ :%d\n" , error);
@@ -307,9 +307,9 @@ static int __devinit da9052_ts_probe(struct platform_device *pdev)return 0 ; err_free_datardy_irq: -da9052_free_irq (da9052,DA9052_IRQ_TSIREADY , da9052); +da9052_free_irq (tsi->da9052,DA9052_IRQ_TSIREADY , tsi); err_free_pendwn_irq: -da9052_free_irq (da9052,DA9052_IRQ_PENDOWN , da9052); +da9052_free_irq (tsi->da9052,DA9052_IRQ_PENDOWN , tsi); err_free_mem:kfree (tsi);input_free_device (input_dev);
@@ -320,12 +320,11 @@ err_free_mem: static int __devexit da9052_ts_remove(struct platform_device *pdev) {struct da9052_tsi *tsi =platform_get_drvdata (pdev); -struct da9052 *da9052 =dev_get_drvdata (pdev->dev.parent);da9052_reg_write (tsi->da9052,DA9052_LDO9_REG ,0x19 ); -da9052_free_irq (da9052,DA9052_IRQ_TSIREADY , da9052); -da9052_free_irq (da9052,DA9052_IRQ_PENDOWN , da9052); +da9052_free_irq (tsi->da9052,DA9052_IRQ_TSIREADY , tsi); +da9052_free_irq (tsi->da9052,DA9052_IRQ_PENDOWN , tsi);input_unregister_device (tsi->dev);kfree (tsi);
Signature · 1 line
1.7.9.5
PATCH 1/6 mfd: da9052-core: Use regmap_irq_get_virq() and fix the probe
From: Fabio Estevam <[email protected]>
On a mx53qsb dt-kernel the da9052-core driver fails to probe as follows:
da9052 1-0048: DA9052 ADC IRQ failed ret=-22
The reason for the error was due to passing only the offset as the interrupt number in request_threaded_irq() without da9052->irq_base.
The recommended approach though is to use regmap_get_virq() to acquire the interrupt number and this allows to get rid of da9052->irq_base.
Fix it and allow the driver to probe successfully.
Also provide a few more error logs and change the irq string to "adc-irq", so that it appears as a single word in 'cat /proc/interrupts'
--- drivers/mfd/da9052-core.c | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-)
drivers/mfd/da9052-core.c +19 -15
@@ -769,10 +769,15 @@ struct regmap_config da9052_regmap_config = { };EXPORT_SYMBOL_GPL (da9052_regmap_config); +static int da9052_map_irq (struct da9052 *da9052,int irq) +{ +return regmap_irq_get_virq (da9052->irq_data, irq); +} +int __devinit da9052_device_init (struct da9052 *da9052,u8 chip_id) {struct da9052_pdata *pdata = da9052->dev->platform_data; -int ret; +int ret, i;mutex_init (&da9052->auxadc_lock);init_completion (&da9052->done);
@@ -782,35 +787,34 @@ int __devinit da9052_device_init(struct da9052 *da9052, u8 chip_id) da9052->chip_id = chip_id; -if (!pdata || !pdata->irq_base) - da9052->irq_base =-1 ; -else - da9052->irq_base = pdata->irq_base; - ret =regmap_add_irq_chip (da9052->regmap, da9052->chip_irq,IRQF_TRIGGER_LOW |IRQF_ONESHOT , - da9052->irq_base, &da9052_regmap_irq_chip, +-1 , &da9052_regmap_irq_chip, &da9052->irq_data); -if (ret <0 ) +if (ret <0 ) { +dev_err (da9052->dev,"regmap_add_irq_chip failed: %d\n" , ret); goto regmap_err; + } - da9052->irq_base =regmap_irq_chip_get_base (da9052->irq_data); - - ret =request_threaded_irq (DA9052_IRQ_ADC_EOM ,NULL , da9052_auxadc_irq, + i =da9052_map_irq (da9052,DA9052_IRQ_ADC_EOM ); + ret =request_threaded_irq (i,NULL , da9052_auxadc_irq,IRQF_TRIGGER_LOW |IRQF_ONESHOT , -"adc irq" , da9052); +"adc-irq" , da9052);if (ret !=0 )dev_err (da9052->dev,"DA9052 ADC IRQ failed ret=%d\n" , ret); ret =mfd_add_devices (da9052->dev,-1 , da9052_subdev_info,ARRAY_SIZE (da9052_subdev_info),NULL ,0 ,NULL ); -if (ret) +if (ret) { +dev_err (da9052->dev,"mfd_add_devices failed: %d\n" , ret); goto err; + }return 0 ; err: -free_irq (DA9052_IRQ_ADC_EOM , da9052); +free_irq (da9052_map_irq (da9052,DA9052_IRQ_ADC_EOM ), da9052); +regmap_del_irq_chip (da9052->chip_irq, da9052->irq_data);mfd_remove_devices (da9052->dev); regmap_err:return ret;
@@ -818,7 +822,7 @@ regmap_err:void da9052_device_exit (struct da9052 *da9052) { -free_irq (DA9052_IRQ_ADC_EOM , da9052); +free_irq (da9052_map_irq (da9052,DA9052_IRQ_ADC_EOM ), da9052);regmap_del_irq_chip (da9052->chip_irq, da9052->irq_data);mfd_remove_devices (da9052->dev); }
Signature · 1 line
1.7.9.5
PATCH 2/6 mfd: da9052: Introduce da9052-irq.c
From: Fabio Estevam <[email protected]>
Create a da9052-irq.c file so that it can handle interrupt related functions.
This is useful for allowing the da9052 drivers to use such functions when dealing with da9052 interrupts.
--- drivers/mfd/Makefile | 1 + drivers/mfd/da9052-core.c | 271 ++-------------------------------- drivers/mfd/da9052-irq.c | 288 +++++++++++++++++++++++++++++++++++++ include/linux/mfd/da9052/da9052.h | 10 ++ 4 files changed, 307 insertions(+), 263 deletions(-) create mode 100644 drivers/mfd/da9052-irq.c
drivers/mfd/Makefile +1 -0
@@ -85,6 +85,7 @@ obj-$(CONFIG_UCB1400_CORE) += ucb1400_core.o obj-$(CONFIG_PMIC_DA903X) += da903x.o +obj-$(CONFIG_PMIC_DA9052) += da9052-irq.o obj-$(CONFIG_PMIC_DA9052) += da9052-core.o obj-$(CONFIG_MFD_DA9052_SPI) += da9052-spi.o obj-$(CONFIG_MFD_DA9052_I2C) += da9052-i2c.o
drivers/mfd/da9052-core.c +8 -263
348 lines not on this page · raw message
drivers/mfd/da9052-irq.c new file +288 -0
288 lines not on this page · raw message
include/linux/mfd/da9052/da9052.h +10 -0
@@ -146,4 +146,14 @@ void da9052_device_exit(struct da9052 *da9052);extern struct regmap_config da9052_regmap_config; +int da9052_irq_init (struct da9052 *da9052); +int da9052_irq_exit (struct da9052 *da9052); +int da9052_request_irq (struct da9052 *da9052,int irq,char *name, +irq_handler_t handler,void *data); +void da9052_free_irq (struct da9052 *da9052,int irq,void *data); + +int da9052_enable_irq (struct da9052 *da9052,int irq); +int da9052_disable_irq (struct da9052 *da9052,int irq); +int da9052_disable_irq_nosync (struct da9052 *da9052,int irq); +#endif /* __MFD_DA9052_DA9052_H */
Signature · 1 line
1.7.9.5
PATCH 4/6 Input: da9052_onkey.c: Convert to the new da9052 interrupt functions.
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
Use the new da9052 irq functions and allow the driver to probe successfully.
--- drivers/input/misc/da9052_onkey.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-)
drivers/input/misc/da9052_onkey.c +5 -17
@@ -24,7 +24,6 @@ struct da9052_onkey {struct da9052 *da9052;struct input_dev *input;struct delayed_work work; -unsigned int irq; };static void da9052_onkey_query (struct da9052_onkey *onkey)
@@ -76,7 +75,6 @@ static int __devinit da9052_onkey_probe(struct platform_device *pdev)struct da9052 *da9052 =dev_get_drvdata (pdev->dev.parent);struct da9052_onkey *onkey;struct input_dev *input_dev; -int irq;int error;if (!da9052) {
@@ -84,13 +82,6 @@ static int __devinit da9052_onkey_probe(struct platform_device *pdev)return -EINVAL ; } - irq =platform_get_irq_byname (pdev,"ONKEY" ); -if (irq <0 ) { -dev_err (&pdev->dev, -"Failed to get an IRQ for input device, %d\n" , irq); -return -EINVAL ; - } - onkey =kzalloc (sizeof (*onkey),GFP_KERNEL ); input_dev =input_allocate_device ();if (!onkey || !input_dev) {
@@ -101,7 +92,6 @@ static int __devinit da9052_onkey_probe(struct platform_device *pdev) onkey->input = input_dev; onkey->da9052 = da9052; - onkey->irq = irq;INIT_DELAYED_WORK (&onkey->work, da9052_onkey_work); input_dev->name ="da9052-onkey" ;
@@ -111,13 +101,11 @@ static int __devinit da9052_onkey_probe(struct platform_device *pdev) input_dev->evbit[0 ] =BIT_MASK (EV_KEY );__set_bit (KEY_POWER , input_dev->keybit); - error =request_threaded_irq (onkey->irq,NULL , da9052_onkey_irq, -IRQF_TRIGGER_LOW |IRQF_ONESHOT , -"ONKEY" , onkey); + error =da9052_request_irq (onkey->da9052,DA9052_IRQ_NONKEY ,"ONKEY" , + da9052_onkey_irq, onkey);if (error <0 ) {dev_err (onkey->da9052->dev, -"Failed to register ONKEY IRQ %d, error = %d\n" , - onkey->irq, error); +"Failed to register ONKEY IRQ: %d\n" , error); goto err_free_mem; }
@@ -132,7 +120,7 @@ static int __devinit da9052_onkey_probe(struct platform_device *pdev)return 0 ; err_free_irq: -free_irq (onkey->irq, onkey); +da9052_free_irq (onkey->da9052,DA9052_IRQ_NONKEY , onkey);cancel_delayed_work_sync (&onkey->work); err_free_mem:input_free_device (input_dev);
@@ -145,7 +133,7 @@ static int __devexit da9052_onkey_remove(struct platform_device *pdev) {struct da9052_onkey *onkey =platform_get_drvdata (pdev); -free_irq (onkey->irq, onkey); +da9052_free_irq (onkey->da9052,DA9052_IRQ_NONKEY , onkey);cancel_delayed_work_sync (&onkey->work);input_unregister_device (onkey->input);
Signature · 1 line
1.7.9.5
PATCH 5/6 power: da9052-battery: Convert to the new da9052 interrupt functions
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
Convert to the new da9052 interrupt functions, so that we can get rid of irq_base references.
---
Build tested only.
drivers/power/da9052-battery.c | 44 +++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 19 deletions(-)
drivers/power/da9052-battery.c +25 -19
@@ -440,8 +440,10 @@ static int da9052_bat_check_health(struct da9052_battery *bat, int *health)static irqreturn_t da9052_bat_irq (int irq,void *data) {struct da9052_battery *bat = data; +int virq; - irq -= bat->da9052->irq_base; + virq =regmap_irq_get_virq (bat->da9052->irq_data, irq); + irq -= virq;if (irq ==DA9052_IRQ_CHGEND ) bat->status =POWER_SUPPLY_STATUS_FULL ;
@@ -567,7 +569,7 @@ static struct power_supply template_battery = { .get_property = da9052_bat_get_property, }; -static const char *const da9052_bat_irqs[] = { +static char *da9052_bat_irqs[] = {"BATT TEMP" ,"DCIN DET" ,"DCIN REM" ,
@@ -576,12 +578,20 @@ static const char *const da9052_bat_irqs[] = { "CHG END", }; +static int da9052_bat_irq_bits[] = { +DA9052_IRQ_TBAT , +DA9052_IRQ_DCIN , +DA9052_IRQ_DCINREM , +DA9052_IRQ_VBUS , +DA9052_IRQ_VBUSREM , +DA9052_IRQ_CHGEND , +}; +static s32 __devinit da9052_bat_probe (struct platform_device *pdev) {struct da9052_pdata *pdata;struct da9052_battery *bat;int ret; -int irq;int i; bat =kzalloc (sizeof (struct da9052_battery ),GFP_KERNEL );
@@ -602,15 +612,14 @@ static s32 __devinit da9052_bat_probe(struct platform_device *pdev) bat->psy.use_for_apm =1 ;for (i =0 ; i <ARRAY_SIZE (da9052_bat_irqs); i++) { - irq =platform_get_irq_byname (pdev, da9052_bat_irqs[i]); - ret =request_threaded_irq (bat->da9052->irq_base + irq, -NULL , da9052_bat_irq, -IRQF_TRIGGER_LOW |IRQF_ONESHOT , - da9052_bat_irqs[i], bat); + ret =da9052_request_irq (bat->da9052, + da9052_bat_irq_bits[i], da9052_bat_irqs[i], + da9052_bat_irq, bat); +if (ret !=0 ) {dev_err (bat->da9052->dev, -"DA9052 failed to request %s IRQ %d: %d\n" , - da9052_bat_irqs[i], irq, ret); +"DA9052 failed to request %s IRQ: %d\n" , + da9052_bat_irqs[i], ret); goto err; } }
@@ -623,23 +632,20 @@ static s32 __devinit da9052_bat_probe(struct platform_device *pdev)return 0 ; err: -while (--i >=0 ) { - irq =platform_get_irq_byname (pdev, da9052_bat_irqs[i]); -free_irq (bat->da9052->irq_base + irq, bat); - } +while (--i >=0 ) +da9052_free_irq (bat->da9052, da9052_bat_irq_bits[i], bat); +kfree (bat);return ret; } static int __devexit da9052_bat_remove(struct platform_device *pdev) {int i; -int irq;struct da9052_battery *bat =platform_get_drvdata (pdev); -for (i =0 ; i <ARRAY_SIZE (da9052_bat_irqs); i++) { - irq =platform_get_irq_byname (pdev, da9052_bat_irqs[i]); -free_irq (bat->da9052->irq_base + irq, bat); - } +for (i =0 ; i <ARRAY_SIZE (da9052_bat_irqs); i++) +da9052_free_irq (bat->da9052, da9052_bat_irq_bits[i], bat); +power_supply_unregister (&bat->psy);kfree (bat);
Signature · 1 line
1.7.9.5
PATCH 6/6 gpio: gpio-da9052: Convert to the new da9052 interrupt functions
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
Convert to the new da9052 interrupt functions, so that we can get rid of irq_base references.
---
Build tested only.
drivers/gpio/gpio-da9052.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpio/gpio-da9052.c +5 -1
@@ -185,7 +185,11 @@ static int da9052_gpio_to_irq(struct gpio_chip *gc, u32 offset)struct da9052_gpio *gpio =to_da9052_gpio (gc);struct da9052 *da9052 = gpio->da9052; -return da9052->irq_base +DA9052_IRQ_GPI0 + offset; +int irq; + + irq =regmap_irq_get_virq (da9052->irq_data,DA9052_IRQ_GPI0 + offset); + +return irq; }static struct gpio_chip reference_gp__devinitdata = {
Signature · 1 line
1.7.9.5
Re: [PATCH 2/6] mfd: da9052: Introduce da9052-irq.c
In reply to Fabio EstevamQuoted 6 lines · Fabio Estevam
drivers/mfd/da9052-irq.c new file +6
-0+static int da9052_map_irq (struct da9052 *da9052,int irq) +{ +return regmap_irq_get_virq (da9052->irq_data, irq); +} + +int da9052_enable_irq (struct da9052 *da9052,int irq)
drivers/mfd/da9052-irq.c line 194
Quoted 10 lines
drivers/mfd/da9052-irq.c new file +10
-0+{ + irq =da9052_map_irq (da9052, irq); +if (irq <0 ) +return irq; + +enable_irq (irq); + +return 0 ; +} +EXPORT_SYMBOL_GPL (da9052_enable_irq);
This looks correct, but I'm not sure it's actually simpler than letting the sub-drivers deal with calling regmap_irq_get_virq().
Can't each driver just call regmap_irq_get_virq once at init time and then call the regular irq management functions?
Maybe I just don't see the real purpose of these functions. If I'm contradicting what Mark said, listen to him instead.
Arnd
Re: [PATCH 2/6] mfd: da9052: Introduce da9052-irq.c
Quoted 17 lines · Arnd Bergmann
drivers/mfd/da9052-irq.c line 194
Quoted 11 lines · Fabio Estevam
drivers/mfd/da9052-irq.c new file +11
-0+int da9052_enable_irq (struct da9052 *da9052,int irq) +{ + irq =da9052_map_irq (da9052, irq); +if (irq <0 ) +return irq; + +enable_irq (irq); + +return 0 ; +} +EXPORT_SYMBOL_GPL (da9052_enable_irq);This looks correct, but I'm not sure it's actually simpler than letting the sub-drivers deal with calling
regmap_irq_get_virq().
Quoted 5 lines
Can't each driver just call
regmap_irq_get_virqonce at init time and then call the regular irq management functions?Maybe I just don't see the real purpose of these functions. If I'm contradicting what Mark said, listen to him instead.
Aside from hiding the lookup of the irqdomian a bit there's a couple of reasons for existing devices having them:
- With some devices like WM8994 the interrupts are optional so it's useful to eat errors due to the interrupts not existing. With the ability to use linear domains this doesn't matter terribly much as we can just allocate the interrupts even if there's no way they can fire, it was more of an issue when irqdomain wasn't available.
- With Arizona we've actually got a bunch of interrupt controllers the interrupts might be allocated to and these functions allow us to hide this mapping from the subdrivers. This is pretty specialist though.
but if the interrupts are always requestable it really makes little odds, just a matter of taste.
Re: [PATCH 2/6] mfd: da9052: Introduce da9052-irq.c
In reply to Fabio EstevamQuoted 6 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Create a
da9052-irq.cfile so that it can handle interrupt related functions.This is useful for allowing the da9052 drivers to use such functions when dealing with da9052 interrupts.
Quoted 8 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
On a mx53qsb dt-kernel the da9052-core driver fails to probe as follows:
da9052 1-0048: DA9052 ADC IRQ failed ret=-22
The reason for the error was due to passing only the offset as the interrupt number in
request_threaded_irq()withoutda9052->irq_base.
Re: [PATCH 6/6] gpio: gpio-da9052: Convert to the new da9052 interrupt functions
In reply to Fabio EstevamQuoted 4 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Convert to the new da9052 interrupt functions, so that we can get rid of
irq_basereferences.
Arnd Bergmann
Acked-byRe: [PATCH 2/6] mfd: da9052: Introduce da9052-irq.c
In reply to Mark BrownQuoted 9 lines · Mark Brown
Aside from hiding the lookup of the irqdomian a bit there's a couple of reasons for existing devices having them:
- With some devices like WM8994 the interrupts are optional so it's useful to eat errors due to the interrupts not existing. With the ability to use linear domains this doesn't matter terribly much as we can just allocate the interrupts even if there's no way they can fire, it was more of an issue when irqdomain wasn't available.
Quoted 6 lines
- With Arizona we've actually got a bunch of interrupt controllers the interrupts might be allocated to and these functions allow us to hide this mapping from the subdrivers. This is pretty specialist though.
but if the interrupts are always requestable it really makes little odds, just a matter of taste.
Ok, thanks for the explanation. Since this was my only concern on this version of the series:
Re: [PATCH 4/6] Input: da9052_onkey.c: Convert to the new da9052 interrupt functions.
In reply to Fabio EstevamQuoted 3 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Use the new da9052 irq functions and allow the driver to probe successfully.
Re: [PATCH 5/6] power: da9052-battery: Convert to the new da9052 interrupt functions
In reply to Fabio EstevamQuoted 4 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Convert to the new da9052 interrupt functions, so that we can get rid of
irq_basereferences.
Linus Walleij
AppliedRe: [PATCH 6/6] gpio: gpio-da9052: Convert to the new da9052 interrupt functions
In reply to Fabio EstevamQuoted 8 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Convert to the new da9052 interrupt functions, so that we can get rid of
irq_basereferences.Cc Grant Likely <[email protected]>Cc Linus Walleij <[email protected]>Signed-off-by Fabio Estevam <[email protected]>
Applied to my GPIO tree with Mark's ACK.
Yours,
Linus Walleij
Re: [PATCH 6/6] gpio: gpio-da9052: Convert to the new da9052 interrupt functions
Hi Linus,
Quoted 4 lines · Linus Walleij
Quoted 2 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Quoted 8 lines
Quoted 6 lines
Convert to the new da9052 interrupt functions, so that we can get rid of
irq_basereferences.Cc Grant Likely <[email protected]>Cc Linus Walleij <[email protected]>Signed-off-by Fabio Estevam <[email protected]>Applied to my GPIO tree with Mark's ACK.
Patches 1/6 and 2/6 are also needed, otherwise it breaks the build if only this one gets applied.
Thanks,
Fabio Estevam
Linus Walleij
Reviewed-byRe: [PATCH 6/6] gpio: gpio-da9052: Convert to the new da9052 interrupt functions
Quoted 9 lines · Fabio Estevam
Hi Linus,
Quoted 7 lines · Linus Walleij
Quoted 5 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Convert to the new da9052 interrupt functions, so that we can get rid of
irq_basereferences.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Cc Grant Likely <[email protected]>Cc Linus Walleij <[email protected]>Signed-off-by Fabio Estevam <[email protected]>Applied to my GPIO tree with Mark's ACK.
Patches 1/6 and 2/6 are also needed, otherwise it breaks the build if only this one gets applied.
Ah OK I'll take it out again. Push this through whatever tree you want (maybe the i.MX or MFD tree then?)
Linus Walleij
Re: [PATCH 6/6] gpio: gpio-da9052: Convert to the new da9052 interrupt functions
Quoted 4 lines · Linus Walleij
Ah OK I'll take it out again. Push this through whatever tree you want (maybe the i.MX or MFD tree then?)
Reviewed-by Linus Walleij <[email protected]>
Sascha/Samuel/Arnd,
Which tree could take this patch series, please?
Thanks,
Fabio Estevam
Hi Samuel,
Quoted 11 lines · Mark Brown
Quoted 8 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
On a mx53qsb dt-kernel the da9052-core driver fails to probe as follows:
da9052 1-0048: DA9052 ADC IRQ failed ret=-22
The reason for the error was due to passing only the offset as the interrupt number in
request_threaded_irq()withoutda9052->irq_base.Reviwed-by Mark Brown <[email protected]>
Could this series be applied, please?
Thanks,
Fabio Estevam
Re: [PATCH 5/6] power: da9052-battery: Convert to the new da9052 interrupt functions
In reply to Fabio EstevamQuoted 8 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Convert to the new da9052 interrupt functions, so that we can get rid of
irq_basereferences.Cc Anton Vorontsov <[email protected]>Signed-off-by Fabio Estevam <[email protected]>---
It seems that the patch depends on other patches in this series.
I don't see it linux-next, so if anything, for the drivers/power part:
Re: [PATCH 5/6] power: da9052-battery: Convert to the new da9052 interrupt functions
Quoted 5 lines · Anton Vorontsov
It seems that the patch depends on other patches in this series.
I don't see it linux-next, so if anything, for the
drivers/powerpart:Acked-by Anton Vorontsov <[email protected]>
Thanks, Anton. Yes, the mfd patches still need to be applied by Samuel so that all dependencies can be resolved.
Samuel?
Thanks,
Fabio Estevam
Hi Fabio,
Quoted 14 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
On a mx53qsb dt-kernel the da9052-core driver fails to probe as follows:
da9052 1-0048: DA9052 ADC IRQ failed ret=-22
The reason for the error was due to passing only the offset as the interrupt number in
request_threaded_irq()withoutda9052->irq_base.The recommended approach though is to use
regmap_get_virq()to acquire the interrupt number and this allows to get rid ofda9052->irq_base.Fix it and allow the driver to probe successfully.
Quoted 7 lines
Also provide a few more error logs and change the irq string to "adc-irq", so that it appears as a single word in 'cat
/proc/interrupts'Signed-off-by Fabio Estevam <[email protected]>--- drivers/mfd/da9052-core.c | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-)
This patch and the next 5 ones are now applied to my for-next branch.
Cheers,
Samuel.
Signature · 2 lines
Intel Open Source Technology Centre http://oss.intel.com/