01 Nov, 2011

1 commit

  • The regulator API contains a range of features for stubbing itself out
    when not in use and for transparently restricting the actual effect of
    regulator API calls where they can't be supported on a particular system
    so that drivers don't need to individually implement this. Simplify the
    driver slightly by making use of this idiom.

    The only in tree user is ecovec24 which does not use the regulator API.

    Signed-off-by: Mark Brown
    Cc: Éric Piel
    Cc: Ilkka Koskinen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mark Brown
     

26 Oct, 2010

4 commits

  • Short documentation at kernel doc format.

    Signed-off-by: Samu Onkalo
    Acked-by: Jonathan Cameron
    Acked-by: Eric Piel
    Signed-off-by: Guenter Roeck

    Samu Onkalo
     
  • Add optional blockread function to interface driver. If available
    the chip driver uses it for data register access. For 12 bit device
    it reads 6 bytes to get 3*16bit data. For 8 bit device it reads out
    5 bytes since every second byte is dummy.
    This optimizes bus usage and reduces number of operations and
    interrupts needed for one data update.

    Signed-off-by: Samu Onkalo
    Acked-by: Jonathan Cameron
    Acked-by: Eric Piel
    Signed-off-by: Guenter Roeck

    Samu Onkalo
     
  • Added default output data rate setting to platform data.
    If default rate is 0, reset default value is used.
    Added control for duration via platform data.
    Added possibility to configure interrupts to trig on
    both rising and falling edge. The lis3 WU unit can be
    configured quite many ways and with some configurations it
    is quite handy to get coordinate refresh when some
    event trigs and when it reason goes away.

    Signed-off-by: Samu Onkalo
    Acked-by: Jonathan Cameron
    Acked-by: Eric Piel
    Signed-off-by: Guenter Roeck

    Samu Onkalo
     
  • Based on pm_runtime control, turn lis3 regulators on and off.
    Perform context save and restore on transitions.

    Feature is optional and must be enabled in platform data.

    Signed-off-by: Samu Onkalo
    Acked-by: Jonathan Cameron
    Acked-by: Eric Piel
    Signed-off-by: Guenter Roeck

    Samu Onkalo
     

25 May, 2010

3 commits

  • Content for the 8bit device threaded interrupt handlers. Depending on the
    interrupt line and chip configuration, either click or wakeup / freefall
    handler is called. In case of click, BTN_ event is sent via input device.
    In case of wakeup or freefall, input device ABS_ events are updated
    immediatelly.

    It is still possible to configure interrupt line 1 for fast freefall
    detection and use the second line either for click or threshold based
    interrupts. Or both lines can be used for click / threshold interrupts.

    Polled input device can be set to stopped state and still get coordinate
    updates via input device using interrupt based method. Polled mode and
    interrupt mode can also be used parallel.

    BTN_ events are remapped based on existing axis remapping information.

    Signed-off-by: Samu Onkalo
    Acked-by: Eric Piel
    Cc: Daniel Mack
    Cc: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Samu Onkalo
     
  • Original lis3 driver didn't provide interrupt handler(s) for click or
    threshold event handling. This patch adds threaded handlers for one or
    two interrupt lines for 8 bit device. Actual content for interrupt
    handling is provided in the separate patch.

    Signed-off-by: Samu Onkalo
    Tested-by: Daniel Mack
    Acked-by: Eric Piel
    Cc: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Samu Onkalo
     
  • 8 bit device has two wakeup / free fall units. It was not possible to
    configure the second unit. This patch introduces configuration entry to
    the platform data and also corresponding changes to the 8 bit setup
    function.

    High pass filters were enabled by default. Patch introduces configuration
    option for high pass filter cut off frequency and also possibility to
    disable or enable the filter via platform data. Since the control is a
    new one and default state was filter enabled, new option is used to
    disable the filter. This way old platform data is still compatible with
    the change.

    Signed-off-by: Samu Onkalo
    Acked-by: Eric Piel
    Tested-by: Daniel Mack
    Cc: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Samu Onkalo
     

16 Dec, 2009

2 commits

  • Implement selftest feature as specified by chip manufacturer. Control:
    read selftest sysfs entry

    Response: "OK x y z" or "FAIL x y z"

    where x, y, and z are difference between selftest mode and normal mode.
    Test is passed when values are within acceptance limit values.

    Acceptance limits are provided via platform data. See chip spesifications
    for acceptance limits. If limits are not properly set, OK / FAIL decision
    is meaningless. However, userspace application can still make decision
    based on the numeric x, y, z values.

    Selftest is meant for HW diagnostic purposes. It is not meant to be
    called during normal use of the chip. It may cause false interrupt
    events. Selftest mode delays polling of the normal results but it doesn't
    cause wrong values. Chip must be in static state during selftest. Any
    acceration during the test causes most probably failure.

    Signed-off-by: Samu Onkalo
    Acked-by: Éric Piel
    Cc: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Samu Onkalo
     
  • Add the possibility to remap axes via platform data. Function pointers
    for resource setup and release purposes

    Signed-off-by: Samu Onkalo
    Acked-by: Éric Piel
    Cc: Pavel Machek
    Cc: Jean Delvare
    Cc: "Trisal, Kalhan"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Samu Onkalo
     

22 Sep, 2009

2 commits

  • This offers a way for platforms to define flags and thresholds for the
    free-fall/wakeup functions of the lis302d chips.

    More registers needed to be seperated as they are specific to the

    Signed-off-by: Daniel Mack
    Acked-by: Pavel Machek
    Cc: Eric Piel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Mack
     
  • Bit 0x80 in CTRL_REG3 is an ACTIVE_LOW rather than an ACTIVE_HIGH
    function, I got that wrong during my last change.

    Signed-off-by: Daniel Mack
    Acked-by: Pavel Machek
    Cc: Eric Piel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Mack
     

17 Jun, 2009

1 commit

  • The LIS302DL accelerometer chip has a 'click' feature which can be used to
    detect sudden motion on any of the three axis. Configuration data is
    passed via spi platform_data and no action is taken if that's not
    specified, so it won't harm any existing platform.

    To make the configuration effective, the IRQ lines need to be set up
    appropriately. This patch also adds a way to do that from board support
    code.

    The DD_* definitions were factored out to an own enum because they are
    specific to LIS3LV02D devices.

    Signed-off-by: Daniel Mack
    Acked-by: Pavel Machek
    Acked-by: Eric Piel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Mack