Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751665AbbGOEJY (ORCPT ); Wed, 15 Jul 2015 00:09:24 -0400 Received: from e32.co.us.ibm.com ([32.97.110.150]:51180 "EHLO e32.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751270AbbGOEJW (ORCPT ); Wed, 15 Jul 2015 00:09:22 -0400 X-Helo: d03dlp03.boulder.ibm.com X-MailFrom: stewart@linux.vnet.ibm.com X-RcptTo: linux-kernel@vger.kernel.org From: Stewart Smith To: Vaibhav Jain , linux-kernel@vger.kernel.org Cc: Alessandro Zummo , Michael Neuling , rtc-linux@googlegroups.com, Vaibhav Jain , Alexandre Belloni , Neelesh Gupta , linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH] rtc/rtc-opal: Enable alarms only when opal supports tpo In-Reply-To: <1436860708-17058-1-git-send-email-vaibhav@linux.vnet.ibm.com> References: <1436860708-17058-1-git-send-email-vaibhav@linux.vnet.ibm.com> User-Agent: Notmuch/0.18+16~gec02089 (http://notmuchmail.org) Emacs/23.1.1 (x86_64-redhat-linux-gnu) Date: Wed, 15 Jul 2015 14:09:15 +1000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15071504-0005-0000-0000-00001399C8F8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1347 Lines: 31 Vaibhav Jain writes: > 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 > Acked-by: Neelesh Gupta > Signed-off-by: Vaibhav Jain Acked-by: Stewart Smith FWIW I'm updating OPAL docs with this. The TPO calls aren't actually documented :( In future, it'd be great if there was an accompanying skiboot patch updating the documentation there too. -- 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/