From: "Randy.Dunlap" <rdunlap@xenotime.net>
To: Johan Vromans <jvromans@squirrel.nl>
Cc: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org
Subject: Re: SMBus access
Date: Sat, 1 Jul 2006 14:10:15 -0700 [thread overview]
Message-ID: <20060701141015.a4922e86.rdunlap@xenotime.net> (raw)
In-Reply-To: <m2irmhjb5t.fsf@phoenix.squirrel.nl>
On Sat, 01 Jul 2006 22:57:34 +0200 Johan Vromans wrote:
> To get battery readings on some laptops it is necessary to interface
> with the SMBus that hangs of the EC. However, the current
> implementation of the EC driver does not permit other modules
> read/write access.
>
> A trivial solution is to change acpi_ec_read/write from static to
> nonstatic, and export the symbols so other modules can use them.
>
> Would there be any objections to apply this change?
a. patch should also be sent to linux-acpi@vger.kernel.org (cc-ed)
b. patch does not apply cleanly to latest kernel
c. missing Signed-off-by: line (see Documentation/SubmittingPatches)
d. incorrect patch filename directory level (see SubmittingPatches)
> -- Johan
>
> --- drivers/acpi/ec.c~ 2006-04-17 13:40:49.000000000 +0200
> +++ drivers/acpi/ec.c 2006-04-22 17:49:13.000000000 +0200
> @@ -305,20 +305,22 @@
> }
> #endif /* ACPI_FUTURE_USAGE */
>
> -static int acpi_ec_read(union acpi_ec *ec, u8 address, u32 * data)
> +int acpi_ec_read(union acpi_ec *ec, u8 address, u32 * data)
> {
> if (acpi_ec_poll_mode)
> return acpi_ec_poll_read(ec, address, data);
> else
> return acpi_ec_intr_read(ec, address, data);
> }
> -static int acpi_ec_write(union acpi_ec *ec, u8 address, u8 data)
> +EXPORT_SYMBOL(acpi_ec_read);
> +int acpi_ec_write(union acpi_ec *ec, u8 address, u8 data)
> {
> if (acpi_ec_poll_mode)
> return acpi_ec_poll_write(ec, address, data);
> else
> return acpi_ec_intr_write(ec, address, data);
> }
> +EXPORT_SYMBOL(acpi_ec_write);
> static int acpi_ec_poll_read(union acpi_ec *ec, u8 address, u32 * data)
> {
> acpi_status status = AE_OK;
> -
---
~Randy
next parent reply other threads:[~2006-07-01 21:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <m2irmhjb5t.fsf@phoenix.squirrel.nl>
2006-07-01 21:10 ` Randy.Dunlap [this message]
2006-07-01 21:12 ` SMBus access Randy.Dunlap
2006-07-02 8:41 ` Johan Vromans
2006-07-02 16:01 ` Randy.Dunlap
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=20060701141015.a4922e86.rdunlap@xenotime.net \
--to=rdunlap@xenotime.net \
--cc=jvromans@squirrel.nl \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox