lkml.org 
[lkml]   [2006]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: SMBus access
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-07-02 00:06    [W:0.066 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site