Re: PATCH] LEDS: tca6507 - fix up some comments.

2013-11-11 Thread Bryan Wu
On Thu, Nov 7, 2013 at 7:24 PM, Joe Perches  wrote:
> On Fri, 2013-11-08 at 14:20 +1100, NeilBrown wrote:
>> 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.
>
> trivia:
>
>> diff --git 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.
>
> Please rewrap the comment to 80 cols.
>
>

Hi Neil,

Could you update your patch according Joe's review.

Thanks,
-Bryan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: PATCH] LEDS: tca6507 - fix up some comments.

2013-11-11 Thread Bryan Wu
On Thu, Nov 7, 2013 at 7:24 PM, Joe Perches j...@perches.com wrote:
 On Fri, 2013-11-08 at 14:20 +1100, NeilBrown wrote:
 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.

 trivia:

 diff --git 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.

 Please rewrap the comment to 80 cols.



Hi Neil,

Could you update your patch according Joe's review.

Thanks,
-Bryan
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: PATCH] LEDS: tca6507 - fix up some comments.

2013-11-07 Thread Joe Perches
On Fri, 2013-11-08 at 14:20 +1100, NeilBrown wrote:
> 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.

trivia:

> diff --git 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.

Please rewrap the comment to 80 cols.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


PATCH] LEDS: tca6507 - fix up some comments.

2013-11-07 Thread NeilBrown

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 
Signed-off-by: NeilBrown 

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 
@@ -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;


signature.asc
Description: PGP signature


PATCH] LEDS: tca6507 - fix up some comments.

2013-11-07 Thread NeilBrown

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 coolo...@gmail.com
Signed-off-by: NeilBrown ne...@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;


signature.asc
Description: PGP signature


Re: PATCH] LEDS: tca6507 - fix up some comments.

2013-11-07 Thread Joe Perches
On Fri, 2013-11-08 at 14:20 +1100, NeilBrown wrote:
 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.

trivia:

 diff --git 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.

Please rewrap the comment to 80 cols.


--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/