public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: S Twiss <stwiss.opensource@diasemi.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>,
	DEVICETREE <devicetree@vger.kernel.org>,
	LINUXINPUT <linux-input@vger.kernel.org>,
	LINUXKERNEL <linux-kernel@vger.kernel.org>,
	RTCLINUX <rtc-linux@googlegroups.com>,
	David Dajun Chen <david.chen@diasemi.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	Lee Jones <lee.jones@linaro.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Pawel Moll <pawel.moll@arm.com>, Rob Herring <robh+dt@kernel.org>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Support Opensource <support.opensource@diasemi.com>
Subject: Re: [PATCH V2 3/3] rtc: da9063: Add DA9062 RTC capability to DA9063 RTC driver
Date: Tue, 21 Jul 2015 12:01:51 +0200	[thread overview]
Message-ID: <20150721100151.GC2853@piout.net> (raw)
In-Reply-To: <93f0906ed7db18b893385b60a43b02f248dfe9a6.1437471790.git.stwiss.opensource@diasemi.com>

Hi Steve,

it looks mostly good, a few more comments:

On 21/07/2015 at 10:43:10 +0100, S Twiss wrote :
> -	if (val & (DA9063_E_ALARM))
> +	if (val & (config->rtc_event_alarm_mask))
unneeded parenthesis here

> +	if (of_device_is_compatible(pdev->dev.of_node, "dlg,da9063-rtc")) {
> +		struct da9063 *chip = dev_get_drvdata(pdev->dev.parent);
> +
> +		if (chip->variant_code == PMIC_DA9063_AD)
> +			rtc->config = &da9063_ad_regs;
> +	} else
> +		rtc->config = match->data;

Both arms of the if should use braces.

Also, what happens if it is a da9063, BB variant? I guess rtc->config
will not be set.

maybe you should write:

rtc->config = match->data;
if (of_device_is_compatible(pdev->dev.of_node, "dlg,da9063-rtc")) {
     struct da9063 *chip = dev_get_drvdata(pdev->dev.parent);

     if (chip->variant_code == PMIC_DA9063_AD)
         rtc->config = &da9063_ad_regs;
}


> @@ -348,5 +515,5 @@ module_platform_driver(da9063_rtc_driver);
>  
>  MODULE_AUTHOR("S Twiss <stwiss.opensource@diasemi.com>");
>  MODULE_DESCRIPTION("Real time clock device driver for Dialog DA9063");
> -MODULE_LICENSE("GPL v2");
> +MODULE_LICENSE("GPL");

This should be part of the license change.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2015-07-21 10:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-21  9:43 [PATCH V2 0/3] da9062: Add DA9062 RTC support using the existing DA9063 RTC driver S Twiss
2015-07-21  9:43 ` [PATCH V2 1/3] mfd: da9062: Support for the DA9063 RTC in the DA9062 core S Twiss
2015-07-21  9:43 ` [PATCH V2 2/3] devicetree: da9062: Add device tree bindings for DA9062 RTC S Twiss
2015-07-21  9:43 ` [PATCH V2 3/3] rtc: da9063: Add DA9062 RTC capability to DA9063 RTC driver S Twiss
2015-07-21 10:01   ` Alexandre Belloni [this message]
2015-07-21 10:15     ` Opensource [Steve Twiss]

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=20150721100151.GC2853@piout.net \
    --to=alexandre.belloni@free-electrons.com \
    --cc=a.zummo@towertech.it \
    --cc=david.chen@diasemi.com \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=lee.jones@linaro.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=rtc-linux@googlegroups.com \
    --cc=sameo@linux.intel.com \
    --cc=stwiss.opensource@diasemi.com \
    --cc=support.opensource@diasemi.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