lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 3 Aug 2012 16:56:49 +0200
From:	Benoit Cousson <b-cousson@...com>
To:	Sourav Poddar <sourav.poddar@...com>
CC:	<khali@...ux-fr.org>, <linux@...ck-us.net>,
	<lm-sensors@...sensors.org>, <linux-kernel@...r.kernel.org>,
	<devicetree-discuss@...ts.ozlabs.org>,
	<linux-omap@...r.kernel.org>,
	<linux-arm-kernel@...ts.infradead.org>,
	Felipe Balbi <balbi@...com>,
	Santosh Shilimkar <santosh.shilimkar@...com>
Subject: Re: [PATCH] hwmon: tmp102: Add device tree support

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@...com>
> Cc: Felipe Balbi <balbi@...com>
> Cc: Santosh Shilimkar <santosh.shilimkar@...com>
> Acked-by: Felipe Balbi <balbi@...com>
> Signed-off-by: Sourav Poddar <sourav.poddar@...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.

Regards,
Benoit

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