Re: [PATCH 32/33] add omap 1-wire interface driver

2008-09-09 Thread Madhusudhan Chikkature

- Original Message - 
From: Tony Lindgren [EMAIL PROTECTED]
To: Madhusudhan Chikkature [EMAIL PROTECTED]
Cc: Felipe Balbi [EMAIL PROTECTED]; linux-omap@vger.kernel.org; Felipe 
Balbi [EMAIL PROTECTED]
Sent: Monday, September 08, 2008 11:35 PM
Subject: Re: [PATCH 32/33] add omap 1-wire interface driver


* Madhusudhan Chikkature [EMAIL PROTECTED] [080908 05:15]:
 
 - Original Message - 
 From: Tony Lindgren [EMAIL PROTECTED]
 To: Madhusudhan Chikkature [EMAIL PROTECTED]
 Cc: Felipe Balbi [EMAIL PROTECTED]; linux-omap@vger.kernel.org; 
 Felipe Balbi [EMAIL PROTECTED]
 Sent: Friday, September 05, 2008 11:29 PM
 Subject: Re: [PATCH 32/33] add omap 1-wire interface driver
 
 
 * Madhusudhan Chikkature [EMAIL PROTECTED] [080901 06:16]:
  Hi,
  
  The HDQ patchset that I posted to Tony were given ACK by Evgeniy Polyakov 
  on the omap list. I hope that helps.
  
  Madhu, can you post your 1-wire driver to LKML and Cc Evgeniy Polyakov
  so we can get that integrated? Also Cc l-o list.
 I have a question regarding this. In fact it can be a generic question which 
 might apply for other drivers as well. How do we post the OMAP3 related 
 driver patches to LKML or any other driver specific lists if OMAP3 base 
 support is not already  present there?
 
 Well the drivers should not have dependencies to omap3 headers.
 And hopefully we'll have the minimal omap3 support integrated when
 2.6.28 opens.
 
 Also, you're already getting IORESOURCE_MEM as rerource. And isn't
 this driver also on 24XX chips too?
Yes.  This driver should work on 2430 as well.
 
 BTW, how about change it to use __raw_read/write instead of
 omap_read/write? Just ioremap the IORESOURCE_MEM, see
 the recent ioremap changes.
Okay. I will look at those changes.

Regards,
Madhu
 
 Regards,
 
 Tony
 
 
 Regards,
 Madhu 
  
  Thanks,
  
  Tony
  
  
  Regards,
  Madhu
  
  - Original Message - 
  From: Felipe Balbi [EMAIL PROTECTED]
  To: linux-omap@vger.kernel.org
  Cc: Felipe Balbi [EMAIL PROTECTED]
  Sent: Saturday, August 30, 2008 10:46 PM
  Subject: [PATCH 32/33] add omap 1-wire interface driver
  
  
   From: Felipe Balbi [EMAIL PROTECTED]
   
   Signed-off-by: Felipe Balbi [EMAIL PROTECTED]
   ---
   arch/arm/plat-omap/include/mach/irqs.h |2 +
   drivers/w1/masters/Kconfig |7 +
   drivers/w1/masters/Makefile|1 +
   drivers/w1/masters/omap_hdq.c  |  704 
   
   4 files changed, 714 insertions(+), 0 deletions(-)
   create mode 100644 drivers/w1/masters/omap_hdq.c
   
   diff --git a/arch/arm/plat-omap/include/mach/irqs.h 
   b/arch/arm/plat-omap/include/mach/irqs.h
   index 17248bb..c9e95a6 100644
   --- a/arch/arm/plat-omap/include/mach/irqs.h
   +++ b/arch/arm/plat-omap/include/mach/irqs.h
   @@ -54,6 +54,8 @@
   #define INT_TIMER2 30
   #define INT_LCD_CTRL 31
   
   +#define INT_24XX_HDQ_IRQ 58 /* Temporarily here for driver to build */
   +
   /*
* OMAP-1510 specific IRQ numbers for interrupt handler 1
*/
   diff --git a/drivers/w1/masters/Kconfig b/drivers/w1/masters/Kconfig
   index c449309..636d4f7 100644
   --- a/drivers/w1/masters/Kconfig
   +++ b/drivers/w1/masters/Kconfig
   @@ -42,6 +42,13 @@ config W1_MASTER_DS1WM
  in HP iPAQ devices like h5xxx, h2200, and ASIC3-based like
  hx4700.
   
   +config HDQ_MASTER_OMAP
   + tristate OMAP HDQ driver
   + depends on ARCH_OMAP2430 || ARCH_OMAP34XX
   + help
   +   Say Y here if you want support for the 1-wire or HDQ Interface
   +   on an OMAP processor.
   +
   config W1_MASTER_GPIO
tristate GPIO 1-wire busmaster
depends on GENERIC_GPIO
   diff --git a/drivers/w1/masters/Makefile b/drivers/w1/masters/Makefile
   index 1420b5b..1daeb6e 100644
   --- a/drivers/w1/masters/Makefile
   +++ b/drivers/w1/masters/Makefile
   @@ -6,4 +6,5 @@ obj-$(CONFIG_W1_MASTER_MATROX) += matrox_w1.o
   obj-$(CONFIG_W1_MASTER_DS2490) += ds2490.o
   obj-$(CONFIG_W1_MASTER_DS2482) += ds2482.o
   obj-$(CONFIG_W1_MASTER_DS1WM) += ds1wm.o
   +obj-$(CONFIG_HDQ_MASTER_OMAP) += omap_hdq.o
   obj-$(CONFIG_W1_MASTER_GPIO) += w1-gpio.o
   diff --git a/drivers/w1/masters/omap_hdq.c 
   b/drivers/w1/masters/omap_hdq.c
   new file mode 100644
   index 000..880e282
   --- /dev/null
   +++ b/drivers/w1/masters/omap_hdq.c
   @@ -0,0 +1,704 @@
   +/*
   + * drivers/w1/masters/omap_hdq.c
   + *
   + * Copyright (C) 2007 Texas Instruments, Inc.
   + *
   + * This file is licensed under the terms of the GNU General Public 
   License
   + * version 2. This program is licensed as is without any warranty of 
   any
   + * kind, whether express or implied.
   + *
   + */
   +#include linux/kernel.h
   +#include linux/module.h
   +#include linux/platform_device.h
   +#include linux/interrupt.h
   +#include linux/err.h
   +#include linux/clk.h
   +#include linux/io.h
   +#include asm/irq.h
   +#include mach/hardware.h
   +
   +#include ../w1.h
   +#include ../w1_int.h
   +
   +#define MOD_NAME OMAP_HDQ

Re: [PATCH 32/33] add omap 1-wire interface driver

2008-09-08 Thread Madhusudhan Chikkature

- Original Message - 
From: Tony Lindgren [EMAIL PROTECTED]
To: Madhusudhan Chikkature [EMAIL PROTECTED]
Cc: Felipe Balbi [EMAIL PROTECTED]; linux-omap@vger.kernel.org; Felipe 
Balbi [EMAIL PROTECTED]
Sent: Friday, September 05, 2008 11:29 PM
Subject: Re: [PATCH 32/33] add omap 1-wire interface driver


* Madhusudhan Chikkature [EMAIL PROTECTED] [080901 06:16]:
 Hi,
 
 The HDQ patchset that I posted to Tony were given ACK by Evgeniy Polyakov on 
 the omap list. I hope that helps.
 
 Madhu, can you post your 1-wire driver to LKML and Cc Evgeniy Polyakov
 so we can get that integrated? Also Cc l-o list.
I have a question regarding this. In fact it can be a generic question which 
might apply for other drivers as well. How do we post the OMAP3 related driver 
patches to LKML or any other driver specific lists if OMAP3 base support is not 
already  present there?

Regards,
Madhu 
 
 Thanks,
 
 Tony
 
 
 Regards,
 Madhu
 
 - Original Message - 
 From: Felipe Balbi [EMAIL PROTECTED]
 To: linux-omap@vger.kernel.org
 Cc: Felipe Balbi [EMAIL PROTECTED]
 Sent: Saturday, August 30, 2008 10:46 PM
 Subject: [PATCH 32/33] add omap 1-wire interface driver
 
 
  From: Felipe Balbi [EMAIL PROTECTED]
  
  Signed-off-by: Felipe Balbi [EMAIL PROTECTED]
  ---
  arch/arm/plat-omap/include/mach/irqs.h |2 +
  drivers/w1/masters/Kconfig |7 +
  drivers/w1/masters/Makefile|1 +
  drivers/w1/masters/omap_hdq.c  |  704 
  
  4 files changed, 714 insertions(+), 0 deletions(-)
  create mode 100644 drivers/w1/masters/omap_hdq.c
  
  diff --git a/arch/arm/plat-omap/include/mach/irqs.h 
  b/arch/arm/plat-omap/include/mach/irqs.h
  index 17248bb..c9e95a6 100644
  --- a/arch/arm/plat-omap/include/mach/irqs.h
  +++ b/arch/arm/plat-omap/include/mach/irqs.h
  @@ -54,6 +54,8 @@
  #define INT_TIMER2 30
  #define INT_LCD_CTRL 31
  
  +#define INT_24XX_HDQ_IRQ 58 /* Temporarily here for driver to build */
  +
  /*
   * OMAP-1510 specific IRQ numbers for interrupt handler 1
   */
  diff --git a/drivers/w1/masters/Kconfig b/drivers/w1/masters/Kconfig
  index c449309..636d4f7 100644
  --- a/drivers/w1/masters/Kconfig
  +++ b/drivers/w1/masters/Kconfig
  @@ -42,6 +42,13 @@ config W1_MASTER_DS1WM
 in HP iPAQ devices like h5xxx, h2200, and ASIC3-based like
 hx4700.
  
  +config HDQ_MASTER_OMAP
  + tristate OMAP HDQ driver
  + depends on ARCH_OMAP2430 || ARCH_OMAP34XX
  + help
  +   Say Y here if you want support for the 1-wire or HDQ Interface
  +   on an OMAP processor.
  +
  config W1_MASTER_GPIO
   tristate GPIO 1-wire busmaster
   depends on GENERIC_GPIO
  diff --git a/drivers/w1/masters/Makefile b/drivers/w1/masters/Makefile
  index 1420b5b..1daeb6e 100644
  --- a/drivers/w1/masters/Makefile
  +++ b/drivers/w1/masters/Makefile
  @@ -6,4 +6,5 @@ obj-$(CONFIG_W1_MASTER_MATROX) += matrox_w1.o
  obj-$(CONFIG_W1_MASTER_DS2490) += ds2490.o
  obj-$(CONFIG_W1_MASTER_DS2482) += ds2482.o
  obj-$(CONFIG_W1_MASTER_DS1WM) += ds1wm.o
  +obj-$(CONFIG_HDQ_MASTER_OMAP) += omap_hdq.o
  obj-$(CONFIG_W1_MASTER_GPIO) += w1-gpio.o
  diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c
  new file mode 100644
  index 000..880e282
  --- /dev/null
  +++ b/drivers/w1/masters/omap_hdq.c
  @@ -0,0 +1,704 @@
  +/*
  + * drivers/w1/masters/omap_hdq.c
  + *
  + * Copyright (C) 2007 Texas Instruments, Inc.
  + *
  + * This file is licensed under the terms of the GNU General Public License
  + * version 2. This program is licensed as is without any warranty of any
  + * kind, whether express or implied.
  + *
  + */
  +#include linux/kernel.h
  +#include linux/module.h
  +#include linux/platform_device.h
  +#include linux/interrupt.h
  +#include linux/err.h
  +#include linux/clk.h
  +#include linux/io.h
  +#include asm/irq.h
  +#include mach/hardware.h
  +
  +#include ../w1.h
  +#include ../w1_int.h
  +
  +#define MOD_NAME OMAP_HDQ:
  +
  +#define OMAP_HDQ_REVISION 0x00
  +#define OMAP_HDQ_TX_DATA 0x04
  +#define OMAP_HDQ_RX_DATA 0x08
  +#define OMAP_HDQ_CTRL_STATUS 0x0c
  +#define OMAP_HDQ_CTRL_STATUS_INTERRUPTMASK (16)
  +#define OMAP_HDQ_CTRL_STATUS_CLOCKENABLE (15)
  +#define OMAP_HDQ_CTRL_STATUS_GO (14)
  +#define OMAP_HDQ_CTRL_STATUS_INITIALIZATION (12)
  +#define OMAP_HDQ_CTRL_STATUS_DIR (11)
  +#define OMAP_HDQ_CTRL_STATUS_MODE (10)
  +#define OMAP_HDQ_INT_STATUS 0x10
  +#define OMAP_HDQ_INT_STATUS_TXCOMPLETE (12)
  +#define OMAP_HDQ_INT_STATUS_RXCOMPLETE (11)
  +#define OMAP_HDQ_INT_STATUS_TIMEOUT (10)
  +#define OMAP_HDQ_SYSCONFIG 0x14
  +#define OMAP_HDQ_SYSCONFIG_SOFTRESET (11)
  +#define OMAP_HDQ_SYSCONFIG_AUTOIDLE (10)
  +#define OMAP_HDQ_SYSSTATUS 0x18
  +#define OMAP_HDQ_SYSSTATUS_RESETDONE (10)
  +
  +#define OMAP_HDQ_FLAG_CLEAR 0
  +#define OMAP_HDQ_FLAG_SET 1
  +#define OMAP_HDQ_TIMEOUT (HZ/5)
  +
  +#define OMAP_HDQ_MAX_USER 4
  +
  +DECLARE_WAIT_QUEUE_HEAD(hdq_wait_queue);
  +int W1_ID;
  +
  +struct hdq_data {
  + resource_size_t

Re: [PATCH 32/33] add omap 1-wire interface driver

2008-09-05 Thread Tony Lindgren
* Madhusudhan Chikkature [EMAIL PROTECTED] [080901 06:16]:
 Hi,
 
 The HDQ patchset that I posted to Tony were given ACK by Evgeniy Polyakov on 
 the omap list. I hope that helps.

Madhu, can you post your 1-wire driver to LKML and Cc Evgeniy Polyakov
so we can get that integrated? Also Cc l-o list.

Thanks,

Tony

 
 Regards,
 Madhu
 
 - Original Message - 
 From: Felipe Balbi [EMAIL PROTECTED]
 To: linux-omap@vger.kernel.org
 Cc: Felipe Balbi [EMAIL PROTECTED]
 Sent: Saturday, August 30, 2008 10:46 PM
 Subject: [PATCH 32/33] add omap 1-wire interface driver
 
 
  From: Felipe Balbi [EMAIL PROTECTED]
  
  Signed-off-by: Felipe Balbi [EMAIL PROTECTED]
  ---
  arch/arm/plat-omap/include/mach/irqs.h |2 +
  drivers/w1/masters/Kconfig |7 +
  drivers/w1/masters/Makefile|1 +
  drivers/w1/masters/omap_hdq.c  |  704 
  
  4 files changed, 714 insertions(+), 0 deletions(-)
  create mode 100644 drivers/w1/masters/omap_hdq.c
  
  diff --git a/arch/arm/plat-omap/include/mach/irqs.h 
  b/arch/arm/plat-omap/include/mach/irqs.h
  index 17248bb..c9e95a6 100644
  --- a/arch/arm/plat-omap/include/mach/irqs.h
  +++ b/arch/arm/plat-omap/include/mach/irqs.h
  @@ -54,6 +54,8 @@
  #define INT_TIMER2 30
  #define INT_LCD_CTRL 31
  
  +#define INT_24XX_HDQ_IRQ 58 /* Temporarily here for driver to build */
  +
  /*
   * OMAP-1510 specific IRQ numbers for interrupt handler 1
   */
  diff --git a/drivers/w1/masters/Kconfig b/drivers/w1/masters/Kconfig
  index c449309..636d4f7 100644
  --- a/drivers/w1/masters/Kconfig
  +++ b/drivers/w1/masters/Kconfig
  @@ -42,6 +42,13 @@ config W1_MASTER_DS1WM
 in HP iPAQ devices like h5xxx, h2200, and ASIC3-based like
 hx4700.
  
  +config HDQ_MASTER_OMAP
  + tristate OMAP HDQ driver
  + depends on ARCH_OMAP2430 || ARCH_OMAP34XX
  + help
  +   Say Y here if you want support for the 1-wire or HDQ Interface
  +   on an OMAP processor.
  +
  config W1_MASTER_GPIO
   tristate GPIO 1-wire busmaster
   depends on GENERIC_GPIO
  diff --git a/drivers/w1/masters/Makefile b/drivers/w1/masters/Makefile
  index 1420b5b..1daeb6e 100644
  --- a/drivers/w1/masters/Makefile
  +++ b/drivers/w1/masters/Makefile
  @@ -6,4 +6,5 @@ obj-$(CONFIG_W1_MASTER_MATROX) += matrox_w1.o
  obj-$(CONFIG_W1_MASTER_DS2490) += ds2490.o
  obj-$(CONFIG_W1_MASTER_DS2482) += ds2482.o
  obj-$(CONFIG_W1_MASTER_DS1WM) += ds1wm.o
  +obj-$(CONFIG_HDQ_MASTER_OMAP) += omap_hdq.o
  obj-$(CONFIG_W1_MASTER_GPIO) += w1-gpio.o
  diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c
  new file mode 100644
  index 000..880e282
  --- /dev/null
  +++ b/drivers/w1/masters/omap_hdq.c
  @@ -0,0 +1,704 @@
  +/*
  + * drivers/w1/masters/omap_hdq.c
  + *
  + * Copyright (C) 2007 Texas Instruments, Inc.
  + *
  + * This file is licensed under the terms of the GNU General Public License
  + * version 2. This program is licensed as is without any warranty of any
  + * kind, whether express or implied.
  + *
  + */
  +#include linux/kernel.h
  +#include linux/module.h
  +#include linux/platform_device.h
  +#include linux/interrupt.h
  +#include linux/err.h
  +#include linux/clk.h
  +#include linux/io.h
  +#include asm/irq.h
  +#include mach/hardware.h
  +
  +#include ../w1.h
  +#include ../w1_int.h
  +
  +#define MOD_NAME OMAP_HDQ:
  +
  +#define OMAP_HDQ_REVISION 0x00
  +#define OMAP_HDQ_TX_DATA 0x04
  +#define OMAP_HDQ_RX_DATA 0x08
  +#define OMAP_HDQ_CTRL_STATUS 0x0c
  +#define OMAP_HDQ_CTRL_STATUS_INTERRUPTMASK (16)
  +#define OMAP_HDQ_CTRL_STATUS_CLOCKENABLE (15)
  +#define OMAP_HDQ_CTRL_STATUS_GO (14)
  +#define OMAP_HDQ_CTRL_STATUS_INITIALIZATION (12)
  +#define OMAP_HDQ_CTRL_STATUS_DIR (11)
  +#define OMAP_HDQ_CTRL_STATUS_MODE (10)
  +#define OMAP_HDQ_INT_STATUS 0x10
  +#define OMAP_HDQ_INT_STATUS_TXCOMPLETE (12)
  +#define OMAP_HDQ_INT_STATUS_RXCOMPLETE (11)
  +#define OMAP_HDQ_INT_STATUS_TIMEOUT (10)
  +#define OMAP_HDQ_SYSCONFIG 0x14
  +#define OMAP_HDQ_SYSCONFIG_SOFTRESET (11)
  +#define OMAP_HDQ_SYSCONFIG_AUTOIDLE (10)
  +#define OMAP_HDQ_SYSSTATUS 0x18
  +#define OMAP_HDQ_SYSSTATUS_RESETDONE (10)
  +
  +#define OMAP_HDQ_FLAG_CLEAR 0
  +#define OMAP_HDQ_FLAG_SET 1
  +#define OMAP_HDQ_TIMEOUT (HZ/5)
  +
  +#define OMAP_HDQ_MAX_USER 4
  +
  +DECLARE_WAIT_QUEUE_HEAD(hdq_wait_queue);
  +int W1_ID;
  +
  +struct hdq_data {
  + resource_size_t hdq_base;
  + struct semaphore hdq_semlock;
  + int hdq_usecount;
  + struct clk *hdq_ick;
  + struct clk *hdq_fck;
  + u8 hdq_irqstatus;
  + spinlock_t hdq_spinlock;
  +};
  +
  +static struct hdq_data *hdq_data;
  +
  +static int omap_hdq_get(void);
  +static int omap_hdq_put(void);
  +static int omap_hdq_break(void);
  +
  +static int __init omap_hdq_probe(struct platform_device *pdev);
  +static int omap_hdq_remove(struct platform_device *pdev);
  +
  +static struct platform_driver omap_hdq_driver = {
  + .probe = omap_hdq_probe,
  + .remove = omap_hdq_remove,
  + .suspend = NULL,
  + .resume

[PATCH 32/33] add omap 1-wire interface driver

2008-08-30 Thread Felipe Balbi
From: Felipe Balbi [EMAIL PROTECTED]

Signed-off-by: Felipe Balbi [EMAIL PROTECTED]
---
 arch/arm/plat-omap/include/mach/irqs.h |2 +
 drivers/w1/masters/Kconfig |7 +
 drivers/w1/masters/Makefile|1 +
 drivers/w1/masters/omap_hdq.c  |  704 
 4 files changed, 714 insertions(+), 0 deletions(-)
 create mode 100644 drivers/w1/masters/omap_hdq.c

diff --git a/arch/arm/plat-omap/include/mach/irqs.h 
b/arch/arm/plat-omap/include/mach/irqs.h
index 17248bb..c9e95a6 100644
--- a/arch/arm/plat-omap/include/mach/irqs.h
+++ b/arch/arm/plat-omap/include/mach/irqs.h
@@ -54,6 +54,8 @@
 #define INT_TIMER2 30
 #define INT_LCD_CTRL   31
 
+#define INT_24XX_HDQ_IRQ   58 /* Temporarily here for driver to build */
+
 /*
  * OMAP-1510 specific IRQ numbers for interrupt handler 1
  */
diff --git a/drivers/w1/masters/Kconfig b/drivers/w1/masters/Kconfig
index c449309..636d4f7 100644
--- a/drivers/w1/masters/Kconfig
+++ b/drivers/w1/masters/Kconfig
@@ -42,6 +42,13 @@ config W1_MASTER_DS1WM
  in HP iPAQ devices like h5xxx, h2200, and ASIC3-based like
  hx4700.
 
+config HDQ_MASTER_OMAP
+   tristate OMAP HDQ driver
+   depends on ARCH_OMAP2430 || ARCH_OMAP34XX
+   help
+ Say Y here if you want support for the 1-wire or HDQ Interface
+ on an OMAP processor.
+
 config W1_MASTER_GPIO
tristate GPIO 1-wire busmaster
depends on GENERIC_GPIO
diff --git a/drivers/w1/masters/Makefile b/drivers/w1/masters/Makefile
index 1420b5b..1daeb6e 100644
--- a/drivers/w1/masters/Makefile
+++ b/drivers/w1/masters/Makefile
@@ -6,4 +6,5 @@ obj-$(CONFIG_W1_MASTER_MATROX)  += matrox_w1.o
 obj-$(CONFIG_W1_MASTER_DS2490) += ds2490.o
 obj-$(CONFIG_W1_MASTER_DS2482) += ds2482.o
 obj-$(CONFIG_W1_MASTER_DS1WM)  += ds1wm.o
+obj-$(CONFIG_HDQ_MASTER_OMAP)  += omap_hdq.o
 obj-$(CONFIG_W1_MASTER_GPIO)   += w1-gpio.o
diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c
new file mode 100644
index 000..880e282
--- /dev/null
+++ b/drivers/w1/masters/omap_hdq.c
@@ -0,0 +1,704 @@
+/*
+ * drivers/w1/masters/omap_hdq.c
+ *
+ * Copyright (C) 2007 Texas Instruments, Inc.
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2. This program is licensed as is without any warranty of any
+ * kind, whether express or implied.
+ *
+ */
+#include linux/kernel.h
+#include linux/module.h
+#include linux/platform_device.h
+#include linux/interrupt.h
+#include linux/err.h
+#include linux/clk.h
+#include linux/io.h
+#include asm/irq.h
+#include mach/hardware.h
+
+#include ../w1.h
+#include ../w1_int.h
+
+#defineMOD_NAMEOMAP_HDQ:
+
+#define OMAP_HDQ_REVISION  0x00
+#define OMAP_HDQ_TX_DATA   0x04
+#define OMAP_HDQ_RX_DATA   0x08
+#define OMAP_HDQ_CTRL_STATUS   0x0c
+#define OMAP_HDQ_CTRL_STATUS_INTERRUPTMASK (16)
+#define OMAP_HDQ_CTRL_STATUS_CLOCKENABLE   (15)
+#define OMAP_HDQ_CTRL_STATUS_GO(14)
+#define OMAP_HDQ_CTRL_STATUS_INITIALIZATION(12)
+#define OMAP_HDQ_CTRL_STATUS_DIR   (11)
+#define OMAP_HDQ_CTRL_STATUS_MODE  (10)
+#define OMAP_HDQ_INT_STATUS0x10
+#define OMAP_HDQ_INT_STATUS_TXCOMPLETE (12)
+#define OMAP_HDQ_INT_STATUS_RXCOMPLETE (11)
+#define OMAP_HDQ_INT_STATUS_TIMEOUT(10)
+#define OMAP_HDQ_SYSCONFIG 0x14
+#define OMAP_HDQ_SYSCONFIG_SOFTRESET   (11)
+#define OMAP_HDQ_SYSCONFIG_AUTOIDLE(10)
+#define OMAP_HDQ_SYSSTATUS 0x18
+#define OMAP_HDQ_SYSSTATUS_RESETDONE   (10)
+
+#define OMAP_HDQ_FLAG_CLEAR0
+#define OMAP_HDQ_FLAG_SET  1
+#define OMAP_HDQ_TIMEOUT   (HZ/5)
+
+#define OMAP_HDQ_MAX_USER  4
+
+DECLARE_WAIT_QUEUE_HEAD(hdq_wait_queue);
+int W1_ID;
+
+struct hdq_data {
+   resource_size_t hdq_base;
+   struct  semaphore   hdq_semlock;
+   int hdq_usecount;
+   struct  clk *hdq_ick;
+   struct  clk *hdq_fck;
+   u8  hdq_irqstatus;
+   spinlock_t  hdq_spinlock;
+};
+
+static struct hdq_data *hdq_data;
+
+static int omap_hdq_get(void);
+static int omap_hdq_put(void);
+static int omap_hdq_break(void);
+
+static int __init omap_hdq_probe(struct platform_device *pdev);
+static int omap_hdq_remove(struct platform_device *pdev);
+
+static struct platform_driver omap_hdq_driver = {
+   .probe = omap_hdq_probe,
+   .remove = omap_hdq_remove,
+   .suspend = NULL,
+   .resume = NULL,
+   .driver = {
+   .name = omap_hdq,
+   },
+};
+
+static u8 omap_w1_read_byte(void *data);
+static void omap_w1_write_byte(void *data, u8 byte);