mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
mfd: sec-irq: s2dos05 doesn't support interrupts
The commit bf231e5feb
("mfd: sec-core: Add support for the Samsung
s2dos05") adding s2dos05 support didn't add anything related to IRQ
support, so I assume this works without IRQs.
Rather than printing a warning message in sec_irq_init() due to the
missing IRQ number, or returning an error due to a missing irq chip
regmap, just return early explicitly.
This will become particularly important once errors from sec_irq_init()
aren't ignored anymore in an upcoming patch and helps the reader of
this code while reasoning about what the intention might be here.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-15-d66d5f39b6bf@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
parent
1cea1b6b2c
commit
fcc7f3b675
1 changed files with 8 additions and 6 deletions
|
@ -452,16 +452,12 @@ int sec_irq_init(struct sec_pmic_dev *sec_pmic)
|
||||||
int type = sec_pmic->device_type;
|
int type = sec_pmic->device_type;
|
||||||
const struct regmap_irq_chip *sec_irq_chip;
|
const struct regmap_irq_chip *sec_irq_chip;
|
||||||
|
|
||||||
if (!sec_pmic->irq) {
|
|
||||||
dev_warn(sec_pmic->dev,
|
|
||||||
"No interrupt specified, no interrupts\n");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case S5M8767X:
|
case S5M8767X:
|
||||||
sec_irq_chip = &s5m8767_irq_chip;
|
sec_irq_chip = &s5m8767_irq_chip;
|
||||||
break;
|
break;
|
||||||
|
case S2DOS05:
|
||||||
|
return 0;
|
||||||
case S2MPA01:
|
case S2MPA01:
|
||||||
sec_irq_chip = &s2mps14_irq_chip;
|
sec_irq_chip = &s2mps14_irq_chip;
|
||||||
break;
|
break;
|
||||||
|
@ -492,6 +488,12 @@ int sec_irq_init(struct sec_pmic_dev *sec_pmic)
|
||||||
sec_pmic->device_type);
|
sec_pmic->device_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!sec_pmic->irq) {
|
||||||
|
dev_warn(sec_pmic->dev,
|
||||||
|
"No interrupt specified, no interrupts\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
ret = devm_regmap_add_irq_chip(sec_pmic->dev, sec_pmic->regmap_pmic,
|
ret = devm_regmap_add_irq_chip(sec_pmic->dev, sec_pmic->regmap_pmic,
|
||||||
sec_pmic->irq, IRQF_ONESHOT,
|
sec_pmic->irq, IRQF_ONESHOT,
|
||||||
0, sec_irq_chip, &sec_pmic->irq_data);
|
0, sec_irq_chip, &sec_pmic->irq_data);
|
||||||
|
|
Loading…
Add table
Reference in a new issue