Re: [PATCH v3 5/6] ARM: pinctrl: Add Broadcom Capri pinctrl driver

2013-12-20 Thread Sherman Yin
On 13-12-18 03:56 PM, Sherman Yin wrote: On 13-12-12 12:54 PM, Linus Walleij wrote: +/* + * Write to the register using the value and mask if current value is different + */ +static void capri_reg_write(struct pinctrl_dev *pctldev, + void __iomem *reg, +

Re: [PATCH v3 5/6] ARM: pinctrl: Add Broadcom Capri pinctrl driver

2013-12-18 Thread Sherman Yin
On 13-12-13 02:22 AM, Mark Brown wrote: On Thu, Dec 12, 2013 at 09:54:50PM +0100, Linus Walleij wrote: This is a reimplementation of regmap for MMIO. See drivers/base/regmap/regmap-mmio.c Notice how regmap_update_bits() is used throughout the kernel. If you want to do this, use regmap. Or

Re: [PATCH v3 5/6] ARM: pinctrl: Add Broadcom Capri pinctrl driver

2013-12-18 Thread Sherman Yin
On 13-12-12 12:54 PM, Linus Walleij wrote: +#define CAPRI_PIN_SHIFT(type, param) \ + (CAPRI_ ## type ## _PIN_REG_ ## param ## _SHIFT) + +#define CAPRI_PIN_MASK(type, param) \ + (CAPRI_ ## type ## _PIN_REG_ ## param ## _MASK) + +/* Macro to update reg with new pin config param */ +#def

Re: [PATCH v3 5/6] ARM: pinctrl: Add Broadcom Capri pinctrl driver

2013-12-13 Thread Mark Brown
On Thu, Dec 12, 2013 at 09:54:50PM +0100, Linus Walleij wrote: > This is a reimplementation of regmap for MMIO. > See drivers/base/regmap/regmap-mmio.c > Notice how regmap_update_bits() is used throughout the > kernel. > If you want to do this, use regmap. Or if this is very performance sensitiv

Re: [PATCH v3 5/6] ARM: pinctrl: Add Broadcom Capri pinctrl driver

2013-12-12 Thread Linus Walleij
On Wed, Dec 11, 2013 at 7:37 PM, Sherman Yin wrote: > Adds pinctrl driver for Broadcom Capri (BCM281xx) SoCs. > > Signed-off-by: Sherman Yin > Reviewed-by: Christian Daudt > Reviewed-by: Matt Porter > --- > v3: Re-work driver to be based on generic pin config. Moved config selection > from

[PATCH v3 5/6] ARM: pinctrl: Add Broadcom Capri pinctrl driver

2013-12-11 Thread Sherman Yin
Adds pinctrl driver for Broadcom Capri (BCM281xx) SoCs. Signed-off-by: Sherman Yin Reviewed-by: Christian Daudt Reviewed-by: Matt Porter --- v3: Re-work driver to be based on generic pin config. Moved config selection from Kconfig to bcm_defconfig. v2: Use hyphens instead of underscore in D