All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: Sebastian Reichel <sre@kernel.org>,
	Alessandro Zummo <a.zummo@towertech.it>,
	rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] rtc: cpcap: new rtc driver
Date: Mon, 20 Feb 2017 09:27:37 -0800	[thread overview]
Message-ID: <20170220172737.GJ21809@atomide.com> (raw)
In-Reply-To: <20170220172103.GI21809@atomide.com>

* Tony Lindgren <tony@atomide.com> [170220 09:21]:
> * Alexandre Belloni <alexandre.belloni@free-electrons.com> [170220 08:40]:
> > On 20/02/2017 at 08:31:56 -0800, Tony Lindgren wrote:
> > > * Sebastian Reichel <sre@kernel.org> [170219 23:37]:
> > > > This driver supports the Motorola CPCAP PMIC found on
> > > > some of Motorola's mobile phones, such as the Droid 4.
> > > 
> > > Hey that's cool, works for me for reading and setting date :)
> > > Just noticed one thing, see below.
> > > 
> > > > +Requires node properties:
> > > > +- compatible: should contain "motorola,cpcap-rtc"
> > > > +- interrupts: An interrupt specifier for alarm and 1 Hz irq
> > > > +
> > > > +Example:
> > > > +
> > > > +cpcap_rtc: rtc {
> > > > +	compatible = "motorola,cpcap-rtc";
> > > > +	interrupts = <39 IRQ_TYPE_NONE>, <26 IRQ_TYPE_NONE>;
> > > > +};
> > > 
> > > I tried rtcwake -s 3, but got the following:
> > > 
> > > rtcwake: cannot open /sys/class/rtc/rtc0/device/power/wakeup:
> > > No such file or directory
> > > rtcwake: /dev/rtc0 not enabled for wakeup events
> > > 
> > > Then tried adding "wakeup-source" to above but I think the driver
> > > needs something, maybe probably just PM ops?
> > > 
> > 
> > Probably device_init_wakeup(dev, 1) ?
> 
> That gets us a bit closer but now produces:
> 
> rtcwake: write error

Oh user error.. It needs to be done with:

# rtcwake -s 3 -m mem

And with the addition of device_init_wakeup(dev, 1) to the probe
it works for me. So Sebastian, with that change, please feel free
to add:

Tested-by: Tony Lindgren <tony@atomide.com>

WARNING: multiple messages have this Message-ID (diff)
From: Tony Lindgren <tony@atomide.com>
To: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: Sebastian Reichel <sre@kernel.org>,
	Alessandro Zummo <a.zummo@towertech.it>,
	rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org
Subject: [rtc-linux] Re: [PATCH 1/1] rtc: cpcap: new rtc driver
Date: Mon, 20 Feb 2017 09:27:37 -0800	[thread overview]
Message-ID: <20170220172737.GJ21809@atomide.com> (raw)
In-Reply-To: <20170220172103.GI21809@atomide.com>

* Tony Lindgren <tony@atomide.com> [170220 09:21]:
> * Alexandre Belloni <alexandre.belloni@free-electrons.com> [170220 08:40]:
> > On 20/02/2017 at 08:31:56 -0800, Tony Lindgren wrote:
> > > * Sebastian Reichel <sre@kernel.org> [170219 23:37]:
> > > > This driver supports the Motorola CPCAP PMIC found on
> > > > some of Motorola's mobile phones, such as the Droid 4.
> > > 
> > > Hey that's cool, works for me for reading and setting date :)
> > > Just noticed one thing, see below.
> > > 
> > > > +Requires node properties:
> > > > +- compatible: should contain "motorola,cpcap-rtc"
> > > > +- interrupts: An interrupt specifier for alarm and 1 Hz irq
> > > > +
> > > > +Example:
> > > > +
> > > > +cpcap_rtc: rtc {
> > > > +	compatible = "motorola,cpcap-rtc";
> > > > +	interrupts = <39 IRQ_TYPE_NONE>, <26 IRQ_TYPE_NONE>;
> > > > +};
> > > 
> > > I tried rtcwake -s 3, but got the following:
> > > 
> > > rtcwake: cannot open /sys/class/rtc/rtc0/device/power/wakeup:
> > > No such file or directory
> > > rtcwake: /dev/rtc0 not enabled for wakeup events
> > > 
> > > Then tried adding "wakeup-source" to above but I think the driver
> > > needs something, maybe probably just PM ops?
> > > 
> > 
> > Probably device_init_wakeup(dev, 1) ?
> 
> That gets us a bit closer but now produces:
> 
> rtcwake: write error

