mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Adam M Belay <abelay@MIT.EDU>
To: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Witold Szczeponik <Witold.Szczeponik@gmx.net>,
	Len Brown <lenb@kernel.org>,
	linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	rjw@sisk.pl
Subject: Re: [PATCH] PNPACPI: Enable Power Support
Date: Mon, 08 Dec 2008 22:25:48 -0500	[thread overview]
Message-ID: <20081208222548.hfac8otubupwkc84@webmail.mit.edu> (raw)
In-Reply-To: <200812082000.05472.bjorn.helgaas@hp.com>

Quoting Bjorn Helgaas <bjorn.helgaas@hp.com>:
> Hi Adam,
>
> Do you have any proposals for how pnpacpi_set_resources() should
> handle failure?  Witold started out with code to call acpi_bus_set_power()
> only if the device is power-manageable, and he then passed the
> return code up.  I suggested letting acpi_bus_set_power() do
> the "is-power-manageable" check.  But then the caller would have
> to distinguish the "device isn't power-manageable" error from
> others, which is kind of ugly.
>
> Bjorn

Hi Bjorn,

How about one of these options:

1.) Modify acpi_bus_set_power() to return success if the device is not power
manageable but the request is for D0.  After all, any device that doesn't
support PM can be assumed to be in D0. (Or maybe more correctly the state
of its parent?)

2.) Call acpi_bus_get_power() and check if the state is not already D0 before
asking acpi_bus_set_power() for the transition.  If it is any other 
state, then
of the device is power manageable.

Thanks,
Adam


  reply	other threads:[~2008-12-09  3:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-08 20:57 Witold Szczeponik
2008-12-09  2:49 ` Adam M Belay
2008-12-09  3:00   ` Bjorn Helgaas
2008-12-09  3:25     ` Adam M Belay [this message]
2008-12-10 19:32   ` Witold Szczeponik
2008-12-10  9:53 ` Henrique de Moraes Holschuh
2008-12-10 10:22   ` Oliver Neukum
2008-12-10 23:26     ` Henrique de Moraes Holschuh
2008-12-10 19:30   ` Witold Szczeponik
2008-12-10 23:21     ` Henrique de Moraes Holschuh
2008-12-11  1:28       ` Henrique de Moraes Holschuh
2008-12-11  1:50         ` Henrique de Moraes Holschuh

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=20081208222548.hfac8otubupwkc84@webmail.mit.edu \
    --to=abelay@mit.edu \
    --cc=Witold.Szczeponik@gmx.net \
    --cc=bjorn.helgaas@hp.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@sisk.pl \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®