1
0
Fork 0
Commit Graph

28 Commits (d2878d642a4edd1d57c691dc3e4d7847cbf9d442)

Author SHA1 Message Date
Adrian Remonda 5132fcd1fb Staging: most: aim-cdev/cdev.c. Fix "missing static keyword" warnings
This is a patch to the most/aim_cdev.c file. It makes several
local functions and structures static to prevent global visibility.

Signed-off-by: Adrian Remonda <adrianremonda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 17:34:52 -07:00
Adrian Remonda 23fe15fadf Staging: most: hdm-usb/hdm_usb.c. Fix "missing static keyword" warnings
This is a patch to the most/hdm-usb/hdm_usb.c file. It
makes several local functions and structures static to prevent global
visibility.

Signed-off-by: Adrian Remonda <adrianremonda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 17:34:42 -07:00
Adrian Remonda 04ca58372c Staging: most: mostcore/core.c. Fix "Using plain integer as NULL pointer" warnings
This patch fixes the warning generated by sparse: "Using plain integer
as NULL pointer" by replacing the pointer test against 0 with a logical test.

Signed-off-by: Adrian Remonda <adrianremonda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 17:34:42 -07:00
Adrian Remonda c942ea7a37 Staging: most: mostcore/core.c. Fix "missing static keyword" warnings
This is a patch to the mostcore/core.c file. It makes
several local functions and structures static to prevent global
visibility.

Signed-off-by: Adrian Remonda <adrianremonda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 17:34:41 -07:00
Joe Perches ddb98ce161 staging: most: Remove unnecessary externs
Using 'extern' is not necessary for function prototypes.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 17:33:23 -07:00
Tomas Melin 910bf1efe6 staging/most: fix return value for DIM_GetChannelState
Return NULL instead of 0 for invalid input.

Signed-off-by: Tomas Melin <tomas.melin@iki.fi>
Acked-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 17:33:23 -07:00
Randy Dunlap bc7ac43253 staging: most: fix hdm-dim2 build error
Fix build of hdm-dim2. Since it calls a function that is provided
by AIM_NETWORK, make it depend on that symbol.

Also fix a misspelling in the Kconfig file.

drivers/built-in.o: In function `deliver_netinfo_thread':
dim2_hdm.c:(.text+0x3a9563): undefined reference to `most_deliver_netinfo'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Jain Roy Ambi <JainRoy.Ambi@microchip.com>
Cc: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-03 17:39:51 -07:00
Randy Dunlap f8ff8db038 staging: most: fix aim-sound build errors
Fix build errors: driver uses snd_pcm*() interfaces, so select
SND_PCM.

drivers/built-in.o: In function `audio_rx_completion':
sound.c:(.text+0x3cd376): undefined reference to `snd_pcm_period_elapsed'
drivers/built-in.o: In function `pcm_prepare':
sound.c:(.text+0x3cd3b0): undefined reference to `snd_pcm_format_physical_width'
sound.c:(.text+0x3cd3ce): undefined reference to `snd_pcm_format_big_endian'
sound.c:(.text+0x3cd42c): undefined reference to `snd_pcm_format_big_endian'
drivers/built-in.o: In function `pcm_hw_free':
sound.c:(.text+0x3cd50a): undefined reference to `snd_pcm_lib_free_vmalloc_buffer'
drivers/built-in.o: In function `pcm_hw_params':
sound.c:(.text+0x3cd54c): undefined reference to `_snd_pcm_lib_alloc_vmalloc_buffer'
drivers/built-in.o: In function `playback_thread':
sound.c:(.text+0x3cd6a0): undefined reference to `snd_pcm_period_elapsed'
drivers/built-in.o: In function `audio_probe_channel':
sound.c:(.text+0x3cdc0b): undefined reference to `snd_pcm_new'
sound.c:(.text+0x3cdc2b): undefined reference to `snd_pcm_set_ops'
drivers/built-in.o:(.data+0x952d0): undefined reference to `snd_pcm_lib_ioctl'
drivers/built-in.o:(.data+0x95318): undefined reference to `snd_pcm_lib_get_vmalloc_page'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-03 17:39:51 -07:00
Christian Gromm 2ae0751007 Staging: most: avoid possible integer overflow
This patch prevents a potential integer overlow.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-03 17:39:51 -07:00
Michael Hornung b3c1a61744 linux-next: drivers: staging: most: Fix return value
* Fix sparse warning "Using plain integer as NULL pointer"

Signed-off-by: Michael Hornung <mhornung.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-31 16:17:21 -07:00
Christian Gromm 59ed0480b9 Staging: most: replace pr_*() functions by dev_*()
This patch replaces pr_*() functions with dev_*().

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-31 16:17:20 -07:00
Christian Gromm 412c8232ed Staging: most: fix doing DMA on stack
This patch fixes error "doing DMA on the stack" by using kzalloc
for buffer allocation.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-31 16:17:20 -07:00
Christian Gromm 3f78f6116d Staging: most: replace min() by min_t()
This patch fixes wrong casting.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-31 16:17:20 -07:00
Christian Gromm 6852ac9acb Staging: most: fix double unlock
This patch fixes double unlocking of a spinlock the aim-v4l2 module.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-31 16:17:20 -07:00
Randy Dunlap d10e0a6332 staging: most: fix aim-network build errors
Fix build errors when CONFIG_NET is not enabled by making the driver
depend on NET.
Also correct the loadable module name.

ERROR: "__netdev_alloc_skb" [drivers/staging/most/aim-network/aim_network.ko] undefined!
ERROR: "netif_rx" [drivers/staging/most/aim-network/aim_network.ko] undefined!
ERROR: "netif_tx_wake_queue" [drivers/staging/most/aim-network/aim_network.ko] undefined!
ERROR: "free_netdev" [drivers/staging/most/aim-network/aim_network.ko] undefined!
ERROR: "register_netdev" [drivers/staging/most/aim-network/aim_network.ko] undefined!
ERROR: "kfree_skb" [drivers/staging/most/aim-network/aim_network.ko] undefined!
ERROR: "alloc_netdev_mqs" [drivers/staging/most/aim-network/aim_network.ko] undefined!
ERROR: "eth_type_trans" [drivers/staging/most/aim-network/aim_network.ko] undefined!
ERROR: "ether_setup" [drivers/staging/most/aim-network/aim_network.ko] undefined!
ERROR: "unregister_netdev" [drivers/staging/most/aim-network/aim_network.ko] undefined!
ERROR: "skb_put" [drivers/staging/most/aim-network/aim_network.ko] undefined!
ERROR: "eth_mac_addr" [drivers/staging/most/aim-network/aim_network.ko] undefined!

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Cc: Michael Fabry <Michael.Fabry@microchip.com>
Acked-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:43:15 -07:00
Christian Gromm a11442fe87 Staging: most: fix passing a potential null pointer
This patch fixes passing of a potential null pointer.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:43:15 -07:00
Christian Gromm 2e4c30458e Staging: most: fix dereferencing freed memory
This patch fixes the dereferencing of freed memory.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:43:15 -07:00
Christian Gromm 7ac5c9f0a0 Staging: most: fix snprintf() is printing too much
This patch prevents snprintf from exceeding a given buffer size.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:43:15 -07:00
Chaehyun Lim add04a9854 staging: most: core.c: remove semicolon at the end of define statement
Remove semicolon at the end of define statement to fix checkpatch warning.
WARNING: macros should not use a trailing semicolon

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Acked-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-29 13:43:15 -07:00
Christian Gromm 59cc3399ef Staging: most: add MOST driver's documentation
This patch adds the documentation to the MOST driver that describes its ABI
interface and the basic usage.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-24 13:50:43 -07:00
Christian Gromm a4198cdf0c Staging: most: add MOST driver's hdm-usb module
This patch adds the hdm-usb module of the MOST driver to the kernel's
driver staging area. This module is part of the MOST driver and handles
the USB interface of the MOST network interface controller.

This patch is needed in order to use the USB peripheral interface of the
network interface controller.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-24 13:50:43 -07:00
Christian Gromm 91a450ada8 Staging: most: add MOST driver's hdm-i2c module
This patch adds the hdm-i2c module of the MOST driver to the kernel's
driver staging area. This module is part of the MOST driver and handles
the I2C interface of the MOST network interface controller.

This patch is needed in order to use the I2C peripheral interface of the
network interface controller.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-24 13:50:43 -07:00
Christian Gromm ba3d7ddfb5 Staging: most: add MOST driver's hdm-dim2 module
This patch adds the hdm-dim2 module of the MOST driver to the kernel's
driver staging area. This module is part of the MOST driver and handles
the MediaLB interface of the MOST network interface controller.

This patch is needed in order to use the MediaLB peripheral interface of
the network interface controller.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-24 13:50:43 -07:00
Christian Gromm 3d31c0cb6c Staging: most: add MOST driver's aim-v4l2 module
This patch adds the aim-v4l2 module of the MOST driver to the kernel's
driver staging area. This module is part of the MOST driver and handles
user space interaction by means of V4L2.

This patch is needed in order to have access to MOST isochronous AVP data
through V4L2 devices.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-24 13:49:17 -07:00
Christian Gromm 54b4856fb3 Staging: most: add MOST driver's aim-sound module
This patch adds the aim-sound module of the MOST driver to the kernel's
driver staging area. This module is part of the MOST driver and handles
user space interaction by means of ALSA devices.

This patch is needed in order to have access to MOST synchronous data
through ALSA devices.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-24 13:49:17 -07:00
Christian Gromm d4a8ce7f57 Staging: most: add MOST driver's aim-network module
This patch adds the aim-network module of the MOST driver to the kernel's
driver staging area. This module is part of the MOST driver and handles
user space interaction by means of network devices.

This patch is needed in order to have access to MOST Ethernet Packets (MEP)
through a networking device.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-24 13:49:17 -07:00
Christian Gromm 9bc79bbcd0 Staging: most: add MOST driver's aim-cdev module
This patch adds the aim-cdev module of the MOST driver to the kernel's
driver staging area. This module is part of the MOST driver and handles
user space interaction by means of character devices.

This patch is needed in order to have access to MOST data through
character devices.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-24 13:49:17 -07:00
Christian Gromm 57562a7241 Staging: most: add MOST driver's core module
This patch adds the core module of the MOST driver to the kernel's driver
staging area. This module is part of the MOST driver and handles the
configuration interface in sysfs, the buffer management and the data
routing.

MOST defines the protocol, hardware and software layers necessary to allow
for the efficient and low-cost transport of control, real-time and packet
data using a single medium (physical layer). Media currently in use are
fiber optics, unshielded twisted pair cables (UTP) and coax cables. MOST
also supports various speed grades up to 150 Mbps.
For more information on MOST, visit the MOST Cooperation website:
www.mostcooperation.com.

Cars continue to evolve into sophisticated consumer electronics platforms,
increasing the demand for reliable and simple solutions to support audio,
video and data communications. MOST can be used to connect multiple
consumer devices via optical or electrical physical layers directly to one
another or in a network configuration. As a synchronous network, MOST
provides excellent Quality of Service and seamless connectivity for
audio/video streaming. Therefore, the driver perfectly fits to the mission
of Automotive Grade Linux to create open source software solutions for
automotive applications.

The driver consists basically of three layers. The hardware layer, the
core layer and the application layer. The core layer consists of the core
module only. This module handles the communication flow through all three
layers, the configuration of the driver, the configuration interface
representation in sysfs, and the buffer management.
For each of the other two layers a selection of modules is provided. These
modules can arbitrarily be combined to meet the needs of the desired
system architecture. A module of the hardware layer is referred to as an
HDM (hardware dependent module). Each module of this layer handles exactly
one of the peripheral interfaces of a network interface controller (e.g.
USB, MediaLB, I2C). A module of the application layer is referred to as an
AIM (application interfacing module). The modules of this layer give access
to MOST via one the following ways: character devices, ALSA, Networking or
V4L2.

To physically access MOST, an Intelligent Network Interface Controller
(INIC) is needed. For more information on available controllers visit:
www.microchip.com

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-24 13:47:32 -07:00