Commit Graph

7 Commits

Author SHA1 Message Date
Peter Rosin 0edff03d44 mux: add SPDX identifiers to all mux source files
Remove all free-text license texts.

This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text.

No copyright headers or other non-license-description text was removed.

Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-09 16:51:44 +01:00
Peter Rosin 4c19c0ec73 mux: remove the Kconfig question for the subsystem
The MULTIPLEXER question in the Kconfig might be confusing and is
of dubious value. Remove it. This makes consumers responsible for
selecting MULTIPLEXER, which they already do.

Signed-off-by: Peter Rosin <peda@axentia.se>
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-17 16:37:30 +02:00
Arnd Bergmann aca4e68acf mux: adg792a: always require I2C support
COMPILE_TEST makes no sense when I2C is disabled, as the driver cannot compile
in that configuration:

drivers/mux/mux-adg792a.c: In function 'adg792a_write_cmd':
drivers/mux/mux-adg792a.c:34:9: error: implicit declaration of function 'i2c_smbus_write_byte_data'; did you mean 'i2c_set_clientdata'? [-Werror=implicit-function-declaration]
drivers/mux/mux-adg792a.o: In function `adg792a_driver_init':
mux-adg792a.c:(.init.text+0x14): undefined reference to `i2c_register_driver'
drivers/mux/mux-adg792a.o: In function `adg792a_probe':
mux-adg792a.c:(.text.adg792a_probe+0x94): undefined reference to `i2c_smbus_write_byte_data'
drivers/mux/mux-adg792a.o: In function `adg792a_set':
mux-adg792a.c:(.text.adg792a_set+0x80): undefined reference to `i2c_smbus_write_byte_data'

Fixes: afda08c4ca ("mux: adg792a: add mux controller driver for ADG792A/G")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-09 12:45:05 +02:00
Philipp Zabel 73726380a2 mux: mmio-based syscon mux controller
This adds a driver for mmio-based syscon multiplexers controlled by
bitfields in a syscon register range.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 19:29:26 +09:00
Peter Rosin afda08c4ca mux: adg792a: add mux controller driver for ADG792A/G
Analog Devices ADG792A/G is a triple 4:1 mux.

Reviewed-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 19:29:26 +09:00
Peter Rosin 2c089f08e0 mux: gpio: add mux controller driver for gpio based multiplexers
The driver builds a single multiplexer controller using a number
of gpio pins. For N pins, there will be 2^N possible multiplexer
states. The GPIO pins can be connected (by the hardware) to several
multiplexers, which in that case will be operated in parallel.

Reviewed-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Peter Rosin <peda@axentia.se>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 19:29:26 +09:00
Peter Rosin a3b02a9c65 mux: minimal mux subsystem
Add a new minimalistic subsystem that handles multiplexer controllers.
When multiplexers are used in various places in the kernel, and the
same multiplexer controller can be used for several independent things,
there should be one place to implement support for said multiplexer
controller.

A single multiplexer controller can also be used to control several
parallel multiplexers, that are in turn used by different subsystems
in the kernel, leading to a need to coordinate multiplexer accesses.
The multiplexer subsystem handles this coordination.

Thanks go out to Lars-Peter Clausen, Jonathan Cameron, Rob Herring,
Wolfram Sang, Paul Gortmaker, Dan Carpenter, Colin Ian King, Greg
Kroah-Hartman and last but certainly not least to Philipp Zabel for
helpful comments, reviews, patches and general encouragement!

Reviewed-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Peter Rosin <peda@axentia.se>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Tested-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 19:29:26 +09:00