devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Poddar, Sourav" <sourav.poddar@ti.com>
To: Benoit Cousson <b-cousson@ti.com>
Cc: khali@linux-fr.org, linux@roeck-us.net,
	lm-sensors@lm-sensors.org, linux-kernel@vger.kernel.org,
	devicetree-discuss@lists.ozlabs.org, linux-omap@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, Felipe Balbi <balbi@ti.com>,
	Santosh Shilimkar <santosh.shilimkar@ti.com>
Subject: Re: [PATCH] hwmon: tmp102: Add device tree support
Date: Mon, 6 Aug 2012 13:05:34 +0530	[thread overview]
Message-ID: <CAKdam54Zshr-d502E_AS+vw5+vLQnTBrAGRPTy-9-hZy1QEFbA@mail.gmail.com> (raw)
In-Reply-To: <501BE6B1.9000100@ti.com>

Hi Benoit,

On Fri, Aug 3, 2012 at 8:26 PM, Benoit Cousson <b-cousson@ti.com> wrote:
> Hi Sourav,
>
> On 08/03/2012 02:35 PM, Sourav Poddar wrote:
>> update tmp102 temperature sensor to also use device tree.
>>
>> Cc: Benoit Cousson <b-cousson@ti.com>
>> Cc: Felipe Balbi <balbi@ti.com>
>> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
>> Acked-by: Felipe Balbi <balbi@ti.com>
>> Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
>> ---
>>  drivers/hwmon/tmp102.c |   14 +++++++++++++-
>>  1 files changed, 13 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/hwmon/tmp102.c b/drivers/hwmon/tmp102.c
>> index 0d466b9..a8a9060 100644
>> --- a/drivers/hwmon/tmp102.c
>> +++ b/drivers/hwmon/tmp102.c
>> @@ -26,6 +26,7 @@
>>  #include <linux/err.h>
>>  #include <linux/mutex.h>
>>  #include <linux/device.h>
>> +#include <linux/of.h>
>>
>>  #define      DRIVER_NAME "tmp102"
>>
>> @@ -284,8 +285,19 @@ static const struct i2c_device_id tmp102_id[] = {
>>  };
>>  MODULE_DEVICE_TABLE(i2c, tmp102_id);
>>
>> +#ifdef CONFIG_OF
>> +static const struct of_device_id temperature_dt_match[] = {
>> +     { .compatible = "ti,tmp102" },
>
> Are you sure this is needed for this device?
>
> There is an automatic binding done for I2C devices in the of_i2c core
> code. So in theory, DT will be able to bind to any I2C device using the
> already existing table: MODULE_DEVICE_TABLE(i2c, tmp102_id).
>
> So I think this patch should not be needed.
>
Indeed. Checked it just now, this patch is not required and the already
existing table is enough for the device to work fine.

Thanks for the information.

This patch is abandoned.
~Sourav
> Regards,
> Benoit
>

      reply	other threads:[~2012-08-06  7:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-03 12:35 [PATCH] hwmon: tmp102: Add device tree support Sourav Poddar
     [not found] ` <1343997350-676-1-git-send-email-sourav.poddar-l0cyMroinI0@public.gmane.org>
2012-08-03 14:56   ` Benoit Cousson
2012-08-06  7:35     ` Poddar, Sourav [this message]

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=CAKdam54Zshr-d502E_AS+vw5+vLQnTBrAGRPTy-9-hZy1QEFbA@mail.gmail.com \
    --to=sourav.poddar@ti.com \
    --cc=b-cousson@ti.com \
    --cc=balbi@ti.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=khali@linux-fr.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=lm-sensors@lm-sensors.org \
    --cc=santosh.shilimkar@ti.com \
    /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).