diff options
author | Tomasz Figa <tomasz.figa@gmail.com> | 2013-03-18 22:31:53 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-04-09 09:42:25 +0200 |
commit | 43fc9e7fab903ea3c525c693c5e9bf566d521380 (patch) | |
tree | 26f7d9ccb1e1ee260981e6382a9a6f772601b57a /drivers/pinctrl/pinctrl-samsung.h | |
parent | 499147c9dbceee27c63bf8e6b604aca1737e9e0c (diff) | |
download | op-kernel-dev-43fc9e7fab903ea3c525c693c5e9bf566d521380.zip op-kernel-dev-43fc9e7fab903ea3c525c693c5e9bf566d521380.tar.gz |
pinctrl: samsung: Remove hardcoded register offsets
This patch replaces statically hardcoded register offsets of Exynos SoCs
with an array of register offsets in samsung_pin_bank_type struct.
Thanks to this change, support for SoCs with other set and order of
registers can be added (e.g. S3C24xx and S3C64xx).
Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-samsung.h')
-rw-r--r-- | drivers/pinctrl/pinctrl-samsung.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/pinctrl/pinctrl-samsung.h b/drivers/pinctrl/pinctrl-samsung.h index 1c590f7..9efeee8 100644 --- a/drivers/pinctrl/pinctrl-samsung.h +++ b/drivers/pinctrl/pinctrl-samsung.h @@ -25,13 +25,6 @@ #include <linux/gpio.h> -/* register offsets within a pin bank */ -#define DAT_REG 0x4 -#define PUD_REG 0x8 -#define DRV_REG 0xC -#define CONPDN_REG 0x10 -#define PUDPDN_REG 0x14 - /* pinmux function number for pin as gpio output line */ #define FUNC_OUTPUT 0x1 @@ -111,9 +104,11 @@ struct samsung_pinctrl_drv_data; /** * struct samsung_pin_bank_type: pin bank type description * @fld_width: widths of configuration bitfields (0 if unavailable) + * @reg_offset: offsets of configuration registers (don't care of width is 0) */ struct samsung_pin_bank_type { u8 fld_width[PINCFG_TYPE_NUM]; + u8 reg_offset[PINCFG_TYPE_NUM]; }; /** |