From: Alan Cox <alan@linux.intel.com>
To: Linus Walleij <linus.walleij@stericsson.com>
Cc: linux-serial@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Len Brown <lenb@kernel.org>, "Rafael J. Wysocki" <rjw@sisk.pl>,
Rickard Andersson <rickard.andersson@stericsson.com>,
linux-acpi@vger.kernel.org,
Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [PATCH 2/2] tty: serial core: use the ACPI PM state defines
Date: Thu, 6 Dec 2012 19:31:31 +0000 [thread overview]
Message-ID: <20121206193131.33823e02@bob.linux.org.uk> (raw)
In-Reply-To: <1354819612-2401-1-git-send-email-linus.walleij@stericsson.com>
On Thu, 6 Dec 2012 19:46:52 +0100
Linus Walleij <linus.walleij@stericsson.com> wrote:
> From: Linus Walleij <linus.walleij@linaro.org>
>
> The Documentation/serial/driver file defines that:
>
> State indicates the new state (defined by ACPI D0-D3),
> oldstate indicates the previous state. Essentially, D0
> means fully on, D3 means powered down.
>
> So let's change the code to actually using the defined ACPI
> states instead of using magic numbers.
The "magic numbers" being "1" to mean one, "2" to mean two etc..
Almost none of the platforms using the serial driver even have ACPI so
this seems to be an obfuscation of a simple numbering system for a
subsystem specific set of definitions that may or may not fit in future.
What are you going to do if it turns out serial ports on some platform
have a state that doesn't fit ACPI_STATE_foo because its got a
behaviour that isn't in the ACPI specification ?
This seems to be tying stuff together in a way that will just cause
future pain.
Alan
next prev parent reply other threads:[~2012-12-06 19:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-06 18:46 [PATCH 2/2] tty: serial core: use the ACPI PM state defines Linus Walleij
2012-12-06 19:31 ` Alan Cox [this message]
2012-12-06 19:31 ` Linus Walleij
2012-12-06 19:40 ` Alan Cox
2012-12-06 20:05 ` Linus Walleij
2012-12-06 20:57 ` Rafael J. Wysocki
2012-12-06 23:36 ` Alan Cox
2012-12-07 10:30 ` Linus Walleij
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=20121206193131.33823e02@bob.linux.org.uk \
--to=alan@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=lenb@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linus.walleij@stericsson.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=rickard.andersson@stericsson.com \
--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