linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Bryan Wu <cooloney@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>,
	Linux LED Subsystem <linux-leds@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>,
	Belisko Marek <marek.belisko@gmail.com>,
	"Dr. H. Nikolaus Schaller" <hns@goldelico.com>
Subject: PATCH] LEDS: tca6507 - fix up some comments.
Date: Fri, 8 Nov 2013 14:20:04 +1100	[thread overview]
Message-ID: <20131108142004.10e31655@notabene.brown> (raw)
In-Reply-To: <CAK5ve-LzYLr0xuvNA3MX=pECPPfAkDFqExPpmQt8GF+9jf5uHg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3178 bytes --]


In particular fix the capitalisation of GPIO and LED and
correct TCA6507_MAKE_CPIO, but also rewrite the comment about
platform-data to include reference to devicetree.

Reported-by: Bryan Wu <cooloney@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>

diff --git a/drivers/leds/leds-tca6507.c b/drivers/leds/leds-tca6507.c
index 93a2b1759054..80c9d69e2bdd 100644
--- a/drivers/leds/leds-tca6507.c
+++ b/drivers/leds/leds-tca6507.c
@@ -8,7 +8,7 @@
  * double-blink.
  *
  * This driver can configure each line either as a 'GPIO' which is out-only
- * (no pull-up) or as an LED with variable brightness and hardware-assisted
+ * (pull-up resistor required) or as an LED with variable brightness and hardware-assisted
  * blinking.
  *
  * Apart from OFF and ON there are three programmable brightness levels which
@@ -60,21 +60,26 @@
  * and LEDs using the blink.  It can only be reprogrammed when the appropriate
  * counter is zero.  The MASTER level has a single usage count.
  *
- * Each Led has programmable 'on' and 'off' time as milliseconds.  With each
+ * Each LED has programmable 'on' and 'off' time as milliseconds.  With each
  * there is a flag saying if it was explicitly requested or defaulted.
  * Similarly the banks know if each time was explicit or a default.  Defaults
  * are permitted to be changed freely - they are not recognised when matching.
  *
  *
- * An led-tca6507 device must be provided with platform data.  This data
- * lists for each output: the name, default trigger, and whether the signal
- * is being used as a GPiO rather than an led.  'struct led_plaform_data'
- * is used for this.  If 'name' is NULL, the output isn't used.  If 'flags'
- * is TCA6507_MAKE_CPIO, the output is a GPO.
- * The "struct led_platform_data" can be embedded in a
- * "struct tca6507_platform_data" which adds a 'gpio_base' for the GPiOs,
- * and a 'setup' callback which is called once the GPiOs are available.
+ * An led-tca6507 device must be provided with platform data or configured
+ * via devicetree.
+ * The platform-data lists for each output: the name, default trigger,
+ * and whether the signal is being used as a GPIO rather than an LED.
+ * 'struct led_plaform_data' is used for this.  If 'name' is NULL, the
+ * output isn't used.  If 'flags' is TCA6507_MAKE_GPIO, the output is
+ * a GPO.  The "struct led_platform_data" can be embedded in a "struct
+ * tca6507_platform_data" which adds a 'gpio_base' for the GPIOs, and
+ * a 'setup' callback which is called once the GPIOs are available.
  *
+ * When configured via devicetree there is one child for each output.
+ * The "reg" determines the output number and "compatible" determines
+ * whether it is an LED or a GPIO.  "linux,default-trigger" can set a
+ * default trigger.
  */
 
 #include <linux/module.h>
@@ -309,7 +314,7 @@ static void set_level(struct tca6507_chip *tca, int bank, int level)
 	tca->bank[bank].level = level;
 }
 
-/* Record all relevant time code for a given bank */
+/* Record all relevant time codes for a given bank */
 static void set_times(struct tca6507_chip *tca, int bank)
 {
 	int c1, c2;

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

  parent reply	other threads:[~2013-11-08  3:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-01  2:41 [PATCH 2/2] LEDS: tca6502: add device-tree support for GPIO configuration NeilBrown
2013-11-07 23:39 ` Bryan Wu
2013-11-07 23:46   ` NeilBrown
2013-11-07 23:46   ` Bryan Wu
2013-11-08  3:20   ` NeilBrown [this message]
2013-11-08  3:24     ` PATCH] LEDS: tca6507 - fix up some comments Joe Perches
2013-11-12  1:06       ` Bryan Wu
2013-11-13  5:52         ` [PATCH - v2] " NeilBrown
2013-11-18 11:55 ` [PATCH 2/2] LEDS: tca6502: add device-tree support for GPIO configuration Mark Rutland
2013-11-18 22:50   ` NeilBrown

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=20131108142004.10e31655@notabene.brown \
    --to=neilb@suse.de \
    --cc=cooloney@gmail.com \
    --cc=hns@goldelico.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=marek.belisko@gmail.com \
    --cc=rpurdie@rpsys.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).