Skip to content

rtc framework: remove class_device, use class suspend()/resume()

David Brownell linux-pm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 of 6 patches 11 repliesIn review

1 of 6 patches is in this archive. The cover letter announces 6.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
6/6rtc suspend()/resume() restores system clockdrivers/rtc/Kconfig drivers/rtc/class.c drivers/rtc/rtc-at91rm9200.c +2 more+91 -765 replies

Reviews trailers per patch

The patch has no Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchGreg Kroah-HartmanAlessandro Zummo
SeriesA-b A-b
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [patch/rfc 0/6] rtc framework: remove class_device, use class suspend()/resume()

Hi,

Following this message (on the RTC list) are six patches:

- Remove the /sys/class/rtc-dev class_device, and a class_interface
- Use "struct rtc_device" in the external interface, not class_device
- Simplify the sysfs attribute handling, removing a class_interface
- Simplify the /proc/driver/rtc handling, removing the last class_interface
- Remove the class_device in "struct rtc_device"; now suspend()/resume() work
- Implement class suspend()/resume() so the system clock is updated on resume

The main point of this series of patches is that last one, which I'll circulate just a bit more widely. (Although I think the first four are
also nice cleanups!) It might be the first example of a framework that
uses the "new" class level suspend()/resume() calls to offload drivers.

Other than actually using that new PM infrastructure, this series should be interesting since it addresses one of the few remaining obstacles to having the "Generic Time-Of-Day" (GTOD) framework be fully generic, in the sense of working with whatever RTC is available on the platform (which includes ones accessed through I2C or SPI, so that spinlocked access is insufficient) and removing arch-specific RTC hooks.

This has been lightly tested on one of the ARMs that doesn't yet have new-style dynamic tick working. I'm sure fault paths need tweaking yet.

- Dave