Re: [PATCH v2] rtc: Add MOXA ART RTC driver
From: Arnd Bergmann
Date: Sun Jul 14 2013 - 15:59:02 EST
On Thursday 11 July 2013, Jonas Jensen wrote:
> Add RTC driver for MOXA ART SoCs.
> +
> +#define GPIO_EM1240_OUTPUT 1
> +#define GPIO_EM1240_INPUT 0
> +
> +#define GPIO_RTC_SCLK (5)
> +#define GPIO_RTC_DATA (6)
> +#define GPIO_RTC_RESET (7)
Since this is a DT-only platform, you should not really have hardcoded GPIO
numbers.
> + devm_gpio_request(&pdev->dev, GPIO_RTC_DATA, "rtc_data");
> + devm_gpio_request(&pdev->dev, GPIO_RTC_SCLK, "rtc_sclk");
> + devm_gpio_request(&pdev->dev, GPIO_RTC_RESET, "rtc_reset");
Instead, you should use of_get_named_gpio() here, and add a binding document
that describes the names.
Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/