Re: PATCH/RFC: driver model/pmcore wakeup hooks (1/4)

From: David Brownell
Date: Tue Oct 05 2004 - 16:54:43 EST


On Tuesday 05 October 2004 1:15 pm, Pavel Machek wrote:

> > Also, so strncmp() can be used. It won't matter if the sysadmin goes
> >
> > echo -n enabled > wakeup
> > echo enabled > wakeup
>
> Well, you could make that 0,1. That would be more sysfs-style...

Only for things like detach_state and power_state, which shouldn't
be numbers in the first place ... :)

The /sys/module/*/OPTION strings use Y/N for booleans, and
maybe sysfs should actually have generic code to read/write
such boolean values.


> On the second thought, perhaps file simply should not be there if
> wakeup is not supported.

That doesn't work too well for things like USB, where one config
may support wakeup but another doesn't ... and unconfigured
devices never support it. The "can_support" value changes
over time.

- Dave
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/