[lkml]   [2013]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 1/4] mfd: add support for AMS AS3722 PMIC
On Tuesday 17 September 2013 04:54 PM, Mark Brown wrote:
> * PGP Signed by an unknown key
> On Tue, Sep 17, 2013 at 12:15:35PM +0530, Laxman Dewangan wrote:
>> +MFD driver adds following mfd devices with their compatible values:
>> +as3722-gpio: The compatible value of this as3722 gpio driver is
>> + "ams,as3722-gpio";
>> +as3722-regulator: The compatible value of this as3722 regulator driver is
>> + "ams,as3722-regulator";
>> +as3722-rtc: The compatible value of this as3722 rtc driver is
>> + "ams,as3722-rtc";
>> +as3722-adc: The compatible value of this as3722 adc driver is
>> + "ams,as3722-adc";
>> +as3722-power-off: he compatible value of this as3722 power off driver is
>> + "ams,as3722-power-off".
> Personally I find this to be exposing implementation details of Linux -
> unless there is something reusable about the binding that'd allow it to
> be used to describe the contents of the chip the subnodes really aren't
> adding any information that wasn't present from just knowing the parent
> chip. If there were relocatable IPs it'd be a bit different.

Ok, then can we fix the the sub node name and parse these when adding
mfd devices and set the pdev->dev.of_node of child devices.
parent_node {
child1_node {

child1_node {

and fix the node name of child1 and child2 and have this as part of
mfd-cell's of_node_name.
So when we add the mfd devices, we look for these fixed name and if
matches then set the dev->of_node for that child sub device.

This will avoid the code for getting child node pointer from parent node
in each driver. We fix the child node name in any case.

 \ /
  Last update: 2013-09-17 14:01    [W:0.082 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site