All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Jain Priyanka-B32167 <B32167@freescale.com>
Cc: "a.zummo@towertech.it" <a.zummo@towertech.it>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"rtc-linux@googlegroups.com" <rtc-linux@googlegroups.com>,
	"p_gortmaker@yahoo.com" <p_gortmaker@yahoo.com>
Subject: Re: [rtc-linux] [PATCH] RTC driver(Linux) for PT7C4338 chip.
Date: Wed, 25 May 2011 16:56:20 -0700	[thread overview]
Message-ID: <20110525165620.eeaa11ff.akpm@linux-foundation.org> (raw)
In-Reply-To: <470DB7CE2CD0944E9436E7ADEFC02FE313B36C@039-SN1MPN1-003.039d.mgd.msft.net>

On Thu, 10 Mar 2011 11:06:27 +0000
Jain Priyanka-B32167 <B32167@freescale.com> wrote:

> Hi Wolfram, 
> 
> 
> > -----Original Message-----
> > From: Wolfram Sang [mailto:w.sang@pengutronix.de]
> > Sent: Thursday, March 10, 2011 2:24 PM
> > To: Jain Priyanka-B32167
> > Cc: rtc-linux@googlegroups.com; linuxppc-dev@lists.ozlabs.org;
> > a.zummo@towertech.it; p_gortmaker@yahoo.com; akpm@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?

  reply	other threads:[~2011-05-25 23:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-03  3:51 [PATCH] RTC driver(Linux) for PT7C4338 chip Priyanka Jain
2011-03-03  9:22 ` [rtc-linux] " Wolfram Sang
2011-03-09  0:55   ` Andrew Morton
2011-03-09  6:46     ` Wolfram Sang
2011-03-10  3:23   ` Jain Priyanka-B32167
2011-03-10  8:54     ` Wolfram Sang
2011-03-10 11:06       ` Jain Priyanka-B32167
2011-05-25 23:56         ` Andrew Morton [this message]
2011-05-26  7:11           ` Jain Priyanka-B32167

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110525165620.eeaa11ff.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=B32167@freescale.com \
    --cc=a.zummo@towertech.it \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=p_gortmaker@yahoo.com \
    --cc=rtc-linux@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.