Re: [PATCH v2 2/3] i2c: s3c2410: Add device tree support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Grant,

On 31 July 2011 04:53, Grant Likely <grant.likely@xxxxxxxxxxxx> wrote:
> On Fri, Jul 22, 2011 at 03:48:37PM +0530, Thomas Abraham wrote:
>> Add device tree probe support for Samsung's s3c2410 i2c driver.
>>
>> Signed-off-by: Thomas Abraham <thomas.abraham@xxxxxxxxxx>
>> ---
>>  .../devicetree/bindings/i2c/samsung-i2c.txt        |   44 +++++++++++++++++
>>  drivers/i2c/busses/i2c-s3c2410.c                   |   51 +++++++++++++++++++-
>>  2 files changed, 94 insertions(+), 1 deletions(-)
>>  create mode 100644 Documentation/devicetree/bindings/i2c/samsung-i2c.txt
>>

[...]

>>
>> -     ret = i2c_add_numbered_adapter(&i2c->adap);
>> +     ret = (pdev->dev.of_node) ? i2c_add_adapter(&i2c->adap) :
>> +                                     i2c_add_numbered_adapter(&i2c->adap);
>
> i2c_add_numbered_adapter will do the right thing now if i2c->adap.nr
> is set to -1 when a bus number needs to be dynamically allocated.  You can simplify this.
>

Ok. I will change it to just use the i2c_add_numbered_adapter function
(just noticed your patch).

A question related to bus number: In case of dynamically allocated bus
number, how would the application know to which i2c bus a particular
slave device is connected? The application would be programmed to look
for a slave device on a particular bus. But with dynamic i2c bus
number, how should application find out the correct bus number?

>>       if (ret < 0) {
>>               dev_err(&pdev->dev, "failed to add bus to i2c core\n");
>>               goto err_cpufreq;
>>       }
>>
>> +     of_i2c_register_devices(&i2c->adap);
>>       platform_set_drvdata(pdev, i2c);
>>

[...]

>>       },
>
> Looks pretty good.  After fixing the above comment, feel free to add
> my:
>
> Acked-by: Grant Likely <grant.likely@xxxxxxxxxxxx>

Thanks Grant. I will fix as per your comment.

Regards,
Thomas.

>
>>  };
>>
>> --
>> 1.6.6.rc2
>>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux