From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: driver callback naming
Date: Sun, 30 Aug 2009 15:10:55 -0500 [thread overview]
Message-ID: <200908301510.56094.denkenz@gmail.com> (raw)
In-Reply-To: <20090830160026.75672609@mycelium.queued.net>
[-- Attachment #1: Type: text/plain, Size: 1196 bytes --]
Hi Andres,
> > > Of course, I'm also wondering why there needs to be two separate
> > > layers of calls in the first place. Why not have drivers register
> > > everything from within probe, call ofono_set_powered(modem, TRUE)
> > > once the device is ready, and be done with it?
> >
> > The reason for this is e.g. airplane mode, where you physically want
> > to turn off the device. Another case is for battery / power reasons,
> > e.g. a netbook with a USB modem that is not being used.
>
> Fair enough. In the kernel, we have callbacks named suspend/resume
> to handle that.
Power down is different from suspend / resume though. Suspend implies a
different usecase, particularly on embedded devices. In fact, I'm already
considering adding suspend and resume to the driver API...
> My criticism is simply w/ the naming. 'enable'/'disable' doesn't imply
> anything about power. powerup/powerdown, poweron/poweroff,
> suspend/resume would all imply power state changes (at least the latter
> would be familiar to those who do kernel stuff). Having comments that
> describe what the callbacks do would also work, though.
>
Fair enough.
Regards,
-Denis
next prev parent reply other threads:[~2009-08-30 20:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-29 22:01 driver callback naming Andres Salomon
2009-08-30 18:45 ` Denis Kenzior
2009-08-30 20:00 ` Andres Salomon
2009-08-30 20:10 ` Denis Kenzior [this message]
2009-08-30 20:10 ` Aki Niemi
2009-08-30 20:20 ` Denis Kenzior
2009-08-31 8:54 ` Aki Niemi
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=200908301510.56094.denkenz@gmail.com \
--to=denkenz@gmail.com \
--cc=ofono@ofono.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.