Oh user error.. It needs to be done with:

# rtcwake -s 3 -m mem

And with the addition of device_init_wakeup(dev, 1) to the probe
it works for me. So Sebastian, with that change, please feel free
to add:

Tested-by: Tony Lindgren <tony@atomide.com>

-- 
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.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

  reply	other threads:[~2017-02-20 17:27 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-20  7:35 [PATCH 0/1] Motorola CPCAP PMIC RTC Sebastian Reichel
2017-02-20  7:35 ` [rtc-linux] " Sebastian Reichel
2017-02-20  7:35 ` [PATCH 1/1] rtc: cpcap: new rtc driver Sebastian Reichel
2017-02-20  7:35   ` [rtc-linux] " Sebastian Reichel
2017-02-20 16:31   ` Tony Lindgren
2017-02-20 16:31     ` [rtc-linux] " Tony Lindgren
2017-02-20 16:38     ` Alexandre Belloni
2017-02-20 16:38       ` [rtc-linux] " Alexandre Belloni
2017-02-20 17:21       ` Tony Lindgren
2017-02-20 17:21         ` [rtc-linux] " Tony Lindgren
2017-02-20 17:27         ` Tony Lindgren [this message]
2017-02-20 17:27           ` Tony Lindgren
2017-02-20 19:35           ` Sebastian Reichel
2017-02-20 19:35             ` [rtc-linux] " Sebastian Reichel
2017-02-21  6:16 ` [PATCHv2] " Sebastian Reichel
2017-02-21  6:16   ` [rtc-linux] " Sebastian Reichel
2017-02-21 23:52   ` Alexandre Belloni
2017-02-21 23:52     ` [rtc-linux] " Alexandre Belloni
2017-02-22  1:56     ` Sebastian Reichel
2017-02-22  1:56       ` [rtc-linux] " Sebastian Reichel
2017-02-22  8:18       ` Alexandre Belloni
2017-02-22  8:18         ` [rtc-linux] " Alexandre Belloni
2017-02-23  1:03 ` [PATCHv3 1/2] dt-bindings: Add vendor prefix for Motorola Sebastian Reichel
2017-02-23  1:03   ` Sebastian Reichel
2017-02-23  1:03   ` [rtc-linux] " Sebastian Reichel
2017-02-23  1:03   ` [PATCHv3 2/2] rtc: cpcap: new rtc driver Sebastian Reichel
2017-02-23  1:03     ` Sebastian Reichel
2017-02-23  1:03     ` [rtc-linux] " Sebastian Reichel
2017-02-27 23:49     ` Rob Herring
2017-02-27 23:49       ` Rob Herring
2017-02-27 23:49       ` [rtc-linux] " Rob Herring
2017-02-27 23:48   ` [PATCHv3 1/2] dt-bindings: Add vendor prefix for Motorola Rob Herring
2017-02-27 23:48     ` Rob Herring
2017-02-27 23:48     ` [rtc-linux] " Rob Herring
2017-03-02  0:27 ` [PATCHv4 " Sebastian Reichel
2017-03-02  0:27   ` Sebastian Reichel
2017-03-02  0:27   ` [rtc-linux] " Sebastian Reichel
2017-03-02  0:27   ` [PATCHv4 2/2] rtc: cpcap: new rtc driver Sebastian Reichel
2017-03-02  0:27     ` Sebastian Reichel
2017-03-02  0:27     ` [rtc-linux] " Sebastian Reichel
2017-03-02 14:11     ` Rob Herring
2017-03-02 14:11       ` Rob Herring
2017-03-02 14:11       ` [rtc-linux] " Rob Herring
2017-03-09  0:34     ` Alexandre Belloni
2017-03-09  0:34       ` Alexandre Belloni
2017-03-09  0:34       ` [rtc-linux] " Alexandre Belloni
2017-03-09  0:33   ` [PATCHv4 1/2] dt-bindings: Add vendor prefix for Motorola Alexandre Belloni
2017-03-09  0:33     ` Alexandre Belloni
2017-03-09  0:33     ` [rtc-linux] " Alexandre Belloni

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=20170220172737.GJ21809@atomide.com \
    --to=tony@atomide.com \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rtc-linux@googlegroups.com \
    --cc=sre@kernel.org \
    /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.