|
17 | 17 |
|
18 | 18 | #include "gpiolib-acpi.h"
|
19 | 19 |
|
20 |
| -/* Common property names */ |
21 |
| -#define XGENE_NIRQ_PROPERTY "apm,nr-irqs" |
22 |
| -#define XGENE_NGPIO_PROPERTY "apm,nr-gpios" |
23 |
| -#define XGENE_IRQ_START_PROPERTY "apm,irq-start" |
24 |
| - |
25 | 20 | #define XGENE_DFLT_MAX_NGPIO 22
|
26 | 21 | #define XGENE_DFLT_MAX_NIRQ 6
|
27 | 22 | #define XGENE_DFLT_IRQ_START_PIN 8
|
@@ -252,18 +247,17 @@ static int xgene_gpio_sb_probe(struct platform_device *pdev)
|
252 | 247 |
|
253 | 248 | /* Retrieve start irq pin, use default if property not found */
|
254 | 249 | priv->irq_start = XGENE_DFLT_IRQ_START_PIN;
|
255 |
| - if (!device_property_read_u32(&pdev->dev, |
256 |
| - XGENE_IRQ_START_PROPERTY, &val32)) |
| 250 | + if (!device_property_read_u32(&pdev->dev, "apm,irq-start", &val32)) |
257 | 251 | priv->irq_start = val32;
|
258 | 252 |
|
259 | 253 | /* Retrieve number irqs, use default if property not found */
|
260 | 254 | priv->nirq = XGENE_DFLT_MAX_NIRQ;
|
261 |
| - if (!device_property_read_u32(&pdev->dev, XGENE_NIRQ_PROPERTY, &val32)) |
| 255 | + if (!device_property_read_u32(&pdev->dev, "apm,nr-irqs", &val32)) |
262 | 256 | priv->nirq = val32;
|
263 | 257 |
|
264 | 258 | /* Retrieve number gpio, use default if property not found */
|
265 | 259 | priv->gc.ngpio = XGENE_DFLT_MAX_NGPIO;
|
266 |
| - if (!device_property_read_u32(&pdev->dev, XGENE_NGPIO_PROPERTY, &val32)) |
| 260 | + if (!device_property_read_u32(&pdev->dev, "apm,nr-gpios", &val32)) |
267 | 261 | priv->gc.ngpio = val32;
|
268 | 262 |
|
269 | 263 | dev_info(&pdev->dev, "Support %d gpios, %d irqs start from pin %d\n",
|
|
0 commit comments