RE: [rtc-linux] [PATCH] RTC driver(Linux) for PT7C4338 chip.

2011-05-26 Thread Jain Priyanka-B32167
Hi Andrew Morton,

I have added the support for pt7c4338 in Dallas driver rtc-ds1307.c as 
suggested by Wolfram Sang
And send the patch Add support for pt7c4338 (rtc device) in rtc-ds1307 driver 
for the same which will supersede the previous patch.

Please let me know if anything else is required.

Thanks
Priyanka


 -Original Message-
 From: Andrew Morton [mailto:a...@linux-foundation.org]
 Sent: Thursday, May 26, 2011 5:26 AM
 To: Jain Priyanka-B32167
 Cc: Wolfram Sang; rtc-li...@googlegroups.com; linuxppc-
 d...@lists.ozlabs.org; a.zu...@towertech.it; p_gortma...@yahoo.com
 Subject: Re: [rtc-linux] [PATCH] RTC driver(Linux) for PT7C4338 chip.
 
 On Thu, 10 Mar 2011 11:06:27 +
 Jain Priyanka-B32167 b32...@freescale.com wrote:
 
  Hi Wolfram,
 
 
   -Original Message-
   From: Wolfram Sang [mailto:w.s...@pengutronix.de]
   Sent: Thursday, March 10, 2011 2:24 PM
   To: Jain Priyanka-B32167
   Cc: rtc-li...@googlegroups.com; linuxppc-dev@lists.ozlabs.org;
   a.zu...@towertech.it; p_gortma...@yahoo.com;
   a...@linux-foundation.org
   Subject: Re: [rtc-linux] [PATCH] RTC driver(Linux) for PT7C4338 chip.
  
   Hi Priyanka,
  
Though register-set looks identical but features were different.
  
   Can you tell what exactly is different?
  I will check both the devices data sheets again in detail and will get
 back on this.
  
And also manufacturer is different.
  
   That does not matter. If you look at ds_type, there are already
   different manufacturers. They will be correctly distinguished by
   i2c_device_id. The name of the driver itself is, well, just a name.
  
But still it might be possible that we can reuse ds1307.c with
some modification.
  
   I agree. The driver already supports some variants. Adding one more
   should not hurt. See 97f902b7be4dd6ba03c6aa8d3400783ed687ebd1 for an
   example which added ds3231 support.
  
But if I look at the drivers present in drivers/rtc folder. Most
of them looks similar but still there are different drivers for
different chips.
  
   Yes, it probably could be cleaned up if somebody had the
 time/hardware.
  
Please suggest which way is more preferred: modifying existing
drivers(of different manufacturer) or writing new driver.
  
   Ususally avoiding code duplication is good, it reduces maintenance
   burden. However, if adding the support turns out to make the
   original code unreadable or hard to follow, a new driver might be
   justified. This is why it is important to understand the differences
   of the chip as a first step. (I have the feeling, that modifying is
   the way to go here, though).
  
 
  I will explore possibility of using ds1307 driver for this.
 
 
 Has there been any movement here?


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [rtc-linux] [PATCH] RTC driver(Linux) for PT7C4338 chip.

2011-05-25 Thread Andrew Morton
On Thu, 10 Mar 2011 11:06:27 +
Jain Priyanka-B32167 b32...@freescale.com wrote:

 Hi Wolfram, 
 
 
  -Original Message-
  From: Wolfram Sang [mailto:w.s...@pengutronix.de]
  Sent: Thursday, March 10, 2011 2:24 PM
  To: Jain Priyanka-B32167
  Cc: rtc-li...@googlegroups.com; linuxppc-dev@lists.ozlabs.org;
  a.zu...@towertech.it; p_gortma...@yahoo.com; a...@linux-foundation.org
  Subject: Re: [rtc-linux] [PATCH] RTC driver(Linux) for PT7C4338 chip.
  
  Hi Priyanka,
  
   Though register-set looks identical but features were different.
  
  Can you tell what exactly is different?
 I will check both the devices data sheets again in detail and will get back 
 on this.
  
   And also manufacturer is different.
  
  That does not matter. If you look at ds_type, there are already different
  manufacturers. They will be correctly distinguished by i2c_device_id. The
  name of the driver itself is, well, just a name.
  
   But still it might be possible that we can reuse ds1307.c with some
   modification.
  
  I agree. The driver already supports some variants. Adding one more
  should not hurt. See 97f902b7be4dd6ba03c6aa8d3400783ed687ebd1 for an
  example which added ds3231 support.
  
   But if I look at the drivers present in drivers/rtc folder. Most of
   them looks similar but still there are different drivers for different
   chips.
  
  Yes, it probably could be cleaned up if somebody had the time/hardware.
  
   Please suggest which way is more preferred: modifying existing
   drivers(of different manufacturer) or writing new driver.
  
  Ususally avoiding code duplication is good, it reduces maintenance
  burden. However, if adding the support turns out to make the original
  code unreadable or hard to follow, a new driver might be justified. This
  is why it is important to understand the differences of the chip as a
  first step. (I have the feeling, that modifying is the way to go here,
  though).
  
 
 I will explore possibility of using ds1307 driver for this.
 

Has there been any movement here?
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [rtc-linux] [PATCH] RTC driver(Linux) for PT7C4338 chip.

2011-03-10 Thread Wolfram Sang
Hi Priyanka,

 Though register-set looks identical but features were different.

Can you tell what exactly is different?

 And also manufacturer is different.

That does not matter. If you look at ds_type, there are already
different manufacturers. They will be correctly distinguished by
i2c_device_id. The name of the driver itself is, well, just a name.

 But still it might be possible that we can reuse ds1307.c with some
 modification.

I agree. The driver already supports some variants. Adding one more
should not hurt. See 97f902b7be4dd6ba03c6aa8d3400783ed687ebd1 for an
example which added ds3231 support.

 But if I look at the drivers present in drivers/rtc folder. Most of
 them looks similar but still there are different drivers for different
 chips.

Yes, it probably could be cleaned up if somebody had the time/hardware.

 Please suggest which way is more preferred: modifying existing
 drivers(of different manufacturer) or writing new driver. 

Ususally avoiding code duplication is good, it reduces maintenance
burden. However, if adding the support turns out to make the original
code unreadable or hard to follow, a new driver might be justified. This
is why it is important to understand the differences of the chip as a
first step. (I have the feeling, that modifying is the way to go here,
though).

Regards,

   Wolfram

-- 
Pengutronix e.K.   | Wolfram Sang|
Industrial Linux Solutions | http://www.pengutronix.de/  |


signature.asc
Description: Digital signature
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

RE: [rtc-linux] [PATCH] RTC driver(Linux) for PT7C4338 chip.

2011-03-10 Thread Jain Priyanka-B32167
Hi Wolfram, 


 -Original Message-
 From: Wolfram Sang [mailto:w.s...@pengutronix.de]
 Sent: Thursday, March 10, 2011 2:24 PM
 To: Jain Priyanka-B32167
 Cc: rtc-li...@googlegroups.com; linuxppc-dev@lists.ozlabs.org;
 a.zu...@towertech.it; p_gortma...@yahoo.com; a...@linux-foundation.org
 Subject: Re: [rtc-linux] [PATCH] RTC driver(Linux) for PT7C4338 chip.
 
 Hi Priyanka,
 
  Though register-set looks identical but features were different.
 
 Can you tell what exactly is different?
I will check both the devices data sheets again in detail and will get back on 
this.
 
  And also manufacturer is different.
 
 That does not matter. If you look at ds_type, there are already different
 manufacturers. They will be correctly distinguished by i2c_device_id. The
 name of the driver itself is, well, just a name.
 
  But still it might be possible that we can reuse ds1307.c with some
  modification.
 
 I agree. The driver already supports some variants. Adding one more
 should not hurt. See 97f902b7be4dd6ba03c6aa8d3400783ed687ebd1 for an
 example which added ds3231 support.
 
  But if I look at the drivers present in drivers/rtc folder. Most of
  them looks similar but still there are different drivers for different
  chips.
 
 Yes, it probably could be cleaned up if somebody had the time/hardware.
 
  Please suggest which way is more preferred: modifying existing
  drivers(of different manufacturer) or writing new driver.
 
 Ususally avoiding code duplication is good, it reduces maintenance
 burden. However, if adding the support turns out to make the original
 code unreadable or hard to follow, a new driver might be justified. This
 is why it is important to understand the differences of the chip as a
 first step. (I have the feeling, that modifying is the way to go here,
 though).
 

I will explore possibility of using ds1307 driver for this.


Thanks
Priyanka

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


RE: [rtc-linux] [PATCH] RTC driver(Linux) for PT7C4338 chip.

2011-03-09 Thread Jain Priyanka-B32167
Dear Wolfram,

Though register-set looks identical but features were different. And also 
manufacturer is different.
But still it might be possible that we can reuse ds1307.c with some 
modification.
But if I look at the drivers present in drivers/rtc folder. Most of them looks 
similar but still there are different drivers for different chips.

Please suggest which way is more preferred: modifying existing drivers(of 
different manufacturer) or writing new driver. 

Thanks
Priyanka

 -Original Message-
 From: Wolfram Sang [mailto:w.s...@pengutronix.de]
 Sent: Thursday, March 03, 2011 2:53 PM
 To: rtc-li...@googlegroups.com
 Cc: linuxppc-dev@lists.ozlabs.org; a.zu...@towertech.it;
 p_gortma...@yahoo.com; a...@linux-foundation.org; Jain Priyanka-B32167
 Subject: Re: [rtc-linux] [PATCH] RTC driver(Linux) for PT7C4338 chip.
 
 Hi,
 
  +/*
  + * This file provides Date  Time support (no alarms) for PT7C4338
 chip.
  + *
  + * This file is based on drivers/rtc/rtc-ds1307.c
 
 Please explain why you can't use rtc-ds1307 directly (or with slight
 modifications). I might have missed something but the register-set looks
 identical to me?
 
 Regards,
 
Wolfram
 
 --
 Pengutronix e.K.   | Wolfram Sang
 |
 Industrial Linux Solutions | http://www.pengutronix.de/
 |

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [rtc-linux] [PATCH] RTC driver(Linux) for PT7C4338 chip.

2011-03-08 Thread Andrew Morton
On Thu, 3 Mar 2011 10:22:39 +0100
Wolfram Sang w.s...@pengutronix.de wrote:

 Hi,
 
  +/*
  + * This file provides Date  Time support (no alarms) for PT7C4338 chip.
  + *
  + * This file is based on drivers/rtc/rtc-ds1307.c
 
 Please explain why you can't use rtc-ds1307 directly (or with slight
 modifications). I might have missed something but the register-set looks
 identical to me?
 

Was there an answer to this question?

Thanks.
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [rtc-linux] [PATCH] RTC driver(Linux) for PT7C4338 chip.

2011-03-08 Thread Wolfram Sang
On Tue, Mar 08, 2011 at 04:55:31PM -0800, Andrew Morton wrote:
 On Thu, 3 Mar 2011 10:22:39 +0100
 Wolfram Sang w.s...@pengutronix.de wrote:
 
  Hi,
  
   +/*
   + * This file provides Date  Time support (no alarms) for PT7C4338 chip.
   + *
   + * This file is based on drivers/rtc/rtc-ds1307.c
  
  Please explain why you can't use rtc-ds1307 directly (or with slight
  modifications). I might have missed something but the register-set looks
  identical to me?
  
 
 Was there an answer to this question?

I didn't get one.

-- 
Pengutronix e.K.   | Wolfram Sang|
Industrial Linux Solutions | http://www.pengutronix.de/  |


signature.asc
Description: Digital signature
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [rtc-linux] [PATCH] RTC driver(Linux) for PT7C4338 chip.

2011-03-03 Thread Wolfram Sang
Hi,

 +/*
 + * This file provides Date  Time support (no alarms) for PT7C4338 chip.
 + *
 + * This file is based on drivers/rtc/rtc-ds1307.c

Please explain why you can't use rtc-ds1307 directly (or with slight
modifications). I might have missed something but the register-set looks
identical to me?

Regards,

   Wolfram

-- 
Pengutronix e.K.   | Wolfram Sang|
Industrial Linux Solutions | http://www.pengutronix.de/  |


signature.asc
Description: Digital signature
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev