linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Tanwar, Rahul" <rahul.tanwar@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
	hpa@zytor.com, tony.luck@intel.com, x86@kernel.org,
	a.zummo@towertech.it, alexandre.belloni@bootlin.com,
	robh+dt@kernel.org, mark.rutland@arm.com,
	linux-rtc@vger.kernel.org, devicetree@vger.kernel.org,
	alan@linux.intel.com, linux-kernel@vger.kernel.org,
	qi-ming.wu@intel.com, cheol.yong.kim@intel.com,
	rahul.tanwar@intel.com
Subject: Re: [PATCH v1 1/2] x86/rtc: Add option to skip using RTC
Date: Mon, 26 Aug 2019 17:01:31 +0800	[thread overview]
Message-ID: <1628049a-e7f7-6f07-db9d-ef716b5a95df@linux.intel.com> (raw)
In-Reply-To: <20190823125604.GS30120@smile.fi.intel.com>


Hi Andy,

On 23/8/2019 8:56 PM, Andy Shevchenko wrote:
>>>> get_wallclock() and set_wallclock() are function pointers of platform_ops
>>>>
>>>> which are initialized to mach_get_cmos_time() and mach_set_rtc_mmss()
>>>>
>>>> at init time. Since adding a new platform to override these functions is
>>>>
>>>> discouraged, so the only way is to modify RTC get/set functions.
>>> Shouldn't it be platform agnostic code?
>>> So, my point is, instead of hacking two functions, perhaps better to avoid them
>>> at all.
>> Sorry, i could not understand your point. The changes are platform
>>
>> agnostic i.e. it doesn't break existing use cases. Are you recommending
>>
>> to add a new platform and make changes there ?
> Nope, I propose to do something like
>
> void __init foo()
> {
> 	if (platform has RTC)
> 		return;
>
> 	set_wallclock = noop;
> 	get_wallclock = noop;
> }

Thanks. I will work out a V2 patch as per your suggestion

and send out for review again.

Regards,

Rahul


  reply	other threads:[~2019-08-26  9:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-22  7:44 [PATCH v1 0/2] x86/rtc: Add option to skip using RTC Rahul Tanwar
     [not found] ` <cover.1566458029.git.rahul.tanwar@linux.intel.com>
2019-08-22  7:44   ` [PATCH v1 1/2] " Rahul Tanwar
2019-08-22  9:02     ` Andy Shevchenko
2019-08-22  9:26       ` Tanwar, Rahul
2019-08-22 13:04         ` Andy Shevchenko
2019-08-23  3:37           ` Tanwar, Rahul
2019-08-23 12:56             ` Andy Shevchenko
2019-08-26  9:01               ` Tanwar, Rahul [this message]
2019-08-22  7:44   ` [PATCH v1 2/2] dt-bindings: rtc: Add optional status property Rahul Tanwar
2019-08-22  8:56     ` Andy Shevchenko
2019-08-22  9:09       ` Alexandre Belloni
2019-08-22  9:38         ` Tanwar, Rahul

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=1628049a-e7f7-6f07-db9d-ef716b5a95df@linux.intel.com \
    --to=rahul.tanwar@linux.intel.com \
    --cc=a.zummo@towertech.it \
    --cc=alan@linux.intel.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=bp@alien8.de \
    --cc=cheol.yong.kim@intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=qi-ming.wu@intel.com \
    --cc=rahul.tanwar@intel.com \
    --cc=robh+dt@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).