20 Feb, 2017

1 commit


14 Feb, 2017

1 commit

  • Declare device_type structure as const as it is only stored in the
    type field of a device structure. This field is of type const, so add
    const to the declaration of device_type structure.

    File size before: drivers/hid/intel-ish-hid/ishtp/bus.o
    text data bss dec hex filename
    4260 336 16 4612 1204 hid/intel-ish-hid/ishtp/bus.o

    File size after: drivers/hid/intel-ish-hid/ishtp/bus.o
    text data bss dec hex filename
    4324 272 16 4612 1204 hid/intel-ish-hid/ishtp/bus.o

    Signed-off-by: Bhumika Goyal
    Acked-by: Srinivas Pandruvada
    Signed-off-by: Jiri Kosina

    Bhumika Goyal
     

08 Feb, 2017

1 commit

  • For ISH resume, there are two paths, they need different way to handle: one
    where ISH is not powered off, in that case a simple resume message is enough,
    in other case we need a reset sequence.

    We can use ISH FW status to distinguish those two cases and handle them
    properly.

    Signed-off-by: Even Xu
    Acked-by: Srinivas Pandruvada
    Signed-off-by: Jiri Kosina

    Even Xu
     

02 Jan, 2017

2 commits

  • In ishtp_hid_probe(), use %04X instead of %04hX to format __u32 values,
    in order to silent a format error reported by clang:

    drivers/hid/intel-ish-hid/ishtp-hid.c:212:3: error: format specifies
    type 'unsigned short' but the argument has type '__u32' (aka
    'unsigned int') [-Werror,-Wformat]
    hid->vendor, hid->product);
    ^~~~~~~~~~~
    drivers/hid/intel-ish-hid/ishtp-hid.c:212:16: error: format
    specifies type 'unsigned short' but the argument has type '__u32'
    (aka 'unsigned int') [-Werror,-Wformat]
    hid->vendor, hid->product);
    ^~~~~~~~~~~~

    Signed-off-by: Nicolas Iooss
    Acked-by: Srinivas Pandruvada
    Signed-off-by: Jiri Kosina

    Nicolas Iooss
     
  • Structure ishtp_device contains a logging function, print_log(), which
    formats some of its parameters using vsnprintf(). Add a __printf
    attribute to this function field (and to ish_event_tracer()) in order to
    detect at compile time issues related to the printf-like formatting.

    While at it, make format parameter a const pointer as print_log() is not
    supposed to modify it.

    Signed-off-by: Nicolas Iooss
    Acked-by: Srinivas Pandruvada
    Signed-off-by: Jiri Kosina

    Nicolas Iooss
     

19 Dec, 2016

1 commit


14 Dec, 2016

1 commit


02 Dec, 2016

1 commit


29 Nov, 2016

1 commit

  • Although unlikely but it is possible that when a connect or disconnect
    request is issued to the firmware, before the response comes, user
    terminates the client session. In this case when the response is arrived
    there is no matching client instance in the list of currently active
    clients. In this case, don't issue call to wake up a waiting client.

    Signed-off-by: Srinivas Pandruvada
    Signed-off-by: Jiri Kosina

    Srinivas Pandruvada
     

16 Nov, 2016

3 commits


06 Nov, 2016

1 commit

  • ts_format.reserved is not used anywhere yet, but the compiler generates a
    warning when the struct's (uninitialized) field is being copied around

    drivers/hid/intel-ish-hid/ipc/ipc.c: In function ‘write_ipc_from_queue’:
    drivers/hid/intel-ish-hid/ipc/ipc.c:316: warning: ‘ts_format.reserved’ may be used uninitialized in this function

    Avoid this by force-initializing the field to zero.

    Acked-by: Srinivas Pandruvada
    Signed-off-by: Jiri Kosina

    Jiri Kosina
     

05 Nov, 2016

