Re: [linux-pm] [patch] pm: fix runtime powermanagement's /sys interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

> >  static ssize_t state_show(struct device * dev, struct device_attribute *attr, char * buf)
> >  {
> > -       return sprintf(buf, "%u\n", dev->power.power_state.event);
> > +       if (dev->power.power_state.event)
> > +               return sprintf(buf, "suspend\n");
> > +       else
> > +               return sprintf(buf, "on\n");
> >  }
> 
> Are you sure that having only 2 options (suspend/on) is enough at the
> core level? I could envision having more levels, like "poweroff", etc?

Note that interface is 0/2, currently, so this is improvement :-).

One day, when we find device that needs it, we may want to add more
states. I don't know about such device currently.

								Pavel
-- 
Thanks, Sharp!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux