Re: [PATCH 2/2] devicetree: hwmon: Add documentation for TMP108 driver.

2016-11-30 Thread John Muir
Hi Guenter,

On Nov 30, 2016, at 4:42 PM, Guenter Roeck  wrote:
> 
>> +Optional node properties:
>> +- ti,thermostat-mode-comparator : (boolean) select the comparator mode for 
>> the
>> +  thermostat rather than the default interrupt-mode.
>> +
> I keep arguing with myself over this. Ultimately, I think it is not needed,
> for a simple reason: As currently written, using the driver in anything but
> comparator mode does not really make sense (because the alert status bits
> will be reset after reading them in interrupt mode). Second, interrupt mode
> can be determined automatically, based on the presence of SMBus alert support.
> Given that, I wonder if it would make more sense to drop this property and
> always put the chip into comparator mode for the time being. At a later time,
> if and when alert support is added, we can discuss the best approach to
> determine how it should be enabled (ie how do we know that the SMBus adapter
> supports handling alerts, or would we assume that it always does ?).
> 
> What do you think ?

I did find myself putting the device into comparator mode in order to test the 
FL and FH bits, so I agree that it can be the default for now. When I can test 
the Alert pin, we can discuss adding interrupt and SMBus alert support.

Once you have finished reviewing the other patch, I will make that change and 
re-send.

Thanks,

John.

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] devicetree: hwmon: Add documentation for TMP108 driver.

2016-11-30 Thread Guenter Roeck
Hi John,

On Wed, Nov 30, 2016 at 12:36:19PM -0800, John Muir wrote:
> Simple hwmon binding documentation.
> 
> Signed-off-by: John Muir 
> ---
>  Documentation/devicetree/bindings/hwmon/tmp108.txt | 24 
> ++
>  1 file changed, 24 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/hwmon/tmp108.txt
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/tmp108.txt 
> b/Documentation/devicetree/bindings/hwmon/tmp108.txt
> new file mode 100644
> index 000..7ba08c4
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hwmon/tmp108.txt
> @@ -0,0 +1,24 @@
> +TMP108 temperature sensor
> +-
> +
> +This device supports I2C only.
> +
> +Requires node properties:
> +- compatible : "ti,tmp108"
> +- reg : the I2C address of the device. This is 0x48, 0x49, 0x4a, or 0x4b.
> +
> +Optional node properties:
> +- ti,thermostat-mode-comparator : (boolean) select the comparator mode for 
> the
> +  thermostat rather than the default interrupt-mode.
> +
I keep arguing with myself over this. Ultimately, I think it is not needed,
for a simple reason: As currently written, using the driver in anything but
comparator mode does not really make sense (because the alert status bits
will be reset after reading them in interrupt mode). Second, interrupt mode
can be determined automatically, based on the presence of SMBus alert support.
Given that, I wonder if it would make more sense to drop this property and
always put the chip into comparator mode for the time being. At a later time,
if and when alert support is added, we can discuss the best approach to
determine how it should be enabled (ie how do we know that the SMBus adapter
supports handling alerts, or would we assume that it always does ?).

What do you think ?

Thanks,
Guenter

> +Example:
> + tmp108@48 {
> + compatible = "ti,tmp108";
> + reg = <0x48>;
> + ti,thermostat-mode-comparator;
> + };
> +
> + tmp108@49 {
> + compatible = "ti,tmp108";
> + reg = <0x49>;
> + };
> -- 
> 2.8.0.rc3.226.g39d4020
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 00/10] Get rid of bitmap images

2016-11-30 Thread Jonathan Corbet
On Wed, 30 Nov 2016 08:00:10 -0200
Mauro Carvalho Chehab  wrote:

> The main goal of this patch series is to get rid of PNG images, using 
> either graphviz or SVG for images.

OK, no build problems this time around...  I've applied the set, thanks.

It occurs to me that the documentation of the requirements to build the
docs is probably falling behind at this point; I'll try to get to that
soon if nobody beats me to it.

Thanks,

jon
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/2] devicetree: hwmon: Add documentation for TMP108 driver.

2016-11-30 Thread John Muir
Simple hwmon binding documentation.

Signed-off-by: John Muir 
---
 Documentation/devicetree/bindings/hwmon/tmp108.txt | 24 ++
 1 file changed, 24 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/tmp108.txt

diff --git a/Documentation/devicetree/bindings/hwmon/tmp108.txt 
b/Documentation/devicetree/bindings/hwmon/tmp108.txt
new file mode 100644
index 000..7ba08c4
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/tmp108.txt
@@ -0,0 +1,24 @@
+TMP108 temperature sensor
+-
+
+This device supports I2C only.
+
+Requires node properties:
+- compatible : "ti,tmp108"
+- reg : the I2C address of the device. This is 0x48, 0x49, 0x4a, or 0x4b.
+
+Optional node properties:
+- ti,thermostat-mode-comparator : (boolean) select the comparator mode for the
+  thermostat rather than the default interrupt-mode.
+
+Example:
+   tmp108@48 {
+   compatible = "ti,tmp108";
+   reg = <0x48>;
+   ti,thermostat-mode-comparator;
+   };
+
+   tmp108@49 {
+   compatible = "ti,tmp108";
+   reg = <0x49>;
+   };
-- 
2.8.0.rc3.226.g39d4020

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/2] hwmon: Add Texas Instruments TMP108 temperature sensor driver.

2016-11-30 Thread John Muir
Add support for the TI TMP108 temperature sensor with some device
configuration parameters.

Signed-off-by: John Muir 
---
 Documentation/hwmon/tmp108 |  38 
 drivers/hwmon/Kconfig  |  11 +
 drivers/hwmon/Makefile |   1 +
 drivers/hwmon/tmp108.c | 495 +
 4 files changed, 545 insertions(+)
 create mode 100644 Documentation/hwmon/tmp108
 create mode 100644 drivers/hwmon/tmp108.c

diff --git a/Documentation/hwmon/tmp108 b/Documentation/hwmon/tmp108
new file mode 100644
index 000..ef2e9a3
--- /dev/null
+++ b/Documentation/hwmon/tmp108
@@ -0,0 +1,38 @@
+Kernel driver tmp108
+
+
+Supported chips:
+  * Texas Instruments TMP108
+Prefix: 'tmp108'
+Addresses scanned: none
+Datasheet: http://www.ti.com/product/tmp108
+
+Author:
+   John Muir 
+
+Description
+---
+
+The Texas Instruments TMP108 implements one temperature sensor. An alert pin
+can be set when temperatures exceed minimum or maximum values plus or minus a
+hysteresis value.
+
+The sensor is accurate to 0.75C over the range of -25 to +85 C, and to 1.0
+degree from -40 to +125 C. Resolution of the sensor is 0.0625 degree. The
+operating temperature has a minimum of -55 C and a maximum of +150 C.
+Hysteresis values can be set to 0, 1, 2, or 4C.
+
+The TMP108 has a programmable update rate that can select between 8, 4, 1, and
+0.5 Hz.
+
+By default the TMP108 reads the temperature continuously. To conserve power,
+the TMP108 has a one-shot mode where the device is normally shut-down. When a
+one shot is requested the temperature is read, the result can be retrieved,
+and then the device is shut down automatically. (This driver only supports
+continuous mode.)
+
+The driver provides the common sysfs-interface for temperatures (see
+Documentation/hwmon/sysfs-interface under Temperatures).
+
+See Documentation/devicetree/bindings/hwmon/tmp108.txt for configuration
+properties.
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 45cef3d..4c173de 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -1591,6 +1591,17 @@ config SENSORS_TMP103
  This driver can also be built as a module.  If so, the module
  will be called tmp103.
 
+config SENSORS_TMP108
+   tristate "Texas Instruments TMP108"
+   depends on I2C
+   select REGMAP_I2C
+   help
+ If you say yes here you get support for Texas Instruments TMP108
+ sensor chips.
+
+ This driver can also be built as a module.  If so, the module
+ will be called tmp108.
+
 config SENSORS_TMP401
tristate "Texas Instruments TMP401 and compatibles"
depends on I2C
diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile
index aecf4ba..51e5256 100644
--- a/drivers/hwmon/Makefile
+++ b/drivers/hwmon/Makefile
@@ -152,6 +152,7 @@ obj-$(CONFIG_SENSORS_TC74)  += tc74.o
 obj-$(CONFIG_SENSORS_THMC50)   += thmc50.o
 obj-$(CONFIG_SENSORS_TMP102)   += tmp102.o
 obj-$(CONFIG_SENSORS_TMP103)   += tmp103.o
+obj-$(CONFIG_SENSORS_TMP108)   += tmp108.o
 obj-$(CONFIG_SENSORS_TMP401)   += tmp401.o
 obj-$(CONFIG_SENSORS_TMP421)   += tmp421.o
 obj-$(CONFIG_SENSORS_TWL4030_MADC)+= twl4030-madc-hwmon.o
diff --git a/drivers/hwmon/tmp108.c b/drivers/hwmon/tmp108.c
new file mode 100644
index 000..35d598d
--- /dev/null
+++ b/drivers/hwmon/tmp108.c
@@ -0,0 +1,495 @@
+/* Texas Instruments TMP108 SMBus temperature sensor driver
+ *
+ * Copyright (C) 2016 John Muir 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#defineDRIVER_NAME "tmp108"
+
+#defineTMP108_REG_TEMP 0x00
+#defineTMP108_REG_CONF 0x01
+#defineTMP108_REG_TLOW 0x02
+#defineTMP108_REG_THIGH0x03
+
+#define TMP108_TEMP_MIN_MC -5 /* Minimum millicelcius. */
+#define TMP108_TEMP_MAX_MC 127937 /* Maximum millicelcius. */
+
+/* Configuration register bits.
+ * Note: these bit definitions are byte swapped.
+ */
+#define TMP108_CONF_M0 0x0100 /* Sensor mode. */
+#define TMP108_CONF_M1 0x0200
+#define TMP108_CONF_TM 0x0400 /* Thermostat mode. */
+#define TMP108_CONF_FL 0x0800 /* Watchdog flag - TLOW */
+#define TMP108_CONF_FH 0x1000 /* Watchdog flag - THIGH */
+#define TMP108_CONF_CR00x2000 /* 

[PATCH v2 0/2] Texas Instruments TMP108 temperature sensor driver.

2016-11-30 Thread John Muir
This adds a device driver for the Texas Instruments TMP108 temperature
sensor. The driver provides support to read the temperature, read or modify
the update interval, min and max temperature and hysteresis values, as well
as read current alarm status. Support for alarm interrupts will come in a
future patch.

John Muir (2):
  hwmon: Add Texas Instruments TMP108 temperature sensor driver.
  devicetree: hwmon: Add documentation for TMP108 driver.

 Documentation/devicetree/bindings/hwmon/tmp108.txt |  24 +
 Documentation/hwmon/tmp108 |  38 ++
 drivers/hwmon/Kconfig  |  11 +
 drivers/hwmon/Makefile |   1 +
 drivers/hwmon/tmp108.c | 495 +
 5 files changed, 569 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/tmp108.txt
 create mode 100644 Documentation/hwmon/tmp108
 create mode 100644 drivers/hwmon/tmp108.c

-- 
2.8.0.rc3.226.g39d4020

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v6 2/9] misc: minimal mux subsystem and gpio-based mux controller

2016-11-30 Thread Peter Rosin
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.

This new mux controller subsystem initially comes with a single backend
driver that controls gpio based multiplexers. Even though not needed by
this initial driver, the mux controller subsystem is prepared to handle
chips with multiple (independent) mux controllers.

Signed-off-by: Peter Rosin 
---
 Documentation/driver-model/devres.txt |   6 +-
 MAINTAINERS   |   2 +
 drivers/misc/Kconfig  |  30 
 drivers/misc/Makefile |   2 +
 drivers/misc/mux-core.c   | 311 ++
 drivers/misc/mux-gpio.c   | 138 +++
 include/linux/mux.h   | 197 +
 7 files changed, 685 insertions(+), 1 deletion(-)
 create mode 100644 drivers/misc/mux-core.c
 create mode 100644 drivers/misc/mux-gpio.c
 create mode 100644 include/linux/mux.h

diff --git a/Documentation/driver-model/devres.txt 
b/Documentation/driver-model/devres.txt
index ca9d1eb46bc0..d64ede85b61b 100644
--- a/Documentation/driver-model/devres.txt
+++ b/Documentation/driver-model/devres.txt
@@ -330,7 +330,11 @@ MEM
   devm_kzalloc()
 
 MFD
- devm_mfd_add_devices()
+  devm_mfd_add_devices()
+
+MUX
+  devm_mux_control_get()
+  devm_mux_control_put()
 
 PER-CPU MEM
   devm_alloc_percpu()
diff --git a/MAINTAINERS b/MAINTAINERS
index 3d4d0efc2b64..dc7498682752 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -8407,6 +8407,8 @@ MULTIPLEXER SUBSYSTEM
 M: Peter Rosin 
 S: Maintained
 F: Documentation/devicetree/bindings/misc/mux-*
+F: include/linux/mux.h
+F: drivers/misc/mux-*
 
 MULTISOUND SOUND DRIVER
 M: Andrew Veliath 
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index 64971baf11fa..2ce675e410c5 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -766,6 +766,36 @@ config PANEL_BOOT_MESSAGE
  An empty message will only clear the display at driver init time. Any 
other
  printf()-formatted message is valid with newline and escape codes.
 
+menuconfig MULTIPLEXER
+   bool "Multiplexer subsystem"
+   help
+ Multiplexer controller subsystem. Multiplexers are used in a
+ variety of settings, and this subsystem abstracts their use
+ so that the rest of the kernel sees a common interface. When
+ multiple parallel multiplexers are controlled by one single
+ multiplexer controller, this subsystem also coordinates the
+ multiplexer accesses.
+
+ If unsure, say no.
+
+if MULTIPLEXER
+
+config MUX_GPIO
+   tristate "GPIO-controlled Multiplexer"
+   depends on OF && GPIOLIB
+   help
+ GPIO-controlled Multiplexer controller.
+
+ 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.
+
+ To compile this driver as a module, choose M here: the module will
+ be called mux-gpio.
+
+endif
+
 source "drivers/misc/c2port/Kconfig"
 source "drivers/misc/eeprom/Kconfig"
 source "drivers/misc/cb710/Kconfig"
diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
index 31983366090a..0befa2bba762 100644
--- a/drivers/misc/Makefile
+++ b/drivers/misc/Makefile
@@ -53,6 +53,8 @@ obj-$(CONFIG_ECHO)+= echo/
 obj-$(CONFIG_VEXPRESS_SYSCFG)  += vexpress-syscfg.o
 obj-$(CONFIG_CXL_BASE) += cxl/
 obj-$(CONFIG_PANEL) += panel.o
+obj-$(CONFIG_MULTIPLEXER)  += mux-core.o
+obj-$(CONFIG_MUX_GPIO) += mux-gpio.o
 
 lkdtm-$(CONFIG_LKDTM)  += lkdtm_core.o
 lkdtm-$(CONFIG_LKDTM)  += lkdtm_bugs.o
diff --git a/drivers/misc/mux-core.c b/drivers/misc/mux-core.c
new file mode 100644
index ..cccaa7261a6e
--- /dev/null
+++ b/drivers/misc/mux-core.c
@@ -0,0 +1,311 @@
+/*
+ * Multiplexer subsystem
+ *
+ * Copyright (C) 2016 Axentia Technologies AB
+ *
+ * Author: Peter Rosin 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#define pr_fmt(fmt) "mux-core: " fmt
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 

[PATCH v6 0/9] mux controller abstraction and iio/i2c muxes

2016-11-30 Thread Peter Rosin
Hi!

v5 -> v6 changes
- fix stupidity in mux_chip_priv, mux_gpio_remove and adg792a_remove.
- change the devicetree bindings for the iio-mux to use a list of strings
  (channels property) instead of a list children.

v4 -> v5 changes
- remove support for fancier dt layouts and go back to the phandle
  approach from v2 and before, killing the horrible non-working
  refcounting crap from v4 and avoiding a bunch of life-time issues
  in v3.
- introduce the concept of a mux-chip, that can hold one or more
  mux-controllers (inspired by the pwm subsystem).
- add dt #mux-control-cells property needed to get to the desired
  mux controller if a mux chip provides more than one.
- take away the option to build the mux-core as a module.
- if the mux controller has an idle state, make sure the mux controller
  is set up in the idle state initially (when it should be idle).
- do not use a variable length array on the stack in mux_gpio_set to
  temporarily store the gpio state, preallocate space instead.
- fix resource leak on one failure path in mux_gpio_probe.
- driver for Analog Devices ADG792A/G, literally the first mux chip
  I found on the Internet with an i2c interface (that was not a
  dedicated i2c multiplexer like PCA9547) which I used to verify
  that the abstractions in the mux core are up to the task. Untested,
  just proof of concept that at least looks pretty and compiles...
- various touch-ups.

v3 -> v4 changes
- rebased onto next-20161122 (depends on recent _available iio changes).
- added support for having the mux-controller in a child node of a
  mux-consumer if it is a sole consumer, to hopefully even further satisfy
  the complaint from Rob (and later Lars-Peter) about dt complexity.
- the above came at the cost of some rather horrible refcounting code,
  please review and suggest how it should be done...
- changed to register a device class instead of a bus.
- pass in the parent device into mux_control_alloc and require less
  work from mux-control drivers.
- changed device names from mux:control%d to mux%d
- move kernel-doc from mux-core.c to mux.h (and add some bits).
- give the gpio driver a chance to update all mux pins at once.
- factor out iio ext_info lookup into new helper function. /Lars-Peter
- use an unsigned type for the iio ext_info count. /Lars-Peter
- unified "brag strings" in the file headers.

v2 -> v3 changes
- have the mux-controller in the parent node of any mux-controller consumer,
  to hopefully satisfy complaint from Rob about dt complexity.
- improve commit message of the mux subsystem commit, making it more
  general, as requested by Jonathan.
- remove priv member from struct mux_control and calculate it on the
  fly. /Jonathan
- make the function comments in mux-core.c kernel doc. /Jonathan
- add devm_mux_control_* to Documentation/driver.model/devres.txt. /Jonathan
- add common dt bindings for mux-controllers, refer to them from the
  mux-gpio bindings. /Rob
- clarify how the gpio pins map to the mux state. /Rob
- separate CONFIG_ variables for the mux core and the mux gpio driver.
- improve Kconfig help texts.
- make CONFIG_MUX_GPIO depend on CONFIG_GPIOLIB.
- keep track of the number of mux states in the mux core.
- since the iio channel number is used as mux state, it was possible
  to drop the state member from the mux_child struct.
- cleanup dt bindings for i2c-mux-simple, it had some of copy-paste
  problems from ots origin (i2c-mux-gpio).
- select the mux control subsystem in config for the i2c-mux-simple driver.
- add entries to MAINTAINERS and my sign-off, I'm now satisfied and know
  nothing in this to be ashamed of.

v1 -> v2 changes
- fixup export of mux_control_put reported by kbuild
- drop devicetree iio-ext-info property as noted by Lars-Peter,
  and replace the functionality by exposing all ext_info
  attributes of the parent channel for each of the muxed
  channels. A cache on top of that and each muxed channel
  gets its own view of the ext_info of the parent channel.
- implement idle-state for muxes
- clear out the cache on failure in order to force a mux
  update on the following use
- cleanup the probe of i2c-mux-simple driver
- fix a bug in the i2c-mux-simple driver, where failure in
  the selection of the mux caused a deadlock when the mux
  was later unconditionally deselected.

I have a piece of hardware that is using the same 3 GPIO pins
to control four 8-way muxes. Three of them control ADC lines
to an ADS1015 chip with an iio driver, and the last one
controls the SDA line of an i2c bus. We have some deployed
code to handle this, but you do not want to see it or ever
hear about it. I'm not sure why I even mention it. Anyway,
the situation has nagged me to no end for quite some time.

So, after first getting more intimate with the i2c muxing code
and later discovering the drivers/iio/inkern.c file and
writing a couple of drivers making use of it, I came up with
what I think is an acceptable solution; add a generic mux
controller driver (and 

[PATCH v6 9/9] misc: mux-adg792a: add mux controller driver for ADG792A/G

2016-11-30 Thread Peter Rosin
Analog Devices ADG792A/G is a triple 4:1 mux.

Signed-off-by: Peter Rosin 
---
 drivers/misc/Kconfig   |  12 
 drivers/misc/Makefile  |   1 +
 drivers/misc/mux-adg792a.c | 154 +
 3 files changed, 167 insertions(+)
 create mode 100644 drivers/misc/mux-adg792a.c

diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index 2ce675e410c5..45567a444bbf 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -780,6 +780,18 @@ menuconfig MULTIPLEXER
 
 if MULTIPLEXER
 
+config MUX_ADG792A
+   tristate "Analog Devices ADG792A/ADG792G Multiplexers"
+   depends on I2C
+   help
+ ADG792A and ADG792G Wide Bandwidth Triple 4:1 Multiplexers
+
+ The driver supports both operating the three multiplexers in
+ parellel and operating them independently.
+
+ To compile the driver as a module, choose M here: the module will
+ be called mux-adg792a.
+
 config MUX_GPIO
tristate "GPIO-controlled Multiplexer"
depends on OF && GPIOLIB
diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
index 0befa2bba762..10ab8d34c9e5 100644
--- a/drivers/misc/Makefile
+++ b/drivers/misc/Makefile
@@ -54,6 +54,7 @@ obj-$(CONFIG_VEXPRESS_SYSCFG) += vexpress-syscfg.o
 obj-$(CONFIG_CXL_BASE) += cxl/
 obj-$(CONFIG_PANEL) += panel.o
 obj-$(CONFIG_MULTIPLEXER)  += mux-core.o
+obj-$(CONFIG_MUX_ADG792A)  += mux-adg792a.o
 obj-$(CONFIG_MUX_GPIO) += mux-gpio.o
 
 lkdtm-$(CONFIG_LKDTM)  += lkdtm_core.o
diff --git a/drivers/misc/mux-adg792a.c b/drivers/misc/mux-adg792a.c
new file mode 100644
index ..7d309a78af65
--- /dev/null
+++ b/drivers/misc/mux-adg792a.c
@@ -0,0 +1,154 @@
+/*
+ * Multiplexer driver for Analog Devices ADG792A/G Triple 4:1 mux
+ *
+ * Copyright (C) 2016 Axentia Technologies AB
+ *
+ * Author: Peter Rosin 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include 
+#include 
+#include 
+#include 
+
+#define ADG792A_LDSW   BIT(0)
+#define ADG792A_RESET  BIT(1)
+#define ADG792A_DISABLE(mux)   (0x50 | (mux))
+#define ADG792A_DISABLE_ALL(0x5f)
+#define ADG792A_MUX(mux, state)(0xc0 | (((mux) + 1) << 2) | (state))
+#define ADG792A_MUX_ALL(state) (0xc0 | (state))
+
+#define ADG792A_DISABLE_STATE  (4)
+#define ADG792A_KEEP_STATE (5)
+
+static int adg792a_set(struct mux_control *mux, int state)
+{
+   struct i2c_client *i2c = to_i2c_client(mux->chip->dev.parent);
+   u8 cmd;
+
+   if (mux->chip->controllers == 1) {
+   /* parallel mux controller operation */
+   if (state == ADG792A_DISABLE_STATE)
+   cmd = ADG792A_DISABLE_ALL;
+   else
+   cmd = ADG792A_MUX_ALL(state);
+   } else {
+   unsigned int controller = mux_control_get_index(mux);
+
+   if (state == ADG792A_DISABLE_STATE)
+   cmd = ADG792A_DISABLE(controller);
+   else
+   cmd = ADG792A_MUX(controller, state);
+   }
+
+   return i2c_smbus_write_byte_data(i2c, cmd, ADG792A_LDSW);
+}
+
+static const struct mux_control_ops adg792a_ops = {
+   .set = adg792a_set,
+};
+
+static int adg792a_probe(struct i2c_client *i2c,
+const struct i2c_device_id *id)
+{
+   struct device *dev = >dev;
+   struct mux_chip *mux_chip;
+   bool parallel;
+   int ret;
+   int i;
+
+   parallel = of_property_read_bool(i2c->dev.of_node, "adi,parallel");
+
+   mux_chip = mux_chip_alloc(dev, parallel ? 1 : 3, 0);
+   if (!mux_chip)
+   return -ENOMEM;
+
+   mux_chip->ops = _ops;
+   dev_set_drvdata(dev, mux_chip);
+
+   ret = i2c_smbus_write_byte_data(i2c, ADG792A_DISABLE_ALL,
+   ADG792A_RESET | ADG792A_LDSW);
+   if (ret < 0)
+   goto free_mux_chip;
+
+   for (i = 0; i < mux_chip->controllers; ++i) {
+   struct mux_control *mux = _chip->mux[i];
+   u32 idle_state;
+
+   mux->states = 4;
+
+   ret = of_property_read_u32_index(i2c->dev.of_node,
+"adi,idle-state", i,
+_state);
+   if (ret >= 0) {
+   if (idle_state > ADG792A_KEEP_STATE) {
+   dev_err(dev, "invalid idle-state %u\n",
+   idle_state);
+   ret = -EINVAL;
+   goto free_mux_chip;
+   }
+   if (idle_state != ADG792A_KEEP_STATE)
+   mux->idle_state = idle_state;
+   }
+  

[PATCH v6 3/9] iio: inkern: api for manipulating ext_info of iio channels

2016-11-30 Thread Peter Rosin
Extend the inkern api with functions for reading and writing ext_info
of iio channels.

Signed-off-by: Peter Rosin 
---
 drivers/iio/inkern.c | 60 
 include/linux/iio/consumer.h | 37 +++
 2 files changed, 97 insertions(+)

diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c
index b0f4630a163f..4848b8129e6c 100644
--- a/drivers/iio/inkern.c
+++ b/drivers/iio/inkern.c
@@ -863,3 +863,63 @@ int iio_write_channel_raw(struct iio_channel *chan, int 
val)
return ret;
 }
 EXPORT_SYMBOL_GPL(iio_write_channel_raw);
+
+unsigned int iio_get_channel_ext_info_count(struct iio_channel *chan)
+{
+   const struct iio_chan_spec_ext_info *ext_info;
+   unsigned int i = 0;
+
+   if (!chan->channel->ext_info)
+   return i;
+
+   for (ext_info = chan->channel->ext_info; ext_info->name; ext_info++)
+   ++i;
+
+   return i;
+}
+EXPORT_SYMBOL_GPL(iio_get_channel_ext_info_count);
+
+static const struct iio_chan_spec_ext_info *iio_lookup_ext_info(
+   const struct iio_channel *chan,
+   const char *attr)
+{
+   const struct iio_chan_spec_ext_info *ext_info;
+
+   if (!chan->channel->ext_info)
+   return NULL;
+
+   for (ext_info = chan->channel->ext_info; ext_info->name; ++ext_info) {
+   if (!strcmp(attr, ext_info->name))
+   return ext_info;
+   }
+
+   return NULL;
+}
+
+ssize_t iio_read_channel_ext_info(struct iio_channel *chan,
+ const char *attr, char *buf)
+{
+   const struct iio_chan_spec_ext_info *ext_info;
+
+   ext_info = iio_lookup_ext_info(chan, attr);
+   if (!ext_info)
+   return -EINVAL;
+
+   return ext_info->read(chan->indio_dev, ext_info->private,
+ chan->channel, buf);
+}
+EXPORT_SYMBOL_GPL(iio_read_channel_ext_info);
+
+ssize_t iio_write_channel_ext_info(struct iio_channel *chan, const char *attr,
+  const char *buf, size_t len)
+{
+   const struct iio_chan_spec_ext_info *ext_info;
+
+   ext_info = iio_lookup_ext_info(chan, attr);
+   if (!ext_info)
+   return -EINVAL;
+
+   return ext_info->write(chan->indio_dev, ext_info->private,
+  chan->channel, buf, len);
+}
+EXPORT_SYMBOL_GPL(iio_write_channel_ext_info);
diff --git a/include/linux/iio/consumer.h b/include/linux/iio/consumer.h
index 47eeec3218b5..5e347a9805fd 100644
--- a/include/linux/iio/consumer.h
+++ b/include/linux/iio/consumer.h
@@ -312,4 +312,41 @@ int iio_read_channel_scale(struct iio_channel *chan, int 
*val,
 int iio_convert_raw_to_processed(struct iio_channel *chan, int raw,
int *processed, unsigned int scale);
 
+/**
+ * iio_get_channel_ext_info_count() - get number of ext_info attributes
+ *   connected to the channel.
+ * @chan:  The channel being queried
+ *
+ * Returns the number of ext_info attributes
+ */
+unsigned int iio_get_channel_ext_info_count(struct iio_channel *chan);
+
+/**
+ * iio_read_channel_ext_info() - read ext_info attribute from a given channel
+ * @chan:  The channel being queried.
+ * @attr:  The ext_info attribute to read.
+ * @buf:   Where to store the attribute value. Assumed to hold
+ * at least PAGE_SIZE bytes.
+ *
+ * Returns the number of bytes written to buf (perhaps w/o zero termination;
+ * it need not even be a string), or an error code.
+ */
+ssize_t iio_read_channel_ext_info(struct iio_channel *chan,
+ const char *attr, char *buf);
+
+/**
+ * iio_write_channel_ext_info() - write ext_info attribute from a given channel
+ * @chan:  The channel being queried.
+ * @attr:  The ext_info attribute to read.
+ * @buf:   The new attribute value. Strings needs to be zero-
+ * terminated, but the terminator should not be included
+ * in the below len.
+ * @len:   The size of the new attribute value.
+ *
+ * Returns the number of accepted bytes, which should be the same as len.
+ * An error code can also be returned.
+ */
+ssize_t iio_write_channel_ext_info(struct iio_channel *chan, const char *attr,
+  const char *buf, size_t len);
+
 #endif
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v6 4/9] dt-bindings: iio: iio-mux: document iio-mux bindings

2016-11-30 Thread Peter Rosin
Signed-off-by: Peter Rosin 
---
 .../bindings/iio/multiplexer/iio-mux.txt   | 40 ++
 MAINTAINERS|  6 
 2 files changed, 46 insertions(+)
 create mode 100644 
Documentation/devicetree/bindings/iio/multiplexer/iio-mux.txt

diff --git a/Documentation/devicetree/bindings/iio/multiplexer/iio-mux.txt 
b/Documentation/devicetree/bindings/iio/multiplexer/iio-mux.txt
new file mode 100644
index ..8080cf790d82
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/multiplexer/iio-mux.txt
@@ -0,0 +1,40 @@
+IIO multiplexer bindings
+
+If a multiplexer is used to select which hardware signal is fed to
+e.g. an ADC channel, these bindings describe that situation.
+
+Required properties:
+- compatible : "iio-mux"
+- io-channels : Channel node of the parent channel that has multiplexed
+   input.
+- io-channel-names : Should be "parent".
+- #address-cells = <1>;
+- #size-cells = <0>;
+- mux-controls : Mux controller node to use for operating the mux
+- channels : List of strings, labeling the mux controller states.
+
+The multiplexer state as described in ../misc/mux-controller.txt
+
+For each non-empty string in the channels property, an iio channel will
+be created. The number of this iio channel is the same as the index into
+the list of strings in the channels property, and also matches the mux
+controller state.
+
+Example:
+   mux: mux-controller {
+   compatible = "mux-gpio";
+   #mux-control-cells = <0>;
+
+   mux-gpios = < 0 GPIO_ACTIVE_HIGH>,
+   < 1 GPIO_ACTIVE_HIGH>;
+   };
+
+   adc-mux {
+   compatible = "iio-mux";
+   io-channels = < 0>;
+   io-channel-names = "parent";
+
+   mux-controls = <>;
+
+   channels = "sync", "in", system-regulator";
+   };
diff --git a/MAINTAINERS b/MAINTAINERS
index dc7498682752..77045ae15865 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -6234,6 +6234,12 @@ F:   
Documentation/ABI/testing/sysfs-bus-iio-adc-envelope-detector
 F: Documentation/devicetree/bindings/iio/adc/envelope-detector.txt
 F: drivers/iio/adc/envelope-detector.c
 
+IIO MULTIPLEXER
+M: Peter Rosin 
+L: linux-...@vger.kernel.org
+S: Maintained
+F: Documentation/devicetree/bindings/iio/multiplexer/iio-mux.txt
+
 IIO SUBSYSTEM AND DRIVERS
 M: Jonathan Cameron 
 R: Hartmut Knaack 
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v6 7/9] i2c: i2c-mux-simple: new driver

2016-11-30 Thread Peter Rosin
This is a generic simple i2c mux that uses the generic multiplexer
subsystem to do the muxing.

The user can select if the mux is to be mux-locked and parent-locked
as described in Documentation/i2c/i2c-topology.

Signed-off-by: Peter Rosin 
---
 drivers/i2c/muxes/Kconfig  |  13 +++
 drivers/i2c/muxes/Makefile |   1 +
 drivers/i2c/muxes/i2c-mux-simple.c | 179 +
 3 files changed, 193 insertions(+)
 create mode 100644 drivers/i2c/muxes/i2c-mux-simple.c

diff --git a/drivers/i2c/muxes/Kconfig b/drivers/i2c/muxes/Kconfig
index 10b3d17ae3ea..565921e09a96 100644
--- a/drivers/i2c/muxes/Kconfig
+++ b/drivers/i2c/muxes/Kconfig
@@ -73,6 +73,19 @@ config I2C_MUX_REG
  This driver can also be built as a module.  If so, the module
  will be called i2c-mux-reg.
 
+config I2C_MUX_SIMPLE
+   tristate "Simple I2C multiplexer"
+   select MULTIPLEXER
+   depends on OF
+   help
+ If you say yes to this option, support will be included for a
+ simple generic I2C multiplexer. This driver provides access to
+ I2C busses connected through a MUX, which is controlled
+ by a generic MUX controller.
+
+ This driver can also be built as a module.  If so, the module
+ will be called i2c-mux-simple.
+
 config I2C_DEMUX_PINCTRL
tristate "pinctrl-based I2C demultiplexer"
depends on PINCTRL && OF
diff --git a/drivers/i2c/muxes/Makefile b/drivers/i2c/muxes/Makefile
index 9948fa45037f..6821d95c92a3 100644
--- a/drivers/i2c/muxes/Makefile
+++ b/drivers/i2c/muxes/Makefile
@@ -11,5 +11,6 @@ obj-$(CONFIG_I2C_MUX_PCA9541) += i2c-mux-pca9541.o
 obj-$(CONFIG_I2C_MUX_PCA954x)  += i2c-mux-pca954x.o
 obj-$(CONFIG_I2C_MUX_PINCTRL)  += i2c-mux-pinctrl.o
 obj-$(CONFIG_I2C_MUX_REG)  += i2c-mux-reg.o
