summaryrefslogtreecommitdiffstats
path: root/drivers/hsi
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* hsi: controllers:remove redundant codeSanjeev Sharma2015-10-301-17/+4
| | | | | | | | | Use devm_ioremap_resource() in order to make the code simpler, and remove redundant return value check of platform_get_resource() because this value is alreadytaken care by devm_ioremap_resource() Signed-off-by: Sanjeev Sharma <sanjeev_sharma@mentor.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* hsi: correctly handle return value of kzallocInsu Yun2015-10-191-1/+11
| | | | | | | | Since kzalloc can be failed in memory pressure, its return value should be checked and handled. Signed-off-by: Insu Yun <wuninsu@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* hsi: omap_ssi_port: Prevent warning if cawake_gpio is not defined.Roger Quadros2015-10-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The error handling path is broken as cawake_gpio was defined as unsigned integer causing the following warnings on boards that don't use SSI port and so don't have cawake_gpio defined. e.g. beagleboard C4. [ 30.094635] WARNING: CPU: 0 PID: 322 at drivers/gpio/gpiolib.c:86 gpio_to_desc+0xa4/0xb8() [ 30.103363] invalid GPIO -2 [ 30.106292] Modules linked in: omap_ssi_port(+) cpufreq_dt cfbfillrect cfbimgblt leds_gpio cfbcopyarea thermal_sys led_class hwmon gpio_keys encoder_tfp410 connector_analog_tv connector_dvi omap_hdq snd phy_i [ 30.145477] CPU: 0 PID: 322 Comm: modprobe Not tainted 4.3.0-rc4-00030-gca978c0-dirty #335 [ 30.154174] Hardware name: Generic OMAP3-GP (Flattened Device Tree) [ 30.160827] [<c0016ef4>] (unwind_backtrace) from [<c00131f4>] (show_stack+0x10/0x14) [ 30.168975] [<c00131f4>] (show_stack) from [<c033cf08>] (dump_stack+0x80/0x9c) [ 30.176635] [<c033cf08>] (dump_stack) from [<c003e920>] (warn_slowpath_common+0x7c/0xb8) [ 30.185180] [<c003e920>] (warn_slowpath_common) from [<c003e9f0>] (warn_slowpath_fmt+0x30/0x40) [ 30.194366] [<c003e9f0>] (warn_slowpath_fmt) from [<c0376314>] (gpio_to_desc+0xa4/0xb8) [ 30.202819] [<c0376314>] (gpio_to_desc) from [<c0376ac8>] (gpio_request_one+0x14/0x11c) [ 30.211273] [<c0376ac8>] (gpio_request_one) from [<c037370c>] (devm_gpio_request_one+0x3c/0x78) [ 30.220458] [<c037370c>] (devm_gpio_request_one) from [<bf184210>] (ssi_port_probe+0x118/0x504 [omap_ssi_port]) [ 30.231170] [<bf184210>] (ssi_port_probe [omap_ssi_port]) from [<c03d4cfc>] (platform_drv_probe+0x48/0xa4) [ 30.241424] [<c03d4cfc>] (platform_drv_probe) from [<c03d3678>] (driver_probe_device+0x1dc/0x2a0) [ 30.250793] [<c03d3678>] (driver_probe_device) from [<c03d37d0>] (__driver_attach+0x94/0x98) [ 30.259643] [<c03d37d0>] (__driver_attach) from [<c03d1d60>] (bus_for_each_dev+0x54/0x88) [ 30.268249] [<c03d1d60>] (bus_for_each_dev) from [<c03d2d50>] (bus_add_driver+0xe8/0x1f8) [ 30.276916] [<c03d2d50>] (bus_add_driver) from [<c03d4118>] (driver_register+0x78/0xf4) [ 30.285369] [<c03d4118>] (driver_register) from [<c03d5380>] (__platform_driver_probe+0x34/0xd8) [ 30.294647] [<c03d5380>] (__platform_driver_probe) from [<c00097e4>] (do_one_initcall+0x80/0x1d8) [ 30.303985] [<c00097e4>] (do_one_initcall) from [<c011617c>] (do_init_module+0x5c/0x1cc) [ 30.312561] [<c011617c>] (do_init_module) from [<c00c7a68>] (load_module+0x18c8/0x1f0c) [ 30.320983] [<c00c7a68>] (load_module) from [<c00c8188>] (SyS_init_module+0xdc/0x150) [ 30.329223] [<c00c8188>] (SyS_init_module) from [<c000f7e0>] (ret_fast_syscall+0x0/0x1c) Fixes: b209e047bc743 ("HSI: Introduce OMAP SSI driver") Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* hsi: fix double kfreeGeliang Tang2015-10-141-1/+0
| | | | | | | | | When device_register() fails, kfree() is called in hsi_client_release(), hence there is no need to call kfree in err3 again. Fixes: a2aa24734d9db ("HSI: Add common DT binding for HSI client devices") Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* HSI: Fix a typoJakub Wilk2015-09-181-1/+1
| | | | | Signed-off-by: Jakub Wilk <jwilk@jwilk.net> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* mm: mark most vm_operations_struct constKirill A. Shutemov2015-09-101-1/+1
| | | | | | | | | | | | | | | | With two exceptions (drm/qxl and drm/radeon) all vm_operations_struct structs should be constant. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Reviewed-by: Oleg Nesterov <oleg@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Minchan Kim <minchan@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge tag 'module-implicit-v4.1-rc8' of ↵Linus Torvalds2015-07-021-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux Pull implicit module.h fixes from Paul Gortmaker: "Fix up implicit <module.h> users that will break later. The files changed here are simply modular source files that are implicitly relying on <module.h> being present. We fix them up now, so that we can decouple some of the module related init code from the core init code in the future. The addition of the module.h include to several files here is also a no-op from a code generation point of view, else there would already be compile issues with these files today. There may be lots more implicit includes of <module.h> in tree, but these are the ones that extensive build test coverage has shown that must be fixed in order to avoid build breakage fallout for the pending module.h <---> init.h code relocation we desire to complete" * tag 'module-implicit-v4.1-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: frv: add module.h to mb93090-mb00/flash.c to avoid compile fail drivers/cpufreq: include <module.h> for modular exynos-cpufreq.c code drivers/staging: include <module.h> for modular android tegra_ion code crypto/asymmetric_keys: pkcs7_key_type needs module.h sh: mach-highlander/psw.c is tristate and should use module.h drivers/regulator: include <module.h> for modular max77802 code drivers/pcmcia: include <module.h> for modular xxs1500_ss code drivers/hsi: include <module.h> for modular omap_ssi code drivers/gpu: include <module.h> for modular rockchip code drivers/gpio: include <module.h> for modular crystalcove code drivers/clk: include <module.h> for clk-max77xxx modular code
| * drivers/hsi: include <module.h> for modular omap_ssi codePaul Gortmaker2015-06-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | These files are built off of a tristate Kconfig option and also contain modular function calls so they should explicitly include module.h to avoid compile breakage during header shuffles done in the future. We change the one header file wich gives us coverage on both files: drivers/hsi/controllers/omap_ssi.c drivers/hsi/controllers/omap_ssi_port.c Cc: Sebastian Reichel <sre@kernel.org> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* | HSI: nokia-modem: use flags argument of devm_gpiod_get to set directionUwe Kleine-König2015-06-231-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions) which appeared in v3.17-rc1, the gpiod_get* functions take an additional parameter that allows to specify direction and initial value for output. Use this to simplify the driver. Furthermore this is one caller less that stops us making the flags argument to gpiod_get*() mandatory. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | HSI: nokia-modem: Reduce missing driver message to debug levelSebastian Reichel2015-06-231-2/+2
| | | | | | | | | | | | | | | | | | Reduce message priority from dev_err to dev_dbg for missing cmt-speech or ssi-protocol drivers, since they will be probed again and it may result in spamming the boot log. Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | HSI: cmt_speech: fix timestamp interfaceSebastian Reichel2015-06-231-2/+7
|/ | | | | | | | | | | | | | | | | | | | | | | | The user interface for timestamps in the new cmt_speech driver is broken in multiple ways: - The layout is incompatible between 32-bit and 64-bit user space, because of the size differences in 'struct timespec'. This means that the driver can not work when used with 32-bit user space on a 64-bit kernel. - As there are plans to change 32-bit user space to use a 64-bit time_t type in the future, it will also be incompatible with new 32-bit user space. - It is using ktime_get_ts under it's deprecated alias (do_posix_clock_monotonic_gettime). To keep support for the user space tools written for this driver (which have lived many years out-of-tree), the interface has been hardened to unsigned 32-bit values. Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* HSI: cmt_speech: fix error return codeJulia Lawall2015-04-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Return a negative error code on failure. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ identifier ret; expression e1,e2; @@ ( if (\(ret < 0\|ret != 0\)) { ... return ret; } | ret = 0 ) ... when != ret = e1 when != &ret *if(...) { ... when != ret = e2 when forall return ret; } // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* HSI: nokia-modem: Add cmt-speech supportSebastian Reichel2015-03-312-2/+32
| | | | | | | | | Register cmt-speech driver in nokia-modem driver and forward hsi channel information. Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi> Tested-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* HSI: cmt_speech: Add cmt-speech driverKai Vehmanen2015-03-313-0/+1467
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduces the cmt-speech driver, which implements a character device interface for transferring speech data frames over HSI/SSI. The driver is used to exchange voice/speech data between the Nokia N900/N950/N9's modem and its cpu. Signed-off-by: Kai Vehmanen <kai.vehmanen@nokia.com> Signed-off-by: Carlos Chinea <carlos.chinea@nokia.com> Signed-off-by: Joni Lapilainen <joni.lapilainen@gmail.com> Since the original driver has been written for 2.6.28 some build fixes and general cleanups have been added by me: * fix build for 4.0 kernel * replace GFP_ATOMIC with GFP_KERNEL in cs_alloc_cmds() * add sanity check for CS_SET_WAKELINE ioctl * cleanup driver initialisation * rename driver to cmt-speech to be consistent with ssi-protocol driver * move cs-protocol.h to include/uapi/linux/hsi, since it describes a userspace API * replace hardcoded channels numbers with values provided via the HSI framework (e.g. coming from DT) Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi> Tested-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* HSI: nokia-modem: fix error return codeJulia Lawall2015-02-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Return a negative error code on failure. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ identifier ret; expression e1,e2; @@ ( if (\(ret < 0\|ret != 0\)) { ... return ret; } | ret = 0 ) ... when != ret = e1 when != &ret *if(...) { ... when != ret = e2 when forall return ret; } // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* hsi: nokia-modem: fix uninitialized device pointerAaro Koskinen2015-01-041-0/+1
| | | | | | | | | modem->device was never initialized. This resulted in logs such as: [ 241.386322] (NULL device *): CMT rst line change detected Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* Merge tag 'hsi-for-3.19' of ↵Linus Torvalds2014-12-152-6/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi Pull HSI update from Sebastian Reichel: "Misc fixes in omap-ssi and nokia-modem drivers" * tag 'hsi-for-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi: HSI: nokia-modem: fix error handling of irq_of_parse_and_map HSI: nokia-modem: setup default value for pm parameter HSI: omap_ssi_port: Don't print uninitialized err HSI: remove deprecated IRQF_DISABLED
| * HSI: nokia-modem: fix error handling of irq_of_parse_and_mapDmitry Torokhov2014-11-141-2/+2
| | | | | | | | | | | | | | | | Return value of irq_of_parse_and_map() is unsigned int, with 0 indicating failure, so testing for negative result never works. Signed-off-by: Dmitry Torokhov <dtor@chromium.org> Signed-off-by: Sebastian Reichel <sre@kernel.org>
| * HSI: nokia-modem: setup default value for pm parameterSebastian Reichel2014-11-141-1/+1
| | | | | | | | | | | | | | | | The module documents, that 1 is the default, but it actually isn't. This updates the module to use pm=1 as default. Signed-off-by: Sebastian Reichel <sre@kernel.org>
| * HSI: omap_ssi_port: Don't print uninitialized errSebastian Reichel2014-10-201-2/+1
| | | | | | | | | | | | | | | | | | | | Do not print err variable, that has nothing to do with the error. This fixes a warning, that is printed at build time: drivers/hsi/controllers/omap_ssi_port.c: In function ‘ssi_port_probe’: drivers/hsi/controllers/omap_ssi_port.c:1121:10: warning: ‘err’ may be used uninitialized in this function [-Wuninitialized] Signed-off-by: Sebastian Reichel <sre@kernel.org>
| * HSI: remove deprecated IRQF_DISABLEDMichael Opdenacker2014-10-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | Remove the use of the IRQF_DISABLED flag from drivers/hsi/clients/nokia-modem.c It's a NOOP since 2.6.35 and it will be removed soon. Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | Merge tag 'driver-core-3.19-rc1' of ↵Linus Torvalds2014-12-142-2/+0
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core update from Greg KH: "Here's the set of driver core patches for 3.19-rc1. They are dominated by the removal of the .owner field in platform drivers. They touch a lot of files, but they are "simple" changes, just removing a line in a structure. Other than that, a few minor driver core and debugfs changes. There are some ath9k patches coming in through this tree that have been acked by the wireless maintainers as they relied on the debugfs changes. Everything has been in linux-next for a while" * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits) Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries" fs: debugfs: add forward declaration for struct device type firmware class: Deletion of an unnecessary check before the function call "vunmap" firmware loader: fix hung task warning dump devcoredump: provide a one-way disable function device: Add dev_<level>_once variants ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries ath: use seq_file api for ath9k debugfs files debugfs: add helper function to create device related seq_file drivers/base: cacheinfo: remove noisy error boot message Revert "core: platform: add warning if driver has no owner" drivers: base: support cpu cache information interface to userspace via sysfs drivers: base: add cpu_device_create to support per-cpu devices topology: replace custom attribute macros with standard DEVICE_ATTR* cpumask: factor out show_cpumap into separate helper function driver core: Fix unbalanced device reference in drivers_probe driver core: fix race with userland in device_add() sysfs/kernfs: make read requests on pre-alloc files use the buffer. sysfs/kernfs: allow attributes to request write buffer be pre-allocated. fs: sysfs: return EGBIG on write if offset is larger than file size ...
| * | hsi: controllers: drop owner assignment from platform_driversWolfram Sang2014-10-202-2/+0
| |/ | | | | | | | | | | | | A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* | hsi / OMAP / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PMRafael J. Wysocki2014-12-042-2/+2
|/ | | | | | | | | | | | After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks depending on CONFIG_PM_RUNTIME may now be changed to depend on CONFIG_PM. Do that for the omap_ssi driver. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-By: Sebastian Reichel <sre@kernel.org>
* 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>
OpenPOWER on IntegriCloud