27 Aug, 2018

3 commits

  • As part of sdw_stream_remove_master(), sdw_stream_remove_slave() is called
    which results in bus lock being acquired twice.

    So, fix it by performing specific Slave remove operations in
    sdw_release_master_stream() instead of calling sdw_stream_remove_slave().

    Signed-off-by: Sanyog Kale
    Signed-off-by: Shreyas NC
    Acked-by: Pierre-Louis Bossart
    Signed-off-by: Vinod Koul

    Sanyog Kale
     
  • In sdw_stream_add_master() after the Master ports are configured,
    the stream is released incorrectly.

    So, fix it by avoiding stream release after configuring the Master
    for the stream.
    While at it, rename the label appropriately.

    Signed-off-by: Shreyas NC
    Acked-by: Pierre-Louis Bossart
    Signed-off-by: Vinod Koul

    Shreyas NC
     
  • For a SoundWire stream it is expected that a Slave is added to the
    stream before Master is added.

    So, move the stream state to CONFIGURED after the first Slave is
    added and remove the stream state assignment for Master add.
    Along with these changes, add additional comments to explain the same.

    Signed-off-by: Shreyas NC
    Acked-by: Pierre-Louis Bossart
    Signed-off-by: Vinod Koul

    Shreyas NC
     

16 Jun, 2018

1 commit

  • As we move stuff around, some doc references are broken. Fix some of
    them via this script:
    ./scripts/documentation-file-ref-check --fix

    Manually checked that produced results are valid.

    Acked-by: Matthias Brugger
    Acked-by: Takashi Iwai
    Acked-by: Jeff Kirsher
    Acked-by: Guenter Roeck
    Acked-by: Miguel Ojeda
    Signed-off-by: Mauro Carvalho Chehab
    Acked-by: Jonathan Corbet

    Mauro Carvalho Chehab
     

06 Jun, 2018

1 commit

  • Pull char/misc driver updates from Greg KH:
    "Here is the "big" char and misc driver patches for 4.18-rc1.

    It's not a lot of stuff here, but there are some highlights:

    - coreboot driver updates

    - soundwire driver updates

    - android binder updates

    - fpga big sync, mostly documentation

    - lots of minor driver updates

    All of these have been in linux-next for a while with no reported
    issues"

    * tag 'char-misc-4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (81 commits)
    vmw_balloon: fixing double free when batching mode is off
    MAINTAINERS: Add driver-api/fpga path
    fpga: clarify that unregister functions also free
    documentation: fpga: move fpga-region.txt to driver-api
    documentation: fpga: add bridge document to driver-api
    documentation: fpga: move fpga-mgr.txt to driver-api
    Documentation: fpga: move fpga overview to driver-api
    fpga: region: kernel-doc fixes
    fpga: bridge: kernel-doc fixes
    fpga: mgr: kernel-doc fixes
    fpga: use SPDX
    fpga: region: change api, add fpga_region_create/free
    fpga: bridge: change api, don't use drvdata
    fpga: manager: change api, don't use drvdata
    fpga: region: don't use drvdata in common fpga code
    Drivers: hv: vmbus: Removed an unnecessary cast from void *
    ver_linux: Drop redundant calls to system() to test if file is readable
    ver_linux: Move stderr redirection from function parameter to function body
    misc: IBM Virtual Management Channel Driver (VMC)
    rpmsg: Correct support for MODULE_DEVICE_TABLE()
    ...

    Linus Torvalds
     

15 May, 2018

1 commit


12 May, 2018

11 commits


22 Jan, 2018

1 commit

  • "ret" is an int and "buf" is a u8. sdw_read() returns negative error
    codes which are truncated to the u8, 0-255 range before being stored as
    an int. It means that "ret" can't be less than zero.

    Fixes: b0a9c37b0178 ("soundwire: Add slave status handling")
    Signed-off-by: Dan Carpenter
    Signed-off-by: Vinod Koul
    Signed-off-by: Greg Kroah-Hartman

    Dan Carpenter
     

10 Jan, 2018

2 commits


09 Jan, 2018

3 commits

  • Fix the typo, 'status' should be instead of 'status2'.

    Fixes: b0a9c37b0178 ("soundwire: Add slave status handling")
    Signed-off-by: Wei Yongjun
    Acked-by: Pierre-Louis Bossart
    Acked-by: Vinod Koul
    Signed-off-by: Greg Kroah-Hartman

    Wei Yongjun
     
  • Currently the return status ret is being checked but it has not been
    updated since the previous check on ret. It appears that assignment of
    ret from return status of the call to sdw_cdns_enable_interrupt was
    accidentally ommited. Fix this.

    Detected by CoverityScan, CID#1463148 ("Logically dead code")

    Fixes: 71bb8a1b059e ("soundwire: intel: Add Intel Master driver")
    Signed-off-by: Colin Ian King
    Acked-by: Vinod Koul
    Signed-off-by: Greg Kroah-Hartman

    Colin Ian King
     
  • The buf[2] left shift by 24 bits is promoted to int (32 bit signed)
    and then signed-extended to unsigned long long. Hence if the upper
    bit to buf[2] is set then all the upper bits of addr end up as 1.
    Fix this by casting it to u64 before shifting it. Also replace the
    unsigned long long casts to u64 casts to match the same type of
    addr.

    Detected by CoverityScan, CID#1463147 ("Unintended sign extension")

    Fixes: d52d7a1be02c ("soundwire: Add Slave status handling helpers")
    Signed-off-by: Colin Ian King
    Acked-by: Vinod Koul
    Signed-off-by: Greg Kroah-Hartman

    Colin Ian King
     

