summaryrefslogtreecommitdiff
path: root/drivers/hsi/clients/nokia-modem.c
AgeCommit message (Collapse)Author
2017-06-08HSI: nokia-modem: Add a space character for better code readability in ↵Markus Elfring
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>
2017-06-08HSI: nokia-modem: Delete error messages for a failed memory allocation in ↵Markus Elfring
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>
2017-06-08HSI: nokia-modem: Use devm_kcalloc() in nokia_modem_gpio_probe()Markus Elfring
* 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>
2016-01-28HSI: nokia-modem: add n950 and n9 supportSebastian Reichel
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>
2015-06-23HSI: nokia-modem: use flags argument of devm_gpiod_get to set directionUwe Kleine-König
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>
2015-06-23HSI: nokia-modem: Reduce missing driver message to debug levelSebastian Reichel
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>
2015-03-31HSI: nokia-modem: Add cmt-speech supportSebastian Reichel
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>
2015-02-28HSI: nokia-modem: fix error return codeJulia Lawall
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>
2015-01-04hsi: nokia-modem: fix uninitialized device pointerAaro Koskinen
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>
2014-11-14HSI: nokia-modem: fix error handling of irq_of_parse_and_mapDmitry Torokhov
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>
2014-11-14HSI: nokia-modem: setup default value for pm parameterSebastian Reichel
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>
2014-10-03HSI: remove deprecated IRQF_DISABLEDMichael Opdenacker
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>
2014-05-16HSI: Introduce Nokia N900 modem driverSebastian Reichel
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>