03 Jul, 2015
1 commit
-
Pull implicit module.h fixes from Paul Gortmaker:
"Fix up implicit users that will break later.The files changed here are simply modular source files that are
implicitly relying on 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 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 for modular exynos-cpufreq.c code
drivers/staging: include 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 for modular max77802 code
drivers/pcmcia: include for modular xxs1500_ss code
drivers/hsi: include for modular omap_ssi code
drivers/gpu: include for modular rockchip code
drivers/gpio: include for modular crystalcove code
drivers/clk: include for clk-max77xxx modular code
23 Jun, 2015
3 commits
-
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
Acked-by: Alexandre Courbot
Signed-off-by: Sebastian 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
Signed-off-by: Sebastian Reichel -
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
Signed-off-by: Sebastian Reichel
17 Jun, 2015
1 commit
-
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.cCc: Sebastian Reichel
Signed-off-by: Paul Gortmaker
05 Apr, 2015
1 commit
-
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/)//
@@
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;
}
//Signed-off-by: Julia Lawall
Signed-off-by: Sebastian Reichel
01 Apr, 2015
2 commits
-
Register cmt-speech driver in nokia-modem driver and forward
hsi channel information.Acked-by: Aaro Koskinen
Tested-by: Pavel Machek
Signed-off-by: Sebastian Reichel -
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
Signed-off-by: Carlos Chinea
Signed-off-by: Joni LapilainenSince 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
Tested-by: Pavel Machek
Signed-off-by: Sebastian Reichel
01 Mar, 2015
1 commit
-
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/)//
@@
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;
}
//Signed-off-by: Julia Lawall
Signed-off-by: Sebastian Reichel
05 Jan, 2015
1 commit
-
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
Signed-off-by: Sebastian Reichel
16 Dec, 2014
1 commit
-
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
15 Dec, 2014
1 commit
-
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__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
...
04 Dec, 2014
1 commit
-
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
Acked-By: Sebastian Reichel
15 Nov, 2014
2 commits
-
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
Signed-off-by: Sebastian 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
20 Oct, 2014
2 commits
-
A platform_driver does not need to set an owner, it will be populated by the
driver core.Signed-off-by: Wolfram Sang
-
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
03 Oct, 2014
1 commit
-
Remove the use of the IRQF_DISABLED flag
from drivers/hsi/clients/nokia-modem.cIt's a NOOP since 2.6.35 and it will be removed soon.
Signed-off-by: Michael Opdenacker
Acked-by: Pavel Machek
Signed-off-by: Sebastian Reichel
07 Aug, 2014
1 commit
-
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
31 Jul, 2014
2 commits
-
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
Signed-off-by: Sebastian Reichel -
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
Signed-off-by: Sebastian Reichel
20 Jul, 2014
1 commit
-
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
Signed-off-by: Sebastian Reichel
18 Jul, 2014
1 commit
-
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
Signed-off-by: Andrey Utkin
Signed-off-by: Sebastian Reichel
16 Jul, 2014
1 commit
-
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
Reviewed-by: David Herrmann
Signed-off-by: David S. Miller
05 Jun, 2014
1 commit
-
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
Cc: Sebastian Reichel
Cc: Carlos Chinea
Cc: Ivaylo Dimitrov
Signed-off-by: Sebastian Reichel
04 Jun, 2014
1 commit
-
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
Cc: Sebastian Reichel
Cc: Ivaylo Dimitrov
Cc: Pavel Machek
Signed-off-by: Sebastian Reichel
16 May, 2014
7 commits
-
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
Reviewed-by: Pavel Machek
Tested-By: Ivaylo Dimitrov -
This adds a driver for the SSI McSAAB protocol as used in
the Nokia N900.Signed-off-by: Carlos Chinea
Signed-off-by: Sebastian Reichel
Tested-By: Ivaylo Dimitrov -
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
Signed-off-by: Sebastian Reichel
Tested-By: Ivaylo Dimitrov -
Implement and document generic DT bindings for HSI clients.
Signed-off-by: Sebastian Reichel
Reviewed-by: Pavel Machek
Tested-By: Ivaylo Dimitrov -
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
Reviewed-by: Pavel Machek
Tested-By: Ivaylo Dimitrov -
Make HSI channel ids platform data, which can be provided
by platform data.Signed-off-by: Sebastian Reichel
Tested-By: Ivaylo Dimitrov -
This exports a method to unregister all clients from
an hsi port.Signed-off-by: Sebastian Reichel
Reviewed-by: Pavel Machek
Tested-By: Ivaylo Dimitrov
04 May, 2014
1 commit
-
Fix return code check of alloc_chrdev_region, which
returns 0 on success.Signed-off-by: Sebastian Reichel
Reviewed-by: Pavel Machek
17 Oct, 2013
1 commit
-
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
Cc: Kees Cook
Signed-off-by: Greg Kroah-Hartman
04 Jul, 2013
1 commit
-
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
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
02 Mar, 2013
1 commit
-
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
Cc: Carlos Chinea
Cc: Linus Walleij
Cc: Greg Kroah-Hartman
Cc: linux-kernel@vger.kernel.org
Cc: linux-omap@vger.kernel.org
Acked-by: Nishanth Menon
Signed-off-by: Linus Torvalds
04 Jan, 2013
1 commit
-
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
Signed-off-by: Greg Kroah-Hartman
23 Apr, 2012
2 commits
-
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
Acked-by: Greg Kroah-Hartman
Acked-by: Linus Walleij -
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
Acked-by: Greg Kroah-Hartman
Acked-by: Linus Walleij