[PATCH v2] rtc: Add MOXA ART RTC driver
Arnd Bergmann
arnd at arndb.de
Sun Jul 14 15:58:43 EDT 2013
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
More information about the linux-arm-kernel
mailing list