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 -
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 -
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
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 --fixManually 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
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()
...
15 May, 2018
1 commit
-
The limitation of being able to check only for -EPROBE_DEFER from
dev_pm_domain_attach() has been removed. Hence let's respect all error
codes and bail out accordingly.Signed-off-by: Ulf Hansson
Acked-by: Vinod Koul
Signed-off-by: Rafael J. Wysocki
12 May, 2018
11 commits
-
Add DAI registration and DAI ops for the Intel driver along with
callback for topology configuration.Signed-off-by: Sanyog Kale
Signed-off-by: Shreyas NC
Signed-off-by: Vinod Koul -
Add Intel stream init routines which initialize the Physical
Data Interface (PDI), Audio Link Hub (ALH) and Audio shim.
Also add bank switch routines.Signed-off-by: Hardik T Shah
Signed-off-by: Sanyog Kale
Signed-off-by: Shreyas NC
Signed-off-by: Vinod Koul -
Add support for Cadence stream initialization and implement
stream APIs.Signed-off-by: Sanyog Kale
Signed-off-by: Shreyas NC
Signed-off-by: Vinod Koul -
Add support for Cadence port management and implement
master port ops.Signed-off-by: Sanyog Kale
Signed-off-by: Shreyas NC
Signed-off-by: Vinod Koul -
There can be instances where drivers using Cadence IP might want
to set sdw_master_ops differently per instance of it's use, so
remove the cdns_master_ops and export the APIs.Signed-off-by: Shreyas NC
Signed-off-by: Vinod Koul -
Add APIs for prepare, enable, disable and de-prepare stream.
Signed-off-by: Sanyog Kale
Signed-off-by: Shreyas NC
Signed-off-by: Vinod Koul -
SoundWire supports two registers banks. So, program the alternate bank
with new configuration and then performs bank switch.Signed-off-by: Sanyog Kale
Signed-off-by: Shreyas NC
Signed-off-by: Vinod Koul -
Add helpers to configure, prepare, enable, disable and
de-prepare ports.Signed-off-by: Sanyog Kale
Signed-off-by: Shreyas NC
Signed-off-by: Vinod Koul -
Master and Slave port registers need to be programmed for each port
used in a stream. Add the helpers for port register programming.Signed-off-by: Sanyog Kale
Signed-off-by: Shreyas NC
Signed-off-by: Vinod Koul -
Add Soundwire port data structures and APIS for initialization
and release of ports.Signed-off-by: Sanyog Kale
Signed-off-by: Shreyas NC
Signed-off-by: Vinod Koul -
This patch adds APIs and relevant stream data structures
for initialization and release of stream.Signed-off-by: Hardik T Shah
Signed-off-by: Sanyog Kale
Signed-off-by: Shreyas NC
Signed-off-by: Vinod Koul
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
10 Jan, 2018
2 commits
-
SoundWire bus needs to select the regmap support. So, add it
Signed-off-by: Vinod Koul
Signed-off-by: Greg Kroah-Hartman -
pm_runtime_get_sync will return negative values for error
and 0 or 1 for success. Update the error check accordingly.Signed-off-by: Shreyas NC
Reported-by: Dan Carpenter
Fixes: 9d715fa005eb: ("soundwire: Add IO transfer")
Signed-off-by: Vinod Koul
Signed-off-by: Greg Kroah-Hartman
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 -
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 -
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
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 -
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 -
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 -
Cadence IP implements SoundWire Master. Add base cadence library
initialization and interrupt handlingSigned-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 -
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 -
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 -
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 -
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
hereSigned-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 -
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 descriptionSigned-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 -
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