All of lore.kernel.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] rtc: Add MOXA ART RTC driver
Date: Sun, 14 Jul 2013 21:58:43 +0200	[thread overview]
Message-ID: <201307142158.44027.arnd@arndb.de> (raw)
In-Reply-To: <1373550711-18828-1-git-send-email-jonas.jensen@gmail.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: Jonas Jensen <jonas.jensen@gmail.com>
Cc: rtc-linux@googlegroups.com, a.zummo@towertech.it,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, arm@kernel.org, broonie@kernel.org
Subject: Re: [PATCH v2] rtc: Add MOXA ART RTC driver
Date: Sun, 14 Jul 2013 21:58:43 +0200	[thread overview]
Message-ID: <201307142158.44027.arnd@arndb.de> (raw)
In-Reply-To: <1373550711-18828-1-git-send-email-jonas.jensen@gmail.com>

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

  parent reply	other threads:[~2013-07-14 19:58 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-10 14:00 [PATCH] rtc: Add MOXA ART RTC driver Jonas Jensen
2013-07-10 14:00 ` Jonas Jensen
2013-07-10 15:47 ` Mark Brown
2013-07-10 15:47   ` Mark Brown
2013-07-11 13:51 ` [PATCH v2] " Jonas Jensen
2013-07-11 13:51   ` Jonas Jensen
2013-07-11 16:51   ` Mark Brown
2013-07-11 16:51     ` Mark Brown
2013-07-14 19:58   ` Arnd Bergmann [this message]
2013-07-14 19:58     ` Arnd Bergmann
2013-07-16 12:41   ` [PATCH v3] " Jonas Jensen
2013-07-16 12:41     ` Jonas Jensen
2013-07-16 13:13     ` Mark Brown
2013-07-16 13:13       ` Mark Brown
2013-07-16 14:04       ` Jonas Jensen
2013-07-16 14:04         ` Jonas Jensen
2013-07-16 15:57         ` Mark Brown
2013-07-16 15:57           ` Mark Brown
2013-07-17  9:14     ` [PATCH v4] " Jonas Jensen
2013-07-17  9:14       ` Jonas Jensen
2013-07-17 10:09       ` Mark Brown
2013-07-17 10:09         ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201307142158.44027.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.