Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1190120

Re: [PATCH] rtc/rtc-opal: Enable alarms only when opal supports tpo

From Alexandre Belloni <alexandre.belloni@free-electrons.com>
Newsgroups linux.kernel
Subject Re: [PATCH] rtc/rtc-opal: Enable alarms only when opal supports tpo
Date 2015-07-22 19:30 +0200
Message-ID <pP5Qt-5YY-1@gated-at.bofh.it> (permalink)
References <pM3rQ-8aI-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 14/07/2015 at 13:28:28 +0530, Vaibhav Jain wrote :
> rtc-opal driver provides support for rtc alarms via
> timed-power-on(tpo). However some Power platforms like BML use a fake
> rtc clock and don't support tpo. Such platforms are indicated by the
> missing 'has-tpo' property in the device tree.
> 
> Current implementation however enables callback for
> rtc_class_ops.read/set alarm irrespective of the tpo support from the
> platform. This results in a failed opal call when kernel tries to read
> an existing alarms via opal_get_tpo_time during rtc device registration.
> 
> This patch fixes this issue by setting opal_rtc_ops.read/set_alarm
> callback pointers only when tpo is supported.
> 
> Acked-by: Michael Neuling <mikey@neuling.org>
> Acked-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
> Signed-off-by: Vaibhav Jain <vaibhav@linux.vnet.ibm.com>
> ---
>  drivers/rtc/rtc-opal.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
Applied, thanks.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH] rtc/rtc-opal: Enable alarms only when opal supports tpo Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2015-07-22 19:30 +0200

csiph-web