summaryrefslogtreecommitdiffstats
path: root/drivers/hsi
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'hsi-for-3.17' of ↵Linus Torvalds2014-08-063-15/+16
|\ | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi Pull HSI changes from Sebastian Reichel: "Misc fixes in SSI related drivers" * tag 'hsi-for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi: HSI: omap_ssi: Fix return value check in ssi_debug_add_ctrl() HSI: omap_ssi_port: Fix return value check in ssi_debug_add_port() HSI: ssi_protocol: Fix sparse non static symbol warning drivers/hsi/controllers/omap_ssi{,_port}.c: fix failure checks
| * HSI: omap_ssi: Fix return value check in ssi_debug_add_ctrl()Wei Yongjun2014-07-311-4/+4
| | | | | | | | | | | | | | | | | | In case of error, the function debugfs_create_*() returns NULL pointer not ERR_PTR() if debugfs is enabled. The IS_ERR() test in the return value check should be replaced with NULL test. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Sebastian Reichel <sre@kernel.org>
| * HSI: omap_ssi_port: Fix return value check in ssi_debug_add_port()Wei Yongjun2014-07-311-4/+4
| | | | | | | | | | | | | | | | | | In case of error, the function debugfs_create_*() returns NULL pointer not ERR_PTR() if debugfs is enabled. The IS_ERR() test in the return value check should be replaced with NULL test. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Sebastian Reichel <sre@kernel.org>
| * HSI: ssi_protocol: Fix sparse non static symbol warningWei Yongjun2014-07-201-1/+1
| | | | | | | | | | | | | | | | | | | | Fixes the following sparse warning: drivers/hsi/clients/ssi_protocol.c:904:6: warning: symbol 'ssip_port_event' was not declared. Should it be static? Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Sebastian Reichel <sre@kernel.org>
| * drivers/hsi/controllers/omap_ssi{,_port}.c: fix failure checksAndrey Utkin2014-07-172-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. [linux-3.16-rc5/drivers/hsi/controllers/omap_ssi.c:357]: (style) Checking if unsigned variable 'gdd_irq' is less than zero. Source code is omap_ssi->gdd_irq = platform_get_irq_byname(pd, "gdd_mpu"); if (omap_ssi->gdd_irq < 0) { 2. [linux-3.16-rc5/drivers/hsi/controllers/omap_ssi_port.c:1017]: (style) Checking if unsigned variable 'irq' is less than zero. Source code is omap_port->irq = platform_get_irq(pd, 0); if (omap_port->irq < 0) { Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80441 Reported-by: David Binderman <dcb314@hotmail.com> Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | net: set name_assign_type in alloc_netdev()Tom Gundersen2014-07-151-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend alloc_netdev{,_mq{,s}}() to take name_assign_type as argument, and convert all users to pass NET_NAME_UNKNOWN. Coccinelle patch: @@ expression sizeof_priv, name, setup, txqs, rxqs, count; @@ ( -alloc_netdev_mqs(sizeof_priv, name, setup, txqs, rxqs) +alloc_netdev_mqs(sizeof_priv, name, NET_NAME_UNKNOWN, setup, txqs, rxqs) | -alloc_netdev_mq(sizeof_priv, name, setup, count) +alloc_netdev_mq(sizeof_priv, name, NET_NAME_UNKNOWN, setup, count) | -alloc_netdev(sizeof_priv, name, setup) +alloc_netdev(sizeof_priv, name, NET_NAME_UNKNOWN, setup) ) v9: move comments here from the wrong commit Signed-off-by: Tom Gundersen <teg@jklm.no> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* hsi: omap_ssi_port: use normal module refcountingArnd Bergmann2014-06-051-2/+2
| | | | | | | | | | | | | | | | | | | | | The ref_module() function is used for internal housekeeping of the module code, it's not normally used by subsystems or device drivers, and the use of ref_module in the omap_ssi_port driver causes a link build error when modules are disabled: hsi/controllers/omap_ssi_port.c: In function 'ssi_port_probe': hsi/controllers/omap_ssi_port.c:1119:2: error: implicit declaration of function 'ref_module' [-Werror=implicit-function-declaration] This changes the omap_ssi_port driver to use try_module_get() and module_put() instead, which is the normal way to ensure that the driver providing a device used in another module does not go away. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Sebastian Reichel <sre@kernel.org> Cc: Carlos Chinea <carlos.chinea@nokia.com> Cc: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* HSI: fix omap ssi driver dependencyArnd Bergmann2014-06-031-1/+1
| | | | | | | | | | | | | | | The SSI protocol implementation has an incorrect dependency on the OMAP_SSI driver, which allows SSI to be built-in while the underlying OMAP_SSI implementation is a loadable module, causing a link error. This changes the dependency to the simpler 'depends on OMAP_SSI' that also ensures that SSI-protocol can only be a module if OMAP_SSI is not built-in. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Sebastian Reichel <sre@kernel.org> Cc: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* HSI: Introduce Nokia N900 modem driverSebastian Reichel2014-05-163-0/+295
| | | | | | | | | | | | | | The Nokia N900's modem is connected via Synchronous Serial Interface (SSI), which is a legacy version of MIPI's High-speed Synchronous Serial Interface (HSI). The handles the GPIOs for enabling and resetting the modem and instanciates ssi-protocol for data exchange. It does not yet support exchanging voice data with the modem. Signed-off-by: Sebastian Reichel <sre@kernel.org> Reviewed-by: Pavel Machek <pavel@ucw.cz> Tested-By: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
* HSI: Introduce driver for SSI ProtocolSebastian Reichel2014-05-163-1/+1201
| | | | | | | | | This adds a driver for the SSI McSAAB protocol as used in the Nokia N900. Signed-off-by: Carlos Chinea <carlos.chinea@nokia.com> Signed-off-by: Sebastian Reichel <sre@kernel.org> Tested-By: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
* HSI: Introduce OMAP SSI driverSebastian Reichel2014-05-168-0/+2388
| | | | | | | | | | | | | | | | | Add OMAP SSI driver to the HSI subsystem. The Synchronous Serial Interface (SSI) is a legacy version of HSI. As in the case of HSI, it is mainly used to connect Application engines (APE) with cellular modem engines (CMT) in cellular handsets. It provides a multichannel, full-duplex, multi-core communication with no reference clock. The OMAP SSI block is capable of reaching speeds of 110 Mbit/s. Signed-off-by: Carlos Chinea <carlos.chinea@nokia.com> Signed-off-by: Sebastian Reichel <sre@kernel.org> Tested-By: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
* HSI: Add common DT binding for HSI client devicesSebastian Reichel2014-05-161-2/+206
| | | | | | | | Implement and document generic DT bindings for HSI clients. Signed-off-by: Sebastian Reichel <sre@kernel.org> Reviewed-by: Pavel Machek <pavel@ucw.cz> Tested-By: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
* HSI: export method to (un)register clientsSebastian Reichel2014-05-161-3/+8
| | | | | | | | | | | | | Expose method for registering and unregistering HSI clients, so that client drivers can register other client drivers. This is useful for HSI drivers, which want to use the functionality of other HSI drivers. For example the N900 modem driver can load HSI drivers for mcsaab protocol and speech protocol. Signed-off-by: Sebastian Reichel <sre@kernel.org> Reviewed-by: Pavel Machek <pavel@ucw.cz> Tested-By: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
* HSI: Add channel resource support to HSI clientsSebastian Reichel2014-05-162-7/+51
| | | | | | | | Make HSI channel ids platform data, which can be provided by platform data. Signed-off-by: Sebastian Reichel <sre@kernel.org> Tested-By: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
* HSI: method to unregister clients from an hsi portSebastian Reichel2014-05-161-0/+10
| | | | | | | | | This exports a method to unregister all clients from an hsi port. Signed-off-by: Sebastian Reichel <sre@kernel.org> Reviewed-by: Pavel Machek <pavel@ucw.cz> Tested-By: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
* HSI: hsi-char: fix driver for multiport scenariosSebastian Reichel2014-05-041-1/+1
| | | | | | | | Fix return code check of alloc_chrdev_region, which returns 0 on success. Signed-off-by: Sebastian Reichel <sre@kernel.org> Reviewed-by: Pavel Machek <pavel@ucw.cz>
* hsi: convert bus code to use dev_groupsGreg Kroah-Hartman2013-10-161-4/+6
| | | | | | | | | | The dev_attrs field of struct bus_type is going away soon, dev_groups should be used instead. This converts the hsi code to use the correct field. Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Kees Cook <keescook@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* drivers: avoid format string in dev_set_nameKees Cook2013-07-031-1/+1
| | | | | | | | | | | Calling dev_set_name with a single paramter causes it to be handled as a format string. Many callers are passing potentially dynamic string content, so use "%s" in those cases to avoid any potential accidents, including wrappers like device_create*() and bdi_register(). Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* hsi: fix kernel-doc warningsRandy Dunlap2013-03-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Fix kernel-doc warnings in hsi files: Warning(include/linux/hsi/hsi.h:136): Excess struct/union/enum/typedef member 'e_handler' description in 'hsi_client' Warning(include/linux/hsi/hsi.h:136): Excess struct/union/enum/typedef member 'pclaimed' description in 'hsi_client' Warning(include/linux/hsi/hsi.h:136): Excess struct/union/enum/typedef member 'nb' description in 'hsi_client' Warning(drivers/hsi/hsi.c:434): No description found for parameter 'handler' Warning(drivers/hsi/hsi.c:434): Excess function parameter 'cb' description in 'hsi_register_port_event' Don't document "private:" fields with kernel-doc notation. If you want to leave them fully documented, that's OK, but then don't mark them as "private:". Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Carlos Chinea <carlos.chinea@nokia.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-kernel@vger.kernel.org Cc: linux-omap@vger.kernel.org Acked-by: Nishanth Menon <nm@ti.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Drivers: misc: remove __dev* attributes.Greg Kroah-Hartman2013-01-031-4/+4
| | | | | | | | | | | | | | CONFIG_HOTPLUG is going away as an option. As a result, the __dev* markings need to be removed. This change removes the use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit from these drivers. Based on patches originally written by Bill Pemberton, but redone by me in order to handle some of the coding style issues better, by hand. Cc: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* HSI: hsi_char: Remove max_data_size from sysfsCarlos Chinea2012-04-231-1/+1
| | | | | | | | | | Remove max_data_size sysfs entry. Otherwise is possible to have a buffer overrun if its value is increased after the device is open. Signed-off-by: Carlos Chinea <carlos.chinea@nokia.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Linus Walleij <linus.walleij@linaro.org>
* HSI: hsi: Rework hsi_event interfaceCarlos Chinea2012-04-231-47/+54
| | | | | | | | | | | | Remove custom hack and make use of the notifier chain interfaces for delivering events from the ports to their associated clients. Clients that want to receive port events need to register their callbacks using hsi_register_port_event(). The callbacks can be called in interrupt context. Use hsi_unregestier_port_event() to undo the registration. Signed-off-by: Carlos Chinea <carlos.chinea@nokia.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Linus Walleij <linus.walleij@linaro.org>
* HSI: hsi: Remove controllers and ports from the busCarlos Chinea2012-04-231-19/+1
| | | | | | | | | HSI controllers and ports do not belong to the HSI bus. Those devices are not supposed to have a driver attached to them. Signed-off-by: Carlos Chinea <carlos.chinea@nokia.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Linus Walleij <linus.walleij@linaro.org>
* HSI: hsi: Fix error path cleanup on client registrationCarlos Chinea2012-04-231-1/+1
| | | | | | | | | HSI client structure should be freed on error path after calling device_registration by dropping a reference to it. Signed-off-by: Carlos Chinea <carlos.chinea@nokia.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Linus Walleij <linus.walleij@linaro.org>
* HSI: hsi: Rework hsi_controller releaseCarlos Chinea2012-04-231-42/+66
| | | | | | | | | | Use the proper release mechanism for hsi_controller and hsi_ports structures. Free the structures through their associated device release callbacks. Signed-off-by: Carlos Chinea <carlos.chinea@nokia.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Linus Walleij <linus.walleij@linaro.org>
* HSI: hsi_char: Add HSI char device kernel configurationAndras Domokos2012-01-054-0/+21
| | | | | | | Add HSI character device kernel configuration Signed-off-by: Andras Domokos <andras.domokos@nokia.com> Signed-off-by: Carlos Chinea <carlos.chinea@nokia.com>
* HSI: hsi_char: Add HSI char device driverAndras Domokos2012-01-051-0/+802
| | | | | | | Add HSI char device driver to the kernel. Signed-off-by: Andras Domokos <andras.domokos@nokia.com> Signed-off-by: Carlos Chinea <carlos.chinea@nokia.com>
* HSI: hsi: Introducing HSI frameworkCarlos Chinea2012-01-055-0/+613
Adds HSI framework in to the linux kernel. High Speed Synchronous Serial Interface (HSI) is a serial interface mainly used for connecting application engines (APE) with cellular modem engines (CMT) in cellular handsets. HSI provides multiplexing for up to 16 logical channels, low-latency and full duplex communication. Signed-off-by: Carlos Chinea <carlos.chinea@nokia.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
OpenPOWER on IntegriCloud