Skip to contentSkip to conversation

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

PATCH In review David Brownell 3 participants 7 messages Feb 22, 2007 – Feb 23, 2007

lore
Share & tools
lore
#0 lore raw

cover 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

Acked-by Greg Kroah-Hartman on the v1 series
#1 lore raw
Quoted 23 lines · David Brownell

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.

Quoted 2 lines

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.

All of these looks good to me, feel free to add an:

to them if you want.

thanks for doing the class_device removal work, I appreciate it.

greg k-h

#2 lore raw
Quoted 7 lines · Greg KH
Quoted 6 lines · David Brownell

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.

Quoted 5 lines
Quoted 1 line

..

All of these looks good to me, feel free to add an:

to them if you want.

Thanks ...

Quoted 1 line

thanks for doing the class_device removal work, I appreciate it.

Actually the class_device removal work was because that was the only way to clean the RTC suspend()/remove() patch out of my queue, where it's been sitting since not log after those class suspend/resume methods started to circulate, early last summer.

It'll be good to have that finally gone!

- Dave

#3 lore raw
Quoted 7 lines · On Thu, 22 Feb 2007 12:44:31 -0800 David Brownell <[email protected]> wrote:
Quoted 3 lines

All of these looks good to me, feel free to add an:

to them if you want.

Thanks ...

Quoted 8 lines
Quoted 1 line

thanks for doing the class_device removal work, I appreciate it.

Actually the class_device removal work was because that was the only way to clean the RTC suspend()/remove() patch out of my queue, where it's been sitting since not log after those class suspend/resume methods started to circulate, early last summer.

It'll be good to have that finally gone!

Hi David,

thanks for your work. The interface system was originally
in place because it seemed the right-thing-to-do. if it isn't, better to remove it ;)

Signature · 6 lines
 Best regards,

 Alessandro Zummo,
  Tower Technologies - Torino, Italy

  http://www.towertech.it
#4 lore raw

On Thursday 22 February 2007 1:37 pm, Alessandro Zummo wro

Quoted 5 lines

Hi David,

thanks for your work. The interface system was originally
in place because it seemed the right-thing-to-do. if it isn't, better to remove it ;)

The Right Thing may also have changed a bit over time!

- Dave

#5 lore raw
Quoted 6 lines · On Thu, 22 Feb 2007 14:21:36 -0800 David Brownell <[email protected]> wrote:
Quoted 4 lines

thanks for your work. The interface system was originally
in place because it seemed the right-thing-to-do. if it isn't, better to remove it ;)

The Right Thing may also have changed a bit over time!

eheh :)

given that Greg also agreed, you have my

Signature · 6 lines
 Best regards,

 Alessandro Zummo,
  Tower Technologies - Torino, Italy

  http://www.towertech.it
#6 lore raw
Quoted 3 lines · Alessandro Zummo

given that Greg also agreed, you have my

Thanks. I'll re-issue this series in a bit with those signoffs, after after the oops fix. Then I expect it should sit in MM for a while.

- Dave