forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 cde9070d9970eef1f7ec2360586c802a16230ad8
kernel/drivers/gpio/gpio-pmic-eic-sprd.c
....@@ -48,7 +48,7 @@
4848 * struct sprd_pmic_eic - PMIC EIC controller
4949 * @chip: the gpio_chip structure.
5050 * @intc: the irq_chip structure.
51
- * @regmap: the regmap from the parent device.
51
+ * @map: the regmap from the parent device.
5252 * @offset: the EIC controller's offset address of the PMIC.
5353 * @reg: the array to cache the EIC registers.
5454 * @buslock: for bus lock/sync and unlock.
....@@ -305,10 +305,8 @@
305305 mutex_init(&pmic_eic->buslock);
306306
307307 pmic_eic->irq = platform_get_irq(pdev, 0);
308
- if (pmic_eic->irq < 0) {
309
- dev_err(&pdev->dev, "Failed to get PMIC EIC interrupt.\n");
308
+ if (pmic_eic->irq < 0)
310309 return pmic_eic->irq;
311
- }
312310
313311 pmic_eic->map = dev_get_regmap(pdev->dev.parent, NULL);
314312 if (!pmic_eic->map)
....@@ -322,7 +320,6 @@
322320
323321 ret = devm_request_threaded_irq(&pdev->dev, pmic_eic->irq, NULL,
324322 sprd_pmic_eic_irq_handler,
325
- IRQF_TRIGGER_LOW |
326323 IRQF_ONESHOT | IRQF_NO_SUSPEND,
327324 dev_name(&pdev->dev), pmic_eic);
328325 if (ret) {
....@@ -341,6 +338,7 @@
341338 pmic_eic->chip.set_config = sprd_pmic_eic_set_config;
342339 pmic_eic->chip.set = sprd_pmic_eic_set;
343340 pmic_eic->chip.get = sprd_pmic_eic_get;
341
+ pmic_eic->chip.can_sleep = true;
344342
345343 pmic_eic->intc.name = dev_name(&pdev->dev);
346344 pmic_eic->intc.irq_mask = sprd_pmic_eic_irq_mask;
....@@ -365,7 +363,7 @@
365363 }
366364
367365 static const struct of_device_id sprd_pmic_eic_of_match[] = {
368
- { .compatible = "sprd,sc27xx-eic", },
366
+ { .compatible = "sprd,sc2731-eic", },
369367 { /* end of list */ }
370368 };
371369 MODULE_DEVICE_TABLE(of, sprd_pmic_eic_of_match);