19 Dec, 2017

10 commits

  • The SoundWire Master is implemented as part of Audio controller in
    Intel platforms. Add a init module which creates SoundWire Master
    platform devices based on the links supported in the hardware.

    Signed-off-by: Sanyog Kale
    Reviewed-by: Philippe Ombredanne
    Acked-By: Pierre-Louis Bossart
    Reviewed-by: Takashi Iwai
    Signed-off-by: Vinod Koul
    Signed-off-by: Greg Kroah-Hartman

    Vinod Koul
     
  • Some Intel platforms have SoundWire Master, so add Intel SoundWire
    Master driver which uses Cadence module. This patch adds probe and
    initialization routines for Intel Master driver.

    Signed-off-by: Hardik T Shah
    Signed-off-by: Sanyog Kale
    Reviewed-by: Philippe Ombredanne
    Acked-By: Pierre-Louis Bossart
    Reviewed-by: Takashi Iwai
    Signed-off-by: Vinod Koul
    Signed-off-by: Greg Kroah-Hartman

    Vinod Koul
     
  • Implement sdw_master_ops with support for xfer_msg, xfer_msg_defer
    and reset_page_addr. Since Cadence module doesn't know the systems
    it will be used, set the read_prop to the bus helper.

    Signed-off-by: Hardik T Shah
    Signed-off-by: Sanyog Kale
    Reviewed-by: Philippe Ombredanne
    Acked-By: Pierre-Louis Bossart
    Reviewed-by: Takashi Iwai
    Signed-off-by: Vinod Koul
    Signed-off-by: Greg Kroah-Hartman

    Sanyog Kale
     
  • Cadence IP implements SoundWire Master. Add base cadence library
    initialization and interrupt handling

    Signed-off-by: Hardik T Shah
    Signed-off-by: Sanyog Kale
    Reviewed-by: Philippe Ombredanne
    Acked-By: Pierre-Louis Bossart
    Reviewed-by: Takashi Iwai
    Signed-off-by: Vinod Koul
    Signed-off-by: Greg Kroah-Hartman

    Vinod Koul
     
  • Add status handling API sdw_handle_slave_status() to handle
    Slave status changes.

    Signed-off-by: Hardik T Shah
    Signed-off-by: Sanyog Kale
    Reviewed-by: Philippe Ombredanne
    Acked-By: Pierre-Louis Bossart
    Reviewed-by: Takashi Iwai
    Signed-off-by: Vinod Koul
    Signed-off-by: Greg Kroah-Hartman

    Vinod Koul
     
  • SoundWire Slaves report status to bus. Add helpers to handle
    the status changes.

    Signed-off-by: Hardik T Shah
    Signed-off-by: Sanyog Kale
    Reviewed-by: Philippe Ombredanne
    Acked-By: Pierre-Louis Bossart
    Reviewed-by: Takashi Iwai
    Signed-off-by: Vinod Koul
    Signed-off-by: Greg Kroah-Hartman

    Sanyog Kale
     
  • SoundWire bus supports read or write register(s) for SoundWire Slave
    device. sdw_read() and sdw_write() APIs are provided for single
    register read/write. sdw_nread() and sdw_nwrite() for operations on
    contiguous registers.

    Signed-off-by: Sanyog Kale
    Reviewed-by: Philippe Ombredanne
    Acked-By: Pierre-Louis Bossart
    Reviewed-by: Takashi Iwai
    Signed-off-by: Vinod Koul
    Signed-off-by: Greg Kroah-Hartman

    Vinod Koul
     
  • MIPI Discovery And Configuration (DisCo) Specification for SoundWire
    specifies properties to be implemented for SoundWire Masters and
    Slaves. The DisCo spec doesn't mandate these properties. However,
    SDW bus cannot work without knowing these values.

    The helper functions read the Master and Slave properties.
    Implementers of Master or Slave drivers can use any of the below
    three mechanisms:
    a) Use these APIs here as .read_prop() callback for Master
    and Slave
    b) Implement own methods and set those as .read_prop(), but invoke
    APIs in this file for generic read and override the values with
    platform specific data
    c) Implement ones own methods which do not use anything provided
    here

    Signed-off-by: Sanyog Kale
    Reviewed-by: Philippe Ombredanne
    Acked-By: Pierre-Louis Bossart
    Reviewed-by: Takashi Iwai
    Signed-off-by: Vinod Koul
    Signed-off-by: Greg Kroah-Hartman

    Vinod Koul
     
  • A Master adds a SoundWire bus instance which scans the firmware
    provided for device description.

    In this patch we scan ACPI namespaces and create SoundWire
    Slave devices based on ACPI description

    Signed-off-by: Sanyog Kale
    Reviewed-by: Philippe Ombredanne
    Acked-By: Pierre-Louis Bossart
    Reviewed-by: Takashi Iwai
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Vinod Koul
    Signed-off-by: Greg Kroah-Hartman

    Vinod Koul
     
  • This adds the base SoundWire bus type, bus and driver registration.
    along with changes to module device table for new SoundWire
    device type.

    Signed-off-by: Sanyog Kale
    Reviewed-by: Philippe Ombredanne
    Acked-By: Pierre-Louis Bossart
    Reviewed-by: Takashi Iwai
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Vinod Koul
    Signed-off-by: Greg Kroah-Hartman

    Vinod Koul