public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Johan Vromans <jvromans@squirrel.nl>
To: linux-kernel@vger.kernel.org
Subject: SMBus access
Date: Sat, 01 Jul 2006 22:57:34 +0200	[thread overview]
Message-ID: <m2irmhjb5t.fsf@phoenix.squirrel.nl> (raw)

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?

-- 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;

             reply	other threads:[~2006-07-01 20:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-01 20:57 Johan Vromans [this message]
2006-07-01 21:10 ` SMBus access Randy.Dunlap
2006-07-01 21:12   ` 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=m2irmhjb5t.fsf@phoenix.squirrel.nl \
    --to=jvromans@squirrel.nl \
    --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