All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Jacek Anaszewski <j.anaszewski@samsung.com>,
	linux-leds@vger.kernel.org, linux-media@vger.kernel.org,
	kyungmin.park@samsung.com, pavel@ucw.cz, cooloney@gmail.com,
	rpurdie@rpsys.net, devicetree@vger.kernel.org, sre@kernel.org
Subject: Re: [PATCH v8 8/8] DT: samsung-fimc: Add examples for samsung,flash-led property
Date: Thu, 21 May 2015 18:58:59 +0200	[thread overview]
Message-ID: <555E0ED3.5080101@samsung.com> (raw)
In-Reply-To: <20150521142018.GK8601@valkosipuli.retiisi.org.uk>

Hi Sakari,

On 21/05/15 16:20, Sakari Ailus wrote:
> On Thu, May 21, 2015 at 03:28:40PM +0200, Sylwester Nawrocki wrote:
>> > On 21/05/15 13:32, Sakari Ailus wrote:
>>>>>> > >>>> @@ -147,6 +149,8 @@ Example:
>>>>>>>>> > >>>> > >>  			clocks = <&camera 0>;
>>>>>>>>> > >>>> > >>  			clock-names = "mclk";
>>>>>>>>> > >>>> > >>
>>>>>>>>> > >>>> > >>+			samsung,flash-led = <&rear_cam_flash>;
>>>>>>>>> > >>>> > >>+
>>>>>>>>> > >>>> > >>  			port {
>>>>>>>>> > >>>> > >>  				s5c73m3_1: endpoint {
>>>>>>>>> > >>>> > >>  					data-lanes = <1 2 3 4>;
>>>>>>> > >>> > >
>>>>>>> > >>> > >Oops. I missed this property would have ended to the sensor's DT node. I
>>>>>>> > >>> > >don't think we should have properties here that are parsed by another
>>>>>>> > >>> > >driver --- let's discuss this tomorrow.
>>>>> > >> > 
>>>>> > >> > exynos4-is driver already parses sensor nodes (at least their 'port'
>>>>> > >> > sub-nodes).
>>> > >
>>> > > If you read the code and the comment, it looks like something that should be
>>> > > done better but hasn't been done yet. :-) That's something we should avoid.
>>> > > Also, flash devices are by far more common than external ISPs I presume.
>> > 
>> > Yes, especially let's not require any samsung specific properties in
>> > other vendors' sensor bindings.
>> > 
>> > One way of modelling [flash led]/[image sensor] association I imagine
>> > would be to put, e.g. 'flash-leds' property in the SoC camera host
>> > interface/ISP DT node. This property would then contain pairs of phandles,
>> > first to the led node and the second to the sensor node, e.g.
>> > 
>> > i2c_controller {
>> > 	...
>> > 	flash_xx@NN {
>> > 		...
>> > 		led_a {
>> > 			...		
>> > 		}
>> > 	};
>> > 
>> > 	image_sensor_x@NN {
>> > 		...
>> > 	};
>> > };
>> > 
>> > flash-leds = <&flash_xx &image_sensor_x>, <...>;
>
> Maybe a stupid question, but how do you access this in a driver? I have to
> admit I'm no DT expert.

You could get of_node pointers with of_parse_phandle() call and then
lookup related flash and sensor devices based on that.

>> > For the purpose of this patch set presumably just samsung specific
>> > property name could be used (i.e. samsung,flash-leds).
>
> I agree. I'll add similar support for the omap3isp driver in the near future
> though. Let's see how the camera modules will get modelled, if they will,
> and if this property still fits to the picture by that time, then we make it
> more generic.
> 
> What do you think?

I think we could do that, perhaps we could get some more opinions and
use generic name already in this series? I'm not sure what are exact
plans for this series, I guess it is targeted for 4.2?

-- 
Regards,
Sylwester

  reply	other threads:[~2015-05-21 16:59 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-20 14:10 [PATCH v8 0/8] LED / flash API integration Jacek Anaszewski
2015-05-20 14:10 ` [PATCH v8 1/8] media: Add registration helpers for V4L2 flash sub-devices Jacek Anaszewski
2015-05-20 14:44   ` Sakari Ailus
2015-05-20 14:10 ` [PATCH v8 2/8] leds: max77693: add support for V4L2 Flash sub-device Jacek Anaszewski
2015-05-20 14:59   ` Sakari Ailus
2015-05-20 20:02   ` Sakari Ailus
2015-05-20 14:10 ` [PATCH v8 3/8] DT: aat1290: Document handling external strobe sources Jacek Anaszewski
2015-05-20 14:10 ` [PATCH v8 4/8] leds: aat1290: add support for V4L2 Flash sub-device Jacek Anaszewski
2015-05-20 14:10 ` [PATCH v8 5/8] exynos4-is: Add support for v4l2-flash subdevs Jacek Anaszewski
2015-05-21  7:46   ` Sakari Ailus
2015-05-21  9:39     ` Jacek Anaszewski
2015-05-21 10:38       ` Sakari Ailus
2015-05-20 14:10 ` [PATCH v8 6/8] DT: s5c73m3: Add documentation for samsung,flash-led property Jacek Anaszewski
2015-05-20 14:10 ` [PATCH v8 7/8] DT: s5k6a3: " Jacek Anaszewski
2015-05-20 14:10 ` [PATCH v8 8/8] DT: samsung-fimc: Add examples " Jacek Anaszewski
2015-05-20 22:00   ` Sakari Ailus
2015-05-21  9:10     ` Jacek Anaszewski
     [not found]       ` <555DA119.9030904-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-05-21 11:32         ` Sakari Ailus
2015-05-21 11:32           ` Sakari Ailus
2015-05-21 13:28           ` Sylwester Nawrocki
2015-05-21 14:20             ` Sakari Ailus
2015-05-21 16:58               ` Sylwester Nawrocki [this message]
2015-05-21 23:27                 ` Sakari Ailus
2015-05-23 12:03             ` Sakari Ailus
2015-05-25 12:00               ` Sylwester Nawrocki
2015-05-25 12:50                 ` Jacek Anaszewski
2015-05-25 14:28                   ` Sylwester Nawrocki
2015-05-25 15:20                     ` Jacek Anaszewski
2015-05-25 20:56                     ` Sakari Ailus
     [not found]                 ` <55630EE1.90307-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-06-01 21:17                   ` Sakari Ailus
2015-06-01 21:17                     ` 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=555E0ED3.5080101@samsung.com \
    --to=s.nawrocki@samsung.com \
    --cc=cooloney@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=j.anaszewski@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rpurdie@rpsys.net \
    --cc=sakari.ailus@iki.fi \
    --cc=sre@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.