linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* a problem about the function of acpi_ec_read_data
@ 2008-08-14  7:32 Zhao Yakui
  2008-08-15 20:38 ` Alexey Starikovskiy
  0 siblings, 1 reply; 3+ messages in thread
From: Zhao Yakui @ 2008-08-14  7:32 UTC (permalink / raw)
  To: astarikovskiy; +Cc: linux-acpi, lenb

Hi, Alexey
    There is a question about the function of acpi_ec_read_data.
 
    When the data is ready for OS, OS will check the OBF flag of EC status and then call the following
function to read the data returned by EC controller.

static inline u8 acpi_ec_read_data(struct acpi_ec *ec)
{
        u8 x = inb(ec->data_addr);
        pr_debug(PREFIX "---> data = 0x%2.2x\n", x);
        return inb(ec->data_addr);
}

    Why is the EC data I/O address accessed twice to get the data returned by EC controller?
    Does there exist some specific reason about it?
 
Thanks for the comments.

Best regards.
   Yakui


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

* Re: a problem about the function of acpi_ec_read_data
  2008-08-14  7:32 a problem about the function of acpi_ec_read_data Zhao Yakui
@ 2008-08-15 20:38 ` Alexey Starikovskiy
  0 siblings, 0 replies; 3+ messages in thread
From: Alexey Starikovskiy @ 2008-08-15 20:38 UTC (permalink / raw)
  To: Zhao Yakui; +Cc: linux-acpi, lenb

Hi Zhao,
Good catch, it is probably debug patch gone bad. it is definitely needs to read "return x;"
Please submit patch, I ACK it.
Thanks,
Alex.


Zhao Yakui wrote:
> Hi, Alexey
>     There is a question about the function of acpi_ec_read_data.
>  
>     When the data is ready for OS, OS will check the OBF flag of EC status and then call the following
> function to read the data returned by EC controller.
> 
> static inline u8 acpi_ec_read_data(struct acpi_ec *ec)
> {
>         u8 x = inb(ec->data_addr);
>         pr_debug(PREFIX "---> data = 0x%2.2x\n", x);
>         return inb(ec->data_addr);
> }
> 
>     Why is the EC data I/O address accessed twice to get the data returned by EC controller?
>     Does there exist some specific reason about it?
>  
> Thanks for the comments.
> 
> Best regards.
>    Yakui
> 


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

* a problem about the function of acpi_ec_read_data
@ 2008-08-18  2:37 Zhao Yakui
  0 siblings, 0 replies; 3+ messages in thread
From: Zhao Yakui @ 2008-08-18  2:37 UTC (permalink / raw)
  To: astarikovskiy; +Cc: linux-acpi, lenb

Hi, Alexey
    There is a question about the function of acpi_ec_read_data.
 
    When the data is ready for OS, OS will check the OBF flag of EC status and then call the following
function to read the data returned by EC controller.

static inline u8 acpi_ec_read_data(struct acpi_ec *ec)
{
        u8 x = inb(ec->data_addr);
        pr_debug(PREFIX "---> data = 0x%2.2x\n", x);
        return inb(ec->data_addr);
}

    Why is the EC data I/O address accessed twice to get the data returned by EC controller?
    Does there exist some specific reason about it?
 
Thanks for the comments.

Best regards.
   Yakui


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

end of thread, other threads:[~2008-08-18  2:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-14  7:32 a problem about the function of acpi_ec_read_data Zhao Yakui
2008-08-15 20:38 ` Alexey Starikovskiy
  -- strict thread matches above, loose matches on Subject: below --
2008-08-18  2:37 Zhao Yakui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).