From: Stefan Wahren <stefan.wahren@i2se.com>
To: Jacek Anaszewski <j.anaszewski@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-leds@vger.kernel.org
Subject: Re: [PATCH 3/3] leds: add SN3218 LED driver
Date: Mon, 1 Feb 2016 14:20:17 +0100 [thread overview]
Message-ID: <56AF5B91.1000209@i2se.com> (raw)
In-Reply-To: <56AF5567.4090102@samsung.com>
Am 01.02.2016 um 13:53 schrieb Jacek Anaszewski:
> On 02/01/2016 10:58 AM, Jacek Anaszewski wrote:
>> Hi Stefan,
>>
>> Thanks for the update. A few more comments below.
>>
>> On 01/31/2016 01:59 PM, Stefan Wahren wrote:
>>> +
>>> +/**
>>> + * struct sn3218 -
>>> + * @client - Pointer to the I2C client
>>> + * @leds - Pointer to the individual LEDs
>>> + * @num_leds - Actual number of LEDs
>>> +**/
>>> +struct sn3218 {
>>> + struct i2c_client *client;
>>> + struct regmap *regmap;
>>> + struct sn3218_led *leds;
>>> + int num_leds;
>>> +};
>>> +
>>> +/**
>>> + * struct sn3218_led -
>>> + * @chip - Pointer to the container
>>> + * @led_cdev - led class device pointer
>>> + * @led_num - LED index ( 0 .. 17 )
>>> +**/
>>> +struct sn3218_led {
>>> + struct sn3218 *chip;
>>
>> You don't need this if you have led id here. Please refer to
>> drivers/leds/leds-max77693.c, sub_led_to_led() to check how to get
>> a pointer to the parent structure in similar case.
>
> Hmm, it would work only if leds was a static array in struct sn3218.
> So, let's better leave this "chip" pointer intact.
Okay
I will wait until the end of the week before sending a new version.
Thanks
Stefan
prev parent reply other threads:[~2016-02-01 13:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-31 12:59 [PATCH 0/3] leds: add SN3218 LED driver Stefan Wahren
2016-01-31 12:59 ` [PATCH 1/3] of: Add vendor prefix for Si-En Technology Stefan Wahren
2016-01-31 12:59 ` [PATCH 2/3] DT: add binding for SN3218 LED driver Stefan Wahren
2016-02-01 9:59 ` Jacek Anaszewski
[not found] ` <1454245156-15747-1-git-send-email-stefan.wahren-eS4NqCHxEME@public.gmane.org>
2016-01-31 12:59 ` [PATCH 3/3] leds: add " Stefan Wahren
2016-02-01 9:58 ` Jacek Anaszewski
2016-02-01 12:53 ` Jacek Anaszewski
2016-02-01 13:20 ` Stefan Wahren [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=56AF5B91.1000209@i2se.com \
--to=stefan.wahren@i2se.com \
--cc=devicetree@vger.kernel.org \
--cc=j.anaszewski@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--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).