4 commits

  • On some platforms ISH interrupt is shared, which causes request_irq to
    fail. This requires IRQF_SHARED irq flag.

    But IRQF_NO_SUSPEND and IRQF_SHARED should not be used together, so
    removed IRQF_NO_SUSPEND flag. Anyway this driver doesn't require
    IRQF_NO_SUSPEND, as this interrupt is not required during "noirq" phases
    of suspending and resuming devices as well as during the time when
    nonboot CPUs are taken offline and brought back online.

    Signed-off-by: Srinivas Pandruvada
    Signed-off-by: Jiri Kosina

    Srinivas Pandruvada
     
  • When built as a module, modprobe followed by rmmod can fail because
    DMA was still active. So to fix this, DMA needs to be disabled during
    module exit.

    This change disables DMA during modules exit and change the ISH PCI
    device status to D3.

    Signed-off-by: Even Xu
    Acked-by: Srinivas Pandruvada
    Signed-off-by: Jiri Kosina

    Even Xu
     
  • Add a new function ish_disable_dma() and move DMA disable operations
    here, so that this functionality can be reused.

    Signed-off-by: Even Xu
    Acked-by: Srinivas Pandruvada
    Signed-off-by: Jiri Kosina

    Even Xu
     
  • Same operations are done in ish_hw_start() and _ish_hw_reset() to
    wakeup ISH device. Consolidate them by introducing a new function
    ish_wakeup() and move the code there.

    Signed-off-by: Even Xu
    Acked-by: Srinivas Pandruvada
    Signed-off-by: Jiri Kosina

    Even Xu
     

04 Nov, 2016

1 commit

  • Fix

    drivers/hid/intel-ish-hid/ipc/pci-ish.c:247:12: warning: ‘ish_suspend’ defined but not used [-Wunused-function]
    static int ish_suspend(struct device *device)
    ^
    drivers/hid/intel-ish-hid/ipc/pci-ish.c:282:12: warning: ‘ish_resume’ defined but not used [-Wunused-function]
    static int ish_resume(struct device *device)
    ^
    by sticking them in the CONFIG_PM range too.

    Signed-off-by: Borislav Petkov
    Cc: Srinivas Pandruvada
    Cc: Jiri Kosina
    Cc: Benjamin Tissoires
    Cc: Wei Yongjun
    Cc: linux-input@vger.kernel.org
    Acked-by: Srinivas Pandruvada
    Signed-off-by: Jiri Kosina

    Borislav Petkov
     

29 Aug, 2016

5 commits


17 Aug, 2016

3 commits

  • This driver is responsible for implementing ISH HID client, which
    gets HID description and report. Once it has completely gets
    report descriptors, it registers as a HID LL drivers. This implements
    necessary callbacks so that it can be used by HID sensor hub driver.

    Original-author: Daniel Drubin
    Reviewed-and-tested-by: Ooi, Joyce
    Tested-by: Grant Likely
    Tested-by: Rann Bar-On
    Tested-by: Atri Bhattacharya
    Signed-off-by: Srinivas Pandruvada
    Signed-off-by: Jiri Kosina

    Srinivas Pandruvada
     
  • This layer is responsible for
    - Enumerating over PCI bus
    - Inform FW about host readiness
    - Provide HW interface to transport layer for control and messages
    - Interrupt handling and routing

    Original-author: Daniel Drubin
    Reviewed-and-tested-by: Ooi, Joyce
    Tested-by: Grant Likely
    Tested-by: Rann Bar-On
    Tested-by: Atri Bhattacharya
    Signed-off-by: Srinivas Pandruvada
    Signed-off-by: Jiri Kosina

    Srinivas Pandruvada
     
  • The ISH transport layer (ishtp) is a bi-directional protocol implemented
    on the top of PCI based inter processor communication layer. This layer
    offers:
    - Connection management
    - Flow control with the firmware
    - Multiple client sessions
    - Client message transfer
    - Client message reception
    - DMA for RX and TX for fast data transfer

    Refer to Documentation/hid/intel-ish-hid.txt for
    overview of the functionality implemented in this layer.

    Original-author: Daniel Drubin
    Reviewed-and-tested-by: Ooi, Joyce
    Tested-by: Grant Likely
    Tested-by: Rann Bar-On
    Tested-by: Atri Bhattacharya
    Signed-off-by: Srinivas Pandruvada
    Signed-off-by: Jiri Kosina

    Srinivas Pandruvada