Re: [PATCH] hwmon: tmp102: Add device tree support |
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [PATCH] hwmon: tmp102: Add device tree support
- From: "Poddar, Sourav" <sourav.poddar@xxxxxx>
- Date: Mon, 6 Aug 2012 13:05:34 +0530
- Cc: khali@xxxxxxxxxxxx, linux@xxxxxxxxxxxx, lm-sensors@xxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, devicetree-discuss@xxxxxxxxxxxxxxxx, linux-omap@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, Felipe Balbi <balbi@xxxxxx>, Santosh Shilimkar <santosh.shilimkar@xxxxxx>
- In-reply-to: <501BE6B1.9000100@ti.com>
Hi Benoit,
On Fri, Aug 3, 2012 at 8:26 PM, Benoit Cousson <b-cousson@xxxxxx> 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@xxxxxx>
>> Cc: Felipe Balbi <balbi@xxxxxx>
>> Cc: Santosh Shilimkar <santosh.shilimkar@xxxxxx>
>> Acked-by: Felipe Balbi <balbi@xxxxxx>
>> Signed-off-by: Sourav Poddar <sourav.poddar@xxxxxx>
>> ---
>> 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
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux Arm (vger)]
[ARM Kernel]
[ARM MSM]
[Linux Tegra]
[Maemo Users]
[Linux USB Devel]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Free Online Dating]
[Linux Kernel]
[Linux SCSI]
[XFree86]