07 Oct, 2015

1 commit


24 Aug, 2013

1 commit

  • Being a low-level component, various drivers (e.g. olpc-battery) assume
    that it is ok to communicate with the OLPC Embedded Controller during
    probe. Therefore the OLPC EC driver must be initialised before other
    drivers try to use it. This was the case until it was recently moved
    out of arch/x86 and restructured around commits ac2504151f5a ("Platform:
    OLPC: turn EC driver into a platform_driver") and 85f90cf6ca56 ("x86:
    OLPC: switch over to using new EC driver on x86").

    Use arch_initcall so that olpc-ec is readied earlier, matching the
    previous behaviour.

    Fixes a regression introduced in Linux-3.6 where various drivers such as
    olpc-battery and olpc-xo1-sci failed to load due to an inability to
    communicate with the EC. The user-visible effect was a lack of battery
    monitoring, missing ebook/lid switch input devices, etc.

    Signed-off-by: Daniel Drake
    Cc: Andres Salomon
    Cc: Paul Fox
    Cc: Thomas Gleixner
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Drake
     

01 Aug, 2012

7 commits

  • Populate olpc_ec_priv with variables that were previously global. This
    makes things a tad bit clearer, IMO.

    Signed-off-by: Andres Salomon
    Acked-by: Paul Fox
    Reviewed-by: Thomas Gleixner

    Andres Salomon
     
  • There's nothing about the debugfs interface for the EC driver that is
    architecture-specific, so move it into the arch-independent driver.

    The code is mostly unchanged with the exception of renamed variables, coding
    style changes, and API updates.

    Signed-off-by: Andres Salomon
    Acked-by: Paul Fox
    Reviewed-by: Thomas Gleixner

    Andres Salomon
     
  • This uses the new EC driver framework in drivers/platform/olpc. The
    XO-1 and XO-1.5-specific code is still in arch/x86, but the generic stuff
    (including a new workqueue; no more running EC commands with IRQs disabled!)
    can be shared with other architectures.

    Signed-off-by: Andres Salomon
    Acked-by: Paul Fox
    Reviewed-by: Thomas Gleixner

    Andres Salomon
     
  • A problem we've noticed on XO-1.75 is when we suspend in the middle of
    an EC command. Don't allow that.

    In the process, create a private object for the generic EC driver to use;
    we have a framework for passing around a struct, use that rather than a
    proliferation of global variables.

    Signed-off-by: Andres Salomon
    Acked-by: Paul Fox
    Reviewed-by: Thomas Gleixner

    Andres Salomon
     
  • The 1.75-based OLPC EC driver already does this; let's do it for all EC
    drivers. This gives us nice suspend/resume hooks, amongst other things.

    We want to run the EC's suspend hooks later than other drivers (which may
    be setting wakeup masks or be running EC commands). We also want to run
    the EC's resume hooks earlier than other drivers (which may want to run EC
    commands).

    Signed-off-by: Andres Salomon
    Acked-by: Paul Fox
    Reviewed-by: Thomas Gleixner

    Andres Salomon
     
  • This provides a new API allows different OLPC architectures to override the
    EC driver. x86 and ARM OLPC machines use completely different EC backends.

    The olpc_ec_cmd is synchronous, and waits for the workqueue to send the
    command to the EC. Multiple callers can run olpc_ec_cmd() at once, and
    they will by serialized and sleep while only one executes on the EC at a time.

    We don't provide an unregister function, as that doesn't make sense within
    the context of OLPC machines - there's only ever 1 EC, it's critical to
    functionality, and it certainly not hotpluggable.

    Signed-off-by: Andres Salomon
    Acked-by: Paul Fox
    Reviewed-by: Thomas Gleixner

    Andres Salomon
     
  • The OLPC EC driver has outgrown arch/x86/platform/. It's time to both
    share common code amongst different architectures, as well as move it out
    of arch/x86/. The XO-1.75 is ARM-based, and the EC driver shares a lot of
    code with the x86 code.

    Signed-off-by: Andres Salomon
    Acked-by: Paul Fox
    Reviewed-by: Thomas Gleixner

    Andres Salomon