* Re: SMBus access
[not found] <m2irmhjb5t.fsf@phoenix.squirrel.nl>
@ 2006-07-01 21:10 ` Randy.Dunlap
2006-07-01 21:12 ` Randy.Dunlap
2006-07-02 8:41 ` Johan Vromans
0 siblings, 2 replies; 4+ messages in thread
From: Randy.Dunlap @ 2006-07-01 21:10 UTC (permalink / raw)
To: Johan Vromans; +Cc: linux-kernel, linux-acpi
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: SMBus access
2006-07-01 21:10 ` SMBus access Randy.Dunlap
@ 2006-07-01 21:12 ` Randy.Dunlap
2006-07-02 8:41 ` Johan Vromans
1 sibling, 0 replies; 4+ messages in thread
From: Randy.Dunlap @ 2006-07-01 21:12 UTC (permalink / raw)
To: jvromans; +Cc: linux-kernel, linux-acpi
On Sat, 1 Jul 2006 14:10:15 -0700 Randy.Dunlap wrote:
> 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
Sorry, my bad. It does apply cleanly (part d. below fooled my
scripts...)
> 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
---
~Randy
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: SMBus access
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
1 sibling, 1 reply; 4+ messages in thread
From: Johan Vromans @ 2006-07-02 8:41 UTC (permalink / raw)
To: Randy.Dunlap; +Cc: Johan Vromans, linux-kernel, linux-acpi
"Randy.Dunlap" <rdunlap@xenotime.net> writes:
> 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)
All procedural issues, than can easily be solved. So I take it there
are no technical/philosophical/emotional/ethical objections against
this change?
-- Johan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: SMBus access
2006-07-02 8:41 ` Johan Vromans
@ 2006-07-02 16:01 ` Randy.Dunlap
0 siblings, 0 replies; 4+ messages in thread
From: Randy.Dunlap @ 2006-07-02 16:01 UTC (permalink / raw)
Cc: jvromans, linux-kernel, linux-acpi
On Sun, 02 Jul 2006 10:41:56 +0200 Johan Vromans wrote:
> "Randy.Dunlap" <rdunlap@xenotime.net> writes:
>
> > 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)
>
> All procedural issues, than can easily be solved.
Agreed.
> So I take it there
> are no technical/philosophical/emotional/ethical objections against
> this change?
We are still waiting for feedback/comments to determine that.
---
~Randy
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-07-02 15:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <m2irmhjb5t.fsf@phoenix.squirrel.nl>
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox