mfd: arizona: Move useful defines into a dt-binding include
Subsystems (5)
PATCH v2 1/1 mfd: arizona: Move useful defines into a dt-binding include
Move parts of linux/mfd/arizona/pdata.h and gpio.h into a new file in the dt-binding directory for use by device tree bindings. This also makes gpio.h redundant so remove it in the process.
Acked-by Mark Brown <[email protected]>
---
Changes since v1:
- Removed some defines that will never be used in DT from the dt-binding include
- Added some convience defines for the most common pin configs (input/output/default)
- Updated the binding documentation to use the new defines to give some context to their usage
Thanks,
Charles
Documentation/devicetree/bindings/mfd/arizona.txt | 20 ++-- include/dt-bindings/mfd/arizona.h | 93 ++++++++++++++++++++ include/linux/mfd/arizona/gpio.h | 96 --------------------- include/linux/mfd/arizona/pdata.h | 22 +----- sound/soc/codecs/arizona.c | 1 - 5 files changed, 105 insertions(+), 127 deletions(-) create mode 100644 include/dt-bindings/mfd/arizona.h delete mode 100644 include/linux/mfd/arizona/gpio.h
Documentation/devicetree/bindings/mfd/arizona.txt +10 -10
@@ -36,11 +36,11 @@ Optional properties: - wlf,reset : GPIO specifier for the GPIO controlling /RESET - wlf,ldoena : GPIO specifier for the GPIO controlling LDOENA - - wlf,gpio-defaults : A list of GPIO configuration register values. If - absent, no configuration of these registers is performed. If any - entry has a value that is out of range for a 16 bit register then - the chip default will be used. If present exactly five values must - be specified. + - wlf,gpio-defaults : A list of GPIO configuration register values. Defines + for the appropriate values can found in <dt-bindings/mfd/arizona.txt>. If + absent, no configuration of these registers is performed. If any entry has + a value that is out of range for a 16 bit register then the chip default + will be used. If present exactly five values must be specified. - wlf,inmode : A list of INn_MODE register values, where n is the number of input signals. Valid values are 0 (Differential), 1 (Single-ended) and
@@ -73,10 +73,10 @@ codec: wm5102@1a { #gpio-cells = <2>; wlf,gpio-defaults = < - 0x00000000 /* AIF1TXLRCLK */ - 0xffffffff - 0xffffffff - 0xffffffff - 0xffffffff + ARIZONA_GP_FN_TXLRCLK + ARIZONA_GP_DEFAULT + ARIZONA_GP_DEFAULT + ARIZONA_GP_DEFAULT + ARIZONA_GP_DEFAULT >; };
include/dt-bindings/mfd/arizona.h new file +93 -0
93 lines not on this page · raw message
include/linux/mfd/arizona/gpio.h deleted +0 -96
96 lines not on this page · raw message
include/linux/mfd/arizona/pdata.h +2 -20
@@ -11,31 +11,26 @@#ifndef _ARIZONA_PDATA_H#define _ARIZONA_PDATA_H -#define ARIZONA_GPN_DIR 0x8000/* GPN_DIR */ +#include <dt-bindings/mfd/arizona.h> +#define ARIZONA_GPN_DIR_MASK 0x8000/* GPN_DIR */ #define ARIZONA_GPN_DIR_SHIFT 15/* GPN_DIR */ #define ARIZONA_GPN_DIR_WIDTH 1/* GPN_DIR */ -#define ARIZONA_GPN_PU 0x4000/* GPN_PU */ #define ARIZONA_GPN_PU_MASK 0x4000/* GPN_PU */ #define ARIZONA_GPN_PU_SHIFT 14/* GPN_PU */ #define ARIZONA_GPN_PU_WIDTH 1/* GPN_PU */ -#define ARIZONA_GPN_PD 0x2000/* GPN_PD */ #define ARIZONA_GPN_PD_MASK 0x2000/* GPN_PD */ #define ARIZONA_GPN_PD_SHIFT 13/* GPN_PD */ #define ARIZONA_GPN_PD_WIDTH 1/* GPN_PD */ -#define ARIZONA_GPN_LVL 0x0800/* GPN_LVL */ #define ARIZONA_GPN_LVL_MASK 0x0800/* GPN_LVL */ #define ARIZONA_GPN_LVL_SHIFT 11/* GPN_LVL */ #define ARIZONA_GPN_LVL_WIDTH 1/* GPN_LVL */ -#define ARIZONA_GPN_POL 0x0400/* GPN_POL */ #define ARIZONA_GPN_POL_MASK 0x0400/* GPN_POL */ #define ARIZONA_GPN_POL_SHIFT 10/* GPN_POL */ #define ARIZONA_GPN_POL_WIDTH 1/* GPN_POL */ -#define ARIZONA_GPN_OP_CFG 0x0200/* GPN_OP_CFG */ #define ARIZONA_GPN_OP_CFG_MASK 0x0200/* GPN_OP_CFG */ #define ARIZONA_GPN_OP_CFG_SHIFT 9/* GPN_OP_CFG */ #define ARIZONA_GPN_OP_CFG_WIDTH 1/* GPN_OP_CFG */ -#define ARIZONA_GPN_DB 0x0100/* GPN_DB */ #define ARIZONA_GPN_DB_MASK 0x0100/* GPN_DB */ #define ARIZONA_GPN_DB_SHIFT 8/* GPN_DB */ #define ARIZONA_GPN_DB_WIDTH 1/* GPN_DB */
@@ -45,23 +40,10 @@#define ARIZONA_MAX_GPIO 5 -#define ARIZONA_32KZ_MCLK1 1 -#define ARIZONA_32KZ_MCLK2 2 -#define ARIZONA_32KZ_NONE 3 -#define ARIZONA_MAX_INPUT 4 -#define ARIZONA_DMIC_MICVDD 0 -#define ARIZONA_DMIC_MICBIAS1 1 -#define ARIZONA_DMIC_MICBIAS2 2 -#define ARIZONA_DMIC_MICBIAS3 3 -#define ARIZONA_MAX_MICBIAS 3 -#define ARIZONA_INMODE_DIFF 0 -#define ARIZONA_INMODE_SE 1 -#define ARIZONA_INMODE_DMIC 2 -#define ARIZONA_MAX_OUTPUT 6#define ARIZONA_MAX_AIF 3
sound/soc/codecs/arizona.c +0 -1
@@ -19,7 +19,6 @@#include <sound/tlv.h> #include <linux/mfd/arizona/core.h> -#include <linux/mfd/arizona/gpio.h> #include <linux/mfd/arizona/registers.h> #include "arizona.h"
Signature · 6 lines
1.7.2.5 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html