Linux LED subsystem development
 help / color / mirror / Atom feed
From: Jacek Anaszewski <j.anaszewski@samsung.com>
To: Tony <tony.makkiel@daqri.com>
Cc: linux-leds@vger.kernel.org, linux-acpi@vger.kernel.org,
	rpurdie@rpsys.net, rjw@rjwysocki.net, lenb@kernel.org,
	mika.westerberg@linux.intel.com
Subject: Re: [PATCH v10 1/1] leds: LED driver for TI LP3952 6-Channel Color LED
Date: Mon, 11 Jul 2016 15:10:07 +0200	[thread overview]
Message-ID: <57839AAF.6070805@samsung.com> (raw)
In-Reply-To: <57838F26.9050100@daqri.com>

On 07/11/2016 02:20 PM, Tony wrote:
>
> Thank you for the comments Jacek.
[...]
>>>>> +static int lp3952_set_pattern_gen_cmd(struct lp3952_led_array *priv,
>>>>> +                      u8 cmd_index, u8 r, u8 g, u8 b,
>>>>> +                      enum lp3952_tt tt, enum lp3952_cet cet)
>>>>> +{
>>>>> +    int ret;
>>>>> +    struct ptrn_gen_cmd line = {
>>>>> +        .r = r,
>>>>> +        .g = g,
>>>>> +        .b = b,
>>>>> +        .cet = cet,
>>>>> +        .tt = tt
>>>>> +    };
>>>>> +
>>>>> +    if (cmd_index >= LP3952_CMD_REG_COUNT)
>>>>> +        return -EINVAL;
>>>>> +
>>>>> +    ret = lp3952_register_write(priv->client,
>>>>> +                    LP3952_REG_CMD_0 + cmd_index * 2,
>>>>> +                    line.bytes.msb);
>>>>> +    if (ret)
>>>>> +        return ret;
>>>>> +
>>>>> +    return (lp3952_register_write(priv->client,
>>>>> +                      LP3952_REG_CMD_0 + cmd_index * 2 + 1,
>>>>> +                      line.bytes.lsb));
>>
>> These brackets are redundant.
>>
>>>>> +}
>>>>> +
>>>>> +static int lp3952_configure(struct lp3952_led_array *priv)
>>>>> +{
>>>>> +    int ret;
>>>>> +
>>>>> +    /* Disable any LEDs on from any previous conf. */
>>>>> +    ret = lp3952_register_write(priv->client, LP3952_REG_LED_CTRL,
>>>>> 0);
>>>>> +    if (ret)
>>>>> +        return ret;
>>>>> +
>>>>> +    /* enable rgb patter, loop */
>>>>> +    ret = lp3952_register_write(priv->client,
>>>>> LP3952_REG_PAT_GEN_CTRL,
>>>>> +                    LP3952_PATRN_LOOP | LP3952_PATRN_GEN_EN);
>>>>> +    if (ret)
>>>>> +        return ret;
>>>>> +
>>>>> +    /* Update Bit 6 (Active mode), Select both Led sets, Bit [1:0] */
>>>>> +    ret = lp3952_register_write(priv->client, LP3952_REG_ENABLES,
>>>>> +                    LP3952_ACTIVE_MODE | LP3952_INT_B00ST_LDR);
>>>>> +    if (ret)
>>>>> +        return ret;
>>>>> +
>>>>> +    /* Set Cmd1 for RGB intensity,cmd and transition time */
>>>>> +    return (lp3952_set_pattern_gen_cmd(priv, 0, I46, I71, I100, TT0,
>>>>> +                       CET197));
>>
>> Ditto.
>>
>> If you agree I can remove them and take the patch.
>
> Yes please :). Thank you for your help.


Patch applied to the for-next branch of linux-leds.git.

Thank you for your effort and determination in submitting
subsequent versions.

-- 
Best regards,
Jacek Anaszewski

      reply	other threads:[~2016-07-11 13:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-11 10:48 [PATCH v10 1/1] leds: LED driver for TI LP3952 6-Channel Color LED Tony Makkiel
2016-07-11 11:25 ` Jacek Anaszewski
2016-07-11 11:39   ` Tony
2016-07-11 12:08     ` Jacek Anaszewski
2016-07-11 12:20       ` Tony
2016-07-11 13:10         ` Jacek Anaszewski [this message]

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=57839AAF.6070805@samsung.com \
    --to=j.anaszewski@samsung.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=rjw@rjwysocki.net \
    --cc=rpurdie@rpsys.net \
    --cc=tony.makkiel@daqri.com \
    /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