public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Balaji Rao <balajirrao@openmoko.org>
To: Alessandro Zummo <alessandro.zummo@towertech.it>
Cc: linux-kernel@vger.kernel.org, Andy Green <andy@openmoko.com>,
	Alessandro Zummo <a.zummo@towertech.it>,
	rtc-linux@googlegroups.com
Subject: Re: [PATCH V2 4/7] rtc: PCF50633 rtc driver
Date: Thu, 18 Dec 2008 20:41:43 +0530	[thread overview]
Message-ID: <20081218151142.GA2284@cff.thadambail> (raw)
In-Reply-To: <20081218100310.385bb808@i1501.lan.towertech.it>

On Thu, Dec 18, 2008 at 10:03:10AM +0100, Alessandro Zummo wrote:
> On Thu, 18 Dec 2008 11:27:26 +0530
> Balaji Rao <balajirrao@openmoko.org> wrote:
> 
> > Changes from V1:
> > 	- Removed include/linux/mfd/pcf50633/rtc.h and moved defenitions into
> > 	  the source file.
> > 	- Remove PIE and introduce UIE support. UIE being the one actually
> > 	  supported in the chip.
> > 
> > Alessandro, I'll change to the new API for AIE once it appears upstream.
> 
>  Ok, I guess the driver will not go in tomorrow, so you can wait.
>  I'd add it now, while you're at it :)
> 

OK! :) So that I can change when it's in -next ?

> > +config RTC_DRV_PCF50633
> > +	depends on MFD_PCF50633
> > +	tristate "NXP PCF50633 RTC"
> > +	help
> > +	  If you say yes here you get support for the NXP PCF50633 RTC.
> 
>  a more detailed description please stating which platforms commonly
>  have this rtc
> 

OK.

> > +static int __devinit pcf50633_rtc_probe(struct platform_device *pdev)
> > +{
> > +	struct pcf50633_subdev_pdata *pdata;
> > +	struct pcf50633_rtc *rtc;
> > +	struct rtc_device *rtc_dev;
> > +
> > +	rtc_dev = rtc_device_register("pcf50633-rtc", &pdev->dev,
> > +				&pcf50633_rtc_ops, THIS_MODULE);
> > +
> > +	if (IS_ERR(rtc_dev))
> > +		return PTR_ERR(rtc_dev);
> > +
> > +	rtc = kzalloc(sizeof(*rtc), GFP_KERNEL);
> > +	if (!rtc) {
> > +		dev_err(&pdev->dev, "allocation of pcf50633_rtc failed\n");
> > +		rtc_device_unregister(rtc_dev);
> > +		return -ENOMEM;
> > +	}
> 
>  once registered, the rtc could be immediately in use. you should first allocate
>  and setup your data structures and only then register the device:
> 

Oh, yea right. Will fix.

> > +static int __devexit pcf50633_rtc_remove(struct platform_device *pdev)
> > +{
> > +	struct pcf50633_rtc *rtc;
> > +
> > +	rtc = platform_get_drvdata(pdev);
> > +	rtc_device_unregister(rtc->rtc_dev);
> > +
> > +	pcf50633_free_irq(rtc->pcf, PCF50633_IRQ_ALARM);
> > +	pcf50633_free_irq(rtc->pcf, PCF50633_IRQ_SECOND);
> 
>  please remove rtc before unregistering
> 

Sorry, didn't get you meant.

Thank you for the review.

	-Balaji

  reply	other threads:[~2008-12-18 15:12 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-18  5:56 [PATCH V2 0/7] PCF50633 support Balaji Rao
2008-12-18  5:56 ` [PATCH V2 1/7] mfd: PCF50633 core driver Balaji Rao
2008-12-18  5:56 ` [PATCH V2 2/7] mfd: PCF50633 adc driver Balaji Rao
2008-12-19 11:18   ` Jonathan Cameron
2008-12-19 12:05     ` Mark Brown
2008-12-19 12:47       ` Jonathan Cameron
2008-12-19 12:15     ` Andy Green
2008-12-19 12:51       ` Jonathan Cameron
2008-12-22 16:23     ` Balaji Rao
2008-12-18  5:57 ` [PATCH V2 3/7] mfd: PCF50633 gpio support Balaji Rao
2008-12-18  5:57 ` [PATCH V2 4/7] rtc: PCF50633 rtc driver Balaji Rao
2008-12-18  9:03   ` Alessandro Zummo
2008-12-18 15:11     ` Balaji Rao [this message]
2008-12-18 16:52       ` Alessandro Zummo
2008-12-18  5:57 ` [PATCH V2 5/7] power_supply: PCF50633 battery charger driver Balaji Rao
2008-12-18 20:26   ` Balaji Rao
2008-12-25 15:45   ` Anton Vorontsov
2008-12-25 18:50     ` Balaji Rao
2008-12-18  5:58 ` [PATCH V2 6/7] input: PCF50633 input driver Balaji Rao
2008-12-18  5:58 ` [PATCH V2 7/7] regulator: PCF50633 pmic driver Balaji Rao
2008-12-18 10:08   ` Mark Brown
2008-12-18 15:14     ` Balaji Rao
2008-12-18 20:30       ` Liam Girdwood
2008-12-18 20:47         ` Balaji Rao
2008-12-18 20:54           ` Liam Girdwood
2008-12-22 10:50 ` [PATCH V2 0/7] PCF50633 support Samuel Ortiz

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=20081218151142.GA2284@cff.thadambail \
    --to=balajirrao@openmoko.org \
    --cc=a.zummo@towertech.it \
    --cc=alessandro.zummo@towertech.it \
    --cc=andy@openmoko.com \
    --cc=linux-kernel@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox