Linux RTC
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Alexandre Belloni <alexandre.belloni@free-electrons.com>,
	rtc-linux@googlegroups.com
Cc: Alessandro Zummo <a.zummo@towertech.it>
Subject: [rtc-linux] rtctest woes
Date: Wed, 16 Sep 2015 09:15:45 +0200	[thread overview]
Message-ID: <20150916071545.GA28635@pengutronix.de> (raw)

Hello,

I'm running rtctest (i.e. tools/testing/selftests/timers/rtctest.c)
against a pcf2127 i2c rtc. The driver doesn't have alarm support.

The first problem is that calling ioctl(fd, RTC_UIE_ON, 0) returns -1
and sets errno to EINVAL but rtctest expects ENOTTY if update irqs are
not supported. (I'll send a patch in reply to this mail.)

Then with this issue fixed the next failure is at ioctl(fd,
RTC_ALM_READ, &rtc_tm) after ioctl(fd, RTC_ALM_SET, &rtc_tm) succeeded.
If I understand the code correctly the RTC_ALM_SET is emulated using
kernel timers but ALM_GET is not. I'd say the right fix here is that
RTC_ALM_SET should already fail in this case, but as I'm not sure I
didn't create a patch.

BTW, asking scripts/get_maintainer.pl where to send a patch touching
rtctest the reply includes the timekeeping and selftest maintainer
entrys but not the rtc one. I suggest to move rtctest to
tools/testing/selftests/rtc/rtctest.c.

Best regards
Uwe

--=20
Pengutronix e.K.                           | Uwe Kleine-K=C3=B6nig         =
   |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

--=20
--=20
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.
---=20
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 e=
mail to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

             reply	other threads:[~2015-09-16  7:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-16  7:15 Uwe Kleine-König [this message]
2015-09-16  7:16 ` [PATCH] rtc: rtctest: enabling UIE for a chip that doesn't support it returns EINVAL Uwe Kleine-König
2015-10-03 12:25   ` 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=20150916071545.GA28635@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@free-electrons.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox