[PATCH v3 01/26] staging: most: rearrange source files
Christian Gromm
christian.gromm at microchip.com
Mon Oct 16 08:46:08 UTC 2017
This patch renames and moves the source files of the driver. Additionally,
it adapts the ABI, Makefiles and Kconfig files of the kernel's build
system.
Signed-off-by: Christian Gromm <christian.gromm at microchip.com>
---
v2: fix patch numeration
v3: - add cover letter
- create patches with -M switch to make file movement visible
.../most/Documentation/ABI/sysfs-bus-most.txt | 313 +++++++++++++++++++++
drivers/staging/most/Kconfig | 27 +-
drivers/staging/most/Makefile | 19 +-
drivers/staging/most/aim-cdev/Makefile | 4 -
drivers/staging/most/aim-network/Makefile | 4 -
drivers/staging/most/aim-sound/Makefile | 4 -
drivers/staging/most/aim-v4l2/Makefile | 5 -
drivers/staging/most/{aim-cdev => cdev}/Kconfig | 6 +-
drivers/staging/most/cdev/Makefile | 4 +
drivers/staging/most/{aim-cdev => cdev}/cdev.c | 2 +-
drivers/staging/most/{mostcore => }/core.c | 2 +-
.../staging/most/{mostcore/mostcore.h => core.h} | 2 +-
drivers/staging/most/{hdm-dim2 => dim2}/Kconfig | 6 +-
drivers/staging/most/dim2/Makefile | 4 +
.../most/{hdm-dim2/dim2_hdm.c => dim2/dim2.c} | 12 +-
.../most/{hdm-dim2/dim2_hdm.h => dim2/dim2.h} | 2 +-
.../most/{hdm-dim2/dim2_errors.h => dim2/errors.h} | 2 +-
.../most/{hdm-dim2/dim2_hal.c => dim2/hal.c} | 8 +-
.../most/{hdm-dim2/dim2_hal.h => dim2/hal.h} | 4 +-
.../most/{hdm-dim2/dim2_reg.h => dim2/reg.h} | 2 +-
.../most/{hdm-dim2/dim2_sysfs.c => dim2/sysfs.c} | 4 +-
.../most/{hdm-dim2/dim2_sysfs.h => dim2/sysfs.h} | 2 +-
drivers/staging/most/hdm-dim2/Makefile | 5 -
drivers/staging/most/hdm-i2c/Makefile | 3 -
drivers/staging/most/hdm-usb/Makefile | 4 -
drivers/staging/most/{hdm-i2c => i2c}/Kconfig | 6 +-
drivers/staging/most/i2c/Makefile | 4 +
.../staging/most/{hdm-i2c/hdm_i2c.c => i2c/i2c.c} | 4 +-
drivers/staging/most/mostcore/Kconfig | 14 -
drivers/staging/most/mostcore/Makefile | 3 -
drivers/staging/most/{aim-network => net}/Kconfig | 6 +-
drivers/staging/most/net/Makefile | 4 +
.../most/{aim-network/networking.c => net/net.c} | 2 +-
drivers/staging/most/{aim-sound => sound}/Kconfig | 6 +-
drivers/staging/most/sound/Makefile | 4 +
drivers/staging/most/{aim-sound => sound}/sound.c | 2 +-
drivers/staging/most/{hdm-usb => usb}/Kconfig | 7 +-
drivers/staging/most/usb/Makefile | 4 +
.../staging/most/{hdm-usb/hdm_usb.c => usb/usb.c} | 4 +-
drivers/staging/most/{aim-v4l2 => video}/Kconfig | 6 +-
drivers/staging/most/video/Makefile | 4 +
drivers/staging/most/{aim-v4l2 => video}/video.c | 2 +-
42 files changed, 416 insertions(+), 116 deletions(-)
create mode 100644 drivers/staging/most/Documentation/ABI/sysfs-bus-most.txt
delete mode 100644 drivers/staging/most/aim-cdev/Makefile
delete mode 100644 drivers/staging/most/aim-network/Makefile
delete mode 100644 drivers/staging/most/aim-sound/Makefile
delete mode 100644 drivers/staging/most/aim-v4l2/Makefile
rename drivers/staging/most/{aim-cdev => cdev}/Kconfig (70%)
create mode 100644 drivers/staging/most/cdev/Makefile
rename drivers/staging/most/{aim-cdev => cdev}/cdev.c (99%)
rename drivers/staging/most/{mostcore => }/core.c (99%)
rename drivers/staging/most/{mostcore/mostcore.h => core.h} (99%)
rename drivers/staging/most/{hdm-dim2 => dim2}/Kconfig (83%)
create mode 100644 drivers/staging/most/dim2/Makefile
rename drivers/staging/most/{hdm-dim2/dim2_hdm.c => dim2/dim2.c} (99%)
rename drivers/staging/most/{hdm-dim2/dim2_hdm.h => dim2/dim2.h} (94%)
rename drivers/staging/most/{hdm-dim2/dim2_errors.h => dim2/errors.h} (95%)
rename drivers/staging/most/{hdm-dim2/dim2_hal.c => dim2/hal.c} (99%)
rename drivers/staging/most/{hdm-dim2/dim2_hal.h => dim2/hal.h} (98%)
rename drivers/staging/most/{hdm-dim2/dim2_reg.h => dim2/reg.h} (98%)
rename drivers/staging/most/{hdm-dim2/dim2_sysfs.c => dim2/sysfs.c} (97%)
rename drivers/staging/most/{hdm-dim2/dim2_sysfs.h => dim2/sysfs.h} (95%)
delete mode 100644 drivers/staging/most/hdm-dim2/Makefile
delete mode 100644 drivers/staging/most/hdm-i2c/Makefile
delete mode 100644 drivers/staging/most/hdm-usb/Makefile
rename drivers/staging/most/{hdm-i2c => i2c}/Kconfig (72%)
create mode 100644 drivers/staging/most/i2c/Makefile
rename drivers/staging/most/{hdm-i2c/hdm_i2c.c => i2c/i2c.c} (99%)
delete mode 100644 drivers/staging/most/mostcore/Kconfig
delete mode 100644 drivers/staging/most/mostcore/Makefile
rename drivers/staging/most/{aim-network => net}/Kconfig (69%)
create mode 100644 drivers/staging/most/net/Makefile
rename drivers/staging/most/{aim-network/networking.c => net/net.c} (99%)
rename drivers/staging/most/{aim-sound => sound}/Kconfig (72%)
create mode 100644 drivers/staging/most/sound/Makefile
rename drivers/staging/most/{aim-sound => sound}/sound.c (99%)
rename drivers/staging/most/{hdm-usb => usb}/Kconfig (77%)
create mode 100644 drivers/staging/most/usb/Makefile
rename drivers/staging/most/{hdm-usb/hdm_usb.c => usb/usb.c} (99%)
rename drivers/staging/most/{aim-v4l2 => video}/Kconfig (71%)
create mode 100644 drivers/staging/most/video/Makefile
rename drivers/staging/most/{aim-v4l2 => video}/video.c (99%)
diff --git a/drivers/staging/most/Documentation/ABI/sysfs-bus-most.txt b/drivers/staging/most/Documentation/ABI/sysfs-bus-most.txt
new file mode 100644
index 0000000..543884d
--- /dev/null
+++ b/drivers/staging/most/Documentation/ABI/sysfs-bus-most.txt
@@ -0,0 +1,313 @@
+What: /sys/bus/most/devices/.../description
+Date: March 2017
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ Provides information about the interface type and the physical
+ location of the device. Hardware attached via USB, for instance,
+ might return <usb_device 1-1.1:1.0>
+Users:
+
+What: /sys/bus/most/devices/.../interface
+Date: March 2017
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ Indicates the type of peripheral interface the device uses.
+Users:
+
+What: /sys/bus/most/devices/.../dci
+Date: June 2016
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ If the network interface controller is attached via USB, a dci
+ directory is created that allows applications to read and
+ write the controller's DCI registers.
+Users:
+
+What: /sys/bus/most/devices/.../dci/arb_address
+Date: June 2016
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ This is used to set an arbitrary DCI register address an
+ application wants to read from or write to.
+Users:
+
+What: /sys/bus/most/devices/.../dci/arb_value
+Date: June 2016
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ This is used to read and write the DCI register whose address
+ is stored in arb_address.
+Users:
+
+What: /sys/bus/most/devices/.../dci/mep_eui48_hi
+Date: June 2016
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ This is used to check and configure the MAC address.
+Users:
+
+What: /sys/bus/most/devices/.../dci/mep_eui48_lo
+Date: June 2016
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ This is used to check and configure the MAC address.
+Users:
+
+What: /sys/bus/most/devices/.../dci/mep_eui48_mi
+Date: June 2016
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ This is used to check and configure the MAC address.
+Users:
+
+What: /sys/bus/most/devices/.../dci/mep_filter
+Date: June 2016
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ This is used to check and configure the MEP filter address.
+Users:
+
+What: /sys/bus/most/devices/.../dci/mep_hash0
+Date: June 2016
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ This is used to check and configure the MEP hash table.
+Users:
+
+What: /sys/bus/most/devices/.../dci/mep_hash1
+Date: June 2016
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ This is used to check and configure the MEP hash table.
+Users:
+
+What: /sys/bus/most/devices/.../dci/mep_hash2
+Date: June 2016
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ This is used to check and configure the MEP hash table.
+Users:
+
+What: /sys/bus/most/devices/.../dci/mep_hash3
+Date: June 2016
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ This is used to check and configure the MEP hash table.
+Users:
+
+What: /sys/bus/most/devices/.../dci/ni_state
+Date: June 2016
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ Indicates the current network interface state.
+Users:
+
+What: /sys/bus/most/devices/.../dci/node_address
+Date: June 2016
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ Indicates the current node address.
+Users:
+
+What: /sys/bus/most/devices/.../dci/node_position
+Date: June 2016
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ Indicates the current node position.
+Users:
+
+What: /sys/bus/most/devices/.../dci/packet_bandwidth
+Date: June 2016
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ Indicates the configured packet bandwidth.
+Users:
+
+What: /sys/bus/most/devices/.../dci/sync_ep
+Date: June 2016
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ Triggers the controller's synchronization process for a certain
+ endpoint.
+Users:
+
+What: /sys/bus/most/devices/.../<channel>/
+Date: March 2017
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ For every channel of the device a directory is created, whose
+ name is dictated by the HDM. This enables an application to
+ collect information about the channel's capabilities and
+ configure it.
+Users:
+
+What: /sys/bus/most/devices/.../<channel>/available_datatypes
+Date: March 2017
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ Indicates the data types the current channel can transport.
+Users:
+
+What: /sys/bus/most/devices/.../<channel>/available_directions
+Date: March 2017
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ Indicates the directions the current channel is capable of.
+Users:
+
+What: /sys/bus/most/devices/.../<channel>/number_of_packet_buffers
+Date: March 2017
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ Indicates the number of packet buffers the current channel can
+ handle.
+Users:
+
+What: /sys/bus/most/devices/.../<channel>/number_of_stream_buffers
+Date: March 2017
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ Indicates the number of streaming buffers the current channel can
+ handle.
+Users:
+
+What: /sys/bus/most/devices/.../<channel>/size_of_packet_buffer
+Date: March 2017
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ Indicates the size of a packet buffer the current channel can
+ handle.
+Users:
+
+What: /sys/bus/most/devices/.../<channel>/size_of_stream_buffer
+Date: March 2017
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ Indicates the size of a streaming buffer the current channel can
+ handle.
+Users:
+
+What: /sys/bus/most/devices/.../<channel>/set_number_of_buffers
+Date: March 2017
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ This is to configure the number of buffers of the current channel.
+Users:
+
+What: /sys/bus/most/devices/.../<channel>/set_buffer_size
+Date: March 2017
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ This is to configure the size of a buffer of the current channel.
+Users:
+
+What: /sys/bus/most/devices/.../<channel>/set_direction
+Date: March 2017
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ This is to configure the direction of the current channel.
+ The following strings will be accepted:
+ 'dir_tx',
+ 'dir_rx'
+Users:
+
+What: /sys/bus/most/devices/.../<channel>/set_datatype
+Date: March 2017
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ This is to configure the data type of the current channel.
+ The following strings will be accepted:
+ 'control',
+ 'async',
+ 'sync',
+ 'isoc_avp'
+Users:
+
+What: /sys/bus/most/devices/.../<channel>/set_subbuffer_size
+Date: March 2017
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ This is to configure the subbuffer size of the current channel.
+Users:
+
+What: /sys/bus/most/devices/.../<channel>/set_packets_per_xact
+Date: March 2017
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ This is to configure the number of packets per transaction of
+ the current channel. This is only needed network interface
+ controller is attached via USB.
+Users:
+
+What: /sys/bus/most/devices/.../<channel>/channel_starving
+Date: March 2017
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ Indicates whether current channel ran out of buffers.
+Users:
+
+What: /sys/bus/most/drivers/mostcore/add_link
+Date: March 2017
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ This is used to link a channel to a component of the
+ mostcore. A link created by writing to this file is
+ refered to as pipe.
+Users:
+
+What: /sys/bus/most/drivers/mostcore/remove_link
+Date: March 2017
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ This is used to unlink a channel from a component.
+Users:
+
+What: /sys/bus/most/drivers/mostcore/components
+Date: March 2017
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ This is used to retrieve a list of registered components.
+Users:
+
+What: /sys/bus/most/drivers/mostcore/links
+Date: March 2017
+KernelVersion: 4.15
+Contact: Christian Gromm <christian.gromm at microchip.com>
+Description:
+ This is used to retrieve a list of established links.
+Users:
diff --git a/drivers/staging/most/Kconfig b/drivers/staging/most/Kconfig
index 0b9b9b5..20047ab 100644
--- a/drivers/staging/most/Kconfig
+++ b/drivers/staging/most/Kconfig
@@ -1,10 +1,15 @@
menuconfig MOST
- tristate "MOST driver"
+ tristate "MOST support"
depends on HAS_DMA
- select MOSTCORE
default n
---help---
- This option allows you to enable support for MOST Network transceivers.
+ Say Y here if you want to enable MOST support.
+ This driver needs at least one additional component to enable the
+ desired access from userspace (e.g. character devices) and one that
+ matches the network controller's hardware interface (e.g. USB).
+
+ To compile this driver as a module, choose M here: the
+ module will be called most_core.
If in doubt, say N here.
@@ -12,20 +17,18 @@ menuconfig MOST
if MOST
-source "drivers/staging/most/mostcore/Kconfig"
-
-source "drivers/staging/most/aim-cdev/Kconfig"
+source "drivers/staging/most/cdev/Kconfig"
-source "drivers/staging/most/aim-network/Kconfig"
+source "drivers/staging/most/net/Kconfig"
-source "drivers/staging/most/aim-sound/Kconfig"
+source "drivers/staging/most/sound/Kconfig"
-source "drivers/staging/most/aim-v4l2/Kconfig"
+source "drivers/staging/most/video/Kconfig"
-source "drivers/staging/most/hdm-dim2/Kconfig"
+source "drivers/staging/most/dim2/Kconfig"
-source "drivers/staging/most/hdm-i2c/Kconfig"
+source "drivers/staging/most/i2c/Kconfig"
-source "drivers/staging/most/hdm-usb/Kconfig"
+source "drivers/staging/most/usb/Kconfig"
endif
diff --git a/drivers/staging/most/Makefile b/drivers/staging/most/Makefile
index 9ee981c..2995309 100644
--- a/drivers/staging/most/Makefile
+++ b/drivers/staging/most/Makefile
@@ -1,8 +1,11 @@
-obj-$(CONFIG_MOSTCORE) += mostcore/
-obj-$(CONFIG_AIM_CDEV) += aim-cdev/
-obj-$(CONFIG_AIM_NETWORK) += aim-network/
-obj-$(CONFIG_AIM_SOUND) += aim-sound/
-obj-$(CONFIG_AIM_V4L2) += aim-v4l2/
-obj-$(CONFIG_HDM_DIM2) += hdm-dim2/
-obj-$(CONFIG_HDM_I2C) += hdm-i2c/
-obj-$(CONFIG_HDM_USB) += hdm-usb/
+obj-$(CONFIG_MOST) += most_core.o
+most_core-y := core.o
+ccflags-y += -Idrivers/staging/
+
+obj-$(CONFIG_MOST_CDEV) += cdev/
+obj-$(CONFIG_MOST_NET) += net/
+obj-$(CONFIG_MOST_SOUND) += sound/
+obj-$(CONFIG_MOST_VIDEO) += video/
+obj-$(CONFIG_MOST_DIM2) += dim2/
+obj-$(CONFIG_MOST_I2C) += i2c/
+obj-$(CONFIG_MOST_USB) += usb/
diff --git a/drivers/staging/most/aim-cdev/Makefile b/drivers/staging/most/aim-cdev/Makefile
deleted file mode 100644
index 0bcc6c6..0000000
--- a/drivers/staging/most/aim-cdev/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-obj-$(CONFIG_AIM_CDEV) += aim_cdev.o
-
-aim_cdev-objs := cdev.o
-ccflags-y += -Idrivers/staging/most/mostcore/
\ No newline at end of file
diff --git a/drivers/staging/most/aim-network/Makefile b/drivers/staging/most/aim-network/Makefile
deleted file mode 100644
index 840c1dd..0000000
--- a/drivers/staging/most/aim-network/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-obj-$(CONFIG_AIM_NETWORK) += aim_network.o
-
-aim_network-objs := networking.o
-ccflags-y += -Idrivers/staging/most/mostcore/
diff --git a/drivers/staging/most/aim-sound/Makefile b/drivers/staging/most/aim-sound/Makefile
deleted file mode 100644
index beba958..0000000
--- a/drivers/staging/most/aim-sound/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-obj-$(CONFIG_AIM_SOUND) += aim_sound.o
-
-aim_sound-objs := sound.o
-ccflags-y += -Idrivers/staging/most/mostcore/
diff --git a/drivers/staging/most/aim-v4l2/Makefile b/drivers/staging/most/aim-v4l2/Makefile
deleted file mode 100644
index 69a7524..0000000
--- a/drivers/staging/most/aim-v4l2/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-obj-$(CONFIG_AIM_V4L2) += aim_v4l2.o
-
-aim_v4l2-objs := video.o
-
-ccflags-y += -Idrivers/staging/most/mostcore/
diff --git a/drivers/staging/most/aim-cdev/Kconfig b/drivers/staging/most/cdev/Kconfig
similarity index 70%
rename from drivers/staging/most/aim-cdev/Kconfig
rename to drivers/staging/most/cdev/Kconfig
index 3c59f1b..2b04e26 100644
--- a/drivers/staging/most/aim-cdev/Kconfig
+++ b/drivers/staging/most/cdev/Kconfig
@@ -2,11 +2,11 @@
# MOST Cdev configuration
#
-config AIM_CDEV
- tristate "Cdev AIM"
+config MOST_CDEV
+ tristate "Cdev"
---help---
Say Y here if you want to commumicate via character devices.
To compile this driver as a module, choose M here: the
- module will be called aim_cdev.
\ No newline at end of file
+ module will be called most_cdev.
diff --git a/drivers/staging/most/cdev/Makefile b/drivers/staging/most/cdev/Makefile
new file mode 100644
index 0000000..afb9870
--- /dev/null
+++ b/drivers/staging/most/cdev/Makefile
@@ -0,0 +1,4 @@
+obj-$(CONFIG_MOST_CDEV) += most_cdev.o
+
+most_cdev-objs := cdev.o
+ccflags-y += -Idrivers/staging/
diff --git a/drivers/staging/most/aim-cdev/cdev.c b/drivers/staging/most/cdev/cdev.c
similarity index 99%
rename from drivers/staging/most/aim-cdev/cdev.c
rename to drivers/staging/most/cdev/cdev.c
index 1e5cbc8..3dce5e0 100644
--- a/drivers/staging/most/aim-cdev/cdev.c
+++ b/drivers/staging/most/cdev/cdev.c
@@ -22,7 +22,7 @@
#include <linux/kfifo.h>
#include <linux/uaccess.h>
#include <linux/idr.h>
-#include "mostcore.h"
+#include <most/core.h>
static dev_t aim_devno;
static struct class *aim_class;
diff --git a/drivers/staging/most/mostcore/core.c b/drivers/staging/most/core.c
similarity index 99%
rename from drivers/staging/most/mostcore/core.c
rename to drivers/staging/most/core.c
index 069269d..6ee6acf 100644
--- a/drivers/staging/most/mostcore/core.c
+++ b/drivers/staging/most/core.c
@@ -27,7 +27,7 @@
#include <linux/kthread.h>
#include <linux/dma-mapping.h>
#include <linux/idr.h>
-#include "mostcore.h"
+#include <most/core.h>
#define MAX_CHANNELS 64
#define STRING_SIZE 80
diff --git a/drivers/staging/most/mostcore/mostcore.h b/drivers/staging/most/core.h
similarity index 99%
rename from drivers/staging/most/mostcore/mostcore.h
rename to drivers/staging/most/core.h
index 915e515..a6e618c 100644
--- a/drivers/staging/most/mostcore/mostcore.h
+++ b/drivers/staging/most/core.h
@@ -1,5 +1,5 @@
/*
- * mostcore.h - Interface between MostCore,
+ * most.h - Interface between MostCore,
* Hardware Dependent Module (HDM) and Application Interface Module (AIM).
*
* Copyright (C) 2013-2015, Microchip Technology Germany II GmbH & Co. KG
diff --git a/drivers/staging/most/hdm-dim2/Kconfig b/drivers/staging/most/dim2/Kconfig
similarity index 83%
rename from drivers/staging/most/hdm-dim2/Kconfig
rename to drivers/staging/most/dim2/Kconfig
index 663bfeb..e39c4e5 100644
--- a/drivers/staging/most/hdm-dim2/Kconfig
+++ b/drivers/staging/most/dim2/Kconfig
@@ -2,8 +2,8 @@
# MediaLB configuration
#
-config HDM_DIM2
- tristate "DIM2 HDM"
+config MOST_DIM2
+ tristate "DIM2"
depends on HAS_IOMEM
---help---
@@ -13,4 +13,4 @@ config HDM_DIM2
maintainer of this driver.
To compile this driver as a module, choose M here: the
- module will be called hdm_dim2.
+ module will be called most_dim2.
diff --git a/drivers/staging/most/dim2/Makefile b/drivers/staging/most/dim2/Makefile
new file mode 100644
index 0000000..66676f5
--- /dev/null
+++ b/drivers/staging/most/dim2/Makefile
@@ -0,0 +1,4 @@
+obj-$(CONFIG_MOST_DIM2) += most_dim2.o
+
+most_dim2-objs := dim2.o hal.o sysfs.o
+ccflags-y += -Idrivers/staging/
diff --git a/drivers/staging/most/hdm-dim2/dim2_hdm.c b/drivers/staging/most/dim2/dim2.c
similarity index 99%
rename from drivers/staging/most/hdm-dim2/dim2_hdm.c
rename to drivers/staging/most/dim2/dim2.c
index df7021c..cc8563f 100644
--- a/drivers/staging/most/hdm-dim2/dim2_hdm.c
+++ b/drivers/staging/most/dim2/dim2.c
@@ -1,5 +1,5 @@
/*
- * dim2_hdm.c - MediaLB DIM2 Hardware Dependent Module
+ * dim2.c - MediaLB DIM2 Hardware Dependent Module
*
* Copyright (C) 2015-2016, Microchip Technology Germany II GmbH & Co. KG
*
@@ -25,11 +25,11 @@
#include <linux/sched.h>
#include <linux/kthread.h>
-#include <mostcore.h>
-#include "dim2_hal.h"
-#include "dim2_hdm.h"
-#include "dim2_errors.h"
-#include "dim2_sysfs.h"
+#include <most/core.h>
+#include "hal.h"
+#include "dim2.h"
+#include "errors.h"
+#include "sysfs.h"
#define DMA_CHANNELS (32 - 1) /* channel 0 is a system channel */
diff --git a/drivers/staging/most/hdm-dim2/dim2_hdm.h b/drivers/staging/most/dim2/dim2.h
similarity index 94%
rename from drivers/staging/most/hdm-dim2/dim2_hdm.h
rename to drivers/staging/most/dim2/dim2.h
index 4050e7c..7fff99c 100644
--- a/drivers/staging/most/hdm-dim2/dim2_hdm.h
+++ b/drivers/staging/most/dim2/dim2.h
@@ -1,5 +1,5 @@
/*
- * dim2_hdm.h - MediaLB DIM2 HDM Header
+ * dim2.h - MediaLB DIM2 HDM Header
*
* Copyright (C) 2015, Microchip Technology Germany II GmbH & Co. KG
*
diff --git a/drivers/staging/most/hdm-dim2/dim2_errors.h b/drivers/staging/most/dim2/errors.h
similarity index 95%
rename from drivers/staging/most/hdm-dim2/dim2_errors.h
rename to drivers/staging/most/dim2/errors.h
index 66343ba..0cd8400 100644
--- a/drivers/staging/most/hdm-dim2/dim2_errors.h
+++ b/drivers/staging/most/dim2/errors.h
@@ -1,5 +1,5 @@
/*
- * dim2_errors.h - Definitions of errors for DIM2 HAL API
+ * errors.h - Definitions of errors for DIM2 HAL API
* (MediaLB, Device Interface Macro IP, OS62420)
*
* Copyright (C) 2015, Microchip Technology Germany II GmbH & Co. KG
diff --git a/drivers/staging/most/hdm-dim2/dim2_hal.c b/drivers/staging/most/dim2/hal.c
similarity index 99%
rename from drivers/staging/most/hdm-dim2/dim2_hal.c
rename to drivers/staging/most/dim2/hal.c
index 9148464..9f00ecc 100644
--- a/drivers/staging/most/hdm-dim2/dim2_hal.c
+++ b/drivers/staging/most/dim2/hal.c
@@ -1,5 +1,5 @@
/*
- * dim2_hal.c - DIM2 HAL implementation
+ * hal.c - DIM2 HAL implementation
* (MediaLB, Device Interface Macro IP, OS62420)
*
* Copyright (C) 2015-2016, Microchip Technology Germany II GmbH & Co. KG
@@ -14,9 +14,9 @@
/* Author: Andrey Shvetsov <andrey.shvetsov at k2l.de> */
-#include "dim2_hal.h"
-#include "dim2_errors.h"
-#include "dim2_reg.h"
+#include "hal.h"
+#include "errors.h"
+#include "reg.h"
#include <linux/stddef.h>
#include <linux/kernel.h>
diff --git a/drivers/staging/most/hdm-dim2/dim2_hal.h b/drivers/staging/most/dim2/hal.h
similarity index 98%
rename from drivers/staging/most/hdm-dim2/dim2_hal.h
rename to drivers/staging/most/dim2/hal.h
index 6df6ea5..a08e4a4 100644
--- a/drivers/staging/most/hdm-dim2/dim2_hal.h
+++ b/drivers/staging/most/dim2/hal.h
@@ -1,5 +1,5 @@
/*
- * dim2_hal.h - DIM2 HAL interface
+ * hal.h - DIM2 HAL interface
* (MediaLB, Device Interface Macro IP, OS62420)
*
* Copyright (C) 2015, Microchip Technology Germany II GmbH & Co. KG
@@ -16,7 +16,7 @@
#define _DIM2_HAL_H
#include <linux/types.h>
-#include "dim2_reg.h"
+#include "reg.h"
/*
* The values below are specified in the hardware specification.
diff --git a/drivers/staging/most/hdm-dim2/dim2_reg.h b/drivers/staging/most/dim2/reg.h
similarity index 98%
rename from drivers/staging/most/hdm-dim2/dim2_reg.h
rename to drivers/staging/most/dim2/reg.h
index f7d9fbc..b0d095c 100644
--- a/drivers/staging/most/hdm-dim2/dim2_reg.h
+++ b/drivers/staging/most/dim2/reg.h
@@ -1,5 +1,5 @@
/*
- * dim2_reg.h - Definitions for registers of DIM2
+ * reg.h - Definitions for registers of DIM2
* (MediaLB, Device Interface Macro IP, OS62420)
*
* Copyright (C) 2015, Microchip Technology Germany II GmbH & Co. KG
diff --git a/drivers/staging/most/hdm-dim2/dim2_sysfs.c b/drivers/staging/most/dim2/sysfs.c
similarity index 97%
rename from drivers/staging/most/hdm-dim2/dim2_sysfs.c
rename to drivers/staging/most/dim2/sysfs.c
index d8b22f9..1331cf0 100644
--- a/drivers/staging/most/hdm-dim2/dim2_sysfs.c
+++ b/drivers/staging/most/dim2/sysfs.c
@@ -1,5 +1,5 @@
/*
- * dim2_sysfs.c - MediaLB sysfs information
+ * sysfs.c - MediaLB sysfs information
*
* Copyright (C) 2015, Microchip Technology Germany II GmbH & Co. KG
*
@@ -16,7 +16,7 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/kernel.h>
-#include "dim2_sysfs.h"
+#include "sysfs.h"
struct bus_attr {
struct attribute attr;
diff --git a/drivers/staging/most/hdm-dim2/dim2_sysfs.h b/drivers/staging/most/dim2/sysfs.h
similarity index 95%
rename from drivers/staging/most/hdm-dim2/dim2_sysfs.h
rename to drivers/staging/most/dim2/sysfs.h
index b71dd02..236de47 100644
--- a/drivers/staging/most/hdm-dim2/dim2_sysfs.h
+++ b/drivers/staging/most/dim2/sysfs.h
@@ -1,5 +1,5 @@
/*
- * dim2_sysfs.h - MediaLB sysfs information
+ * sysfs.h - MediaLB sysfs information
*
* Copyright (C) 2015, Microchip Technology Germany II GmbH & Co. KG
*
diff --git a/drivers/staging/most/hdm-dim2/Makefile b/drivers/staging/most/hdm-dim2/Makefile
deleted file mode 100644
index 6bbee87..0000000
--- a/drivers/staging/most/hdm-dim2/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-obj-$(CONFIG_HDM_DIM2) += hdm_dim2.o
-
-hdm_dim2-objs := dim2_hdm.o dim2_hal.o dim2_sysfs.o
-ccflags-y += -Idrivers/staging/most/mostcore/
-ccflags-y += -Idrivers/staging/most/aim-network/
diff --git a/drivers/staging/most/hdm-i2c/Makefile b/drivers/staging/most/hdm-i2c/Makefile
deleted file mode 100644
index 03a4a59..0000000
--- a/drivers/staging/most/hdm-i2c/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-obj-$(CONFIG_HDM_I2C) += hdm_i2c.o
-
-ccflags-y += -Idrivers/staging/most/mostcore/
diff --git a/drivers/staging/most/hdm-usb/Makefile b/drivers/staging/most/hdm-usb/Makefile
deleted file mode 100644
index 6bbacb4..0000000
--- a/drivers/staging/most/hdm-usb/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-obj-$(CONFIG_HDM_USB) += hdm_usb.o
-
-ccflags-y += -Idrivers/staging/most/mostcore/
-ccflags-y += -Idrivers/staging/most/aim-network/
diff --git a/drivers/staging/most/hdm-i2c/Kconfig b/drivers/staging/most/i2c/Kconfig
similarity index 72%
rename from drivers/staging/most/hdm-i2c/Kconfig
rename to drivers/staging/most/i2c/Kconfig
index 6fd7983..79d0ff2 100644
--- a/drivers/staging/most/hdm-i2c/Kconfig
+++ b/drivers/staging/most/i2c/Kconfig
@@ -2,11 +2,11 @@
# MOST I2C configuration
#
-config HDM_I2C
- tristate "I2C HDM"
+config MOST_I2C
+ tristate "I2C"
depends on I2C
---help---
Say Y here if you want to connect via I2C to network tranceiver.
To compile this driver as a module, choose M here: the
- module will be called hdm_i2c.
+ module will be called most_i2c.
diff --git a/drivers/staging/most/i2c/Makefile b/drivers/staging/most/i2c/Makefile
new file mode 100644
index 0000000..a7d094c
--- /dev/null
+++ b/drivers/staging/most/i2c/Makefile
@@ -0,0 +1,4 @@
+obj-$(CONFIG_MOST_I2C) += most_i2c.o
+
+most_i2c-objs := i2c.o
+ccflags-y += -Idrivers/staging/
diff --git a/drivers/staging/most/hdm-i2c/hdm_i2c.c b/drivers/staging/most/i2c/i2c.c
similarity index 99%
rename from drivers/staging/most/hdm-i2c/hdm_i2c.c
rename to drivers/staging/most/i2c/i2c.c
index 2b4de40..0a3e858 100644
--- a/drivers/staging/most/hdm-i2c/hdm_i2c.c
+++ b/drivers/staging/most/i2c/i2c.c
@@ -1,5 +1,5 @@
/*
- * hdm_i2c.c - Hardware Dependent Module for I2C Interface
+ * i2c.c - Hardware Dependent Module for I2C Interface
*
* Copyright (C) 2013-2015, Microchip Technology Germany II GmbH & Co. KG
*
@@ -21,7 +21,7 @@
#include <linux/interrupt.h>
#include <linux/err.h>
-#include <mostcore.h>
+#include <most/core.h>
enum { CH_RX, CH_TX, NUM_CHANNELS };
diff --git a/drivers/staging/most/mostcore/Kconfig b/drivers/staging/most/mostcore/Kconfig
deleted file mode 100644
index 4717254..0000000
--- a/drivers/staging/most/mostcore/Kconfig
+++ /dev/null
@@ -1,14 +0,0 @@
-#
-# MOSTCore configuration
-#
-
-config MOSTCORE
- tristate "MOST Core"
- depends on HAS_DMA
-
- ---help---
- Say Y here if you want to enable MOST support.
- This device driver needs at least an additional AIM and HDM to work.
-
- To compile this driver as a module, choose M here: the
- module will be called mostcore.
diff --git a/drivers/staging/most/mostcore/Makefile b/drivers/staging/most/mostcore/Makefile
deleted file mode 100644
index a078f01..0000000
--- a/drivers/staging/most/mostcore/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-obj-$(CONFIG_MOSTCORE) += mostcore.o
-
-mostcore-objs := core.o
diff --git a/drivers/staging/most/aim-network/Kconfig b/drivers/staging/most/net/Kconfig
similarity index 69%
rename from drivers/staging/most/aim-network/Kconfig
rename to drivers/staging/most/net/Kconfig
index 4c66b24..795330b 100644
--- a/drivers/staging/most/aim-network/Kconfig
+++ b/drivers/staging/most/net/Kconfig
@@ -2,12 +2,12 @@
# MOST Networking configuration
#
-config AIM_NETWORK
- tristate "Networking AIM"
+config MOST_NET
+ tristate "Net"
depends on NET
---help---
Say Y here if you want to commumicate via a networking device.
To compile this driver as a module, choose M here: the
- module will be called aim_network.
+ module will be called most_net.
diff --git a/drivers/staging/most/net/Makefile b/drivers/staging/most/net/Makefile
new file mode 100644
index 0000000..54500aa
--- /dev/null
+++ b/drivers/staging/most/net/Makefile
@@ -0,0 +1,4 @@
+obj-$(CONFIG_MOST_NET) += most_net.o
+
+most_net-objs := net.o
+ccflags-y += -Idrivers/staging/
diff --git a/drivers/staging/most/aim-network/networking.c b/drivers/staging/most/net/net.c
similarity index 99%
rename from drivers/staging/most/aim-network/networking.c
rename to drivers/staging/most/net/net.c
index 936f013..d43aad3 100644
--- a/drivers/staging/most/aim-network/networking.c
+++ b/drivers/staging/most/net/net.c
@@ -21,7 +21,7 @@
#include <linux/list.h>
#include <linux/wait.h>
#include <linux/kobject.h>
-#include "mostcore.h"
+#include <most/core.h>
#define MEP_HDR_LEN 8
#define MDP_HDR_LEN 16
diff --git a/drivers/staging/most/aim-sound/Kconfig b/drivers/staging/most/sound/Kconfig
similarity index 72%
rename from drivers/staging/most/aim-sound/Kconfig
rename to drivers/staging/most/sound/Kconfig
index 3194c21..115262a 100644
--- a/drivers/staging/most/aim-sound/Kconfig
+++ b/drivers/staging/most/sound/Kconfig
@@ -2,12 +2,12 @@
# MOST ALSA configuration
#
-config AIM_SOUND
- tristate "ALSA AIM"
+config MOST_SOUND
+ tristate "Sound"
depends on SND
select SND_PCM
---help---
Say Y here if you want to commumicate via ALSA/sound devices.
To compile this driver as a module, choose M here: the
- module will be called aim_sound.
+ module will be called most_sound.
diff --git a/drivers/staging/most/sound/Makefile b/drivers/staging/most/sound/Makefile
new file mode 100644
index 0000000..eee8774
--- /dev/null
+++ b/drivers/staging/most/sound/Makefile
@@ -0,0 +1,4 @@
+obj-$(CONFIG_MOST_SOUND) += most_sound.o
+
+most_sound-objs := sound.o
+ccflags-y += -Idrivers/staging/
diff --git a/drivers/staging/most/aim-sound/sound.c b/drivers/staging/most/sound/sound.c
similarity index 99%
rename from drivers/staging/most/aim-sound/sound.c
rename to drivers/staging/most/sound/sound.c
index ea1366a..72603ae 100644
--- a/drivers/staging/most/aim-sound/sound.c
+++ b/drivers/staging/most/sound/sound.c
@@ -22,7 +22,7 @@
#include <sound/pcm_params.h>
#include <linux/sched.h>
#include <linux/kthread.h>
-#include <mostcore.h>
+#include <most/core.h>
#define DRIVER_NAME "sound"
diff --git a/drivers/staging/most/hdm-usb/Kconfig b/drivers/staging/most/usb/Kconfig
similarity index 77%
rename from drivers/staging/most/hdm-usb/Kconfig
rename to drivers/staging/most/usb/Kconfig
index 487f1f3..ebbdb57 100644
--- a/drivers/staging/most/hdm-usb/Kconfig
+++ b/drivers/staging/most/usb/Kconfig
@@ -2,13 +2,12 @@
# MOST USB configuration
#
-config HDM_USB
- tristate "USB HDM"
+config MOST_USB
+ tristate "USB"
depends on USB && NET
-
---help---
Say Y here if you want to connect via USB to network tranceiver.
This device driver depends on the networking AIM.
To compile this driver as a module, choose M here: the
- module will be called hdm_usb.
+ module will be called most_usb.
diff --git a/drivers/staging/most/usb/Makefile b/drivers/staging/most/usb/Makefile
new file mode 100644
index 0000000..18d28cb
--- /dev/null
+++ b/drivers/staging/most/usb/Makefile
@@ -0,0 +1,4 @@
+obj-$(CONFIG_MOST_USB) += most_usb.o
+
+most_usb-objs := usb.o
+ccflags-y += -Idrivers/staging/
diff --git a/drivers/staging/most/hdm-usb/hdm_usb.c b/drivers/staging/most/usb/usb.c
similarity index 99%
rename from drivers/staging/most/hdm-usb/hdm_usb.c
rename to drivers/staging/most/usb/usb.c
index 85775da..2e4f237 100644
--- a/drivers/staging/most/hdm-usb/hdm_usb.c
+++ b/drivers/staging/most/usb/usb.c
@@ -1,5 +1,5 @@
/*
- * hdm_usb.c - Hardware dependent module for USB
+ * usb.c - Hardware dependent module for USB
*
* Copyright (C) 2013-2015 Microchip Technology Germany II GmbH & Co. KG
*
@@ -29,7 +29,7 @@
#include <linux/dma-mapping.h>
#include <linux/etherdevice.h>
#include <linux/uaccess.h>
-#include "mostcore.h"
+#include <most/core.h>
#define USB_MTU 512
#define NO_ISOCHRONOUS_URB 0
diff --git a/drivers/staging/most/aim-v4l2/Kconfig b/drivers/staging/most/video/Kconfig
similarity index 71%
rename from drivers/staging/most/aim-v4l2/Kconfig
rename to drivers/staging/most/video/Kconfig
index d70eaaf..ce6af4f 100644
--- a/drivers/staging/most/aim-v4l2/Kconfig
+++ b/drivers/staging/most/video/Kconfig
@@ -2,11 +2,11 @@
# MOST V4L2 configuration
#
-config AIM_V4L2
- tristate "V4L2 AIM"
+config MOST_VIDEO
+ tristate "Video"
depends on VIDEO_V4L2
---help---
Say Y here if you want to commumicate via Video 4 Linux.
To compile this driver as a module, choose M here: the
- module will be called aim_v4l2.
\ No newline at end of file
+ module will be called most_video.
diff --git a/drivers/staging/most/video/Makefile b/drivers/staging/most/video/Makefile
new file mode 100644
index 0000000..1c8e520
--- /dev/null
+++ b/drivers/staging/most/video/Makefile
@@ -0,0 +1,4 @@
+obj-$(CONFIG_MOST_VIDEO) += most_video.o
+
+most_video-objs := video.o
+ccflags-y += -Idrivers/staging/
diff --git a/drivers/staging/most/aim-v4l2/video.c b/drivers/staging/most/video/video.c
similarity index 99%
rename from drivers/staging/most/aim-v4l2/video.c
rename to drivers/staging/most/video/video.c
index e074841..eed9046 100644
--- a/drivers/staging/most/aim-v4l2/video.c
+++ b/drivers/staging/most/video/video.c
@@ -27,7 +27,7 @@
#include <media/v4l2-ctrls.h>
#include <media/v4l2-fh.h>
-#include "mostcore.h"
+#include <most/core.h>
#define V4L2_AIM_MAX_INPUT 1
--
1.9.1
More information about the devel
mailing list