+obj-$(CONFIG_I2C_MUX_SIMPLE)   += i2c-mux-simple.o
 
 ccflags-$(CONFIG_I2C_DEBUG_BUS) := -DDEBUG
diff --git a/drivers/i2c/muxes/i2c-mux-simple.c 
b/drivers/i2c/muxes/i2c-mux-simple.c
new file mode 100644
index ..4a03493e1ad7
--- /dev/null
+++ b/drivers/i2c/muxes/i2c-mux-simple.c
@@ -0,0 +1,179 @@
+/*
+ * Generic simple I2C multiplexer
+ *
+ * Copyright (C) 2016 Axentia Technologies AB
+ *
+ * Author: Peter Rosin 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+struct mux {
+   struct mux_control *control;
+
+   bool do_not_deselect;
+};
+
+static int i2c_mux_select(struct i2c_mux_core *muxc, u32 chan)
+{
+   struct mux *mux = i2c_mux_priv(muxc);
+   int ret;
+
+   ret = mux_control_select(mux->control, chan);
+   mux->do_not_deselect = ret < 0;
+
+   return ret;
+}
+
+static int i2c_mux_deselect(struct i2c_mux_core *muxc, u32 chan)
+{
+   struct mux *mux = i2c_mux_priv(muxc);
+
+   if (mux->do_not_deselect)
+   return 0;
+
+   return mux_control_deselect(mux->control);
+}
+
+static struct i2c_adapter *mux_parent_adapter(struct device *dev)
+{
+   struct device_node *np = dev->of_node;
+   struct device_node *parent_np;
+   struct i2c_adapter *parent;
+
+   parent_np = of_parse_phandle(np, "i2c-parent", 0);
+   if (!parent_np) {
+   dev_err(dev, "Cannot parse i2c-parent\n");
+   return ERR_PTR(-ENODEV);
+   }
+   parent = of_find_i2c_adapter_by_node(parent_np);
+   of_node_put(parent_np);
+   if (!parent)
+   return ERR_PTR(-EPROBE_DEFER);
+
+   return parent;
+}
+
+static const struct of_device_id i2c_mux_of_match[] = {
+   { .compatible = "i2c-mux-simple,parent-locked",
+ .data = (void *)0, },
+   { .compatible = "i2c-mux-simple,mux-locked",
+ .data = (void *)1, },
+   {},
+};
+MODULE_DEVICE_TABLE(of, i2c_mux_of_match);
+
+static int i2c_mux_probe(struct platform_device *pdev)
+{
+   struct device *dev = >dev;
+   struct device_node *np = dev->of_node;
+   struct device_node *child;
+   const struct of_device_id *match;
+   struct i2c_mux_core *muxc;
+   struct mux *mux;
+   struct i2c_adapter *parent;
+   int children;
+   int ret;
+
+   if (!np)
+   return -ENODEV;
+
+   mux = devm_kzalloc(dev, sizeof(*mux), GFP_KERNEL);
+   if (!mux)
+   return -ENOMEM;
+
+   mux->control = devm_mux_control_get(dev, NULL);
+   if (IS_ERR(mux->control)) {
+   if (PTR_ERR(mux->control) != -EPROBE_DEFER)
+   dev_err(dev, "failed to get control-mux\n");
+   return PTR_ERR(mux->control);
+   }
+
+   parent = mux_parent_adapter(dev);
+   if (IS_ERR(parent)) {
+   if (PTR_ERR(parent) != -EPROBE_DEFER)
+   dev_err(dev, "failed to get i2c-parent 

[PATCH v2 06/10] [media] docs-rst: replace bayer.png by a SVG image

2016-11-30 Thread Mauro Carvalho Chehab
SVG images are scalable, with makes easier to output on
different formats.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/media/Makefile|   1 +
 Documentation/media/uapi/v4l/bayer.png  | Bin 9725 -> 0 bytes
 Documentation/media/uapi/v4l/bayer.svg  | 984 
 Documentation/media/uapi/v4l/subdev-formats.rst |   4 +-
 4 files changed, 987 insertions(+), 2 deletions(-)
 delete mode 100644 Documentation/media/uapi/v4l/bayer.png
 create mode 100644 Documentation/media/uapi/v4l/bayer.svg

diff --git a/Documentation/media/Makefile b/Documentation/media/Makefile
index d97e969c3ac0..998e8dd49352 100644
--- a/Documentation/media/Makefile
+++ b/Documentation/media/Makefile
@@ -13,6 +13,7 @@ TARGETS := $(addprefix $(BUILDDIR)/, $(FILES))
 IMAGES = \
typical_media_device.svg \
uapi/dvb/dvbstb.svg \
+   uapi/v4l/bayer.svg \
uapi/v4l/constraints.svg \
uapi/v4l/crop.svg \
uapi/v4l/fieldseq_bt.svg \
diff --git a/Documentation/media/uapi/v4l/bayer.png 
b/Documentation/media/uapi/v4l/bayer.png
deleted file mode 100644
index 
9b15fb22e8173c83c3da6df73cd7cdc7d8f41736..
GIT binary patch
literal 0
HcmV?d1

literal 9725
zcmY*<1ymeOv-ZN`?(Qy|;1(=cfZzm{1p+J@oZuQ@AxQAxK>~!35LjUGH!QMCu;3xM
zySqC-@4er5&-u@Jre>47Ry6UNO`h%IxztQ0RR9X*3?in1OPB0kJn{*z(@Jw
z9eV8XgyC(dt_-LgWZD7%fB=1MBQ*df01p!rfJIG?fq_W~;K9HI5U>FWDKQB6nQ<`0
zF#rG}9SkY}IRzOe0}#Lj0MMv1QxVY95U3Di12{1N+yHVWer6UXV=`=P78eIHAb`t{
zhl3qU7zdL(8b$)}rUGC|0`PfLM0mJ)`FY4ekPH%lJP$ql6B!vneCDT`(n4GS6`;Nl
z1wf)tTtW;W*#Xc303;r!$T098=b*UV!Tcy6upj_IH78RA!FeXY93!Qw>T`hl!zu@0
zng)upDY@Y-0Ocy%KN3E%A7_0ac*9Cy%0iZN~cx9w7{W^YGhLz*>gPK){804PO
z`r)0agEh~e315h
zaP;yHeQUCAB#WC5aPTYg_4fgk;H+6Ze-ZMqZ7oPp3ILP?f`S7!p}B0vQIP=#
z?FOhJi3iFevh>A?ZhyJ9j-h
z$3HYyDGy0WANGUA6#oGrk_~r4-bl5GITW|O%WIcuRq)KY--+=$j)}|
zGcFH;<}1v6km_>O?$Fvx4pZuRU0s}3{Jk`)^kFY2&4ex%{s4M`(jWO(e<=K2
zuS^x9GP`c<wOq%e@I^V>bf?bH}|P#_~!TEpTWVtzFG5$fl>7E!*x
zkCkt&%dy=PE6ab|8`i#*Zueb}HuTNhU;gc#nwe_cs{6U!{CBN%b|bZYx9#_C*VX*O
z-D=y=;mG{P!{*lJ;vsT$@2=zgboylKVe8N3_VU)=-Nnw{B4+`OW?P?ZVZ~<=xHx!|l!W{lo3U
zN5zvJJ9VWXw43W)_7F#-)fk80|3;?k4Gj3ahhKDV$&!-a9P>;x0qvZu__)`09As5s!j)9dRbj~;W}`Q^8*(0IDgqF+8-a+ZJA;Ix_M34Ov
z;ETgS^XK6tn3K2h_1apdTBT*$9hjnRHc-%ey``@w5@;%p1V%|d#Fvzp<5z~Eoa0o
zEM2387kAcE=)>*lx}!5Ly6I@Xnrm;~le>u7kJWmn|6-(@PU|}R(T=s|s`KU9fwQqj
zuH9K4^
zmv6Sst^LnPwJ}`uy6zd6r>w-@1!|*@cO9j_@eZtYieUAT#`Wc%jk=WjOLUOI36b5b
zrDGYuq`4(nR5#NpYdKxiSH(j@tZ^)0a8@@B{7WQ`8#uFz3O@4kPEuBGpc-rEd4oZ1
znl`Xpy=sa@ILzJ^9kft5z$}8}5)+#1R*logrgH9(ivvbtK>GM0R3L_GK8OK8(3pxC
zVfS1UAGut51wA6B4=-_wxq?QG9L(T>@x(ZA1>a!`nbO-D`W_I-jQ?ITx4QHnwkY}p
z^~?+Y)Lq*@;1vXQnz5FIF!k+x-=(C6B)KYe{j&6j;DQ^PE#4s@w35JkW@1F@_xOj&
z>n;z~Dl^4KB{QOExR)RoKm&8|f|XCM)gXl8|S9*+ewvujht|lf!CVB+Bu@
zy*OL9nG>v9o)DbOQ__}tp`D1%Ac2m3;}8`N92bU7iiaz0a2X9m_;rOmx5Wl0RViF^
zUdG*{@sc#_zRNkX#4YA0w7Tl$^;zq{b~yEBE@g7bqp7^u2dzIi@y0$v6aEOp?=U~P
zRJ#F1{QF95npI~VsekIq9mzLLZ}0>YLD%oX1yV-d;KDl0K_b-jU69M
z8!ptl1X%uYsaj-32AO$vXxMw%<^!8hH^&=K_=6bx)0Tscycf|yKqgxjb_KkUv!%g`
zaTJgcDXtA*%EvNn@DcXm6$kIjvb;f)yG0LO7nF^ankV30r1ZEqK}hEoti(Fz6SUeK
z5Rkia7MWmS*0B}N-5kR3Iz0-MhJHrMbL3X?wHaF_lT#eRv^_5)tzSL729;o}kBw5r
z1#KV~1=%^G;a#>`XCeA~YGS$Y#SUq)jWX=0^G!%Qv
zng`;tsuVYKe9n}`4k^wzpC
z5kidI^6l7-oj}*-<+;r+Q`Q`i!`yp4U4^4XQ7l1hze5u+Nz{}wGHuY2
zBnq@UuT}%%eED0pEsG$vXqPmw!^<6`K<0=k@)g;54!)t`J%J{*~u%nlJ}AEXU&
zw`j4(_m5r`^+VnQ!m}#0=V|Tq@}D_v!`t#OT5Kg!{j>Q)zgfSqLZxO;Dk|+%4x18_
zJUhybV}=M=jB_2#p&}DjGmVdlv$j_uW`5cDU@^YV{Ka|nj>#bXpe@E>ldTWv8)MKz
zp~M^t9C=Yq&*Y)jN#bwh1$X*ev|6QDo^NZ7I3zqWj0a)IQ{UY2m8aP{O+LDexR7aQ
zgZ!e=k@vuo3pG>oE;B>xndR)$+n8zMWGCH}m(c2E``OpxsFyENbMibXZY7L^`9dg$
z8r#B7@u((6UDot_Xqd}mMu@i0P$P(65k)EH(Pu6I;%on?wr9ZB^r0lPjAljRU#pu`
zZitSe6xjf(98WF=D7V&$qHStcWRBev#O10*PxT}ep{+ZAG_smTJq_KOwAMUMIun${
z6kM~`$mHzwLM##k11v~EB7xnM8L#U@@B2lU1IR#YT7#Hs_U+$4Xz#!$?stAuu
zb1L!8TG><1%xLCyU8%zsNsw<9{s{<##y8H`5yd`d=ZvTR5cKmQLAk)fqv1

[PATCH v2 10/10] docs-rst: parse-headers.pl: cleanup the documentation

2016-11-30 Thread Mauro Carvalho Chehab
Keeping both rst and in-file documentation in sync can be harsh.

So, simplify the script's internal documntation to a bare minimum,
and add a mention to the ReST file with its full documentation.

This way, a quick help is still available at the command line,
while the complete one is maintained at the ReST format.

As we won't be using pad2rst anymore, do a cleanup at the ReST
file.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/doc-guide/parse-headers.rst |  22 +-
 Documentation/sphinx/parse-headers.pl | 116 +++---
 2 files changed, 12 insertions(+), 126 deletions(-)

diff --git a/Documentation/doc-guide/parse-headers.rst 
b/Documentation/doc-guide/parse-headers.rst
index 615e25ec64bb..96a0423d5dba 100644
--- a/Documentation/doc-guide/parse-headers.rst
+++ b/Documentation/doc-guide/parse-headers.rst
@@ -18,13 +18,6 @@ about how to use it inside the Kernel tree.
 parse_headers.pl
 
 
-.. NOTE: the man pages below were generated using pod2rst tool:
-.. http://search.cpan.org/~dowens/Pod-POM-View-Restructured-0.02/bin/pod2rst
-.. If you need to change anything below this point, please do the changes
-.. at parse-headers.pl directly, re-run the script and paste the output of
-.. the script here.
-
-
 NAME
 
 
@@ -33,7 +26,6 @@ parse_headers.pl - parse a C file, in order to identify 
functions, structs,
 enums and defines and create cross-references to a Sphinx book.
 
 
-
 SYNOPSIS
 
 
@@ -43,7 +35,6 @@ SYNOPSIS
 Where  can be: --debug, --help or --man.
 
 
-***
 OPTIONS
 ***
 
@@ -55,20 +46,17 @@ OPTIONS
 
 
 
-\ **--help**\
+\ **--usage**\
 
  Prints a brief help message and exits.
 
 
 
-\ **--man**\
+\ **--help**\
 
- Prints the manual page and exits.
+ Prints a more detailed help message and exits.
 
 
-
-
-***
 DESCRIPTION
 ***
 
@@ -155,8 +143,6 @@ For both statements, \ **type**\  can be either one of the 
following:
 
 
 
-
-
 EXAMPLES
 
 
@@ -187,7 +173,6 @@ It will make the BAR1 and BAR2 enum symbols to cross 
reference the foo
 symbol at the C domain.
 
 
-
 BUGS
 
 
@@ -195,7 +180,6 @@ BUGS
 Report bugs to Mauro Carvalho Chehab 
 
 
-*
 COPYRIGHT
 *
 
diff --git a/Documentation/sphinx/parse-headers.pl 
b/Documentation/sphinx/parse-headers.pl
index 20dbdf55c71e..a958d8b5e99d 100755
--- a/Documentation/sphinx/parse-headers.pl
+++ b/Documentation/sphinx/parse-headers.pl
@@ -10,8 +10,8 @@ my $man;
 
 GetOptions(
"debug" => \$debug,
-   'help|?' => \$help,
-   man => \$man
+   'usage|?' => \$help,
+   'help' => \$man
 ) or pod2usage(2);
 
 pod2usage(1) if $help;
@@ -354,13 +354,13 @@ Where  can be: --debug, --help or --man.
 
 Put the script in verbose mode, useful for debugging.
 
-=item B<--help>
+=item B<--usage>
 
 Prints a brief help message and exits.
 
-=item B<--man>
+=item B<--help>
 
-Prints the manual page and exits.
+Prints a more detailed help message and exits.
 
 =back
 
@@ -379,109 +379,11 @@ enums and enum symbols and create cross-references for 
all of them.
 It is also capable of distinguish #define used for specifying a Linux
 ioctl.
 
-The EXCEPTIONS_FILE contain two types of statements: B or B.
+The EXCEPTIONS_FILE contain two rules to allow ignoring a symbol or
+to replace the default references by a custom one.
 
-The syntax for the ignore tag is:
-
-=over 8
-
-ignore B B
-
-=back
-
-The B means that it won't generate cross references for a
-B symbol of type B.
-
-The syntax for the replace tag is:
-
-=over 8
-
-replace B B B
-
-=back
-
-The B means that it will generate cross references for a
-B symbol of type B, but, instead of using the default
-replacement rule, it will use B.
-
-For both statements, B can be either one of the following:
-
-=over 8
-
-=item B
-
-The ignore or replace statement will apply to ioctl definitions like:
-
-#defineVIDIOC_DBG_S_REGISTER_IOW('V', 79, struct v4l2_dbg_register)
-
-=item B
-
-The ignore or replace statement will apply to any other #define found
-at C_FILE.
-
-=item B
-
-The ignore or replace statement will apply to typedef statements at C_FILE.
-
-=item B
-
-The ignore or replace statement will apply to the name of struct statements
-at C_FILE.
-
-=item B
-
-The ignore or replace statement will apply to the name of enum statements
-at C_FILE.
-
-=item B
-
-The ignore or replace statement will apply to the name of enum statements
-at C_FILE.
-
-
-For replace statements, B will automatically use :c:type:
-references for B, B and B types. It will use :ref:
-for B, B and B types. The type of reference can
-also be explicitly defined at the replace statement.
-
-=back
-
-=head1 EXAMPLES
-
-ignore define _VIDEODEV2_H
-
-=over 8
-
-
-Ignore a #define _VIDEODEV2_H at the C_FILE.
-
-=back
-
-ignore symbol PRIVATE
-
-=over 8
-
-On a struct like:
-
-enum foo { BAR1, BAR2, PRIVATE };
-
-It won't generate 

[PATCH v2 07/10] docs-rst: media: build SVG from graphviz files

2016-11-30 Thread Mauro Carvalho Chehab
Instead of keeping both SVG and graphviz files, dynamically
build SVG from its graphviz sources.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/media/.gitignore|  2 +
 Documentation/media/Makefile  | 20 ++---
 Documentation/media/uapi/v4l/pipeline.svg | 68 ---
 3 files changed, 16 insertions(+), 74 deletions(-)
 delete mode 100644 Documentation/media/uapi/v4l/pipeline.svg

diff --git a/Documentation/media/.gitignore b/Documentation/media/.gitignore
index a1363379944a..08b21de3ef94 100644
--- a/Documentation/media/.gitignore
+++ b/Documentation/media/.gitignore
@@ -1 +1,3 @@
 *.pdf
+# Files generated from *.dot
+uapi/v4l/pipeline.svg
diff --git a/Documentation/media/Makefile b/Documentation/media/Makefile
index 998e8dd49352..547b4105f826 100644
--- a/Documentation/media/Makefile
+++ b/Documentation/media/Makefile
@@ -10,6 +10,9 @@ FILES = audio.h.rst ca.h.rst dmx.h.rst frontend.h.rst 
net.h.rst video.h.rst \
 
 TARGETS := $(addprefix $(BUILDDIR)/, $(FILES))
 
+DOTS = \
+   uapi/v4l/pipeline.dot \
+
 IMAGES = \
typical_media_device.svg \
uapi/dvb/dvbstb.svg \
@@ -29,8 +32,10 @@ IMAGES = \
uapi/v4l/vbi_625.svg \
uapi/v4l/vbi_hsync.svg \
 
+DOTTGT := $(patsubst %.dot,%.svg,$(DOTS))
+IMGDOT := $(patsubst %,$(SRC_DIR)/%,$(DOTTGT))
 
-IMGTGT := $(patsubst %.png,%.pdf,$(patsubst %.svg,%.pdf,$(IMAGES)))
+IMGTGT := $(patsubst %.svg,%.pdf,$(IMAGES))
 IMGPDF := $(patsubst %,$(SRC_DIR)/%,$(IMGTGT))
 
 cmd = $(echo-cmd) $(cmd_$(1))
@@ -38,19 +43,25 @@ cmd = $(echo-cmd) $(cmd_$(1))
 quiet_cmd_genpdf = GENPDF  $2
   cmd_genpdf = convert $2 $3
 
+quiet_cmd_gendot = DOT $2
+  cmd_gendot = dot -Tsvg $2 > $3
+
 %.pdf: %.svg
@$(call cmd,genpdf,$<,$@)
 
+%.svg: %.dot
+   @$(call cmd,gendot,$<,$@)
+
 .PHONY: all html epub xml latex
 
-all: $(BUILDDIR) ${TARGETS}
+all: $(IMGDOT) $(BUILDDIR) ${TARGETS}
 html: all
 epub: all
 xml: all
 latex: $(IMGPDF) all
 
 clean:
-   -rm -f $(IMGTGT) 2>/dev/null
+   -rm -f $(DOTTGT) $(IMGTGT) $(patsubst %,$(SRC_DIR)/%,${TARGETS}) 
2>/dev/null
 
 $(BUILDDIR):
$(Q)mkdir -p $@
@@ -95,6 +106,3 @@ $(BUILDDIR)/cec.h.rst: ${KAPI}/cec.h ${PARSER} 
$(SRC_DIR)/cec.h.rst.exceptions
 
 $(BUILDDIR)/lirc.h.rst: ${UAPI}/lirc.h ${PARSER} 
$(SRC_DIR)/lirc.h.rst.exceptions
@$($(quiet)gen_rst)
-
-cleandocs:
-   -rm -f ${TARGETS}
diff --git a/Documentation/media/uapi/v4l/pipeline.svg 
b/Documentation/media/uapi/v4l/pipeline.svg
deleted file mode 100644
index 70f4c1b23ca1..
--- a/Documentation/media/uapi/v4l/pipeline.svg
+++ /dev/null
@@ -1,68 +0,0 @@
-
-http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd;>
-
-
-http://www.w3.org/2000/svg; 
xmlns:xlink="http://www.w3.org/1999/xlink;>
-
-board
-
-
-scaler
-
-0
-
-Host
-Scaler
-
-1
-
-
-io
-
-0
-
-V4L I/O
-
-
-scaler:scaler_1io:io_0
-
-
-HQ: 1280x720
-HS: 1280x720
-
-
-frontend
-
-0
-
-Host
-Frontend
-
-1
-
-
-frontend:frontend_1scaler:scaler_0
-
-
-HQ: 2592x1968
-HS: 1296x984
-
-
-sensor
-
-Sensor
-
-0
-
-
-sensor:sensor_0frontend:frontend_0
-
-
-HQ: 2592x1968
-HS: 1296x984
-
-
-
-- 
2.9.3


--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 09/10] docs-rst: fix media cleandocs target

2016-11-30 Thread Mauro Carvalho Chehab
The builddir prefix was missing on make cleandocs. Fix it.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/Makefile.sphinx | 2 +-
 Documentation/media/Makefile  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/Makefile.sphinx b/Documentation/Makefile.sphinx
index a23d3c8b4848..707c65337ebf 100644
--- a/Documentation/Makefile.sphinx
+++ b/Documentation/Makefile.sphinx
@@ -98,7 +98,7 @@ installmandocs:
 
 cleandocs:
$(Q)rm -rf $(BUILDDIR)
-   $(Q)$(MAKE) -C Documentation/media clean
+   $(Q)$(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) -C Documentation/media clean
 
 endif # HAVE_SPHINX
 
diff --git a/Documentation/media/Makefile b/Documentation/media/Makefile
index ab05323b779b..4d8e2ff378c4 100644
--- a/Documentation/media/Makefile
+++ b/Documentation/media/Makefile
@@ -105,7 +105,7 @@ xml: all
 latex: $(IMGPDF) all
 
 clean:
-   -rm -f $(DOTTGT) $(IMGTGT) $(patsubst %,$(SRC_DIR)/%,${TARGETS}) 
2>/dev/null
+   -rm -f $(DOTTGT) $(IMGTGT) ${TARGETS} 2>/dev/null
 
 $(BUILDDIR):
$(Q)mkdir -p $@
-- 
2.9.3


--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v6 4/9] dt-bindings: iio: iio-mux: document iio-mux bindings

2016-11-30 Thread Peter Rosin
Hi,

v6 was apparently rushed a little bit too much, but I really wanted to
supersede the stupidity I found elsewhere in v5. Perhaps I shouldn't
have bolted on the changes for the iio-mux bindings, but so I did...

On 2016-11-30 09:16, Peter Rosin wrote:
> Signed-off-by: Peter Rosin 
> ---
>  .../bindings/iio/multiplexer/iio-mux.txt   | 40 
> ++
>  MAINTAINERS|  6 
>  2 files changed, 46 insertions(+)
>  create mode 100644 
> Documentation/devicetree/bindings/iio/multiplexer/iio-mux.txt
> 
> diff --git a/Documentation/devicetree/bindings/iio/multiplexer/iio-mux.txt 
> b/Documentation/devicetree/bindings/iio/multiplexer/iio-mux.txt
> new file mode 100644
> index ..8080cf790d82
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/multiplexer/iio-mux.txt
> @@ -0,0 +1,40 @@
> +IIO multiplexer bindings
> +
> +If a multiplexer is used to select which hardware signal is fed to
> +e.g. an ADC channel, these bindings describe that situation.
> +
> +Required properties:
> +- compatible : "iio-mux"
> +- io-channels : Channel node of the parent channel that has multiplexed
> + input.
> +- io-channel-names : Should be "parent".
> +- #address-cells = <1>;
> +- #size-cells = <0>;
> +- mux-controls : Mux controller node to use for operating the mux
> +- channels : List of strings, labeling the mux controller states.
> +
> +The multiplexer state as described in ../misc/mux-controller.txt

Delete the above non-sentence, but reintroduce the gist of it...

> +For each non-empty string in the channels property, an iio channel will
> +be created. The number of this iio channel is the same as the index into
> +the list of strings in the channels property, and also matches the mux
> +controller state.

...at the end of the above sentence instead.

I'm holding off v7 pending more important changes.

Cheers,
Peter

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 00/10] Get rid of bitmap images

2016-11-30 Thread Mauro Carvalho Chehab
The main goal of this patch series is to get rid of PNG images, using 
either graphviz or SVG for images.

I appended one unrelated patch in the end with some documentation
changes for parse_headers.pl.

In order to get rid of PNG, for old images generated with xfig,
stored inside PDF, just convert them to SVG and cleanup the
images using inkscape.

The pipeline image is actually a graphviz diagram. So, I wrote
an equivalent diagram in Graphviz, and add support to use
*.dot files, converting them to SVG.

The other bitmap images were rewritten in SVG from scratch.

For now, I'm keeping the image conversion rules inside the
Documentation/media/Makefile. I have a patch moving them to
Documentation/Makefile.sphinx at:

https://git.linuxtv.org/mchehab/experimental.git/commit/?h=svg-images-v2

but, as there's an extension being developed to do such 
conversion on the fly, I'm not including such patch in this
series.

NOTE: some images use more than 998 columns, causing troubles
with some MTA and MUA that could refuse them, because of an
IETF RFC 2821 violation:

$ git send-email patches/tmp
fatal: patches/tmp/0001-media-convert-more-media-images-to-SVG.patch: 
191: patch contains a line longer than 998 characters

Due to that, in case you miss a patch, I'm also storing them
on my development tree at:
https://git.linuxtv.org/mchehab/experimental.git/log/?h=svg-images

It is based on docs-next tree.

Version 2:

- added a .gitignore to ignore the svg image generated
  from a *.dot file;
-  added a small fixup patch that makes pdfdocs build clean,
   replacing fieldseq_bt.svg by fieldseq_bt.* at the .. figure:: tag.
- added the parse-headers.pl cleanup the documentation patch.

Mauro Carvalho Chehab (10):
  [media] convert more media images to SVG
  [media] svg files: cleanup them
  [media] docs-rst: nv12mt zigzag images: replace by SVG images
  [media] docs-rst: convert pipeline to SVG format
  [media] docs-rst: replace the selection.png by a SVG image
  [media] docs-rst: replace bayer.png by a SVG image
  docs-rst: media: build SVG from graphviz files
  docs-rst: media/Makefile: reorganize the rules
  docs-rst: fix media cleandocs target
  docs-rst: parse-headers.pl: cleanup the documentation

 Documentation/Makefile.sphinx  |2 +-
 Documentation/doc-guide/parse-headers.rst  |   22 +-
 Documentation/media/.gitignore |2 +
 Documentation/media/Makefile   |   67 +-
 Documentation/media/uapi/v4l/bayer.png |  Bin 9725 -> 0 bytes
 Documentation/media/uapi/v4l/bayer.svg |  984 
 Documentation/media/uapi/v4l/crop.png  |  Bin 3334 -> 0 bytes
 Documentation/media/uapi/v4l/crop.rst  |4 +-
 Documentation/media/uapi/v4l/crop.svg  |  281 +
 Documentation/media/uapi/v4l/dev-raw-vbi.rst   |   12 +-
 Documentation/media/uapi/v4l/dev-subdev.rst|4 +-
 Documentation/media/uapi/v4l/field-order.rst   |8 +-
 Documentation/media/uapi/v4l/fieldseq_bt.png   |  Bin 12306 -> 0 bytes
 Documentation/media/uapi/v4l/fieldseq_bt.svg   | 2613 +
 Documentation/media/uapi/v4l/fieldseq_tb.png   |  Bin 12247 -> 0 bytes
 Documentation/media/uapi/v4l/fieldseq_tb.svg   | 2607 +
 Documentation/media/uapi/v4l/nv12mt.png|  Bin 1920 -> 0 bytes
 Documentation/media/uapi/v4l/nv12mt.svg|  450 ++
 Documentation/media/uapi/v4l/nv12mt_example.png|  Bin 5261 -> 0 bytes
 Documentation/media/uapi/v4l/nv12mt_example.svg| 1589 ++
 Documentation/media/uapi/v4l/pipeline.dot  |   12 +
 Documentation/media/uapi/v4l/pipeline.png  |  Bin 12130 -> 0 bytes
 Documentation/media/uapi/v4l/pixfmt-nv12mt.rst |8 +-
 Documentation/media/uapi/v4l/selection-api-003.rst |4 +-
 Documentation/media/uapi/v4l/selection.png |  Bin 11716 -> 0 bytes
 Documentation/media/uapi/v4l/selection.svg | 5812 
 Documentation/media/uapi/v4l/subdev-formats.rst|4 +-
 .../uapi/v4l/subdev-image-processing-crop.svg  |  346 +-
 .../uapi/v4l/subdev-image-processing-full.svg  |  892 ++-
 ...ubdev-image-processing-scaling-multi-source.svg |  626 ++-
 Documentation/media/uapi/v4l/vbi_525.png   |  Bin 2053 -> 0 bytes
 Documentation/media/uapi/v4l/vbi_525.svg   |  811 +++
 Documentation/media/uapi/v4l/vbi_625.png   |  Bin 2352 -> 0 bytes
 Documentation/media/uapi/v4l/vbi_625.svg   |  858 +++
 Documentation/media/uapi/v4l/vbi_hsync.png |  Bin 906 -> 0 bytes
 Documentation/media/uapi/v4l/vbi_hsync.svg |  313 ++
 Documentation/sphinx/parse-headers.pl  |  116 +-
 37 files changed, 17994 insertions(+), 453 deletions(-)
 delete mode 100644 Documentation/media/uapi/v4l/bayer.png
 create mode 100644 Documentation/media/uapi/v4l/bayer.svg
 delete mode 100644 Documentation/media/uapi/v4l/crop.png
 create mode 100644 

[PATCH v2 04/10] [media] docs-rst: convert pipeline to SVG format

2016-11-30 Thread Mauro Carvalho Chehab
The pipeline image was produced from some dot file that has
long missed. Create a pipeline.dot with the graph and convert
it to SVG. As we're planning to add future support for graphviz
graphics, also store the .dot file on the tree, as this will
make easier when we add such Sphinx extension.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/media/Makefile|   1 +
 Documentation/media/uapi/v4l/dev-subdev.rst |   4 +-
 Documentation/media/uapi/v4l/pipeline.dot   |  12 +
 Documentation/media/uapi/v4l/pipeline.png   | Bin 12130 -> 0 bytes
 Documentation/media/uapi/v4l/pipeline.svg   |  68 
 5 files changed, 83 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/media/uapi/v4l/pipeline.dot
 delete mode 100644 Documentation/media/uapi/v4l/pipeline.png
 create mode 100644 Documentation/media/uapi/v4l/pipeline.svg

diff --git a/Documentation/media/Makefile b/Documentation/media/Makefile
index ec95286e556c..fff8e3b73e25 100644
--- a/Documentation/media/Makefile
+++ b/Documentation/media/Makefile
@@ -19,6 +19,7 @@ IMAGES = \
uapi/v4l/fieldseq_tb.svg \
uapi/v4l/nv12mt.svg \
uapi/v4l/nv12mt_example.svg \
+   uapi/v4l/pipeline.svg \
uapi/v4l/subdev-image-processing-full.svg \
uapi/v4l/subdev-image-processing-scaling-multi-source.svg \
uapi/v4l/subdev-image-processing-crop.svg \
diff --git a/Documentation/media/uapi/v4l/dev-subdev.rst 
b/Documentation/media/uapi/v4l/dev-subdev.rst
index c18e9c5427ee..cd2870180208 100644
--- a/Documentation/media/uapi/v4l/dev-subdev.rst
+++ b/Documentation/media/uapi/v4l/dev-subdev.rst
@@ -99,8 +99,8 @@ the video sensor and the host image processing hardware.
 
 .. _pipeline-scaling:
 
-.. figure::  pipeline.png
-:alt:pipeline.png
+.. figure::  pipeline.*
+:alt:pipeline.pdf / pipeline.svg
 :align:  center
 
 Image Format Negotiation on Pipelines
diff --git a/Documentation/media/uapi/v4l/pipeline.dot 
b/Documentation/media/uapi/v4l/pipeline.dot
new file mode 100644
index ..02d7fcf12b26
--- /dev/null
+++ b/Documentation/media/uapi/v4l/pipeline.dot
@@ -0,0 +1,12 @@
+digraph board {
+   rankdir=TB
+   colorscheme=x11
+   scaler [label="{ 0} | Host\nScaler | { 1} ", 
shape=Mrecord, style=filled, fillcolor=lightblue]
+   frontend [label="{ 0} | Host\nFrontend | { 1}", 
shape=Mrecord, style=filled, fillcolor=lightblue]
+   sensor [label="Sensor | { 0}", shape=Mrecord, style=filled, 
fillcolor=aquamarine]
+   io [label="{ 0} | V4L I/O", shape=Mrecord, style=filled, 
fillcolor=aquamarine]
+
+   sensor:sensor_0 -> frontend:frontend_0 [color=blue, label="HQ: 
2592x1968\nHS: 1296x984"]
+   frontend:frontend_1 -> scaler:scaler_0 [color=blue, label="HQ: 
2592x1968\nHS: 1296x984"]
+   scaler:scaler_1 -> io:io_0 [color=blue, label="HQ: 1280x720\nHS: 
1280x720"]
+}
diff --git a/Documentation/media/uapi/v4l/pipeline.png 
b/Documentation/media/uapi/v4l/pipeline.png
deleted file mode 100644
index 
f19b86c2c24d07d5ae437820944d25489a447d7a..
GIT binary patch
literal 0
HcmV?d1

literal 12130
zcmX}ScQ~BS_dmQ?#A5Z{TL_B~y@wDbh_-Hh5kyZ!?;`sovAnC44R*@Yt45)x=ts*;9g!>8YQlk~Fn?
z%wrWL=_k4%KpD@_QBh69P(|2UNfd0RXR5{vH4IkLumoAyzL()*HSz)>d=(7*taW8y
zKZ9u)8iVY^O!PJN4fRyvb|6<>z(61D?1$@=3UW^Xy>S$F6N~$DEbR1
zs?^!lS;i;N%hetfgDkWGlAN{7Ue$u)D^0u;a1*QCz5Tqr-}ndk0^#|}?>hZM!ruou
zdb~}09r`;r#Hu(DT1I^t6=zkG{$Ib>&~)*!3YQD=va<_I!ja8Ca^AFk^^8Ieek}d9
z`uTNtN#tyaSsAMSYi(~ADyyaj)z;Da3;p?Tv+q<}6{>e?uA`u~Z+GZ>{pX>-ef@pI
zeVx1CQx5t==70A0k8duGc5jW=4PoXcFk^EQzdL4kuK#@K+P=P8M*Ue`9@)71yE1;U
zGBCG!e6`;DAXY+1vcKhV|@A2WydBx<_?cLez-Q~~gOU?cKl4%d3m?+q=7)
ztGnCNyBjR+?u+_J140M(gPl&^vq;|mAc6r5Qrx6zaP$%aj-0wNa(4dtx7mU
zL`{av`Iy{*7zAPmX*_vs=sUBQO%_PKR(C$8f$93~SxqjLMX?bcXIsYh~Sc7S2@903$e%)|1f9mfPmS(9Cd#8^wOa6WFU{x1s`wX
zu$a{4Mx~l)DB$<;;BLpRn?#m{=(JqNQ1nAt*&5lJA)nvULm3;=AHRS7I+_c+q*B*F
zedPw=h6TkLcZ+*R^v+PR0PhYK*RhCS+AX?Ag+fW>LafLBmLdxWu8wX_an(6}W3Is-
zHJ9kVR_#h~yD*9m{gb)mVZz-3-qPJcZ5b$c!B5OaHsrt~uscs~GD7(Fo^rga@vF6|
zpjvc=3*mla{~}e@Mlgu`@aAuZ
zfvU@eNvIboG3YjIz!=2GeTLiVWM1-R-?UHDH_{_zCbO2eKRdts?n>5d;W$O!q;R=rnl!GZORE6mKUX8vDjMq
zgre-M-<`NUtPAE3

[PATCH v2 08/10] docs-rst: media/Makefile: reorganize the rules

2016-11-30 Thread Mauro Carvalho Chehab
Better organize the media/Makefile, in order to better
split what's related to image conversion from the ones
related to parse-headers.pl.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/media/Makefile | 45 +++-
 1 file changed, 24 insertions(+), 21 deletions(-)

diff --git a/Documentation/media/Makefile b/Documentation/media/Makefile
index 547b4105f826..ab05323b779b 100644
--- a/Documentation/media/Makefile
+++ b/Documentation/media/Makefile
@@ -1,15 +1,7 @@
-# Generate the *.h.rst files from uAPI headers
+# Rules to convert DOT and SVG to Sphinx images
 
-PARSER = $(srctree)/Documentation/sphinx/parse-headers.pl
-UAPI = $(srctree)/include/uapi/linux
-KAPI = $(srctree)/include/linux
 SRC_DIR=$(srctree)/Documentation/media
 
-FILES = audio.h.rst ca.h.rst dmx.h.rst frontend.h.rst net.h.rst video.h.rst \
- videodev2.h.rst media.h.rst cec.h.rst lirc.h.rst
-
-TARGETS := $(addprefix $(BUILDDIR)/, $(FILES))
-
 DOTS = \
uapi/v4l/pipeline.dot \
 
@@ -52,21 +44,16 @@ quiet_cmd_gendot = DOT $2
 %.svg: %.dot
@$(call cmd,gendot,$<,$@)
 
-.PHONY: all html epub xml latex
+# Rules to convert a .h file to inline RST documentation
 
-all: $(IMGDOT) $(BUILDDIR) ${TARGETS}
-html: all
-epub: all
-xml: all
-latex: $(IMGPDF) all
+PARSER = $(srctree)/Documentation/sphinx/parse-headers.pl
+UAPI = $(srctree)/include/uapi/linux
+KAPI = $(srctree)/include/linux
 
-clean:
-   -rm -f $(DOTTGT) $(IMGTGT) $(patsubst %,$(SRC_DIR)/%,${TARGETS}) 
2>/dev/null
+FILES = audio.h.rst ca.h.rst dmx.h.rst frontend.h.rst net.h.rst video.h.rst \
+ videodev2.h.rst media.h.rst cec.h.rst lirc.h.rst
 
-$(BUILDDIR):
-   $(Q)mkdir -p $@
-
-# Rule to convert a .h file to inline RST documentation
+TARGETS := $(addprefix $(BUILDDIR)/, $(FILES))
 
 gen_rst = \
echo ${PARSER} $< $@ $(SRC_DIR)/$(notdir $@).exceptions; \
@@ -106,3 +93,19 @@ $(BUILDDIR)/cec.h.rst: ${KAPI}/cec.h ${PARSER} 
$(SRC_DIR)/cec.h.rst.exceptions
 
 $(BUILDDIR)/lirc.h.rst: ${UAPI}/lirc.h ${PARSER} 
$(SRC_DIR)/lirc.h.rst.exceptions
@$($(quiet)gen_rst)
+
+# Media build rules
+
+.PHONY: all html epub xml latex
+
+all: $(IMGDOT) $(BUILDDIR) ${TARGETS}
+html: all
+epub: all
+xml: all
+latex: $(IMGPDF) all
+
+clean:
+   -rm -f $(DOTTGT) $(IMGTGT) $(patsubst %,$(SRC_DIR)/%,${TARGETS}) 
2>/dev/null
+
+$(BUILDDIR):
+   $(Q)mkdir -p $@
-- 
2.9.3


--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 03/10] [media] docs-rst: nv12mt zigzag images: replace by SVG images

2016-11-30 Thread Mauro Carvalho Chehab
Instead of using bitmap images to show the zigzag macroblock
parsing, replace it by a SVG ones, with is scalable.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/media/Makefile|2 +
 Documentation/media/uapi/v4l/nv12mt.png |  Bin 1920 -> 0 bytes
 Documentation/media/uapi/v4l/nv12mt.svg |  450 +++
 Documentation/media/uapi/v4l/nv12mt_example.png |  Bin 5261 -> 0 bytes
 Documentation/media/uapi/v4l/nv12mt_example.svg | 1589 +++
 Documentation/media/uapi/v4l/pixfmt-nv12mt.rst  |8 +-
 6 files changed, 2045 insertions(+), 4 deletions(-)
 delete mode 100644 Documentation/media/uapi/v4l/nv12mt.png
 create mode 100644 Documentation/media/uapi/v4l/nv12mt.svg
 delete mode 100644 Documentation/media/uapi/v4l/nv12mt_example.png
 create mode 100644 Documentation/media/uapi/v4l/nv12mt_example.svg

diff --git a/Documentation/media/Makefile b/Documentation/media/Makefile
index d79afe4d27e9..ec95286e556c 100644
--- a/Documentation/media/Makefile
+++ b/Documentation/media/Makefile
@@ -17,6 +17,8 @@ IMAGES = \
uapi/v4l/crop.svg \
uapi/v4l/fieldseq_bt.svg \
uapi/v4l/fieldseq_tb.svg \
+   uapi/v4l/nv12mt.svg \
+   uapi/v4l/nv12mt_example.svg \
uapi/v4l/subdev-image-processing-full.svg \
uapi/v4l/subdev-image-processing-scaling-multi-source.svg \
uapi/v4l/subdev-image-processing-crop.svg \
diff --git a/Documentation/media/uapi/v4l/nv12mt.png 
b/Documentation/media/uapi/v4l/nv12mt.png
deleted file mode 100644
index 
41401860fb737739658c354c0cb7ca12313a0265..
GIT binary patch
literal 0
HcmV?d1

literal 1920
zcmb7EX*ApU8vfCysc20nwM-SI6L*H2RD!CDUQKUQa@5*TTZ>exLB#Tpph!EvA
ziixV}W*4MJ?ORc4Ev2=UqGR7Rh+r}?^XY!L=iK|{eSXjTyw7{y^ZW3`*;tt$L?|Nw
z00&7#f*k--ijue2{ymbqnvq#3fxTXMOFRH2NwV7>FbP+`LbS64Anb1d+=u}{Bx&84
z27rkLVAdS~qci}N{5h4jCX!`_Hs{G^VzD?qJ)O;FGZ+lXuvlCNNdQ1~VleYcFC>=)z$sU{uFl=2oNQvoz2aq_uWJy=nM~9n*^+{GtH`F(~I`t*p*<4(l
zZE5)scWX-^7=HYy(Sbb9EgsFwUHdYgaoTuedb@yoKU6|CUb#pn`O+)`Hj(47E_)
zdt#zGm{5|T!EY~l1qA%p;o*h$c0S#EzWojMFmkf0awsF+QcbnZi~2UmKgG{4-_`l9
zKcm9NGJ(nDUbMdz67s_BQX1`AVo(t8g6%U8H)AEG=6c6Toels^o3}he(!Y@X`I>z;SvV_>B7iz*I>DJUL`=fpgtu$Uwfue$wXLV_pG`
zqp2k~`duk%u@om=bvK1x!&*pXKD^ADs}-MeF1Eo}cD#oS!1mTi%;|KVZD_cu7AzEeq)7+Fh{t;b?Y~7nmJ8kRoe2qX)|9JQ%
z)%pKuy!VjhcT6b66gIBj%Fm%GsG8%V2zBL)1g0hnee~iJon>D9!(#d`TzS*V4y-8P
zfdSr;+N9`LP+B?;B@fx9+ikQ`q|_V+xZO`Dt=<-1YqcBP?hjCW#z4-
zFQNSO`dP2C@`?ulI$3kG!Q0+6cdiM!)*1W*jaBI}PxWx>kiQxGz%O7cm77suef>^n
zm}^92aD97sxm4{^nt(N)KRTK~5dUk8*)=Ehs>a?$_Lz)PWtVXWmeO)*
z_Muw@Mp<~19XifrtxhKmnr!V^G7x7LkagEhi$uCLp9L`q2{P#G4fRuN>A9W@S)<6l

[PATCH v6 6/9] dt-bindings: i2c: i2c-mux-simple: document i2c-mux-simple bindings

2016-11-30 Thread Peter Rosin
Signed-off-by: Peter Rosin 
---
 .../devicetree/bindings/i2c/i2c-mux-simple.txt | 81 ++
 1 file changed, 81 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/i2c/i2c-mux-simple.txt

diff --git a/Documentation/devicetree/bindings/i2c/i2c-mux-simple.txt 
b/Documentation/devicetree/bindings/i2c/i2c-mux-simple.txt
new file mode 100644
index ..d32ebc9c5639
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/i2c-mux-simple.txt
@@ -0,0 +1,81 @@
+Simple I2C Bus Mux
+
+This binding describes an I2C bus multiplexer that uses a mux controller
+from the mux subsystem to route the I2C signals.
+
+  .-.  .-.
+  | dev |  | dev |
+..'-'  '-'
+| SoC|   ||
+||  .+'
+|   .--. |  .--+child bus A, on MUX value set to 0
+|   | I2C  |-|--| Mux  |
+|   '--' |  '--+---+child bus B, on MUX value set to 1
+|   .--. | |'--++.
+|   | MUX- | | |   |||
+|   | Ctrl |-|-+.-.  .-.  .-.
+|   '--' |  | dev |  | dev |  | dev |
+''  '-'  '-'  '-'
+
+Required properties:
+- compatible: i2c-mux-simple,mux-locked or i2c-mux-simple,parent-locked
+- i2c-parent: The phandle of the I2C bus that this multiplexer's master-side
+  port is connected to.
+- mux-controls: The phandle of the mux controller to use for operating the
+  mux.
+* Standard I2C mux properties. See i2c-mux.txt in this directory.
+* I2C child bus nodes. See i2c-mux.txt in this directory. The sub-bus number
+  is also the mux-controller state described in ../misc/mux-controller.txt
+
+For each i2c child node, an I2C child bus will be created. They will
+be numbered based on their order in the device tree.
+
+Whenever an access is made to a device on a child bus, the value set
+in the relevant node's reg property will be set as the state in the
+mux controller.
+
+Example:
+   mux: mux-controller {
+   compatible = "mux-gpio";
+   #mux-control-cells = <0>;
+
+   mux-gpios = < 0 GPIO_ACTIVE_HIGH>,
+   < 1 GPIO_ACTIVE_HIGH>;
+   };
+
+   i2c-mux {
+   compatible = "i2c-mux-simple,mux-locked";
+   i2c-parent = <>;
+
+   mux-controls = <>;
+
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   i2c@1 {
+   reg = <1>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   ssd1307: oled@3c {
+   compatible = "solomon,ssd1307fb-i2c";
+   reg = <0x3c>;
+   pwms = < 4 3000>;
+   reset-gpios = < 7 1>;
+   reset-active-low;
+   };
+   };
+
+   i2c@3 {
+   reg = <3>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   pca9555: pca9555@20 {
+   compatible = "nxp,pca9555";
+   gpio-controller;
+   #gpio-cells = <2>;
+   reg = <0x20>;
+   };
+   };
+   };
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v6 5/9] iio: multiplexer: new iio category and iio-mux driver

2016-11-30 Thread Peter Rosin
When a multiplexer changes how an iio device behaves (for example
by feeding different signals to an ADC), this driver can be used
to create one virtual iio channel for each multiplexer state.

Depends on the generic multiplexer subsystem.

Cache any ext_info values from the parent iio channel, creating a private
copy of the ext_info attributes for each multiplexer state/channel.

Signed-off-by: Peter Rosin 
---
 MAINTAINERS   |   1 +
 drivers/iio/Kconfig   |   1 +
 drivers/iio/Makefile  |   1 +
 drivers/iio/multiplexer/Kconfig   |  18 ++
 drivers/iio/multiplexer/Makefile  |   6 +
 drivers/iio/multiplexer/iio-mux.c | 456 ++
 6 files changed, 483 insertions(+)
 create mode 100644 drivers/iio/multiplexer/Kconfig
 create mode 100644 drivers/iio/multiplexer/Makefile
 create mode 100644 drivers/iio/multiplexer/iio-mux.c

diff --git a/MAINTAINERS b/MAINTAINERS
index 77045ae15865..16490fbd1721 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -6239,6 +6239,7 @@ M:Peter Rosin 
 L: linux-...@vger.kernel.org
 S: Maintained
 F: Documentation/devicetree/bindings/iio/multiplexer/iio-mux.txt
+F: drivers/iio/multiplexer/iio-mux.c
 
 IIO SUBSYSTEM AND DRIVERS
 M: Jonathan Cameron 
diff --git a/drivers/iio/Kconfig b/drivers/iio/Kconfig
index a918270d6f54..b3c8c6ef0dff 100644
--- a/drivers/iio/Kconfig
+++ b/drivers/iio/Kconfig
@@ -83,6 +83,7 @@ source "drivers/iio/humidity/Kconfig"
 source "drivers/iio/imu/Kconfig"
 source "drivers/iio/light/Kconfig"
 source "drivers/iio/magnetometer/Kconfig"
+source "drivers/iio/multiplexer/Kconfig"
 source "drivers/iio/orientation/Kconfig"
 if IIO_TRIGGER
source "drivers/iio/trigger/Kconfig"
diff --git a/drivers/iio/Makefile b/drivers/iio/Makefile
index 33fa4026f92c..93c769cd99bf 100644
--- a/drivers/iio/Makefile
+++ b/drivers/iio/Makefile
@@ -28,6 +28,7 @@ obj-y += humidity/
 obj-y += imu/
 obj-y += light/
 obj-y += magnetometer/
+obj-y += multiplexer/
 obj-y += orientation/
 obj-y += potentiometer/
 obj-y += potentiostat/
diff --git a/drivers/iio/multiplexer/Kconfig b/drivers/iio/multiplexer/Kconfig
new file mode 100644
index ..70a044510686
--- /dev/null
+++ b/drivers/iio/multiplexer/Kconfig
@@ -0,0 +1,18 @@
+#
+# Multiplexer drivers
+#
+# When adding new entries keep the list in alphabetical order
+
+menu "Multiplexers"
+
+config IIO_MUX
+   tristate "IIO multiplexer driver"
+   select MULTIPLEXER
+   depends on OF
+   help
+ Say yes here to build support for the IIO multiplexer.
+
+ To compile this driver as a module, choose M here: the
+ module will be called iio-mux.
+
+endmenu
diff --git a/drivers/iio/multiplexer/Makefile b/drivers/iio/multiplexer/Makefile
new file mode 100644
index ..68be3c4abd07
--- /dev/null
+++ b/drivers/iio/multiplexer/Makefile
@@ -0,0 +1,6 @@
+#
+# Makefile for industrial I/O multiplexer drivers
+#
+
+# When adding new entries keep the list in alphabetical order
+obj-$(CONFIG_IIO_MUX) += iio-mux.o
diff --git a/drivers/iio/multiplexer/iio-mux.c 
b/drivers/iio/multiplexer/iio-mux.c
new file mode 100644
index ..92dfee2dfed1
--- /dev/null
+++ b/drivers/iio/multiplexer/iio-mux.c
@@ -0,0 +1,456 @@
+/*
+ * IIO multiplexer driver
+ *
+ * Copyright (C) 2016 Axentia Technologies AB
+ *
+ * Author: Peter Rosin 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+struct mux_ext_info_cache {
+   char *data;
+   size_t size;
+};
+
+struct mux_child {
+   struct mux_ext_info_cache *ext_info_cache;
+};
+
+struct mux {
+   int cached_state;
+   struct mux_control *control;
+   struct iio_channel *parent;
+   struct iio_dev *indio_dev;
+   struct iio_chan_spec *chan;
+   struct iio_chan_spec_ext_info *ext_info;
+   struct mux_child *child;
+};
+
+static int iio_mux_select(struct mux *mux, int idx)
+{
+   struct mux_child *child = >child[idx];
+   struct iio_chan_spec const *chan = >chan[idx];
+   int ret;
+   int i;
+
+   ret = mux_control_select(mux->control, chan->channel);
+   if (ret < 0) {
+   mux->cached_state = -1;
+   return ret;
+   }
+
+   if (mux->cached_state == chan->channel)
+   return 0;
+
+   if (chan->ext_info) {
+   for (i = 0; chan->ext_info[i].name; ++i) {
+   const char *attr = chan->ext_info[i].name;
+   struct mux_ext_info_cache *cache;
+
+   cache = >ext_info_cache[i];
+
+   if (cache->size < 0)
+   continue;
+
+   ret = 

[PATCH v6 8/9] dt-bindings: mux-adg792a: document devicetree bindings for ADG792A/G mux

2016-11-30 Thread Peter Rosin
Analog Devices ADG792A/G is a triple 4:1 mux.

Signed-off-by: Peter Rosin 
---
 .../devicetree/bindings/misc/mux-adg792a.txt   | 64 ++
 1 file changed, 64 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/misc/mux-adg792a.txt

diff --git a/Documentation/devicetree/bindings/misc/mux-adg792a.txt 
b/Documentation/devicetree/bindings/misc/mux-adg792a.txt
new file mode 100644
index ..4677f9ab1c55
--- /dev/null
+++ b/Documentation/devicetree/bindings/misc/mux-adg792a.txt
@@ -0,0 +1,64 @@
+Bindings for Analog Devices ADG792A/G Triple 4:1 Multiplexers
+
+Required properties:
+- compatible : "adi,adg792a" or "adi,adg792g"
+- #mux-control-cells : <0> if parallel, or <1> if not.
+* Standard mux-controller bindings as decribed in mux-controller.txt
+
+Optional properties:
+- adi,parallel : if present, the three muxes are bound together with a single
+  mux controller, controlling all three muxes in parallel.
+- adi,idle-state : if present, array of states the three mux controllers will
+  have when idle (or, if parallel, a single idle-state).
+
+Mux controller states 0 through 3 correspond to signals A through D in the
+datasheet. Mux controller states 4 and 5 are only available as possible idle
+states. State 4 represents that nothing is connected, and state 5 represents
+that the mux controller keeps the mux in its previously selected state during
+the idle period. State 5 is the default idle state.
+
+Example:
+
+   /* three independent mux controllers (of which one is used) */
+{
+   mux: adg792a@50 {
+   compatible = "adi,adg792a";
+   reg = <0x50>;
+   #mux-control-cells = <1>;
+   };
+   };
+
+   adc-mux {
+   compatible = "iio-mux";
+   io-channels = < 0>;
+   io-channel-names = "parent";
+
+   mux-controls = < 1>;
+
+   channels = "sync-1", "", "out";
+   };
+
+
+   /*
+* Three parallel muxes with one mux controller, useful e.g. if
+* the adc is differential, thus needing two signals to be muxed
+* simultaneously for correct operation.
+*/
+{
+   pmux: adg792a@50 {
+   compatible = "adi,adg792a";
+   reg = <0x50>;
+   #mux-control-cells = <0>;
+   adi,parallel;
+   };
+   };
+
+   diff-adc-mux {
+   compatible = "iio-mux";
+   io-channels = < 0>;
+   io-channel-names = "parent";
+
+   mux-controls = <>;
+
+   channels = "sync-1", "", "out";
+   };
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/3] ARM: dts: sunxi: enable SDIO Wi-Fi on Orange Pi Zero

