Re: [PATCH] regmap: regmap-irq: silently ignore unsupported type settings

From: Geert Uytterhoeven
Date: Fri Jan 04 2019 - 10:48:06 EST


()Hi Steve,

On Wed, Jan 2, 2019 at 4:31 PM Steve Twiss
<stwiss.opensource@xxxxxxxxxxx> wrote:
> On 01 January 2019 @17:36, Geert Uytterhoeven wrote:
> > Subject: Re: [PATCH] regmap: regmap-irq: silently ignore unsupported type settings
> > On Mon, Dec 31, 2018 at 8:14 PM Mark Brown <broonie@xxxxxxxxxx> wrote:
> > > On Sat, Dec 29, 2018 at 12:13:32PM +0100, Geert Uytterhoeven wrote:
> > > > > Geert, do you know if anyone vould to test this?
> > >
> > > > Thanks, that seems to fix the issue with da9063-rtc.
> > >
> > > > I don't know how to trigger an actual interrupt, though.
> > >
> > > If it's a RTC does it have an alarm you can set?
> >
> > That's what I had expected, too, but there is no alarm file under
> > /sys/class/rtc/.
> >
> > Gr{oetje,eeting}s,
> >
> > Geert
>
> To communicate with the DA9063 RTC I am use ioctl function calls
>
> - RTC_SET_TIME
> - RTC_RD_TIME
> - RTC_ALM_SET
> - RTC_ALM_READ
> - RTC_AIE_ON
> - RTC_AIE_OFF
>
> - https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/rtc.txt
> - https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/testing/selftests/rtc
>
> Although I don't use the test programs found in Linux, the ioctl calls I
> make are shown in the Linux selftests. I believe that Alexandre Belloni
> updated the RTC tests recently -- but I am not up to date with the latest.
>
> git show d8da8665e8e34c14f9b20fe3f21dff29b24cbf02:tools/testing/selftests/rtc/rtctest.c

root@koelsch:~# tools/testing/selftests/rtc/rtctest
[==========] Running 5 tests from 2 test cases.
[ RUN ] rtc.date_read
rtctest.c:49:rtc.date_read:Current RTC date/time is 04/01/2019 14:44:25.
[ OK ] rtc.date_read
[ RUN ] rtc.uie_read
[ OK ] rtc.uie_read
[ RUN ] rtc.uie_select
rtctest.c:98:rtc.uie_select:Expected 0 (0) != rc (0)
rtc.uie_select: Test terminated by assertion
[ FAIL ] rtc.uie_select
[ RUN ] rtc.alarm_alm_set
rtctest.c:137:rtc.alarm_alm_set:Alarm time now set to 14:47:23.
rtctest.c:148:rtc.alarm_alm_set:Expected 0 (0) != rc (0)
rtc.alarm_alm_set: Test failed at step #5
[ FAIL ] rtc.alarm_alm_set
[ RUN ] rtc.alarm_wkalm_set
rtctest.c:198:rtc.alarm_wkalm_set:Alarm time now set to 04/01/2019 14:47:28.
rtctest.c:205:rtc.alarm_wkalm_set:Expected 0 (0) != rc (0)
rtctest.c:214:rtc.alarm_wkalm_set:Expected new (1546613934) == secs (1546613248)
rtc.alarm_wkalm_set: Test terminated by assertion
[ FAIL ] rtc.alarm_wkalm_set
[==========] 2 / 5 tests passed.
[ FAILED ]
root@koelsch:~#

No interrupt fired, as witnessed by /proc/interrupts, and the pr_info()
I had added to da9063_alarm_event().

Note that rtctest behaves the same before the regmap irq breakage,
so this is not a recent regression...

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds