Re: [rtc-linux] [PATCH 2/2] rtc: rtc-s3c: Updates RTC driver for clock enabling support

2010-07-27 Thread Wan ZongShun
2010/7/22 Atul Dahiya atuldahiy...@gmail.com:
 On Thu, Jul 22, 2010 at 11:39 AM, Wan ZongShun mcuos@gmail.com wrote:

 2010/7/21 Kukjin Kim kgene@samsung.com:
  From: Atul Dahiya atul.dah...@samsung.com
 
  This Patch updates existing Samsung RTC driver for clock enabling support.
 
  Signed-off-by: Atul Dahiya atul.dah...@samsung.com
  Signed-off-by: Kukjin Kim kgene@samsung.com
  ---
   drivers/rtc/rtc-s3c.c |   22 ++
   1 files changed, 22 insertions(+), 0 deletions(-)
 
  diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
  index 70b68d3..c032a15 100644
  --- a/drivers/rtc/rtc-s3c.c
  +++ b/drivers/rtc/rtc-s3c.c
  @@ -1,5 +1,8 @@
   /* drivers/rtc/rtc-s3c.c
   *
  + * Copyright (c) 2010 Samsung Electronics Co., Ltd.
  + *             http://www.samsung.com/
  + *
   * Copyright (c) 2004,2006 Simtec Electronics
   *     Ben Dooks, b...@simtec.co.uk
   *     http://armlinux.simtec.co.uk/
  @@ -39,6 +42,7 @@ enum s3c_cpu_type {
 
   static struct resource *s3c_rtc_mem;
 
  +static struct clk *rtc_clk;
   static void __iomem *s3c_rtc_base;
   static int s3c_rtc_alarmno = NO_IRQ;
   static int s3c_rtc_tickno  = NO_IRQ;
  @@ -431,6 +435,10 @@ static int __devexit s3c_rtc_remove(struct 
  platform_device *dev)
         s3c_rtc_setpie(dev-dev, 0);
         s3c_rtc_setaie(0);
 
  +       clk_disable(rtc_clk);
  +       clk_put(rtc_clk);
  +       rtc_clk = NULL;
  +
         iounmap(s3c_rtc_base);
         release_resource(s3c_rtc_mem);
         kfree(s3c_rtc_mem);
  @@ -488,6 +496,16 @@ static int __devinit s3c_rtc_probe(struct 
  platform_device *pdev)
                 goto err_nomap;
         }
 
  +       rtc_clk = clk_get(pdev-dev, rtc);

 Do you really need the second argument? I think the bus clock for
 a device should be findable with NULL for s3c platform..

 No, actually  clk_get() function for s3c platform searches on the
 basis of second parameter passed
 so need to pass the second argument here.

Okay, good patch!

Acked-by: Wan ZongShun mcuos@gmail.com



  +       if (IS_ERR(rtc_clk)) {
  +               dev_err(pdev-dev, failed to find rtc clock source\n);
  +               ret = PTR_ERR(rtc_clk);
  +               rtc_clk = NULL;
  +               goto err_clk;
  +       }
  +
  +       clk_enable(rtc_clk);
  +
         /* check to see if everything is setup correctly */
 
         s3c_rtc_enable(pdev, 1);
  @@ -523,6 +541,10 @@ static int __devinit s3c_rtc_probe(struct 
  platform_device *pdev)
 
   err_nortc:
         s3c_rtc_enable(pdev, 0);
  +       clk_disable(rtc_clk);
  +       clk_put(rtc_clk);
  +
  + err_clk:
         iounmap(s3c_rtc_base);
 
   err_nomap:
  --
  1.6.2.5
 
  --
  You received this message because you are subscribed to rtc-linux.
  Membership options at http://groups.google.com/group/rtc-linux .
  Please read http://groups.google.com/group/rtc-linux/web/checklist
  before submitting a driver.



 --
 *linux-arm-kernel mailing list
 mail addr:linux-arm-ker...@lists.infradead.org
 you can subscribe by:
 http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

 * linux-arm-NUC900 mailing list
 mail addr:nuc...@googlegroups.com
 main web: https://groups.google.com/group/NUC900
 you can subscribe it by sending me mail:
 mcuos@gmail.com
 --
 To unsubscribe from this list: send the line unsubscribe linux-samsung-soc 
 in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html




-- 
*linux-arm-kernel mailing list
mail addr:linux-arm-ker...@lists.infradead.org
you can subscribe by:
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

* linux-arm-NUC900 mailing list
mail addr:nuc...@googlegroups.com
main web: https://groups.google.com/group/NUC900
you can subscribe it by sending me mail:
mcuos@gmail.com
--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [rtc-linux] [PATCH 2/2] rtc: rtc-s3c: Updates RTC driver for clock enabling support

2010-07-27 Thread Kukjin Kim
Wan ZongShun wrote:
 
 2010/7/22 Atul Dahiya atuldahiy...@gmail.com:
  On Thu, Jul 22, 2010 at 11:39 AM, Wan ZongShun mcuos@gmail.com
 wrote:
 
  2010/7/21 Kukjin Kim kgene@samsung.com:
   From: Atul Dahiya atul.dah...@samsung.com
  
   This Patch updates existing Samsung RTC driver for clock enabling 
   support.
  
   Signed-off-by: Atul Dahiya atul.dah...@samsung.com
   Signed-off-by: Kukjin Kim kgene@samsung.com
   ---
drivers/rtc/rtc-s3c.c |   22 ++
1 files changed, 22 insertions(+), 0 deletions(-)
  
   diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
   index 70b68d3..c032a15 100644
   --- a/drivers/rtc/rtc-s3c.c
   +++ b/drivers/rtc/rtc-s3c.c
   @@ -1,5 +1,8 @@
/* drivers/rtc/rtc-s3c.c
*
   + * Copyright (c) 2010 Samsung Electronics Co., Ltd.
   + * http://www.samsung.com/
   + *
* Copyright (c) 2004,2006 Simtec Electronics
* Ben Dooks, b...@simtec.co.uk
* http://armlinux.simtec.co.uk/
   @@ -39,6 +42,7 @@ enum s3c_cpu_type {
  
static struct resource *s3c_rtc_mem;
  
   +static struct clk *rtc_clk;
static void __iomem *s3c_rtc_base;
static int s3c_rtc_alarmno = NO_IRQ;
static int s3c_rtc_tickno  = NO_IRQ;
   @@ -431,6 +435,10 @@ static int __devexit s3c_rtc_remove(struct
 platform_device *dev)
  s3c_rtc_setpie(dev-dev, 0);
  s3c_rtc_setaie(0);
  
   +   clk_disable(rtc_clk);
   +   clk_put(rtc_clk);
   +   rtc_clk = NULL;
   +
  iounmap(s3c_rtc_base);
  release_resource(s3c_rtc_mem);
  kfree(s3c_rtc_mem);
   @@ -488,6 +496,16 @@ static int __devinit s3c_rtc_probe(struct
 platform_device *pdev)
  goto err_nomap;
  }
  
   +   rtc_clk = clk_get(pdev-dev, rtc);
 
  Do you really need the second argument? I think the bus clock for
  a device should be findable with NULL for s3c platform..
 
  No, actually  clk_get() function for s3c platform searches on the
  basis of second parameter passed
  so need to pass the second argument here.
 
 Okay, good patch!
 
 Acked-by: Wan ZongShun mcuos@gmail.com
 
Thanks for your review and ack.

As I asked to Alessandro, does this goes through what subsystem go to upstream?

(snip)

Thanks.

Best regards,
Kgene.
--
Kukjin Kim kgene@samsung.com, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [rtc-linux] [PATCH 2/2] rtc: rtc-s3c: Updates RTC driver for clock enabling support

2010-07-27 Thread Wan ZongShun
2010/7/28 Kukjin Kim kgene@samsung.com:
 Wan ZongShun wrote:

 2010/7/22 Atul Dahiya atuldahiy...@gmail.com:
  On Thu, Jul 22, 2010 at 11:39 AM, Wan ZongShun mcuos@gmail.com
 wrote:
 
  2010/7/21 Kukjin Kim kgene@samsung.com:
   From: Atul Dahiya atul.dah...@samsung.com
  
   This Patch updates existing Samsung RTC driver for clock enabling 
   support.
  
   Signed-off-by: Atul Dahiya atul.dah...@samsung.com
   Signed-off-by: Kukjin Kim kgene@samsung.com
   ---
    drivers/rtc/rtc-s3c.c |   22 ++
    1 files changed, 22 insertions(+), 0 deletions(-)
  
   diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
   index 70b68d3..c032a15 100644
   --- a/drivers/rtc/rtc-s3c.c
   +++ b/drivers/rtc/rtc-s3c.c
   @@ -1,5 +1,8 @@
    /* drivers/rtc/rtc-s3c.c
    *
   + * Copyright (c) 2010 Samsung Electronics Co., Ltd.
   + *             http://www.samsung.com/
   + *
    * Copyright (c) 2004,2006 Simtec Electronics
    *     Ben Dooks, b...@simtec.co.uk
    *     http://armlinux.simtec.co.uk/
   @@ -39,6 +42,7 @@ enum s3c_cpu_type {
  
    static struct resource *s3c_rtc_mem;
  
   +static struct clk *rtc_clk;
    static void __iomem *s3c_rtc_base;
    static int s3c_rtc_alarmno = NO_IRQ;
    static int s3c_rtc_tickno  = NO_IRQ;
   @@ -431,6 +435,10 @@ static int __devexit s3c_rtc_remove(struct
 platform_device *dev)
          s3c_rtc_setpie(dev-dev, 0);
          s3c_rtc_setaie(0);
  
   +       clk_disable(rtc_clk);
   +       clk_put(rtc_clk);
   +       rtc_clk = NULL;
   +
          iounmap(s3c_rtc_base);
          release_resource(s3c_rtc_mem);
          kfree(s3c_rtc_mem);
   @@ -488,6 +496,16 @@ static int __devinit s3c_rtc_probe(struct
 platform_device *pdev)
                  goto err_nomap;
          }
  
   +       rtc_clk = clk_get(pdev-dev, rtc);
 
  Do you really need the second argument? I think the bus clock for
  a device should be findable with NULL for s3c platform..
 
  No, actually  clk_get() function for s3c platform searches on the
  basis of second parameter passed
  so need to pass the second argument here.

 Okay, good patch!

 Acked-by: Wan ZongShun mcuos@gmail.com

 Thanks for your review and ack.

 As I asked to Alessandro, does this goes through what subsystem go to 
 upstream?

After you get ack, Samsung git tree or Andrew's mm git tree can do it.
Thanks!

 (snip)

 Thanks.

 Best regards,
 Kgene.
 --
 Kukjin Kim kgene@samsung.com, Senior Engineer,
 SW Solution Development Team, Samsung Electronics Co., Ltd.

 --
 You received this message because you are subscribed to rtc-linux.
 Membership options at http://groups.google.com/group/rtc-linux .
 Please read http://groups.google.com/group/rtc-linux/web/checklist
 before submitting a driver.



-- 
*linux-arm-kernel mailing list
mail addr:linux-arm-ker...@lists.infradead.org
you can subscribe by:
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

* linux-arm-NUC900 mailing list
mail addr:nuc...@googlegroups.com
main web: https://groups.google.com/group/NUC900
you can subscribe it by sending me mail:
mcuos@gmail.com
--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [rtc-linux] [PATCH 2/2] rtc: rtc-s3c: Updates RTC driver for clock enabling support

2010-07-27 Thread Kukjin Kim


 -Original Message-
 From: linux-arm-kernel-boun...@lists.infradead.org [mailto:linux-arm-kernel-
 boun...@lists.infradead.org] On Behalf Of Wan ZongShun
 Sent: Wednesday, July 28, 2010 1:42 PM
 To: rtc-li...@googlegroups.com
 Cc: a.zu...@towertech.it; linux-samsung-soc@vger.kernel.org; Atul Dahiya;
 p_gortma...@yahoo.com; Atul Dahiya; ben-li...@fluff.org; linux-arm-
 ker...@lists.infradead.org
 Subject: Re: [rtc-linux] [PATCH 2/2] rtc: rtc-s3c: Updates RTC driver for 
 clock
 enabling support
 
 2010/7/28 Kukjin Kim kgene@samsung.com:
  Wan ZongShun wrote:
 
  2010/7/22 Atul Dahiya atuldahiy...@gmail.com:
   On Thu, Jul 22, 2010 at 11:39 AM, Wan ZongShun mcuos@gmail.com
  wrote:
  
   2010/7/21 Kukjin Kim kgene@samsung.com:
From: Atul Dahiya atul.dah...@samsung.com
   
This Patch updates existing Samsung RTC driver for clock enabling
 support.
   
Signed-off-by: Atul Dahiya atul.dah...@samsung.com
Signed-off-by: Kukjin Kim kgene@samsung.com
---
 drivers/rtc/rtc-s3c.c |   22 ++
 1 files changed, 22 insertions(+), 0 deletions(-)
   
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
index 70b68d3..c032a15 100644
--- a/drivers/rtc/rtc-s3c.c
+++ b/drivers/rtc/rtc-s3c.c
@@ -1,5 +1,8 @@
 /* drivers/rtc/rtc-s3c.c
 *
+ * Copyright (c) 2010 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com/
+ *
 * Copyright (c) 2004,2006 Simtec Electronics
 * Ben Dooks, b...@simtec.co.uk
 * http://armlinux.simtec.co.uk/
@@ -39,6 +42,7 @@ enum s3c_cpu_type {
   
 static struct resource *s3c_rtc_mem;
   
+static struct clk *rtc_clk;
 static void __iomem *s3c_rtc_base;
 static int s3c_rtc_alarmno = NO_IRQ;
 static int s3c_rtc_tickno  = NO_IRQ;
@@ -431,6 +435,10 @@ static int __devexit s3c_rtc_remove(struct
  platform_device *dev)
   s3c_rtc_setpie(dev-dev, 0);
   s3c_rtc_setaie(0);
   
+   clk_disable(rtc_clk);
+   clk_put(rtc_clk);
+   rtc_clk = NULL;
+
   iounmap(s3c_rtc_base);
   release_resource(s3c_rtc_mem);
   kfree(s3c_rtc_mem);
@@ -488,6 +496,16 @@ static int __devinit s3c_rtc_probe(struct
  platform_device *pdev)
   goto err_nomap;
   }
   
+   rtc_clk = clk_get(pdev-dev, rtc);
  
   Do you really need the second argument? I think the bus clock for
   a device should be findable with NULL for s3c platform..
  
   No, actually  clk_get() function for s3c platform searches on the
   basis of second parameter passed
   so need to pass the second argument here.
 
  Okay, good patch!
 
  Acked-by: Wan ZongShun mcuos@gmail.com
 
  Thanks for your review and ack.
 
  As I asked to Alessandro, does this goes through what subsystem go to
 upstream?
 
 After you get ack, Samsung git tree or Andrew's mm git tree can do it.
 Thanks!
 
Ok...will apply this for next merge window with your ack.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim kgene@samsung.com, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [rtc-linux] [PATCH 2/2] rtc: rtc-s3c: Updates RTC driver for clock enabling support

2010-07-22 Thread Wan ZongShun
2010/7/21 Kukjin Kim kgene@samsung.com:
 From: Atul Dahiya atul.dah...@samsung.com

 This Patch updates existing Samsung RTC driver for clock enabling support.

 Signed-off-by: Atul Dahiya atul.dah...@samsung.com
 Signed-off-by: Kukjin Kim kgene@samsung.com
 ---
  drivers/rtc/rtc-s3c.c |   22 ++
  1 files changed, 22 insertions(+), 0 deletions(-)

 diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
 index 70b68d3..c032a15 100644
 --- a/drivers/rtc/rtc-s3c.c
 +++ b/drivers/rtc/rtc-s3c.c
 @@ -1,5 +1,8 @@
  /* drivers/rtc/rtc-s3c.c
  *
 + * Copyright (c) 2010 Samsung Electronics Co., Ltd.
 + *             http://www.samsung.com/
 + *
  * Copyright (c) 2004,2006 Simtec Electronics
  *     Ben Dooks, b...@simtec.co.uk
  *     http://armlinux.simtec.co.uk/
 @@ -39,6 +42,7 @@ enum s3c_cpu_type {

  static struct resource *s3c_rtc_mem;

 +static struct clk *rtc_clk;
  static void __iomem *s3c_rtc_base;
  static int s3c_rtc_alarmno = NO_IRQ;
  static int s3c_rtc_tickno  = NO_IRQ;
 @@ -431,6 +435,10 @@ static int __devexit s3c_rtc_remove(struct 
 platform_device *dev)
        s3c_rtc_setpie(dev-dev, 0);
        s3c_rtc_setaie(0);

 +       clk_disable(rtc_clk);
 +       clk_put(rtc_clk);
 +       rtc_clk = NULL;
 +
        iounmap(s3c_rtc_base);
        release_resource(s3c_rtc_mem);
        kfree(s3c_rtc_mem);
 @@ -488,6 +496,16 @@ static int __devinit s3c_rtc_probe(struct 
 platform_device *pdev)
                goto err_nomap;
        }

 +       rtc_clk = clk_get(pdev-dev, rtc);

Do you really need the second argument? I think the bus clock for
a device should be findable with NULL for s3c platform..

 +       if (IS_ERR(rtc_clk)) {
 +               dev_err(pdev-dev, failed to find rtc clock source\n);
 +               ret = PTR_ERR(rtc_clk);
 +               rtc_clk = NULL;
 +               goto err_clk;
 +       }
 +
 +       clk_enable(rtc_clk);
 +
        /* check to see if everything is setup correctly */

        s3c_rtc_enable(pdev, 1);
 @@ -523,6 +541,10 @@ static int __devinit s3c_rtc_probe(struct 
 platform_device *pdev)

  err_nortc:
        s3c_rtc_enable(pdev, 0);
 +       clk_disable(rtc_clk);
 +       clk_put(rtc_clk);
 +
 + err_clk:
        iounmap(s3c_rtc_base);

  err_nomap:
 --
 1.6.2.5

 --
 You received this message because you are subscribed to rtc-linux.
 Membership options at http://groups.google.com/group/rtc-linux .
 Please read http://groups.google.com/group/rtc-linux/web/checklist
 before submitting a driver.



-- 
*linux-arm-kernel mailing list
mail addr:linux-arm-ker...@lists.infradead.org
you can subscribe by:
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

* linux-arm-NUC900 mailing list
mail addr:nuc...@googlegroups.com
main web: https://groups.google.com/group/NUC900
you can subscribe it by sending me mail:
mcuos@gmail.com
--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html