From: Lee Jones <lee.jones@linaro.org>
To: Jacek Anaszewski <j.anaszewski@samsung.com>
Cc: linux-leds@vger.kernel.org, linux-media@vger.kernel.org,
linux-kernel@vger.kernel.org, kyungmin.park@samsung.com,
b.zolnierkie@samsung.com, pavel@ucw.cz, cooloney@gmail.com,
rpurdie@rpsys.net, sakari.ailus@iki.fi, s.nawrocki@samsung.com,
robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com,
ijc+devicetree@hellion.org.uk, galak@codeaurora.org,
Chanwoo Choi <cw00.choi@samsung.com>
Subject: Re: [PATCH/RFC v9 04/19] mfd: max77693: adjust max77693_led_platform_data
Date: Tue, 9 Dec 2014 13:50:17 +0000 [thread overview]
Message-ID: <20141209135017.GY3951@x1> (raw)
In-Reply-To: <5486CE1F.9010102@samsung.com>
On Tue, 09 Dec 2014, Jacek Anaszewski wrote:
> On 12/09/2014 11:04 AM, Lee Jones wrote:
> >On Tue, 09 Dec 2014, Jacek Anaszewski wrote:
> >
> >>On 12/09/2014 09:50 AM, Lee Jones wrote:
> >>>On Wed, 03 Dec 2014, Jacek Anaszewski wrote:
> >>>
> >>>>Add "label" array for Device Tree strings with the name of a LED device
> >>>>and make flash_timeout a two element array, for caching the sub-led
> >>>>related flash timeout. Added is also an array for caching pointers to the
> >>>>sub-nodes representing sub-leds.
> >>>>
> >>>>Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
> >>>>Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
> >>>>Cc: Chanwoo Choi <cw00.choi@samsung.com>
> >>>>Cc: Lee Jones <lee.jones@linaro.org>
> >>>>---
> >>>> include/linux/mfd/max77693.h | 4 +++-
> >>>> 1 file changed, 3 insertions(+), 1 deletion(-)
> >>>>
> >>>>diff --git a/include/linux/mfd/max77693.h b/include/linux/mfd/max77693.h
> >>>>index f0b6585..c80ee99 100644
> >>>>--- a/include/linux/mfd/max77693.h
> >>>>+++ b/include/linux/mfd/max77693.h
> >>>>@@ -88,16 +88,18 @@ enum max77693_led_boost_mode {
> >>>> };
> >>>>
> >>>> struct max77693_led_platform_data {
> >>>>+ const char *label[2];
> >>>> u32 fleds[2];
> >>>> u32 iout_torch[2];for_each_available_child_of_node
> >>>> u32 iout_flash[2];
> >>>> u32 trigger[2];
> >>>> u32 trigger_type[2];
> >>>>+ u32 flash_timeout[2];
> >>>> u32 num_leds;
> >>>> u32 boost_mode;
> >>>>- u32 flash_timeout;
> >>>> u32 boost_vout;
> >>>> u32 low_vsys;
> >>>>+ struct device_node *sub_nodes[2];
> >>>
> >>>I haven't seen anyone do this before. Why can't you use the provided
> >>>OF functions to traverse through your tree?
> >>
> >>I use for_each_available_child_of_node when parsing DT node, but I
> >>need to cache the pointer to sub-node to be able to use it later
> >>when it needs to be passed to V4L2 sub-device which is then
> >>asynchronously matched by the phandle to sub-node.
> >>
> >>If it is not well seen to cache it in the platform data then
> >>I will find different way to accomplish this.
> >
> >I haven't seen the end-driver for this, but why can't you use that
> >device's of_node pointer?
>
> Maybe it is indeed a good idea. I could pass the of_node pointer
> and the sub-led identifier to the V4L2 sub-device and there look
> for the sub-node containing relevant identifier. The downside
> would be only that for_each_available_child_of_node would
> have to be called twice - in the led driver and in the V4L2 sub-device.
> I think that we can live with it.
Are the LED and V4L2 drivers children of this MFD? If so, you can use
the of_compatible attribute in struct mfd_cell to populate the each
child's of_node dynamically i.e. the MFD core will do that for you.
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
next prev parent reply other threads:[~2014-12-09 13:50 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-03 16:06 [PATCH/RFC v9 00/19] LED / flash API integration Jacek Anaszewski
2014-12-03 16:06 ` [PATCH/RFC v9 01/19] leds: Add LED Flash class extension to the LED subsystem Jacek Anaszewski
2014-12-03 16:50 ` Sakari Ailus
2014-12-04 9:29 ` Jacek Anaszewski
2014-12-09 12:36 ` Sakari Ailus
2014-12-09 12:56 ` Jacek Anaszewski
2014-12-09 14:12 ` Sakari Ailus
2014-12-03 16:06 ` [PATCH/RFC v9 02/19] Documentation: leds: Add description of LED Flash class extension Jacek Anaszewski
2014-12-03 17:08 ` Sakari Ailus
2014-12-04 9:42 ` Jacek Anaszewski
2014-12-09 12:38 ` Sakari Ailus
2014-12-09 13:14 ` Jacek Anaszewski
2014-12-03 16:06 ` [PATCH/RFC v9 03/19] mfd: max77693: Modify flash cell name identifiers Jacek Anaszewski
2014-12-09 8:52 ` Lee Jones
2014-12-09 9:18 ` Jacek Anaszewski
2014-12-09 10:02 ` Lee Jones
2014-12-03 16:06 ` [PATCH/RFC v9 04/19] mfd: max77693: adjust max77693_led_platform_data Jacek Anaszewski
2014-12-09 8:50 ` Lee Jones
2014-12-09 9:09 ` Jacek Anaszewski
2014-12-09 10:04 ` Lee Jones
2014-12-09 10:25 ` Jacek Anaszewski
2014-12-09 13:50 ` Lee Jones [this message]
2014-12-09 14:02 ` Jacek Anaszewski
2014-12-09 14:41 ` Lee Jones
2014-12-09 15:08 ` Sylwester Nawrocki
2014-12-10 12:38 ` Jacek Anaszewski
2014-12-03 16:06 ` [PATCH/RFC v9 05/19] leds: Add support for max77693 mfd flash cell Jacek Anaszewski
2014-12-04 9:39 ` Sakari Ailus
2014-12-04 11:06 ` Jacek Anaszewski
2014-12-09 13:11 ` Sakari Ailus
2014-12-11 13:53 ` Jacek Anaszewski
2014-12-11 15:48 ` Sakari Ailus
2014-12-03 16:06 ` [PATCH/RFC v9 06/19] DT: Add documentation for the mfd Maxim max77693 Jacek Anaszewski
2014-12-04 10:07 ` Sakari Ailus
2014-12-04 11:40 ` Jacek Anaszewski
2014-12-04 16:12 ` Pavel Machek
2014-12-08 10:29 ` Jacek Anaszewski
2014-12-10 12:20 ` Sylwester Nawrocki
2014-12-10 12:41 ` Jacek Anaszewski
2014-12-09 14:09 ` Sakari Ailus
2014-12-09 14:13 ` Jacek Anaszewski
2014-12-10 10:02 ` Jacek Anaszewski
2014-12-10 10:50 ` Sakari Ailus
2014-12-10 10:59 ` Sylwester Nawrocki
2014-12-03 16:06 ` [PATCH/RFC v9 07/19] dt-binding: mfd: max77693: Add DT binding related macros Jacek Anaszewski
2014-12-30 22:15 ` Sakari Ailus
2014-12-03 16:06 ` [PATCH/RFC v9 08/19] leds: Add driver for AAT1290 current regulator Jacek Anaszewski
2014-12-11 14:16 ` Sakari Ailus
2014-12-11 15:34 ` Jacek Anaszewski
2014-12-11 15:52 ` Sakari Ailus
2014-12-03 16:06 ` [PATCH/RFC v9 09/19] of: Add Skyworks Solutions, Inc. vendor prefix Jacek Anaszewski
2014-12-03 16:06 ` [PATCH/RFC v9 10/19] DT: Add documentation for the Skyworks AAT1290 Jacek Anaszewski
2014-12-03 16:06 ` [PATCH/RFC v9 11/19] v4l2-async: change custom.match callback argument type Jacek Anaszewski
2014-12-03 16:06 ` [PATCH/RFC v9 12/19] v4l2-async: add V4L2_ASYNC_MATCH_CUSTOM_OF matching type Jacek Anaszewski
2014-12-03 16:06 ` [PATCH/RFC v9 13/19] v4l2-ctrls: Add V4L2_CID_FLASH_SYNC_STROBE control Jacek Anaszewski
2014-12-03 16:06 ` [PATCH/RFC v9 14/19] media: Add registration helpers for V4L2 flash sub-devices Jacek Anaszewski
2014-12-03 16:06 ` [PATCH/RFC v9 15/19] Documentation: leds: Add description of v4l2-flash sub-device Jacek Anaszewski
2014-12-03 16:06 ` [PATCH/RFC v9 16/19] exynos4-is: Add support for v4l2-flash subdevs Jacek Anaszewski
2014-12-03 16:06 ` [PATCH/RFC v9 17/19] DT: Add documentation for exynos4-is 'flashes' property Jacek Anaszewski
2014-12-03 16:06 ` [PATCH/RFC v9 18/19] leds: max77693: add support for V4L2 Flash sub-device Jacek Anaszewski
2014-12-03 16:06 ` [PATCH/RFC v9 19/19] leds: aat1290: " Jacek Anaszewski
2014-12-10 13:48 ` Sakari Ailus
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=20141209135017.GY3951@x1 \
--to=lee.jones@linaro.org \
--cc=b.zolnierkie@samsung.com \
--cc=cooloney@gmail.com \
--cc=cw00.choi@samsung.com \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=j.anaszewski@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pavel@ucw.cz \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=rpurdie@rpsys.net \
--cc=s.nawrocki@samsung.com \
--cc=sakari.ailus@iki.fi \
/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).