public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* SMBus access
@ 2006-07-01 20:57 Johan Vromans
  2006-07-01 21:10 ` Randy.Dunlap
  0 siblings, 1 reply; 5+ messages in thread
From: Johan Vromans @ 2006-07-01 20:57 UTC (permalink / raw)
  To: linux-kernel

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;

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-07-02 15:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-01 20:57 SMBus access Johan Vromans
2006-07-01 21:10 ` Randy.Dunlap
2006-07-01 21:12   ` Randy.Dunlap
2006-07-02  8:41   ` Johan Vromans
2006-07-02 16:01     ` Randy.Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox