summaryrefslogtreecommitdiffstats
path: root/drivers/hsi
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'hsi-for-4.13' of ↵Linus Torvalds2017-07-044-20/+14
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi Pull HSI updates from Sebastian Reichel: "Misc cleanups" * tag 'hsi-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi: HSI: core: Use kcalloc() in two functions HSI: Use kcalloc() in hsi_register_board_info() HSI: omap_ssi: Delete an error message for a failed memory allocation in ssi_add_controller() HSI: omap_ssi: Fix a typo in a comment line HSI: omap_ssi: Use devm_kcalloc() in ssi_add_controller() HSI: nokia-modem: Add a space character for better code readability in nokia_modem_probe() HSI: nokia-modem: Delete error messages for a failed memory allocation in two functions HSI: nokia-modem: Use devm_kcalloc() in nokia_modem_gpio_probe()
| * HSI: core: Use kcalloc() in two functionsMarkus Elfring2017-06-081-4/+3
| | | | | | | | | | | | | | | | | | | | | | Multiplications for the size determination of memory allocations indicated that array data structures should be processed. Thus use the corresponding function "kcalloc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
| * HSI: Use kcalloc() in hsi_register_board_info()Markus Elfring2017-06-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kcalloc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
| * HSI: omap_ssi: Delete an error message for a failed memory allocation in ↵Markus Elfring2017-06-081-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ssi_add_controller() The script "checkpatch.pl" pointed information out like the following. WARNING: Possible unnecessary 'out of memory' message Thus remove such a statement here. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
| * HSI: omap_ssi: Fix a typo in a comment lineMarkus Elfring2017-06-081-1/+1
| | | | | | | | | | | | | | Add a missing character in this description for a function call. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
| * HSI: omap_ssi: Use devm_kcalloc() in ssi_add_controller()Markus Elfring2017-06-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "devm_kcalloc". This issue was detected by using the Coccinelle software. * Replace the specification of a data type by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
| * HSI: nokia-modem: Add a space character for better code readability in ↵Markus Elfring2017-06-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | nokia_modem_probe() The script "checkpatch.pl" pointed information out like the following. ERROR: space required before the open parenthesis '(' Thus fix the affected source code place. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
| * HSI: nokia-modem: Delete error messages for a failed memory allocation in ↵Markus Elfring2017-06-081-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | two functions The script "checkpatch.pl" pointed information out like the following. WARNING: Possible unnecessary 'out of memory' message Thus remove such statements here. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
| * HSI: nokia-modem: Use devm_kcalloc() in nokia_modem_gpio_probe()Markus Elfring2017-06-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "devm_kcalloc". This issue was detected by using the Coccinelle software. * Replace the specification of a data structure by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
* | hsi: Fix build regression due to netdev destructor fix.David S. Miller2017-06-081-1/+1
|/ | | | | | | | > ../drivers/hsi/clients/ssi_protocol.c:1069:5: error: 'struct net_device' has no member named 'destructor' Reported-by: Mark Brown <broonie@kernel.org> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* HSI: ssi_protocol: double free in ssip_pn_xmit()Dan Carpenter2017-04-211-2/+3
| | | | | | | | | If skb_pad() fails then it frees skb and we don't need to free it again at the end of the function. Fixes: dc7bf5d7 ("HSI: Introduce driver for SSI Protocol") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* sched/headers: Prepare to move signal wakeup & sigpending methods from ↵Ingo Molnar2017-03-021-1/+1
| | | | | | | | | | | | | <linux/sched.h> into <linux/sched/signal.h> Fix up affected files that include this signal functionality via sched.h. Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
* mm, fs: reduce fault, page_mkwrite, and pfn_mkwrite to take only vmfDave Jiang2017-02-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | ->fault(), ->page_mkwrite(), and ->pfn_mkwrite() calls do not need to take a vma and vmf parameter when the vma already resides in vmf. Remove the vma parameter to simplify things. [arnd@arndb.de: fix ARM build] Link: http://lkml.kernel.org/r/20170125223558.1451224-1-arnd@arndb.de Link: http://lkml.kernel.org/r/148521301778.19116.10840599906674778980.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Theodore Ts'o <tytso@mit.edu> Cc: Darrick J. Wong <darrick.wong@oracle.com> Cc: Matthew Wilcox <mawilcox@microsoft.com> Cc: Dave Hansen <dave.hansen@intel.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Jan Kara <jack@suse.com> Cc: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* net: use core MTU range checking in misc driversJarod Wilson2016-10-201-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | firewire-net: - set min/max_mtu - remove fwnet_change_mtu nes: - set max_mtu - clean up nes_netdev_change_mtu xpnet: - set min/max_mtu - remove xpnet_dev_change_mtu hippi: - set min/max_mtu - remove hippi_change_mtu batman-adv: - set max_mtu - remove batadv_interface_change_mtu - initialization is a little async, not 100% certain that max_mtu is set in the optimal place, don't have hardware to test with rionet: - set min/max_mtu - remove rionet_change_mtu slip: - set min/max_mtu - streamline sl_change_mtu um/net_kern: - remove pointless ndo_change_mtu hsi/clients/ssi_protocol: - use core MTU range checking - remove now redundant ssip_pn_set_mtu ipoib: - set a default max MTU value - Note: ipoib's actual max MTU can vary, depending on if the device is in connected mode or not, so we'll just set the max_mtu value to the max possible, and let the ndo_change_mtu function continue to validate any new MTU change requests with checks for CM or not. Note that ipoib has no min_mtu set, and thus, the network core's mtu > 0 check is the only lower bounds here. mptlan: - use net core MTU range checking - remove now redundant mpt_lan_change_mtu fddi: - min_mtu = 21, max_mtu = 4470 - remove now redundant fddi_change_mtu (including export) fjes: - min_mtu = 8192, max_mtu = 65536 - The max_mtu value is actually one over IP_MAX_MTU here, but the idea is to get past the core net MTU range checks so fjes_change_mtu can validate a new MTU against what it supports (see fjes_support_mtu in fjes_hw.c) hsr: - min_mtu = 0 (calls ether_setup, max_mtu is 1500) f_phonet: - min_mtu = 6, max_mtu = 65541 u_ether: - min_mtu = 14, max_mtu = 15412 phonet/pep-gprs: - min_mtu = 576, max_mtu = 65530 - remove redundant gprs_set_mtu CC: netdev@vger.kernel.org CC: linux-rdma@vger.kernel.org CC: Stefan Richter <stefanr@s5r6.in-berlin.de> CC: Faisal Latif <faisal.latif@intel.com> CC: linux-rdma@vger.kernel.org CC: Cliff Whickman <cpw@sgi.com> CC: Robin Holt <robinmholt@gmail.com> CC: Jes Sorensen <jes@trained-monkey.org> CC: Marek Lindner <mareklindner@neomailbox.ch> CC: Simon Wunderlich <sw@simonwunderlich.de> CC: Antonio Quartulli <a@unstable.cc> CC: Sathya Prakash <sathya.prakash@broadcom.com> CC: Chaitra P B <chaitra.basappa@broadcom.com> CC: Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com> CC: MPT-FusionLinux.pdl@broadcom.com CC: Sebastian Reichel <sre@kernel.org> CC: Felipe Balbi <balbi@kernel.org> CC: Arvid Brodin <arvid.brodin@alten.se> CC: Remi Denis-Courmont <courmisch@gmail.com> Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* HSI: omap_ssi: drop pm_runtime_irq_safeSebastian Reichel2016-06-282-3/+0
| | | | | | | | | pm_runtime_irq_safe increases the parents runtime usage counter effectively keeping the OMAP SoC from idling. Signed-off-by: Sebastian Reichel <sre@kernel.org> Acked-by: Tony Lindgren <tony@atomide.com> Tested-by: Pavel Machek <pavel@ucw.cz>
* HSI: omap_ssi_port: use rpm autosuspend APISebastian Reichel2016-06-281-24/+44
| | | | | | | | | Instead of immediately sending the SSI module to sleep, wait some time in case of new incoming or outgoing traffic. Signed-off-by: Sebastian Reichel <sre@kernel.org> Tested-by: Pavel Machek <pavel@ucw.cz>
* HSI: omap_ssi: call msg->complete() from process contextSebastian Reichel2016-06-283-1/+25
| | | | | | | | msg->complete() should always be called from process context once irq_safe runtime pm flag is no longer set for omap-ssi. Signed-off-by: Sebastian Reichel <sre@kernel.org> Tested-by: Pavel Machek <pavel@ucw.cz>
* HSI: omap_ssi_port: ensure clocks are kept enabled during transferSebastian Reichel2016-06-281-0/+2
| | | | | | | ensure, that clocks remain enabled, when a transfer is started. Signed-off-by: Sebastian Reichel <sre@kernel.org> Tested-by: Pavel Machek <pavel@ucw.cz>
* HSI: omap_ssi_port: replace pm_runtime_put_sync with non-sync variantSebastian Reichel2016-06-281-9/+9
| | | | | | | | There is no need to wait for hardware to really reach idle states, so just release runtime PM asynchronously. Signed-off-by: Sebastian Reichel <sre@kernel.org> Tested-by: Pavel Machek <pavel@ucw.cz>
* HSI: omap_ssi_port: avoid calling runtime_pm_*_sync inside spinlockSebastian Reichel2016-06-281-4/+4
| | | | | | | | | runtime_pm_*_sync can block when irq_safe flag is removed from omap-ssi driver, so it may not be called while a spinlock is held. Signed-off-by: Sebastian Reichel <sre@kernel.org> Tested-by: Pavel Machek <pavel@ucw.cz>
* HSI: omap_ssi_port: avoid pm_runtime_get_sync in ssi_start_dma and ssi_start_pioSebastian Reichel2016-06-281-6/+24
| | | | | | | | These functions may be called from atomic context, so avoid synchronous runtime pm calls. Signed-off-by: Sebastian Reichel <sre@kernel.org> Tested-by: Pavel Machek <pavel@ucw.cz>
* HSI: omap_ssi_port: switch to threaded pio irqSebastian Reichel2016-06-282-38/+24
| | | | | | | | | Move pio interrupt handler from tasklet into thread to allow runtime_pm_get_sync calls without irq_safe being set. Signed-off-by: Sebastian Reichel <sre@kernel.org> Tested-by: Pavel Machek <pavel@ucw.cz>
* HSI: omap_ssi_core: remove pm_runtime_get_sync call from taskletSebastian Reichel2016-06-281-1/+7
| | | | | | | | | | | | We may not call pm_runtime_get_sync() from tasklet, since it can block once pm_runtime_irq_safe is removed for omap-ssi. Since irq can should only be created for a running device, we assume, that the device is already running and use non- synchronous API instead. Signed-off-by: Sebastian Reichel <sre@kernel.org> Tested-by: Pavel Machek <pavel@ucw.cz>
* HSI: omap_ssi_core: use pm_runtime_put instead of pm_runtime_put_syncSebastian Reichel2016-06-281-5/+5
| | | | | | | | There is no need to disable the device synchronously, so don't do it. Signed-off-by: Sebastian Reichel <sre@kernel.org> Tested-by: Pavel Machek <pavel@ucw.cz>
* HSI: omap_ssi_port: prepare start_tx/stop_tx for blocking pm_runtime callsSebastian Reichel2016-06-282-5/+20
| | | | | | | | | | | | ssi_start_tx and ssi_stop_tx may be called from atomic context. Once pm_runtime_irq_safe() is removed for omap-ssi, this will fail, due to blocking pm_runtime_*_sync() calls. This fixes ssi_stop_tx by using non-sync API and ssi_start_tx by using a worker thread. Signed-off-by: Sebastian Reichel <sre@kernel.org> Tested-by: Pavel Machek <pavel@ucw.cz>
* HSI: core: switch port event notifier from atomic to blockingSebastian Reichel2016-06-281-4/+4
| | | | | | | | port events should be sent from process context after irq_safe runtime pm flag is removed in omap-ssi. Signed-off-By: Sebastian Reichel <sre@kernel.org> Tested-by: Pavel Machek <pavel@ucw.cz>
* HSI: omap_ssi_port: replace wkin_cken with atomic bitmap operationsSebastian Reichel2016-06-282-15/+7
| | | | | | | | | | This simplifies the code and avoids holding a spin_lock when runtime pm calls are made. Once the irq_safe flag is removed for omap_ssi's runtime pm, pm_runtime_get/put_sync can sleep, which is a no-go while holding a spin_lock. Signed-off-by: Sebastian Reichel <sre@kernel.org> Tested-by: Pavel Machek <pavel@ucw.cz>
* HSI: omap_ssi: convert cawake irq handler to threadSebastian Reichel2016-06-283-19/+8
| | | | | | | | | Convert cawake interrupt handler from tasklet to threaded interrupt handler in preparation of blocking runtime_pm calls. Signed-off-by: Sebastian Reichel <sre@kernel.org> Tested-by: Pavel Machek <pavel@ucw.cz>
* HSI: ssi_protocol: fix ssip_xmit invocationSebastian Reichel2016-06-281-1/+12
| | | | | | | | ssip_xmit should be called from process context, since it calls hsi_async_write. Signed-off-by: Sebastian Reichel <sre@kernel.org> Tested-by: Pavel Machek <pavel@ucw.cz>
* HSI: ssi_protocol: replace spin_lock with spin_lock_bhSebastian Reichel2016-06-281-32/+32
| | | | | | | | | To avoid setting irq_safe runtime pm flag in omap-ssi, multiple calls will be moved to process context. This also affects ssi-protocol, so use the safer spin_lock_bh instead of a simple spin_lock. Signed-off-by: Sebastian Reichel <sre@kernel.org> Tested-by: Pavel Machek <pavel@ucw.cz>
* HSI: ssi_protocol: avoid ssi_waketest call with held spinlockSebastian Reichel2016-06-281-16/+25
| | | | | | | | | This avoids calling ssi_waketest(), while a spinlock is being hold, since ssi_waketest may sleep once irq_safe runtime pm is disabled. Signed-off-by: Sebastian Reichel <sre@kernel.org> Tested-by: Pavel Machek <pavel@ucw.cz>
* HSI: omap_ssi: do not reset moduleSebastian Reichel2016-06-282-20/+1
| | | | | | | | | | module reset and power management rule setup is already done by hwmod. Remove this cruft, which predates hwmod. Signed-off-by: Sebastian Reichel <sre@kernel.org> Acked-by: Tony Lindgren <tony@atomide.com> Tested-by: Pavel Machek <pavel@ucw.cz>
* HSI: omap_ssi_port: remove useless newlineSebastian Reichel2016-06-281-4/+2
| | | | | Signed-off-by: Sebastian Reichel <sre@kernel.org> Tested-by: Pavel Machek <pavel@ucw.cz>
* hsi: Build hsi_boardinfo.c into hsi core if enabledAndrew F. Davis2016-06-152-1/+2
| | | | | | | | | | | If the HSI core is built as a module hsi_boardinfo may still be built-in as its Kconfig type is bool, which can cause build issues. Fix this by building this code into the HSI core when enabled. Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* HSI: cmt_speech: Fix double spin_lockIago Abal2016-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | | Release &hi->lock before calling `cs_hsi_control_read_error' to avoid deadlock. The bug was found using EBA (https://github.com/models-team/eba), which reported the following: Double lock first at drivers/hsi/clients/cmt_speech.c:443 second at drivers/hsi/clients/cmt_speech.c:447 In cs_hsi_read_on_control_complete defined at drivers/hsi/clients/cmt_speech.c:438: (!) drivers/hsi/clients/cmt_speech.c:443: spin_lock(& hi->lock); (?) drivers/hsi/clients/cmt_speech.c:445: msg->status == 4 -> true (!) drivers/hsi/clients/cmt_speech.c:447: cs_hsi_control_read_error(hi, msg); (!) drivers/hsi/clients/cmt_speech.c:407: __cs_hsi_error_pre(hi, msg, "control read", & hi->control_state); (!) drivers/hsi/clients/cmt_speech.c:382: spin_lock(& hi->lock); Signed-off-by: Iago Abal <mail@iagoabal.eu> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* hsi: use kmemdupMuhammad Falak R Wani2016-05-291-4/+4
| | | | | | | | | Use kmemdup when some other buffer is immediately copied into allocated region. It replaces call to allocation followed by memcpy, by a single call to kmemdup. Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* HSI: cmt_speech: use vma_pages().Muhammad Falak R Wani2016-05-291-1/+1
| | | | | | | | Replace explicit computation of vma page count by a call to vma_pages() Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* HSI: omap-ssi: move omap_ssi_port_update_fclkArnd Bergmann2016-05-091-18/+17
| | | | | | | | | | | | | | | | | After the clk change support, the ssi omap ssi core driver now calls into the port driver to change fclk. This function was previously inside of an #ifdef, because it was only used when CONFIG_PM is enabled. Now it also gets used without power management support: drivers/hsi/built-in.o: In function `ssi_clk_event': omap_ssi_port.c:(.text+0x1bf8): undefined reference to `omap_ssi_port_update_fclk' This moves the function outside of the CONFIG_PM guard. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 4bcf7414528a ("HSI: omap-ssi: add clk change support") Signed-off-by: Sebastian Reichel <sre@kernel.org>
* HSI: omap-ssi: include pinctrl header filesArnd Bergmann2016-05-092-0/+2
| | | | | | | | | | | | | | | | | | | The driver now uses some pinctrl functions, but fails to build if PINCTRL is disabled because the respective header files are only included indirectly: drivers/hsi/controllers/omap_ssi_core.c: In function 'ssi_clk_event': drivers/hsi/controllers/omap_ssi_core.c:317:4: error: implicit declaration of function 'pinctrl_pm_select_idle_state' [-Werror=implicit-function-declaration] drivers/hsi/controllers/omap_ssi_core.c:339:4: error: implicit declaration of function 'pinctrl_pm_select_default_state' [-Werror=implicit-function-declaration] drivers/hsi/controllers/omap_ssi_port.c: In function 'ssi_flush': drivers/hsi/controllers/omap_ssi_port.c:520:2: error: implicit declaration of function 'pinctrl_pm_select_idle_state' [-Werror=implicit-function-declaration] This includes the headers from the files that call the functions, which works even if pinctrl is turned off. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 4bcf7414528a ("HSI: omap-ssi: add clk change support") Signed-off-by: Sebastian Reichel <sre@kernel.org>
* HSI: omap-ssi: add COMMON_CLK dependencyArnd Bergmann2016-05-091-1/+2
| | | | | | | | | | | | | Enabling the omap ssi driver without COMMON_CLK results in a build failure: drivers/hsi/controllers/omap_ssi_core.c: In function 'ssi_clk_event': drivers/hsi/controllers/omap_ssi_core.c:304:7: error: 'PRE_RATE_CHANGE' undeclared (first use in this function) This adds a Kconfig dependency to avoid the invalid configuration. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 4bcf7414528a ("HSI: omap-ssi: add clk change support") Signed-off-by: Sebastian Reichel <sre@kernel.org>
* HSI: omap-ssi: add clk change supportSebastian Reichel2016-05-023-0/+89
| | | | | | | | This adds support for frequency changes of the SSI functional clock, which may occur due to DVFS. Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-By: Sebastian Reichel <sre@kernel.org>
* HSI: omap_ssi: built omap_ssi and omap_ssi_port into one moduleSebastian Reichel2016-05-025-23/+21
| | | | | | | | | Merge omap_ssi and omap_ssi_port into one module. This fixes problems with module cycle dependencies introduced by future patches. Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* HSI: omap_ssi: fix removal of port platform deviceSebastian Reichel2016-05-021-0/+4
| | | | | | | | | | | This avoids removal of the HSI port device when only the platform port device should be removed and clears the POPULATED bit in the DT node, so that a new platform device is created when the driver is probed again. Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* HSI: omap_ssi: make sure probe stays availableSebastian Reichel2016-05-022-17/+19
| | | | | | | | device can be unbind/rebind, so probe should stay available. Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* HSI: omap_ssi: fix module unloadingSebastian Reichel2016-05-021-3/+3
| | | | | | | | | Removal of ssi controller debugfs directory must happen after the clients have been removed from it. Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* HSI: omap_ssi_port: switch to gpiod APISebastian Reichel2016-05-023-24/+12
| | | | | | | Simplify driver by switching to new gpio descriptor based API. Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* HSI: ssi-protocol: Use handshake logic from n950Sebastian Reichel2016-01-281-11/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using the ssi-protocol driver with the Nokia N950, the following error is thrown during modem powered up sequence. [13852.274993] port0: SSI error: 0x01 [13852.279205] ssi-protocol ssi-protocol: RX error detected [13852.284820] ssi-protocol ssi-protocol: Main state: 1 [13852.290069] ssi-protocol ssi-protocol: Recv state: 0 [13852.295288] ssi-protocol ssi-protocol: Send state: 0 [13852.300537] ssi-protocol ssi-protocol: CMT Offline [13852.305603] ssi-protocol ssi-protocol: Wake test 1 [13852.310638] ssi-protocol ssi-protocol: Data RX id: 0 [13852.315887] ssi-protocol ssi-protocol: Data TX id: 0 [13856.001464] ssi-protocol ssi-protocol: Watchdog trigerred [13856.007293] ssi-protocol ssi-protocol: Main state: 1 [13856.012542] ssi-protocol ssi-protocol: Recv state: 0 [13856.017761] ssi-protocol ssi-protocol: Send state: 0 [13856.023010] ssi-protocol ssi-protocol: CMT Offline [13856.028045] ssi-protocol ssi-protocol: Wake test 0 [13856.033111] ssi-protocol ssi-protocol: Data RX id: 0 [13856.038330] ssi-protocol ssi-protocol: Data TX id: 0 This patch fixes the issue by using the handshake setup from the Nokia N950 kernel. The new handshake sequence also works with the N900, so there is no need to differentiate between both modems. Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* HSI: nokia-modem: add n950 and n9 supportSebastian Reichel2016-01-281-0/+2
| | | | | | | | | | | | | | | The Nokia N950 and Nokia N9 also have a SSI connected modem, which use the same protocols as the Nokia N900, but with increased link speed (96000 kbps instead of 55000 kbps) and with less GPIOs. Since it's unclear, if the N950 and the N9 use exactly the same modem, each of them gets their own compatible string. Acked-by: Rob Herring <robh@kernel.org> Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* HSI: omap_ssi_port: fix handling of_get_named_gpio resultAndrzej Hajda2016-01-071-4/+4
| | | | | | | | | | | | The function can return negative value. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* HSI: omap_ssi: fix handling ida_simple_get resultAndrzej Hajda2016-01-071-4/+3
| | | | | | | | | | | | The function can return negative value. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
OpenPOWER on IntegriCloud