[lkml]   [2011]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 1/3] mfd: allow mfd_cell association with device tree node
On Wed, Sep 21, 2011 at 1:49 PM, Mark Brown
<> wrote:
> On Wed, Sep 21, 2011 at 01:01:48PM +0100, Daniel Drake wrote:
>> @@ -37,6 +38,9 @@ struct mfd_cell {
>>       void                    *platform_data;
>>       size_t                  pdata_size;
>> +     /* association with device tree node (optional) */
>> +     struct device_node      *of_node;
>> +
> This doesn't seem great as it means that the mfd_cells can't be static
> data, they have to be allocated per device.  Why can't the MFD cells get
> at the OF node by using the parent device in the same way as they
> (mostly) get platform data at the minute?

Thanks for reviewing.
The data can still be static, not needing allocation, it just has to
be modified at runtime. See patch 2.

Not sure how the MFD cells could get at the OF node by using the
parent device - if the parent device had a OF node, wouldn't this
correspond to the parent instead of the child? Also, as far as I can
see, platform data is passed to the child in exactly the same way - by
including it in the mfd_cell definition - see mfd_add_device():

if (cell->pdata_size) {
ret = platform_device_add_data(pdev,
cell->platform_data, cell->pdata_size);
if (ret)
goto fail_res;

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2011-09-21 15:05    [W:0.047 / U:8.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site