devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacek Anaszewski <jacek.anaszewski@gmail.com>
To: Dan Murphy <dmurphy@ti.com>, Pavel Machek <pavel@ucw.cz>
Cc: robh+dt@kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org
Subject: Re: [PATCH v5 2/2] leds: lm3697: Introduce the lm3697 driver
Date: Fri, 24 Aug 2018 21:33:44 +0200	[thread overview]
Message-ID: <586dc4fb-ebdf-ba8a-8a1e-ad49c80a1157@gmail.com> (raw)
In-Reply-To: <e5abd336-9861-66f3-3991-40cf1302ce8d@ti.com>

Dan,

On 08/24/2018 01:58 PM, Dan Murphy wrote:
> Jacek
> 
> On 08/24/2018 05:05 AM, Pavel Machek wrote:
>> Hi!
>>
>>> +/**
>>> + * struct lm3697 -
>>> + * @enable_gpio - Hardware enable gpio
>>> + * @regulator - LED supply regulator pointer
>>> + * @client - Pointer to the I2C client
>>> + * @regmap - Devices register map
>>> + * @dev - Pointer to the devices device struct
>>> + * @lock - Lock for reading/writing the device
>>> + * @leds - Array of LED strings.
>>> + */
>>
>> extra .
>>
>>> +	ret = regmap_write(led->priv->regmap, brt_msb_reg, brt_val);
>>> +	if (ret) {
>>> +		dev_err(&led->priv->client->dev, "Cannot write MSB\n");
>>> +		goto out;
>>> +	}
>>> +out:
>>
>> I'd avoid this goto.
>>
>>> +static int lm3697_set_control_bank(struct lm3697 *priv)
>>> +{
>>> +	u8 control_bank_config = 0;
>>> +	struct lm3697_led *led;
>>> +	int ret, i;
>>> +
>>> +	led = &priv->leds[0];
>>> +	if (led->control_bank == LM3697_CONTROL_A)
>>> +		led = &priv->leds[1];
>>
>> I'd expect CONTROL_A to correspond to leds[0]...?
>>
>>> +	for (i = 0; i < LM3697_MAX_LED_STRINGS; i++) {
>>> +		if (led->hvled_strings[i] == LM3697_HVLED_ASSIGNMENT)
>>> +			control_bank_config |= 1 << i;
>>> +	}
>>
>> Extra {}s.
>>
>>> +	priv->regulator = devm_regulator_get(&priv->client->dev, "vled");
>>> +	if (IS_ERR(priv->regulator))
>>> +		priv->regulator = NULL;
>>
>> If vled regulator is specified in dt and _get fails, is it worth a
>> warning?
>>
>> 									Pavel
>>
> 
> Do you want v6 or a new patch on top?

Please submit v6.

-- 
Best regards,
Jacek Anaszewski

  reply	other threads:[~2018-08-24 19:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-17 15:15 [PATCH v5 1/2] dt-bindings: leds: Add bindings for lm3697 driver Dan Murphy
2018-08-17 15:15 ` [PATCH v5 2/2] leds: lm3697: Introduce the " Dan Murphy
2018-08-24 10:05   ` Pavel Machek
2018-08-24 11:58     ` Dan Murphy
2018-08-24 19:33       ` Jacek Anaszewski [this message]
2018-09-05 18:18     ` Dan Murphy
2018-08-20 17:57 ` [PATCH v5 1/2] dt-bindings: leds: Add bindings for " Rob Herring
2018-08-24  9:55 ` Pavel Machek
2018-08-24 19:32   ` Jacek Anaszewski
2018-09-05 18:21   ` Dan Murphy
2018-09-07  7:45     ` Pavel Machek

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=586dc4fb-ebdf-ba8a-8a1e-ad49c80a1157@gmail.com \
    --to=jacek.anaszewski@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmurphy@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=robh+dt@kernel.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 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).