2016-11-30 Thread Andre Przywara
Hi,

On 29/11/16 10:19, Icenowy Zheng wrote:
> 
> 2016年11月29日 15:16于 Alexey Kardashevskiy 写道:
>>
>>
>>
>> On Wed, Nov 23, 2016 at 6:59 PM, Maxime Ripard
>  wrote:
>>>
>>> Hi,
>>>
>>> On Tue, Nov 22, 2016 at 12:24:21AM +0800, Icenowy Zheng wrote:
>>> > There's a Allwinner's XR819 SDIO Wi-Fi module soldered on the board of
>>> > Orange Pi Zero, which used a dedicated regulator to power.
>>> >
>>> > Add the device tree node of the regulator, the enable gpio (with
>>> > mmc-pwrseq) and the sdio controller.
>>> >
>>> > There's a out-of-tree driver tested to work with this device tree.
>>
>>
>> btw could you please give a pointer where to find a XR819 driver for
> relatively recent kernel (4.8 may be, just not 3.4)? Thanks.
> 
> https://github.com/Icenowy/xradio

I was just curious, so pulled your tree and tried to just compile it. It
still threw warnings at me for ARM, and even more so for arm64.
I fixed all of them and put that on my github[1]. Feel free to just pick
them from there or wait till I manage to clean them up and send you a
pull request.
And also just a a test, I quickly put it in drivers/net/wireless/xradio,
where it compiled fine after registering it with the upper level Kconfig
and Makefile.

And while looking at it: This looks like typical AW code, not even
remotely upstreameable and probably far too complicated. Enabling some
Kconfig options made it complain about missing functions.
Has anyone checked if this is close to an existing WiFi chip? That
wouldn't be a first ;-)

Cheers,
Andre.

[1] https://github.com/apritzel/xradio/commits/quickfixes
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v6 4/9] dt-bindings: iio: iio-mux: document iio-mux bindings

2016-11-30 Thread Peter Rosin
On 2016-11-30 09:52, Peter Rosin wrote:
> I'm holding off v7 pending more important changes.

Err, crap. That was ambiguous. I do not know of any important
changes to make, but please review so that important changes
can be discovered!

Cheers,
Peter

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html