From: Dmitry Torokhov <dtor@google.com> To: Ray Jui <rjui@broadcom.com> Cc: Linus Walleij <linus.walleij@linaro.org>, Alexandre Courbot <gnurou@gmail.com>, Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>, Mark Rutland <mark.rutland@arm.com>, Ian Campbell <ijc+devicetree@hellion.org.uk>, Kumar Gala <galak@codeaurora.org>, Grant Likely <grant.likely@linaro.org>, Christian Daudt <bcm@fixthebug.org>, Matt Porter <mporter@linaro.org>, Florian Fainelli <f.fainelli@gmail.com>, Russell King <linux@arm.linux.org.uk>, Joe Perches <joe@perches.com>, Arnd Bergmann <arnd@arndb.de>, Scott Branden <sbranden@broadcom.com>, Anatol Pomazau <anatol@google.com>, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, devicetree@vger.kernel.org Subject: Re: [PATCH v7 2/4] pinctrl: cygnus: add gpio/pinconf driver Date: Tue, 3 Feb 2015 17:41:52 -0800 [thread overview] Message-ID: <20150204014152.GD15969@dtor-ws> (raw) In-Reply-To: <1423012148-22560-3-git-send-email-rjui@broadcom.com> On Tue, Feb 03, 2015 at 05:09:06PM -0800, Ray Jui wrote: > This adds the initial support of the Broadcom Cygnus GPIO/PINCONF driver > that supports all 3 GPIO controllers on Cygnus including the ASIU GPIO > controller, the chipCommonG GPIO controller, and the always-on GPIO > controller. Basic PINCONF configurations such as bias pull up/down, and > drive strength are also supported in this driver. > > Pins from the ASIU GPIO controller can be individually muxed to GPIO > function, through interaction with the Cygnus IOMUX controller > > Signed-off-by: Ray Jui <rjui@broadcom.com> > Reviewed-by: Scott Branden <sbranden@broadcom.com> > --- > drivers/pinctrl/bcm/Kconfig | 22 + > drivers/pinctrl/bcm/Makefile | 1 + > drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c | 920 +++++++++++++++++++++++++++++ > 3 files changed, 943 insertions(+) > create mode 100644 drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c > > diff --git a/drivers/pinctrl/bcm/Kconfig b/drivers/pinctrl/bcm/Kconfig > index eb13201..cd11d4d 100644 > --- a/drivers/pinctrl/bcm/Kconfig > +++ b/drivers/pinctrl/bcm/Kconfig > @@ -20,6 +20,28 @@ config PINCTRL_BCM2835 > select PINMUX > select PINCONF > > +config PINCTRL_CYGNUS_GPIO > + bool "Broadcom Cygnus GPIO (with PINCONF) driver" > + depends on OF_GPIO && ARCH_BCM_CYGNUS > + select GPIOLIB_IRQCHIP > + select PINCONF > + select GENERIC_PINCONF > + default ARCH_BCM_CYGNUS > + help > + Say yes here to enable the Broadcom Cygnus GPIO driver. > + > + The Broadcom Cygnus SoC has 3 GPIO controllers including the ASIU > + GPIO controller (ASIU), the chipCommonG GPIO controller (CCM), and > + the always-ON GPIO controller (CRMU/AON). All 3 GPIO controllers are > + supported by this driver. > + > + All 3 Cygnus GPIO controllers support basic PINCONF functions such > + as bias pull up, pull down, and drive strength configurations, when > + these pins are muxed to GPIO. > + > + Pins from the ASIU GPIO can be individually muxed to GPIO function, > + through interaction with the Cygnus IOMUX controller. > + > config PINCTRL_CYGNUS_MUX > bool "Broadcom Cygnus IOMUX driver" > depends on (ARCH_BCM_CYGNUS || COMPILE_TEST) > diff --git a/drivers/pinctrl/bcm/Makefile b/drivers/pinctrl/bcm/Makefile > index bb6beb6..2b2f70e 100644 > --- a/drivers/pinctrl/bcm/Makefile > +++ b/drivers/pinctrl/bcm/Makefile > @@ -2,4 +2,5 @@ > > obj-$(CONFIG_PINCTRL_BCM281XX) += pinctrl-bcm281xx.o > obj-$(CONFIG_PINCTRL_BCM2835) += pinctrl-bcm2835.o > +obj-$(CONFIG_PINCTRL_CYGNUS_GPIO) += pinctrl-cygnus-gpio.o > obj-$(CONFIG_PINCTRL_CYGNUS_MUX) += pinctrl-cygnus-mux.o > diff --git a/drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c b/drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c > new file mode 100644 > index 0000000..cfe4478 > --- /dev/null > +++ b/drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c > @@ -0,0 +1,920 @@ > +/* > + * Copyright (C) 2014-2015 Broadcom Corporation > + * > + * 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 version 2. > + * > + * This program is distributed "as is" WITHOUT ANY WARRANTY of any > + * kind, whether express or implied; without even the implied warranty > + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + * This file contains the Broadcom Cygnus GPIO driver that supports 3 > + * GPIO controllers on Cygnus including the ASIU GPIO controller, the > + * chipCommonG GPIO controller, and the always-on GPIO controller. Basic > + * PINCONF such as bias pull up/down, and drive strength are also supported > + * in this driver. > + * > + * Pins from the ASIU GPIO can be individually muxed to GPIO function, > + * through the interaction with the Cygnus IOMUX controller > + */ > + > +#include <linux/kernel.h> > +#include <linux/slab.h> > +#include <linux/module.h> > +#include <linux/interrupt.h> > +#include <linux/io.h> > +#include <linux/gpio.h> > +#include <linux/ioport.h> > +#include <linux/of_device.h> > +#include <linux/of_irq.h> > +#include <linux/pinctrl/pinctrl.h> > +#include <linux/pinctrl/pinmux.h> > +#include <linux/pinctrl/pinconf.h> > +#include <linux/pinctrl/pinconf-generic.h> > + > +#include "../pinctrl-utils.h" > + > +#define CYGNUS_GPIO_DATA_IN_OFFSET 0x00 > +#define CYGNUS_GPIO_DATA_OUT_OFFSET 0x04 > +#define CYGNUS_GPIO_OUT_EN_OFFSET 0x08 > +#define CYGNUS_GPIO_IN_TYPE_OFFSET 0x0c > +#define CYGNUS_GPIO_INT_DE_OFFSET 0x10 > +#define CYGNUS_GPIO_INT_EDGE_OFFSET 0x14 > +#define CYGNUS_GPIO_INT_MSK_OFFSET 0x18 > +#define CYGNUS_GPIO_INT_STAT_OFFSET 0x1c > +#define CYGNUS_GPIO_INT_MSTAT_OFFSET 0x20 > +#define CYGNUS_GPIO_INT_CLR_OFFSET 0x24 > +#define CYGNUS_GPIO_PAD_RES_OFFSET 0x34 > +#define CYGNUS_GPIO_RES_EN_OFFSET 0x38 > + > +/* drive strength control for ASIU GPIO */ > +#define CYGNUS_GPIO_ASIU_DRV0_CTRL_OFFSET 0x58 > + > +/* drive strength control for CCM/CRMU (AON) GPIO */ > +#define CYGNUS_GPIO_DRV0_CTRL_OFFSET 0x00 > + > +#define GPIO_BANK_SIZE 0x200 > +#define NGPIOS_PER_BANK 32 > +#define GPIO_BANK(pin) ((pin) / NGPIOS_PER_BANK) > + > +#define CYGNUS_GPIO_REG(pin, reg) (GPIO_BANK(pin) * GPIO_BANK_SIZE + (reg)) > +#define CYGNUS_GPIO_SHIFT(pin) ((pin) % NGPIOS_PER_BANK) > + > +#define GPIO_DRV_STRENGTH_BIT_SHIFT 20 > +#define GPIO_DRV_STRENGTH_BITS 3 > +#define GPIO_DRV_STRENGTH_BIT_MASK ((1 << GPIO_DRV_STRENGTH_BITS) - 1) > + > +/* > + * Cygnus GPIO core > + * > + * @dev: pointer to device > + * @base: I/O register base for Cygnus GPIO controller > + * @io_ctrl: I/O register base for certain type of Cygnus GPIO controller that > + * has the PINCONF support implemented outside of the GPIO block > + * @lock: lock to protect access to I/O registers > + * @gc: GPIO chip > + * @num_banks: number of GPIO banks, each bank supports up to 32 GPIOs > + * @pinmux_is_supported: flag to indicate this GPIO controller contains pins > + * that can be individually muxed to GPIO > + * @pctl: pointer to pinctrl_dev > + * @pctldesc: pinctrl descriptor > + * @pins: pointer to array of pins > + */ > +struct cygnus_gpio { > + struct device *dev; > + > + void __iomem *base; > + void __iomem *io_ctrl; > + > + spinlock_t lock; > + > + struct gpio_chip gc; > + unsigned num_banks; > + > + int pinmux_is_supported; bool? > + > + struct pinctrl_dev *pctl; > + struct pinctrl_desc pctldesc; > + struct pinctrl_pin_desc *pins; > +}; > + > +static struct cygnus_gpio *to_cygnus_gpio(struct gpio_chip *gc) > +{ > + return container_of(gc, struct cygnus_gpio, gc); > +} > + > +/* > + * Mapping from PINCONF pins to GPIO pins is 1-to-1 > + */ > +static unsigned cygnus_pin_to_gpio(unsigned pin) > +{ > + return pin; > +} > + > +static u32 cygnus_readl(struct cygnus_gpio *chip, unsigned int offset) > +{ > + return readl(chip->base + offset); > +} > + > +static void cygnus_writel(struct cygnus_gpio *chip, unsigned int offset, > + u32 val) > +{ > + writel(val, chip->base + offset); > +} > + > +/** > + * cygnus_set_bit - set or clear one bit (corresponding to the GPIO pin) in a > + * Cygnus GPIO register > + * > + * @cygnus_gpio: Cygnus GPIO device > + * @reg: register offset > + * @gpio: GPIO pin > + * @set: set or clear. 1 - set; 0 -clear > + */ > +static void cygnus_set_bit(struct cygnus_gpio *chip, unsigned int reg, > + unsigned gpio, int set) > +{ > + unsigned int offset = CYGNUS_GPIO_REG(gpio, reg); > + unsigned int shift = CYGNUS_GPIO_SHIFT(gpio); > + u32 val; > + > + val = cygnus_readl(chip, offset); > + if (set) > + val |= BIT(shift); > + else > + val &= ~BIT(shift); > + cygnus_writel(chip, offset, val); > +} > + > +static int cygnus_get_bit(struct cygnus_gpio *chip, unsigned int reg, > + unsigned gpio) > +{ > + unsigned int offset = CYGNUS_GPIO_REG(gpio, reg); > + unsigned int shift = CYGNUS_GPIO_SHIFT(gpio); > + u32 val; > + > + val = cygnus_readl(chip, offset) & BIT(shift); > + if (val) > + return 1; > + else > + return 0; > +} > + > +static void cygnus_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) > +{ > + struct gpio_chip *gc = irq_desc_get_handler_data(desc); > + struct cygnus_gpio *chip = to_cygnus_gpio(gc); > + struct irq_chip *irq_chip = irq_desc_get_chip(desc); > + int i, bit; > + > + chained_irq_enter(irq_chip, desc); > + > + /* go through the entire GPIO banks and handle all interrupts */ > + for (i = 0; i < chip->num_banks; i++) { > + unsigned long val = cygnus_readl(chip, > + (i * GPIO_BANK_SIZE) + > + CYGNUS_GPIO_INT_MSTAT_OFFSET); > + > + for_each_set_bit(bit, &val, NGPIOS_PER_BANK) { > + unsigned pin = NGPIOS_PER_BANK * i + bit; > + int child_irq = irq_find_mapping(gc->irqdomain, pin); > + > + /* > + * Clear the interrupt before invoking the > + * handler, so we do not leave any window > + */ > + cygnus_writel(chip, (i * GPIO_BANK_SIZE) + > + CYGNUS_GPIO_INT_CLR_OFFSET, BIT(bit)); > + > + generic_handle_irq(child_irq); > + } > + } > + > + chained_irq_exit(irq_chip, desc); > +} > + > + > +static void cygnus_gpio_irq_ack(struct irq_data *d) > +{ > + struct gpio_chip *gc = irq_data_get_irq_chip_data(d); > + struct cygnus_gpio *chip = to_cygnus_gpio(gc); > + unsigned gpio = d->hwirq; > + unsigned int offset = CYGNUS_GPIO_REG(gpio, > + CYGNUS_GPIO_INT_CLR_OFFSET); > + unsigned int shift = CYGNUS_GPIO_SHIFT(gpio); > + u32 val = BIT(shift); > + > + cygnus_writel(chip, offset, val); > +} > + > +/** > + * cygnus_gpio_irq_set_mask - mask/unmask a GPIO interrupt > + * > + * @d: IRQ chip data > + * @mask: mask/unmask GPIO interrupt. 0 - mask (disable); 1 - unmask (enable) > + */ > +static void cygnus_gpio_irq_set_mask(struct irq_data *d, int mask) > +{ > + struct gpio_chip *gc = irq_data_get_irq_chip_data(d); > + struct cygnus_gpio *chip = to_cygnus_gpio(gc); > + unsigned gpio = d->hwirq; > + > + cygnus_set_bit(chip, CYGNUS_GPIO_INT_MSK_OFFSET, gpio, mask); > +} > + > +static void cygnus_gpio_irq_mask(struct irq_data *d) > +{ > + struct gpio_chip *gc = irq_data_get_irq_chip_data(d); > + struct cygnus_gpio *chip = to_cygnus_gpio(gc); > + unsigned long flags; > + > + spin_lock_irqsave(&chip->lock, flags); > + cygnus_gpio_irq_set_mask(d, 0); > + spin_unlock_irqrestore(&chip->lock, flags); > +} > + > +static void cygnus_gpio_irq_unmask(struct irq_data *d) > +{ > + struct gpio_chip *gc = irq_data_get_irq_chip_data(d); > + struct cygnus_gpio *chip = to_cygnus_gpio(gc); > + unsigned long flags; > + > + spin_lock_irqsave(&chip->lock, flags); > + cygnus_gpio_irq_set_mask(d, 1); > + spin_unlock_irqrestore(&chip->lock, flags); > +} > + > +static int cygnus_gpio_irq_set_type(struct irq_data *d, unsigned int type) > +{ > + struct gpio_chip *gc = irq_data_get_irq_chip_data(d); > + struct cygnus_gpio *chip = to_cygnus_gpio(gc); > + unsigned gpio = d->hwirq; > + int int_type = 0, dual_edge = 0, edge_lvl = 0; > + unsigned long flags; > + > + switch (type & IRQ_TYPE_SENSE_MASK) { > + case IRQ_TYPE_EDGE_RISING: > + edge_lvl = 1; > + break; > + > + case IRQ_TYPE_EDGE_FALLING: > + break; > + > + case IRQ_TYPE_EDGE_BOTH: > + dual_edge = 1; > + break; > + > + case IRQ_TYPE_LEVEL_HIGH: > + int_type = 1; > + edge_lvl = 1; > + break; > + > + case IRQ_TYPE_LEVEL_LOW: > + int_type = 1; > + break; > + > + default: > + dev_err(chip->dev, "invalid GPIO IRQ type 0x%x\n", > + type); > + return -EINVAL; > + } > + > + spin_lock_irqsave(&chip->lock, flags); > + cygnus_set_bit(chip, CYGNUS_GPIO_IN_TYPE_OFFSET, gpio, int_type); > + cygnus_set_bit(chip, CYGNUS_GPIO_INT_DE_OFFSET, gpio, dual_edge); > + cygnus_set_bit(chip, CYGNUS_GPIO_INT_EDGE_OFFSET, gpio, > + edge_lvl); > + spin_unlock_irqrestore(&chip->lock, flags); > + > + dev_dbg(chip->dev, > + "gpio:%u set int_type:%d dual_edge:%d edge_lvl:%d\n", > + gpio, int_type, dual_edge, edge_lvl); > + > + return 0; > +} > + > +static struct irq_chip cygnus_gpio_irq_chip = { > + .name = "bcm-cygnus-gpio", > + .irq_ack = cygnus_gpio_irq_ack, > + .irq_mask = cygnus_gpio_irq_mask, > + .irq_unmask = cygnus_gpio_irq_unmask, > + .irq_set_type = cygnus_gpio_irq_set_type, > +}; > + > +/* > + * Request the Cygnus IOMUX pinmux controller to mux individual pins to GPIO > + */ > +static int cygnus_gpio_request(struct gpio_chip *gc, unsigned offset) > +{ > + struct cygnus_gpio *chip = to_cygnus_gpio(gc); > + unsigned gpio = gc->base + offset; > + > + /* not all Cygnus GPIO pins can be muxed individually */ > + if (!chip->pinmux_is_supported) > + return 0; > + > + return pinctrl_request_gpio(gpio); > +} > + > +static void cygnus_gpio_free(struct gpio_chip *gc, unsigned offset) > +{ > + struct cygnus_gpio *chip = to_cygnus_gpio(gc); > + unsigned gpio = gc->base + offset; > + > + if (!chip->pinmux_is_supported) > + return; > + > + pinctrl_free_gpio(gpio); > +} > + > +static int cygnus_gpio_direction_input(struct gpio_chip *gc, unsigned gpio) > +{ > + struct cygnus_gpio *chip = to_cygnus_gpio(gc); > + unsigned long flags; > + > + spin_lock_irqsave(&chip->lock, flags); > + cygnus_set_bit(chip, CYGNUS_GPIO_OUT_EN_OFFSET, gpio, 0); > + spin_unlock_irqrestore(&chip->lock, flags); > + > + dev_dbg(chip->dev, "gpio:%u set input\n", gpio); > + > + return 0; > +} > + > +static int cygnus_gpio_direction_output(struct gpio_chip *gc, unsigned gpio, > + int value) > +{ > + struct cygnus_gpio *chip = to_cygnus_gpio(gc); > + unsigned long flags; > + > + spin_lock_irqsave(&chip->lock, flags); > + cygnus_set_bit(chip, CYGNUS_GPIO_OUT_EN_OFFSET, gpio, 1); > + cygnus_set_bit(chip, CYGNUS_GPIO_DATA_OUT_OFFSET, gpio, value); > + spin_unlock_irqrestore(&chip->lock, flags); > + > + dev_dbg(chip->dev, "gpio:%u set output, value:%d\n", gpio, value); > + > + return 0; > +} > + > +static void cygnus_gpio_set(struct gpio_chip *gc, unsigned gpio, int value) > +{ > + struct cygnus_gpio *chip = to_cygnus_gpio(gc); > + unsigned long flags; > + > + spin_lock_irqsave(&chip->lock, flags); > + cygnus_set_bit(chip, CYGNUS_GPIO_DATA_OUT_OFFSET, gpio, value); > + spin_unlock_irqrestore(&chip->lock, flags); > + > + dev_dbg(chip->dev, "gpio:%u set, value:%d\n", gpio, value); > +} > + > +static int cygnus_gpio_get(struct gpio_chip *gc, unsigned gpio) > +{ > + struct cygnus_gpio *chip = to_cygnus_gpio(gc); > + unsigned int offset = CYGNUS_GPIO_REG(gpio, > + CYGNUS_GPIO_DATA_IN_OFFSET); > + unsigned int shift = CYGNUS_GPIO_SHIFT(gpio); > + > + return !!(cygnus_readl(chip, offset) & BIT(shift)); > +} > + > +static int cygnus_get_groups_count(struct pinctrl_dev *pctldev) > +{ > + return 1; > +} > + > +/* > + * Only one group: "gpio_grp", since this local pinctrl device only performs > + * GPIO specific PINCONF configurations > + */ > +static const char *cygnus_get_group_name(struct pinctrl_dev *pctldev, > + unsigned selector) > +{ > + Extra blank line. > + return "gpio_grp"; > +} > + > +static const struct pinctrl_ops cygnus_pctrl_ops = { > + .get_groups_count = cygnus_get_groups_count, > + .get_group_name = cygnus_get_group_name, > + .dt_node_to_map = pinconf_generic_dt_node_to_map_pin, > + .dt_free_map = pinctrl_utils_dt_free_map, > +}; > + > +static int cygnus_gpio_set_pull(struct cygnus_gpio *chip, unsigned gpio, > + int disable, int pull_up) > +{ > + unsigned long flags; > + > + spin_lock_irqsave(&chip->lock, flags); > + > + if (disable) { > + cygnus_set_bit(chip, CYGNUS_GPIO_RES_EN_OFFSET, gpio, 0); > + } else { > + cygnus_set_bit(chip, CYGNUS_GPIO_PAD_RES_OFFSET, gpio, > + pull_up); > + cygnus_set_bit(chip, CYGNUS_GPIO_RES_EN_OFFSET, gpio, 1); > + } > + > + spin_unlock_irqrestore(&chip->lock, flags); > + > + dev_dbg(chip->dev, "gpio:%u set pullup:%d\n", gpio, pull_up); > + > + return 0; > +} > + > +static void cygnus_gpio_get_pull(struct cygnus_gpio *chip, unsigned gpio, > + int *disable, int *pull_up) > +{ > + unsigned long flags; > + > + spin_lock_irqsave(&chip->lock, flags); > + *disable = !cygnus_get_bit(chip, CYGNUS_GPIO_RES_EN_OFFSET, gpio); > + *pull_up = cygnus_get_bit(chip, CYGNUS_GPIO_PAD_RES_OFFSET, gpio); > + spin_unlock_irqrestore(&chip->lock, flags); > +} > + > +static int cygnus_gpio_set_strength(struct cygnus_gpio *chip, unsigned gpio, > + unsigned strength) > +{ > + void __iomem *base; > + unsigned int i, offset, shift; > + u32 val; > + unsigned long flags; > + > + /* make sure drive strength is supported */ > + if (strength < 2 || strength > 16 || (strength % 2)) > + return -ENOTSUPP; > + > + if (chip->io_ctrl) { > + base = chip->io_ctrl; > + offset = CYGNUS_GPIO_DRV0_CTRL_OFFSET; > + } else { > + base = chip->base; > + offset = CYGNUS_GPIO_REG(gpio, > + CYGNUS_GPIO_ASIU_DRV0_CTRL_OFFSET); > + } > + > + shift = CYGNUS_GPIO_SHIFT(gpio); > + > + dev_dbg(chip->dev, "gpio:%u set drive strength:%d mA\n", gpio, > + strength); > + > + spin_lock_irqsave(&chip->lock, flags); > + strength = (strength / 2) - 1; > + for (i = 0; i < GPIO_DRV_STRENGTH_BITS; i++) { > + val = readl(base + offset); > + val &= ~BIT(shift); > + val |= ((strength >> i) & 0x1) << shift; > + writel(val, base + offset); > + offset += 4; > + } > + spin_unlock_irqrestore(&chip->lock, flags); > + > + return 0; > +} > + > +static int cygnus_gpio_get_strength(struct cygnus_gpio *chip, unsigned gpio, > + u16 *strength) > +{ > + void __iomem *base; > + unsigned int i, offset, shift; > + u32 val; > + unsigned long flags; > + > + if (chip->io_ctrl) { > + base = chip->io_ctrl; > + offset = CYGNUS_GPIO_DRV0_CTRL_OFFSET; > + } else { > + base = chip->base; > + offset = CYGNUS_GPIO_REG(gpio, > + CYGNUS_GPIO_ASIU_DRV0_CTRL_OFFSET); > + } > + > + shift = CYGNUS_GPIO_SHIFT(gpio); > + > + spin_lock_irqsave(&chip->lock, flags); > + *strength = 0; > + for (i = 0; i < GPIO_DRV_STRENGTH_BITS; i++) { > + val = readl(base + offset) & BIT(shift); > + val >>= shift; > + *strength += (val << i); > + offset += 4; > + } > + > + /* convert to mA */ > + *strength = (*strength + 1) * 2; > + spin_unlock_irqrestore(&chip->lock, flags); > + > + return 0; > +} > + > +static int cygnus_pin_config_get(struct pinctrl_dev *pctldev, unsigned pin, > + unsigned long *config) > +{ > + struct cygnus_gpio *chip = pinctrl_dev_get_drvdata(pctldev); > + enum pin_config_param param = pinconf_to_config_param(*config); > + unsigned gpio = cygnus_pin_to_gpio(pin); > + u16 arg; > + int disable, pull_up, ret; > + > + switch (param) { > + case PIN_CONFIG_BIAS_DISABLE: > + cygnus_gpio_get_pull(chip, gpio, &disable, &pull_up); > + if (disable) > + return 0; > + else > + return -EINVAL; > + > + case PIN_CONFIG_BIAS_PULL_UP: > + cygnus_gpio_get_pull(chip, gpio, &disable, &pull_up); > + if (!disable && pull_up) > + return 0; > + else > + return -EINVAL; > + > + case PIN_CONFIG_BIAS_PULL_DOWN: > + cygnus_gpio_get_pull(chip, gpio, &disable, &pull_up); > + if (!disable && !pull_up) > + return 0; > + else > + return -EINVAL; > + > + case PIN_CONFIG_DRIVE_STRENGTH: > + ret = cygnus_gpio_get_strength(chip, gpio, &arg); > + if (ret) > + return ret; > + else > + *config = pinconf_to_config_packed(param, arg); > + > + return 0; > + > + default: > + return -ENOTSUPP; > + } > + > + return -ENOTSUPP; > +} > + > +static int cygnus_pin_config_set(struct pinctrl_dev *pctldev, unsigned pin, > + unsigned long *configs, unsigned num_configs) > +{ > + struct cygnus_gpio *chip = pinctrl_dev_get_drvdata(pctldev); > + enum pin_config_param param; > + u16 arg; > + unsigned i, gpio = cygnus_pin_to_gpio(pin); > + int ret = -ENOTSUPP; > + > + for (i = 0; i < num_configs; i++) { > + param = pinconf_to_config_param(configs[i]); > + arg = pinconf_to_config_argument(configs[i]); > + > + switch (param) { > + case PIN_CONFIG_BIAS_DISABLE: > + ret = cygnus_gpio_set_pull(chip, gpio, 1, 0); > + if (ret < 0) > + goto out; > + break; > + > + case PIN_CONFIG_BIAS_PULL_UP: > + ret = cygnus_gpio_set_pull(chip, gpio, 0, 1); > + if (ret < 0) > + goto out; > + break; > + > + case PIN_CONFIG_BIAS_PULL_DOWN: > + ret = cygnus_gpio_set_pull(chip, gpio, 0, 0); > + if (ret < 0) > + goto out; > + break; > + > + case PIN_CONFIG_DRIVE_STRENGTH: > + ret = cygnus_gpio_set_strength(chip, gpio, arg); > + if (ret < 0) > + goto out; > + break; > + > + default: > + dev_err(chip->dev, "invalid configuration\n"); > + return -ENOTSUPP; > + } > + } /* for each config */ > + > +out: > + return ret; > +} > + > +static const struct pinconf_ops cygnus_pconf_ops = { > + .is_generic = true, > + .pin_config_get = cygnus_pin_config_get, > + .pin_config_set = cygnus_pin_config_set, > +}; > + > +/* > + * Map a GPIO in the local gpio_chip pin space to a pin in the Cygnus IOMUX > + * pinctrl pin space > + */ > +struct cygnus_gpio_pin_range { > + unsigned offset; > + unsigned pin_base; > + unsigned num_pins; > +}; > + > +#define CYGNUS_PINRANGE(o, p, n) { .offset = o, .pin_base = p, .num_pins = n } > + > +/* > + * Pin mapping table for mapping local GPIO pins to Cygnus IOMUX pinctrl pins > + */ > +static const struct cygnus_gpio_pin_range cygnus_gpio_pintable[] = { > + CYGNUS_PINRANGE(0, 42, 1), > + CYGNUS_PINRANGE(1, 44, 3), > + CYGNUS_PINRANGE(4, 48, 1), > + CYGNUS_PINRANGE(5, 50, 3), > + CYGNUS_PINRANGE(8, 126, 1), > + CYGNUS_PINRANGE(9, 155, 1), > + CYGNUS_PINRANGE(10, 152, 1), > + CYGNUS_PINRANGE(11, 154, 1), > + CYGNUS_PINRANGE(12, 153, 1), > + CYGNUS_PINRANGE(13, 127, 3), > + CYGNUS_PINRANGE(16, 140, 1), > + CYGNUS_PINRANGE(17, 145, 7), > + CYGNUS_PINRANGE(24, 130, 10), > + CYGNUS_PINRANGE(34, 141, 4), > + CYGNUS_PINRANGE(38, 54, 1), > + CYGNUS_PINRANGE(39, 56, 3), > + CYGNUS_PINRANGE(42, 60, 3), > + CYGNUS_PINRANGE(45, 64, 3), > + CYGNUS_PINRANGE(48, 68, 2), > + CYGNUS_PINRANGE(50, 84, 6), > + CYGNUS_PINRANGE(56, 94, 6), > + CYGNUS_PINRANGE(62, 72, 1), > + CYGNUS_PINRANGE(63, 70, 1), > + CYGNUS_PINRANGE(64, 80, 1), > + CYGNUS_PINRANGE(65, 74, 3), > + CYGNUS_PINRANGE(68, 78, 1), > + CYGNUS_PINRANGE(69, 82, 1), > + CYGNUS_PINRANGE(70, 156, 17), > + CYGNUS_PINRANGE(87, 104, 12), > + CYGNUS_PINRANGE(99, 102, 2), > + CYGNUS_PINRANGE(101, 90, 4), > + CYGNUS_PINRANGE(105, 116, 10), > + CYGNUS_PINRANGE(123, 11, 1), > + CYGNUS_PINRANGE(124, 38, 4), > + CYGNUS_PINRANGE(128, 43, 1), > + CYGNUS_PINRANGE(129, 47, 1), > + CYGNUS_PINRANGE(130, 49, 1), > + CYGNUS_PINRANGE(131, 53, 1), > + CYGNUS_PINRANGE(132, 55, 1), > + CYGNUS_PINRANGE(133, 59, 1), > + CYGNUS_PINRANGE(134, 63, 1), > + CYGNUS_PINRANGE(135, 67, 1), > + CYGNUS_PINRANGE(136, 71, 1), > + CYGNUS_PINRANGE(137, 73, 1), > + CYGNUS_PINRANGE(138, 77, 1), > + CYGNUS_PINRANGE(139, 79, 1), > + CYGNUS_PINRANGE(140, 81, 1), > + CYGNUS_PINRANGE(141, 83, 1), > + CYGNUS_PINRANGE(142, 10, 1) > +}; > + > +/* > + * The Cygnus IOMUX controller mainly supports group based mux configuration, > + * but certain pins can be muxed to GPIO individually. Only the ASIU GPIO > + * controller can support this, so it's an optional configuration > + * > + * Return -ENODEV means no support and that's fine > + */ > +static int cygnus_gpio_pinmux_add_range(struct cygnus_gpio *chip) > +{ > + struct device_node *node = chip->dev->of_node; > + struct device_node *pinmux_node; > + struct platform_device *pinmux_pdev; > + struct gpio_chip *gc = &chip->gc; > + int i, ret; > + > + /* parse DT to find the phandle to the pinmux controller */ > + pinmux_node = of_parse_phandle(node, "pinmux", 0); > + if (!pinmux_node) > + return -ENODEV; > + > + pinmux_pdev = of_find_device_by_node(pinmux_node); > + if (!pinmux_pdev) { > + dev_err(chip->dev, "failed to get pinmux device\n"); > + return -EINVAL; > + } > + > + /* now need to create the mapping between local GPIO and PINMUX pins */ > + for (i = 0; i < ARRAY_SIZE(cygnus_gpio_pintable); i++) { > + ret = gpiochip_add_pin_range(gc, dev_name(&pinmux_pdev->dev), > + cygnus_gpio_pintable[i].offset, > + cygnus_gpio_pintable[i].pin_base, > + cygnus_gpio_pintable[i].num_pins); > + if (ret) { > + dev_err(chip->dev, "unable to add GPIO pin range\n"); > + goto err_rm_pin_range; > + } > + } > + > + chip->pinmux_is_supported = 1; chip->pinmux_is_supported = true; ? > + return 0; > + > +err_rm_pin_range: > + gpiochip_remove_pin_ranges(gc); I think you need: put_dveice(&pinmux_pdev->dev); since of_find_device_by_node calls bus_find_device() that takes reference to found device. ... And now that I look at this majority of users of of_find_device_by_node() is broken like that :( BTW, it looks like you only need pinmux_dev for it's name so you probably need to drop reference in success path as well. > + return ret; > +} > + > +static void cygnus_gpio_pinmux_remove_range(struct cygnus_gpio *chip) > +{ > + struct gpio_chip *gc = &chip->gc; > + > + if (chip->pinmux_is_supported) > + gpiochip_remove_pin_ranges(gc); > +} > + > +/* > + * Cygnus GPIO controller supports some PINCONF related configurations such as > + * pull up, pull down, and drive strength, when the pin is configured to GPIO > + * > + * Here a local pinctrl device is created with simple 1-to-1 pin mapping to the > + * local GPIO pins > + */ > +static int cygnus_gpio_register_pinconf(struct cygnus_gpio *chip) > +{ > + struct pinctrl_desc *pctldesc = &chip->pctldesc; > + struct pinctrl_pin_desc *pins; > + struct gpio_chip *gc = &chip->gc; > + int i, ret; > + > + pins = devm_kcalloc(chip->dev, gc->ngpio, sizeof(*pins), GFP_KERNEL); > + if (!pins) > + return -ENOMEM; > + chip->pins = pins; > + > + for (i = 0; i < gc->ngpio; i++) { > + pins[i].number = i; > + pins[i].name = kasprintf(GFP_KERNEL, "gpio-%d", i); We have devm_kasprintf(). > + if (!pins[i].name) { > + ret = -ENOMEM; > + goto err_kfree; > + } > + } > + > + pctldesc->name = dev_name(chip->dev); > + pctldesc->pctlops = &cygnus_pctrl_ops; > + pctldesc->pins = pins; > + pctldesc->npins = gc->ngpio; > + pctldesc->confops = &cygnus_pconf_ops; > + > + chip->pctl = pinctrl_register(pctldesc, chip->dev, chip); > + if (!chip->pctl) { > + dev_err(chip->dev, "unable to register pinctrl device\n"); > + ret = -EINVAL; > + goto err_kfree; > + } > + > + return 0; > + > +err_kfree: > + for (i = 0; i < gc->ngpio; i++) > + kfree(pins[i].name); > + > + return ret; > +} > + > +static void cygnus_gpio_unregister_pinconf(struct cygnus_gpio *chip) > +{ > + struct gpio_chip *gc = &chip->gc; > + int i; > + > + if (chip->pctl) > + pinctrl_unregister(chip->pctl); > + > + for (i = 0; i < gc->ngpio; i++) > + kfree(chip->pins[i].name); Should not be needed if you use devm_kasprintf. > +} > + > +static const struct of_device_id cygnus_gpio_of_match[] = { > + { .compatible = "brcm,cygnus-gpio" }, > + { } > +}; > +MODULE_DEVICE_TABLE(of, cygnus_gpio_of_match); > + > +static int cygnus_gpio_probe(struct platform_device *pdev) > +{ > + struct device *dev = &pdev->dev; > + struct resource *res; > + struct cygnus_gpio *chip; > + struct gpio_chip *gc; > + u32 ngpios; > + int irq, ret; > + > + chip = devm_kzalloc(dev, sizeof(*chip), GFP_KERNEL); > + if (!chip) > + return -ENOMEM; > + > + chip->dev = dev; > + platform_set_drvdata(pdev, chip); > + > + if (of_property_read_u32(dev->of_node, "ngpios", &ngpios)) { > + dev_err(dev, "missing ngpios DT property\n"); > + return -ENODEV; > + } > + chip->num_banks = (ngpios + NGPIOS_PER_BANK - 1) / NGPIOS_PER_BANK; > + > + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > + chip->base = devm_ioremap_resource(dev, res); > + if (IS_ERR(chip->base)) { > + dev_err(dev, "unable to map I/O memory\n"); > + return PTR_ERR(chip->base); > + } > + > + res = platform_get_resource(pdev, IORESOURCE_MEM, 1); > + if (res) { > + chip->io_ctrl = devm_ioremap_resource(dev, res); > + if (IS_ERR(chip->io_ctrl)) { > + dev_err(dev, "unable to map I/O memory\n"); > + return PTR_ERR(chip->io_ctrl); > + } > + } > + > + spin_lock_init(&chip->lock); > + > + gc = &chip->gc; > + gc->base = -1; > + gc->ngpio = ngpios; > + gc->label = dev_name(dev); > + gc->dev = dev; > + gc->of_node = dev->of_node; > + gc->request = cygnus_gpio_request; > + gc->free = cygnus_gpio_free; > + gc->direction_input = cygnus_gpio_direction_input; > + gc->direction_output = cygnus_gpio_direction_output; > + gc->set = cygnus_gpio_set; > + gc->get = cygnus_gpio_get; > + > + ret = gpiochip_add(gc); > + if (ret < 0) { > + dev_err(dev, "unable to add GPIO chip\n"); > + return ret; > + } > + > + ret = cygnus_gpio_pinmux_add_range(chip); > + if (ret && ret != -ENODEV) { > + dev_err(dev, "unable to add GPIO pin range\n"); > + goto err_rm_gpiochip; > + } > + > + ret = cygnus_gpio_register_pinconf(chip); > + if (ret) { > + dev_err(dev, "unable to register pinconf\n"); > + goto err_rm_range; > + } > + > + /* optional GPIO interrupt support */ > + irq = platform_get_irq(pdev, 0); > + if (irq) { > + ret = gpiochip_irqchip_add(gc, &cygnus_gpio_irq_chip, 0, > + handle_simple_irq, IRQ_TYPE_NONE); > + if (ret) { > + dev_err(dev, "no GPIO irqchip\n"); > + goto err_unregister_pinconf; > + } > + > + gpiochip_set_chained_irqchip(gc, &cygnus_gpio_irq_chip, irq, > + cygnus_gpio_irq_handler); > + } > + > + return 0; > + > +err_unregister_pinconf: > + cygnus_gpio_unregister_pinconf(chip); > + > +err_rm_range: > + cygnus_gpio_pinmux_remove_range(chip); > + > +err_rm_gpiochip: > + gpiochip_remove(gc); > + > + return ret; > +} > + > +static struct platform_driver cygnus_gpio_driver = { > + .driver = { > + .name = "cygnus-gpio", > + .of_match_table = cygnus_gpio_of_match, > + }, > + .probe = cygnus_gpio_probe, The same comment about suppress_bind_attrs. > +}; > + > +static int __init cygnus_gpio_init(void) > +{ > + return platform_driver_probe(&cygnus_gpio_driver, cygnus_gpio_probe); > +} > +arch_initcall_sync(cygnus_gpio_init); > + > +MODULE_AUTHOR("Ray Jui <rjui@broadcom.com>"); > +MODULE_DESCRIPTION("Broadcom Cygnus GPIO Driver"); > +MODULE_LICENSE("GPL v2"); > -- > 1.7.9.5 > Thanks. -- Dmitry
WARNING: multiple messages have this Message-ID (diff)
From: dtor@google.com (Dmitry Torokhov) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v7 2/4] pinctrl: cygnus: add gpio/pinconf driver Date: Tue, 3 Feb 2015 17:41:52 -0800 [thread overview] Message-ID: <20150204014152.GD15969@dtor-ws> (raw) In-Reply-To: <1423012148-22560-3-git-send-email-rjui@broadcom.com> On Tue, Feb 03, 2015 at 05:09:06PM -0800, Ray Jui wrote: > This adds the initial support of the Broadcom Cygnus GPIO/PINCONF driver > that supports all 3 GPIO controllers on Cygnus including the ASIU GPIO > controller, the chipCommonG GPIO controller, and the always-on GPIO > controller. Basic PINCONF configurations such as bias pull up/down, and > drive strength are also supported in this driver. > > Pins from the ASIU GPIO controller can be individually muxed to GPIO > function, through interaction with the Cygnus IOMUX controller > > Signed-off-by: Ray Jui <rjui@broadcom.com> > Reviewed-by: Scott Branden <sbranden@broadcom.com> > --- > drivers/pinctrl/bcm/Kconfig | 22 + > drivers/pinctrl/bcm/Makefile | 1 + > drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c | 920 +++++++++++++++++++++++++++++ > 3 files changed, 943 insertions(+) > create mode 100644 drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c > > diff --git a/drivers/pinctrl/bcm/Kconfig b/drivers/pinctrl/bcm/Kconfig > index eb13201..cd11d4d 100644 > --- a/drivers/pinctrl/bcm/Kconfig > +++ b/drivers/pinctrl/bcm/Kconfig > @@ -20,6 +20,28 @@ config PINCTRL_BCM2835 > select PINMUX > select PINCONF > > +config PINCTRL_CYGNUS_GPIO > + bool "Broadcom Cygnus GPIO (with PINCONF) driver" > + depends on OF_GPIO && ARCH_BCM_CYGNUS > + select GPIOLIB_IRQCHIP > + select PINCONF > + select GENERIC_PINCONF > + default ARCH_BCM_CYGNUS > + help > + Say yes here to enable the Broadcom Cygnus GPIO driver. > + > + The Broadcom Cygnus SoC has 3 GPIO controllers including the ASIU > + GPIO controller (ASIU), the chipCommonG GPIO controller (CCM), and > + the always-ON GPIO controller (CRMU/AON). All 3 GPIO controllers are > + supported by this driver. > + > + All 3 Cygnus GPIO controllers support basic PINCONF functions such > + as bias pull up, pull down, and drive strength configurations, when > + these pins are muxed to GPIO. > + > + Pins from the ASIU GPIO can be individually muxed to GPIO function, > + through interaction with the Cygnus IOMUX controller. > + > config PINCTRL_CYGNUS_MUX > bool "Broadcom Cygnus IOMUX driver" > depends on (ARCH_BCM_CYGNUS || COMPILE_TEST) > diff --git a/drivers/pinctrl/bcm/Makefile b/drivers/pinctrl/bcm/Makefile > index bb6beb6..2b2f70e 100644 > --- a/drivers/pinctrl/bcm/Makefile > +++ b/drivers/pinctrl/bcm/Makefile > @@ -2,4 +2,5 @@ > > obj-$(CONFIG_PINCTRL_BCM281XX) += pinctrl-bcm281xx.o > obj-$(CONFIG_PINCTRL_BCM2835) += pinctrl-bcm2835.o > +obj-$(CONFIG_PINCTRL_CYGNUS_GPIO) += pinctrl-cygnus-gpio.o > obj-$(CONFIG_PINCTRL_CYGNUS_MUX) += pinctrl-cygnus-mux.o > diff --git a/drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c b/drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c > new file mode 100644 > index 0000000..cfe4478 > --- /dev/null > +++ b/drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c > @@ -0,0 +1,920 @@ > +/* > + * Copyright (C) 2014-2015 Broadcom Corporation > + * > + * 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 version 2. > + * > + * This program is distributed "as is" WITHOUT ANY WARRANTY of any > + * kind, whether express or implied; without even the implied warranty > + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + * This file contains the Broadcom Cygnus GPIO driver that supports 3 > + * GPIO controllers on Cygnus including the ASIU GPIO controller, the > + * chipCommonG GPIO controller, and the always-on GPIO controller. Basic > + * PINCONF such as bias pull up/down, and drive strength are also supported > + * in this driver. > + * > + * Pins from the ASIU GPIO can be individually muxed to GPIO function, > + * through the interaction with the Cygnus IOMUX controller > + */ > + > +#include <linux/kernel.h> > +#include <linux/slab.h> > +#include <linux/module.h> > +#include <linux/interrupt.h> > +#include <linux/io.h> > +#include <linux/gpio.h> > +#include <linux/ioport.h> > +#include <linux/of_device.h> > +#include <linux/of_irq.h> > +#include <linux/pinctrl/pinctrl.h> > +#include <linux/pinctrl/pinmux.h> > +#include <linux/pinctrl/pinconf.h> > +#include <linux/pinctrl/pinconf-generic.h> > + > +#include "../pinctrl-utils.h" > + > +#define CYGNUS_GPIO_DATA_IN_OFFSET 0x00 > +#define CYGNUS_GPIO_DATA_OUT_OFFSET 0x04 > +#define CYGNUS_GPIO_OUT_EN_OFFSET 0x08 > +#define CYGNUS_GPIO_IN_TYPE_OFFSET 0x0c > +#define CYGNUS_GPIO_INT_DE_OFFSET 0x10 > +#define CYGNUS_GPIO_INT_EDGE_OFFSET 0x14 > +#define CYGNUS_GPIO_INT_MSK_OFFSET 0x18 > +#define CYGNUS_GPIO_INT_STAT_OFFSET 0x1c > +#define CYGNUS_GPIO_INT_MSTAT_OFFSET 0x20 > +#define CYGNUS_GPIO_INT_CLR_OFFSET 0x24 > +#define CYGNUS_GPIO_PAD_RES_OFFSET 0x34 > +#define CYGNUS_GPIO_RES_EN_OFFSET 0x38 > + > +/* drive strength control for ASIU GPIO */ > +#define CYGNUS_GPIO_ASIU_DRV0_CTRL_OFFSET 0x58 > + > +/* drive strength control for CCM/CRMU (AON) GPIO */ > +#define CYGNUS_GPIO_DRV0_CTRL_OFFSET 0x00 > + > +#define GPIO_BANK_SIZE 0x200 > +#define NGPIOS_PER_BANK 32 > +#define GPIO_BANK(pin) ((pin) / NGPIOS_PER_BANK) > + > +#define CYGNUS_GPIO_REG(pin, reg) (GPIO_BANK(pin) * GPIO_BANK_SIZE + (reg)) > +#define CYGNUS_GPIO_SHIFT(pin) ((pin) % NGPIOS_PER_BANK) > + > +#define GPIO_DRV_STRENGTH_BIT_SHIFT 20 > +#define GPIO_DRV_STRENGTH_BITS 3 > +#define GPIO_DRV_STRENGTH_BIT_MASK ((1 << GPIO_DRV_STRENGTH_BITS) - 1) > + > +/* > + * Cygnus GPIO core > + * > + * @dev: pointer to device > + * @base: I/O register base for Cygnus GPIO controller > + * @io_ctrl: I/O register base for certain type of Cygnus GPIO controller that > + * has the PINCONF support implemented outside of the GPIO block > + * @lock: lock to protect access to I/O registers > + * @gc: GPIO chip > + * @num_banks: number of GPIO banks, each bank supports up to 32 GPIOs > + * @pinmux_is_supported: flag to indicate this GPIO controller contains pins > + * that can be individually muxed to GPIO > + * @pctl: pointer to pinctrl_dev > + * @pctldesc: pinctrl descriptor > + * @pins: pointer to array of pins > + */ > +struct cygnus_gpio { > + struct device *dev; > + > + void __iomem *base; > + void __iomem *io_ctrl; > + > + spinlock_t lock; > + > + struct gpio_chip gc; > + unsigned num_banks; > + > + int pinmux_is_supported; bool? > + > + struct pinctrl_dev *pctl; > + struct pinctrl_desc pctldesc; > + struct pinctrl_pin_desc *pins; > +}; > + > +static struct cygnus_gpio *to_cygnus_gpio(struct gpio_chip *gc) > +{ > + return container_of(gc, struct cygnus_gpio, gc); > +} > + > +/* > + * Mapping from PINCONF pins to GPIO pins is 1-to-1 > + */ > +static unsigned cygnus_pin_to_gpio(unsigned pin) > +{ > + return pin; > +} > + > +static u32 cygnus_readl(struct cygnus_gpio *chip, unsigned int offset) > +{ > + return readl(chip->base + offset); > +} > + > +static void cygnus_writel(struct cygnus_gpio *chip, unsigned int offset, > + u32 val) > +{ > + writel(val, chip->base + offset); > +} > + > +/** > + * cygnus_set_bit - set or clear one bit (corresponding to the GPIO pin) in a > + * Cygnus GPIO register > + * > + * @cygnus_gpio: Cygnus GPIO device > + * @reg: register offset > + * @gpio: GPIO pin > + * @set: set or clear. 1 - set; 0 -clear > + */ > +static void cygnus_set_bit(struct cygnus_gpio *chip, unsigned int reg, > + unsigned gpio, int set) > +{ > + unsigned int offset = CYGNUS_GPIO_REG(gpio, reg); > + unsigned int shift = CYGNUS_GPIO_SHIFT(gpio); > + u32 val; > + > + val = cygnus_readl(chip, offset); > + if (set) > + val |= BIT(shift); > + else > + val &= ~BIT(shift); > + cygnus_writel(chip, offset, val); > +} > + > +static int cygnus_get_bit(struct cygnus_gpio *chip, unsigned int reg, > + unsigned gpio) > +{ > + unsigned int offset = CYGNUS_GPIO_REG(gpio, reg); > + unsigned int shift = CYGNUS_GPIO_SHIFT(gpio); > + u32 val; > + > + val = cygnus_readl(chip, offset) & BIT(shift); > + if (val) > + return 1; > + else > + return 0; > +} > + > +static void cygnus_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) > +{ > + struct gpio_chip *gc = irq_desc_get_handler_data(desc); > + struct cygnus_gpio *chip = to_cygnus_gpio(gc); > + struct irq_chip *irq_chip = irq_desc_get_chip(desc); > + int i, bit; > + > + chained_irq_enter(irq_chip, desc); > + > + /* go through the entire GPIO banks and handle all interrupts */ > + for (i = 0; i < chip->num_banks; i++) { > + unsigned long val = cygnus_readl(chip, > + (i * GPIO_BANK_SIZE) + > + CYGNUS_GPIO_INT_MSTAT_OFFSET); > + > + for_each_set_bit(bit, &val, NGPIOS_PER_BANK) { > + unsigned pin = NGPIOS_PER_BANK * i + bit; > + int child_irq = irq_find_mapping(gc->irqdomain, pin); > + > + /* > + * Clear the interrupt before invoking the > + * handler, so we do not leave any window > + */ > + cygnus_writel(chip, (i * GPIO_BANK_SIZE) + > + CYGNUS_GPIO_INT_CLR_OFFSET, BIT(bit)); > + > + generic_handle_irq(child_irq); > + } > + } > + > + chained_irq_exit(irq_chip, desc); > +} > + > + > +static void cygnus_gpio_irq_ack(struct irq_data *d) > +{ > + struct gpio_chip *gc = irq_data_get_irq_chip_data(d); > + struct cygnus_gpio *chip = to_cygnus_gpio(gc); > + unsigned gpio = d->hwirq; > + unsigned int offset = CYGNUS_GPIO_REG(gpio, > + CYGNUS_GPIO_INT_CLR_OFFSET); > + unsigned int shift = CYGNUS_GPIO_SHIFT(gpio); > + u32 val = BIT(shift); > + > + cygnus_writel(chip, offset, val); > +} > + > +/** > + * cygnus_gpio_irq_set_mask - mask/unmask a GPIO interrupt > + * > + * @d: IRQ chip data > + * @mask: mask/unmask GPIO interrupt. 0 - mask (disable); 1 - unmask (enable) > + */ > +static void cygnus_gpio_irq_set_mask(struct irq_data *d, int mask) > +{ > + struct gpio_chip *gc = irq_data_get_irq_chip_data(d); > + struct cygnus_gpio *chip = to_cygnus_gpio(gc); > + unsigned gpio = d->hwirq; > + > + cygnus_set_bit(chip, CYGNUS_GPIO_INT_MSK_OFFSET, gpio, mask); > +} > + > +static void cygnus_gpio_irq_mask(struct irq_data *d) > +{ > + struct gpio_chip *gc = irq_data_get_irq_chip_data(d); > + struct cygnus_gpio *chip = to_cygnus_gpio(gc); > + unsigned long flags; > + > + spin_lock_irqsave(&chip->lock, flags); > + cygnus_gpio_irq_set_mask(d, 0); > + spin_unlock_irqrestore(&chip->lock, flags); > +} > + > +static void cygnus_gpio_irq_unmask(struct irq_data *d) > +{ > + struct gpio_chip *gc = irq_data_get_irq_chip_data(d); > + struct cygnus_gpio *chip = to_cygnus_gpio(gc); > + unsigned long flags; > + > + spin_lock_irqsave(&chip->lock, flags); > + cygnus_gpio_irq_set_mask(d, 1); > + spin_unlock_irqrestore(&chip->lock, flags); > +} > + > +static int cygnus_gpio_irq_set_type(struct irq_data *d, unsigned int type) > +{ > + struct gpio_chip *gc = irq_data_get_irq_chip_data(d); > + struct cygnus_gpio *chip = to_cygnus_gpio(gc); > + unsigned gpio = d->hwirq; > + int int_type = 0, dual_edge = 0, edge_lvl = 0; > + unsigned long flags; > + > + switch (type & IRQ_TYPE_SENSE_MASK) { > + case IRQ_TYPE_EDGE_RISING: > + edge_lvl = 1; > + break; > + > + case IRQ_TYPE_EDGE_FALLING: > + break; > + > + case IRQ_TYPE_EDGE_BOTH: > + dual_edge = 1; > + break; > + > + case IRQ_TYPE_LEVEL_HIGH: > + int_type = 1; > + edge_lvl = 1; > + break; > + > + case IRQ_TYPE_LEVEL_LOW: > + int_type = 1; > + break; > + > + default: > + dev_err(chip->dev, "invalid GPIO IRQ type 0x%x\n", > + type); > + return -EINVAL; > + } > + > + spin_lock_irqsave(&chip->lock, flags); > + cygnus_set_bit(chip, CYGNUS_GPIO_IN_TYPE_OFFSET, gpio, int_type); > + cygnus_set_bit(chip, CYGNUS_GPIO_INT_DE_OFFSET, gpio, dual_edge); > + cygnus_set_bit(chip, CYGNUS_GPIO_INT_EDGE_OFFSET, gpio, > + edge_lvl); > + spin_unlock_irqrestore(&chip->lock, flags); > + > + dev_dbg(chip->dev, > + "gpio:%u set int_type:%d dual_edge:%d edge_lvl:%d\n", > + gpio, int_type, dual_edge, edge_lvl); > + > + return 0; > +} > + > +static struct irq_chip cygnus_gpio_irq_chip = { > + .name = "bcm-cygnus-gpio", > + .irq_ack = cygnus_gpio_irq_ack, > + .irq_mask = cygnus_gpio_irq_mask, > + .irq_unmask = cygnus_gpio_irq_unmask, > + .irq_set_type = cygnus_gpio_irq_set_type, > +}; > + > +/* > + * Request the Cygnus IOMUX pinmux controller to mux individual pins to GPIO > + */ > +static int cygnus_gpio_request(struct gpio_chip *gc, unsigned offset) > +{ > + struct cygnus_gpio *chip = to_cygnus_gpio(gc); > + unsigned gpio = gc->base + offset; > + > + /* not all Cygnus GPIO pins can be muxed individually */ > + if (!chip->pinmux_is_supported) > + return 0; > + > + return pinctrl_request_gpio(gpio); > +} > + > +static void cygnus_gpio_free(struct gpio_chip *gc, unsigned offset) > +{ > + struct cygnus_gpio *chip = to_cygnus_gpio(gc); > + unsigned gpio = gc->base + offset; > + > + if (!chip->pinmux_is_supported) > + return; > + > + pinctrl_free_gpio(gpio); > +} > + > +static int cygnus_gpio_direction_input(struct gpio_chip *gc, unsigned gpio) > +{ > + struct cygnus_gpio *chip = to_cygnus_gpio(gc); > + unsigned long flags; > + > + spin_lock_irqsave(&chip->lock, flags); > + cygnus_set_bit(chip, CYGNUS_GPIO_OUT_EN_OFFSET, gpio, 0); > + spin_unlock_irqrestore(&chip->lock, flags); > + > + dev_dbg(chip->dev, "gpio:%u set input\n", gpio); > + > + return 0; > +} > + > +static int cygnus_gpio_direction_output(struct gpio_chip *gc, unsigned gpio, > + int value) > +{ > + struct cygnus_gpio *chip = to_cygnus_gpio(gc); > + unsigned long flags; > + > + spin_lock_irqsave(&chip->lock, flags); > + cygnus_set_bit(chip, CYGNUS_GPIO_OUT_EN_OFFSET, gpio, 1); > + cygnus_set_bit(chip, CYGNUS_GPIO_DATA_OUT_OFFSET, gpio, value); > + spin_unlock_irqrestore(&chip->lock, flags); > + > + dev_dbg(chip->dev, "gpio:%u set output, value:%d\n", gpio, value); > + > + return 0; > +} > + > +static void cygnus_gpio_set(struct gpio_chip *gc, unsigned gpio, int value) > +{ > + struct cygnus_gpio *chip = to_cygnus_gpio(gc); > + unsigned long flags; > + > + spin_lock_irqsave(&chip->lock, flags); > + cygnus_set_bit(chip, CYGNUS_GPIO_DATA_OUT_OFFSET, gpio, value); > + spin_unlock_irqrestore(&chip->lock, flags); > + > + dev_dbg(chip->dev, "gpio:%u set, value:%d\n", gpio, value); > +} > + > +static int cygnus_gpio_get(struct gpio_chip *gc, unsigned gpio) > +{ > + struct cygnus_gpio *chip = to_cygnus_gpio(gc); > + unsigned int offset = CYGNUS_GPIO_REG(gpio, > + CYGNUS_GPIO_DATA_IN_OFFSET); > + unsigned int shift = CYGNUS_GPIO_SHIFT(gpio); > + > + return !!(cygnus_readl(chip, offset) & BIT(shift)); > +} > + > +static int cygnus_get_groups_count(struct pinctrl_dev *pctldev) > +{ > + return 1; > +} > + > +/* > + * Only one group: "gpio_grp", since this local pinctrl device only performs > + * GPIO specific PINCONF configurations > + */ > +static const char *cygnus_get_group_name(struct pinctrl_dev *pctldev, > + unsigned selector) > +{ > + Extra blank line. > + return "gpio_grp"; > +} > + > +static const struct pinctrl_ops cygnus_pctrl_ops = { > + .get_groups_count = cygnus_get_groups_count, > + .get_group_name = cygnus_get_group_name, > + .dt_node_to_map = pinconf_generic_dt_node_to_map_pin, > + .dt_free_map = pinctrl_utils_dt_free_map, > +}; > + > +static int cygnus_gpio_set_pull(struct cygnus_gpio *chip, unsigned gpio, > + int disable, int pull_up) > +{ > + unsigned long flags; > + > + spin_lock_irqsave(&chip->lock, flags); > + > + if (disable) { > + cygnus_set_bit(chip, CYGNUS_GPIO_RES_EN_OFFSET, gpio, 0); > + } else { > + cygnus_set_bit(chip, CYGNUS_GPIO_PAD_RES_OFFSET, gpio, > + pull_up); > + cygnus_set_bit(chip, CYGNUS_GPIO_RES_EN_OFFSET, gpio, 1); > + } > + > + spin_unlock_irqrestore(&chip->lock, flags); > + > + dev_dbg(chip->dev, "gpio:%u set pullup:%d\n", gpio, pull_up); > + > + return 0; > +} > + > +static void cygnus_gpio_get_pull(struct cygnus_gpio *chip, unsigned gpio, > + int *disable, int *pull_up) > +{ > + unsigned long flags; > + > + spin_lock_irqsave(&chip->lock, flags); > + *disable = !cygnus_get_bit(chip, CYGNUS_GPIO_RES_EN_OFFSET, gpio); > + *pull_up = cygnus_get_bit(chip, CYGNUS_GPIO_PAD_RES_OFFSET, gpio); > + spin_unlock_irqrestore(&chip->lock, flags); > +} > + > +static int cygnus_gpio_set_strength(struct cygnus_gpio *chip, unsigned gpio, > + unsigned strength) > +{ > + void __iomem *base; > + unsigned int i, offset, shift; > + u32 val; > + unsigned long flags; > + > + /* make sure drive strength is supported */ > + if (strength < 2 || strength > 16 || (strength % 2)) > + return -ENOTSUPP; > + > + if (chip->io_ctrl) { > + base = chip->io_ctrl; > + offset = CYGNUS_GPIO_DRV0_CTRL_OFFSET; > + } else { > + base = chip->base; > + offset = CYGNUS_GPIO_REG(gpio, > + CYGNUS_GPIO_ASIU_DRV0_CTRL_OFFSET); > + } > + > + shift = CYGNUS_GPIO_SHIFT(gpio); > + > + dev_dbg(chip->dev, "gpio:%u set drive strength:%d mA\n", gpio, > + strength); > + > + spin_lock_irqsave(&chip->lock, flags); > + strength = (strength / 2) - 1; > + for (i = 0; i < GPIO_DRV_STRENGTH_BITS; i++) { > + val = readl(base + offset); > + val &= ~BIT(shift); > + val |= ((strength >> i) & 0x1) << shift; > + writel(val, base + offset); > + offset += 4; > + } > + spin_unlock_irqrestore(&chip->lock, flags); > + > + return 0; > +} > + > +static int cygnus_gpio_get_strength(struct cygnus_gpio *chip, unsigned gpio, > + u16 *strength) > +{ > + void __iomem *base; > + unsigned int i, offset, shift; > + u32 val; > + unsigned long flags; > + > + if (chip->io_ctrl) { > + base = chip->io_ctrl; > + offset = CYGNUS_GPIO_DRV0_CTRL_OFFSET; > + } else { > + base = chip->base; > + offset = CYGNUS_GPIO_REG(gpio, > + CYGNUS_GPIO_ASIU_DRV0_CTRL_OFFSET); > + } > + > + shift = CYGNUS_GPIO_SHIFT(gpio); > + > + spin_lock_irqsave(&chip->lock, flags); > + *strength = 0; > + for (i = 0; i < GPIO_DRV_STRENGTH_BITS; i++) { > + val = readl(base + offset) & BIT(shift); > + val >>= shift; > + *strength += (val << i); > + offset += 4; > + } > + > + /* convert to mA */ > + *strength = (*strength + 1) * 2; > + spin_unlock_irqrestore(&chip->lock, flags); > + > + return 0; > +} > + > +static int cygnus_pin_config_get(struct pinctrl_dev *pctldev, unsigned pin, > + unsigned long *config) > +{ > + struct cygnus_gpio *chip = pinctrl_dev_get_drvdata(pctldev); > + enum pin_config_param param = pinconf_to_config_param(*config); > + unsigned gpio = cygnus_pin_to_gpio(pin); > + u16 arg; > + int disable, pull_up, ret; > + > + switch (param) { > + case PIN_CONFIG_BIAS_DISABLE: > + cygnus_gpio_get_pull(chip, gpio, &disable, &pull_up); > + if (disable) > + return 0; > + else > + return -EINVAL; > + > + case PIN_CONFIG_BIAS_PULL_UP: > + cygnus_gpio_get_pull(chip, gpio, &disable, &pull_up); > + if (!disable && pull_up) > + return 0; > + else > + return -EINVAL; > + > + case PIN_CONFIG_BIAS_PULL_DOWN: > + cygnus_gpio_get_pull(chip, gpio, &disable, &pull_up); > + if (!disable && !pull_up) > + return 0; > + else > + return -EINVAL; > + > + case PIN_CONFIG_DRIVE_STRENGTH: > + ret = cygnus_gpio_get_strength(chip, gpio, &arg); > + if (ret) > + return ret; > + else > + *config = pinconf_to_config_packed(param, arg); > + > + return 0; > + > + default: > + return -ENOTSUPP; > + } > + > + return -ENOTSUPP; > +} > + > +static int cygnus_pin_config_set(struct pinctrl_dev *pctldev, unsigned pin, > + unsigned long *configs, unsigned num_configs) > +{ > + struct cygnus_gpio *chip = pinctrl_dev_get_drvdata(pctldev); > + enum pin_config_param param; > + u16 arg; > + unsigned i, gpio = cygnus_pin_to_gpio(pin); > + int ret = -ENOTSUPP; > + > + for (i = 0; i < num_configs; i++) { > + param = pinconf_to_config_param(configs[i]); > + arg = pinconf_to_config_argument(configs[i]); > + > + switch (param) { > + case PIN_CONFIG_BIAS_DISABLE: > + ret = cygnus_gpio_set_pull(chip, gpio, 1, 0); > + if (ret < 0) > + goto out; > + break; > + > + case PIN_CONFIG_BIAS_PULL_UP: > + ret = cygnus_gpio_set_pull(chip, gpio, 0, 1); > + if (ret < 0) > + goto out; > + break; > + > + case PIN_CONFIG_BIAS_PULL_DOWN: > + ret = cygnus_gpio_set_pull(chip, gpio, 0, 0); > + if (ret < 0) > + goto out; > + break; > + > + case PIN_CONFIG_DRIVE_STRENGTH: > + ret = cygnus_gpio_set_strength(chip, gpio, arg); > + if (ret < 0) > + goto out; > + break; > + > + default: > + dev_err(chip->dev, "invalid configuration\n"); > + return -ENOTSUPP; > + } > + } /* for each config */ > + > +out: > + return ret; > +} > + > +static const struct pinconf_ops cygnus_pconf_ops = { > + .is_generic = true, > + .pin_config_get = cygnus_pin_config_get, > + .pin_config_set = cygnus_pin_config_set, > +}; > + > +/* > + * Map a GPIO in the local gpio_chip pin space to a pin in the Cygnus IOMUX > + * pinctrl pin space > + */ > +struct cygnus_gpio_pin_range { > + unsigned offset; > + unsigned pin_base; > + unsigned num_pins; > +}; > + > +#define CYGNUS_PINRANGE(o, p, n) { .offset = o, .pin_base = p, .num_pins = n } > + > +/* > + * Pin mapping table for mapping local GPIO pins to Cygnus IOMUX pinctrl pins > + */ > +static const struct cygnus_gpio_pin_range cygnus_gpio_pintable[] = { > + CYGNUS_PINRANGE(0, 42, 1), > + CYGNUS_PINRANGE(1, 44, 3), > + CYGNUS_PINRANGE(4, 48, 1), > + CYGNUS_PINRANGE(5, 50, 3), > + CYGNUS_PINRANGE(8, 126, 1), > + CYGNUS_PINRANGE(9, 155, 1), > + CYGNUS_PINRANGE(10, 152, 1), > + CYGNUS_PINRANGE(11, 154, 1), > + CYGNUS_PINRANGE(12, 153, 1), > + CYGNUS_PINRANGE(13, 127, 3), > + CYGNUS_PINRANGE(16, 140, 1), > + CYGNUS_PINRANGE(17, 145, 7), > + CYGNUS_PINRANGE(24, 130, 10), > + CYGNUS_PINRANGE(34, 141, 4), > + CYGNUS_PINRANGE(38, 54, 1), > + CYGNUS_PINRANGE(39, 56, 3), > + CYGNUS_PINRANGE(42, 60, 3), > + CYGNUS_PINRANGE(45, 64, 3), > + CYGNUS_PINRANGE(48, 68, 2), > + CYGNUS_PINRANGE(50, 84, 6), > + CYGNUS_PINRANGE(56, 94, 6), > + CYGNUS_PINRANGE(62, 72, 1), > + CYGNUS_PINRANGE(63, 70, 1), > + CYGNUS_PINRANGE(64, 80, 1), > + CYGNUS_PINRANGE(65, 74, 3), > + CYGNUS_PINRANGE(68, 78, 1), > + CYGNUS_PINRANGE(69, 82, 1), > + CYGNUS_PINRANGE(70, 156, 17), > + CYGNUS_PINRANGE(87, 104, 12), > + CYGNUS_PINRANGE(99, 102, 2), > + CYGNUS_PINRANGE(101, 90, 4), > + CYGNUS_PINRANGE(105, 116, 10), > + CYGNUS_PINRANGE(123, 11, 1), > + CYGNUS_PINRANGE(124, 38, 4), > + CYGNUS_PINRANGE(128, 43, 1), > + CYGNUS_PINRANGE(129, 47, 1), > + CYGNUS_PINRANGE(130, 49, 1), > + CYGNUS_PINRANGE(131, 53, 1), > + CYGNUS_PINRANGE(132, 55, 1), > + CYGNUS_PINRANGE(133, 59, 1), > + CYGNUS_PINRANGE(134, 63, 1), > + CYGNUS_PINRANGE(135, 67, 1), > + CYGNUS_PINRANGE(136, 71, 1), > + CYGNUS_PINRANGE(137, 73, 1), > + CYGNUS_PINRANGE(138, 77, 1), > + CYGNUS_PINRANGE(139, 79, 1), > + CYGNUS_PINRANGE(140, 81, 1), > + CYGNUS_PINRANGE(141, 83, 1), > + CYGNUS_PINRANGE(142, 10, 1) > +}; > + > +/* > + * The Cygnus IOMUX controller mainly supports group based mux configuration, > + * but certain pins can be muxed to GPIO individually. Only the ASIU GPIO > + * controller can support this, so it's an optional configuration > + * > + * Return -ENODEV means no support and that's fine > + */ > +static int cygnus_gpio_pinmux_add_range(struct cygnus_gpio *chip) > +{ > + struct device_node *node = chip->dev->of_node; > + struct device_node *pinmux_node; > + struct platform_device *pinmux_pdev; > + struct gpio_chip *gc = &chip->gc; > + int i, ret; > + > + /* parse DT to find the phandle to the pinmux controller */ > + pinmux_node = of_parse_phandle(node, "pinmux", 0); > + if (!pinmux_node) > + return -ENODEV; > + > + pinmux_pdev = of_find_device_by_node(pinmux_node); > + if (!pinmux_pdev) { > + dev_err(chip->dev, "failed to get pinmux device\n"); > + return -EINVAL; > + } > + > + /* now need to create the mapping between local GPIO and PINMUX pins */ > + for (i = 0; i < ARRAY_SIZE(cygnus_gpio_pintable); i++) { > + ret = gpiochip_add_pin_range(gc, dev_name(&pinmux_pdev->dev), > + cygnus_gpio_pintable[i].offset, > + cygnus_gpio_pintable[i].pin_base, > + cygnus_gpio_pintable[i].num_pins); > + if (ret) { > + dev_err(chip->dev, "unable to add GPIO pin range\n"); > + goto err_rm_pin_range; > + } > + } > + > + chip->pinmux_is_supported = 1; chip->pinmux_is_supported = true; ? > + return 0; > + > +err_rm_pin_range: > + gpiochip_remove_pin_ranges(gc); I think you need: put_dveice(&pinmux_pdev->dev); since of_find_device_by_node calls bus_find_device() that takes reference to found device. ... And now that I look at this majority of users of of_find_device_by_node() is broken like that :( BTW, it looks like you only need pinmux_dev for it's name so you probably need to drop reference in success path as well. > + return ret; > +} > + > +static void cygnus_gpio_pinmux_remove_range(struct cygnus_gpio *chip) > +{ > + struct gpio_chip *gc = &chip->gc; > + > + if (chip->pinmux_is_supported) > + gpiochip_remove_pin_ranges(gc); > +} > + > +/* > + * Cygnus GPIO controller supports some PINCONF related configurations such as > + * pull up, pull down, and drive strength, when the pin is configured to GPIO > + * > + * Here a local pinctrl device is created with simple 1-to-1 pin mapping to the > + * local GPIO pins > + */ > +static int cygnus_gpio_register_pinconf(struct cygnus_gpio *chip) > +{ > + struct pinctrl_desc *pctldesc = &chip->pctldesc; > + struct pinctrl_pin_desc *pins; > + struct gpio_chip *gc = &chip->gc; > + int i, ret; > + > + pins = devm_kcalloc(chip->dev, gc->ngpio, sizeof(*pins), GFP_KERNEL); > + if (!pins) > + return -ENOMEM; > + chip->pins = pins; > + > + for (i = 0; i < gc->ngpio; i++) { > + pins[i].number = i; > + pins[i].name = kasprintf(GFP_KERNEL, "gpio-%d", i); We have devm_kasprintf(). > + if (!pins[i].name) { > + ret = -ENOMEM; > + goto err_kfree; > + } > + } > + > + pctldesc->name = dev_name(chip->dev); > + pctldesc->pctlops = &cygnus_pctrl_ops; > + pctldesc->pins = pins; > + pctldesc->npins = gc->ngpio; > + pctldesc->confops = &cygnus_pconf_ops; > + > + chip->pctl = pinctrl_register(pctldesc, chip->dev, chip); > + if (!chip->pctl) { > + dev_err(chip->dev, "unable to register pinctrl device\n"); > + ret = -EINVAL; > + goto err_kfree; > + } > + > + return 0; > + > +err_kfree: > + for (i = 0; i < gc->ngpio; i++) > + kfree(pins[i].name); > + > + return ret; > +} > + > +static void cygnus_gpio_unregister_pinconf(struct cygnus_gpio *chip) > +{ > + struct gpio_chip *gc = &chip->gc; > + int i; > + > + if (chip->pctl) > + pinctrl_unregister(chip->pctl); > + > + for (i = 0; i < gc->ngpio; i++) > + kfree(chip->pins[i].name); Should not be needed if you use devm_kasprintf. > +} > + > +static const struct of_device_id cygnus_gpio_of_match[] = { > + { .compatible = "brcm,cygnus-gpio" }, > + { } > +}; > +MODULE_DEVICE_TABLE(of, cygnus_gpio_of_match); > + > +static int cygnus_gpio_probe(struct platform_device *pdev) > +{ > + struct device *dev = &pdev->dev; > + struct resource *res; > + struct cygnus_gpio *chip; > + struct gpio_chip *gc; > + u32 ngpios; > + int irq, ret; > + > + chip = devm_kzalloc(dev, sizeof(*chip), GFP_KERNEL); > + if (!chip) > + return -ENOMEM; > + > + chip->dev = dev; > + platform_set_drvdata(pdev, chip); > + > + if (of_property_read_u32(dev->of_node, "ngpios", &ngpios)) { > + dev_err(dev, "missing ngpios DT property\n"); > + return -ENODEV; > + } > + chip->num_banks = (ngpios + NGPIOS_PER_BANK - 1) / NGPIOS_PER_BANK; > + > + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > + chip->base = devm_ioremap_resource(dev, res); > + if (IS_ERR(chip->base)) { > + dev_err(dev, "unable to map I/O memory\n"); > + return PTR_ERR(chip->base); > + } > + > + res = platform_get_resource(pdev, IORESOURCE_MEM, 1); > + if (res) { > + chip->io_ctrl = devm_ioremap_resource(dev, res); > + if (IS_ERR(chip->io_ctrl)) { > + dev_err(dev, "unable to map I/O memory\n"); > + return PTR_ERR(chip->io_ctrl); > + } > + } > + > + spin_lock_init(&chip->lock); > + > + gc = &chip->gc; > + gc->base = -1; > + gc->ngpio = ngpios; > + gc->label = dev_name(dev); > + gc->dev = dev; > + gc->of_node = dev->of_node; > + gc->request = cygnus_gpio_request; > + gc->free = cygnus_gpio_free; > + gc->direction_input = cygnus_gpio_direction_input; > + gc->direction_output = cygnus_gpio_direction_output; > + gc->set = cygnus_gpio_set; > + gc->get = cygnus_gpio_get; > + > + ret = gpiochip_add(gc); > + if (ret < 0) { > + dev_err(dev, "unable to add GPIO chip\n"); > + return ret; > + } > + > + ret = cygnus_gpio_pinmux_add_range(chip); > + if (ret && ret != -ENODEV) { > + dev_err(dev, "unable to add GPIO pin range\n"); > + goto err_rm_gpiochip; > + } > + > + ret = cygnus_gpio_register_pinconf(chip); > + if (ret) { > + dev_err(dev, "unable to register pinconf\n"); > + goto err_rm_range; > + } > + > + /* optional GPIO interrupt support */ > + irq = platform_get_irq(pdev, 0); > + if (irq) { > + ret = gpiochip_irqchip_add(gc, &cygnus_gpio_irq_chip, 0, > + handle_simple_irq, IRQ_TYPE_NONE); > + if (ret) { > + dev_err(dev, "no GPIO irqchip\n"); > + goto err_unregister_pinconf; > + } > + > + gpiochip_set_chained_irqchip(gc, &cygnus_gpio_irq_chip, irq, > + cygnus_gpio_irq_handler); > + } > + > + return 0; > + > +err_unregister_pinconf: > + cygnus_gpio_unregister_pinconf(chip); > + > +err_rm_range: > + cygnus_gpio_pinmux_remove_range(chip); > + > +err_rm_gpiochip: > + gpiochip_remove(gc); > + > + return ret; > +} > + > +static struct platform_driver cygnus_gpio_driver = { > + .driver = { > + .name = "cygnus-gpio", > + .of_match_table = cygnus_gpio_of_match, > + }, > + .probe = cygnus_gpio_probe, The same comment about suppress_bind_attrs. > +}; > + > +static int __init cygnus_gpio_init(void) > +{ > + return platform_driver_probe(&cygnus_gpio_driver, cygnus_gpio_probe); > +} > +arch_initcall_sync(cygnus_gpio_init); > + > +MODULE_AUTHOR("Ray Jui <rjui@broadcom.com>"); > +MODULE_DESCRIPTION("Broadcom Cygnus GPIO Driver"); > +MODULE_LICENSE("GPL v2"); > -- > 1.7.9.5 > Thanks. -- Dmitry
next prev parent reply other threads:[~2015-02-04 1:41 UTC|newest] Thread overview: 984+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <Ray Jui <rjui@broadcom.com> 2014-10-08 0:35 ` [PATCH] serial: 8250_dw: Add DMA support for non-ACPI platforms Ray Jui 2014-10-08 0:35 ` Ray Jui 2014-10-09 13:20 ` Heikki Krogerus 2014-10-08 4:38 ` [PATCH] spi: pl022: Fix broken spidev when DMA is enabled Ray Jui 2014-10-08 4:38 ` Ray Jui 2014-10-08 11:21 ` Mark Brown 2014-10-08 11:21 ` Mark Brown 2014-10-08 16:14 ` Ray Jui 2014-10-08 18:21 ` Mark Brown 2014-10-08 18:21 ` Mark Brown 2014-10-08 18:31 ` Ray Jui 2014-10-08 18:31 ` Ray Jui 2014-10-09 13:59 ` Geert Uytterhoeven 2014-10-09 13:59 ` Geert Uytterhoeven 2014-10-09 18:19 ` [PATCH] spi: spidev: Use separate TX and RX bounce buffers Ray Jui 2014-10-13 11:07 ` Mark Brown 2014-10-13 11:07 ` Mark Brown 2014-10-14 3:05 ` Ray Jui 2014-10-14 3:05 ` Ray Jui 2014-10-09 18:44 ` [PATCH] spi: pl022: Fix incorrect dma_unmap_sg Ray Jui 2014-10-09 18:44 ` Ray Jui 2014-10-13 11:08 ` Mark Brown 2014-10-13 11:08 ` Mark Brown 2014-10-14 3:05 ` Ray Jui 2014-10-14 3:05 ` Ray Jui 2014-10-17 0:48 ` [PATCH] dmaengine: pl330: use subsys_initcall Ray Jui 2014-10-17 7:45 ` Lars-Peter Clausen 2014-10-17 7:35 ` Vinod Koul 2014-10-17 11:15 ` Lars-Peter Clausen 2014-10-17 16:18 ` Ray Jui 2014-10-17 16:39 ` Lars-Peter Clausen 2014-10-17 16:56 ` Ray Jui 2014-10-21 10:45 ` Vinod Koul 2014-10-21 16:17 ` Ray Jui 2014-10-21 10:43 ` Vinod Koul 2014-10-17 9:44 ` Krzysztof Kozłowski 2014-11-27 23:46 ` [PATCH 0/4] Add pinctrl support to Broadcom Cygnus SoC Ray Jui 2014-11-27 23:46 ` Ray Jui 2014-11-27 23:46 ` Ray Jui 2014-11-27 23:46 ` [PATCH 1/4] pinctrl: Broadcom Cygnus pinctrl device tree binding Ray Jui 2014-11-27 23:46 ` Ray Jui 2014-11-27 23:46 ` Ray Jui 2015-01-09 10:12 ` Linus Walleij 2015-01-09 10:12 ` Linus Walleij 2015-01-09 10:12 ` Linus Walleij 2015-01-09 18:26 ` Ray Jui 2015-01-09 18:26 ` Ray Jui 2015-01-09 18:26 ` Ray Jui 2015-01-13 8:20 ` Linus Walleij 2015-01-13 8:20 ` Linus Walleij 2015-01-13 8:20 ` Linus Walleij 2015-01-13 17:14 ` Ray Jui 2015-01-13 17:14 ` Ray Jui 2015-01-13 17:14 ` Ray Jui 2015-01-23 2:14 ` Ray Jui 2015-01-23 2:14 ` Ray Jui 2015-01-23 2:14 ` Ray Jui 2015-01-23 6:49 ` Ray Jui 2015-01-23 6:49 ` Ray Jui 2015-01-23 6:49 ` Ray Jui 2015-01-30 14:18 ` Linus Walleij 2015-01-30 14:18 ` Linus Walleij 2015-01-30 14:18 ` Linus Walleij 2015-01-30 17:01 ` Ray Jui 2015-01-30 17:01 ` Ray Jui 2015-01-30 17:01 ` Ray Jui 2015-01-30 13:54 ` Linus Walleij 2015-01-30 13:54 ` Linus Walleij 2015-01-30 13:54 ` Linus Walleij 2014-11-27 23:46 ` [PATCH 2/4] pinctrl: cygnus: add initial pinctrl support Ray Jui 2014-11-27 23:46 ` Ray Jui 2014-11-27 23:46 ` Ray Jui 2015-01-09 11:03 ` Linus Walleij 2015-01-09 11:03 ` Linus Walleij 2015-01-09 11:03 ` Linus Walleij 2015-01-09 18:38 ` Ray Jui 2015-01-09 18:38 ` Ray Jui 2015-01-09 18:38 ` Ray Jui 2015-01-13 8:25 ` Linus Walleij 2015-01-13 8:25 ` Linus Walleij 2015-01-13 8:25 ` Linus Walleij 2015-01-13 17:17 ` Ray Jui 2015-01-13 17:17 ` Ray Jui 2014-11-27 23:46 ` [PATCH 3/4] ARM: mach-bcm: enable pinctrl support for Cygnus Ray Jui 2014-11-27 23:46 ` Ray Jui 2014-11-27 23:46 ` Ray Jui 2014-11-27 23:46 ` [PATCH 4/4] ARM: dts: enable pinctrl for Broadcom Cygnus Ray Jui 2014-11-27 23:46 ` Ray Jui 2014-11-27 23:46 ` Ray Jui 2014-11-28 1:27 ` [PATCH 0/4] Add common clock support for Broadcom iProc architecture Ray Jui 2014-11-28 1:27 ` Ray Jui 2014-11-28 1:27 ` [PATCH 1/4] clk: iproc: define Broadcom iProc clock binding Ray Jui 2014-11-28 1:27 ` Ray Jui 2014-11-28 1:27 ` [PATCH 2/4] clk: iproc: add initial common clock support Ray Jui 2014-11-28 1:27 ` Ray Jui 2014-11-28 1:27 ` [PATCH 3/4] clk: cygnus: add clock support for Broadcom Cygnus Ray Jui 2014-11-28 1:27 ` Ray Jui 2014-11-28 1:27 ` [PATCH 4/4] ARM: dts: enable " Ray Jui 2014-11-28 1:27 ` Ray Jui 2014-12-04 21:43 ` [PATCH 0/4] Add common clock support for Broadcom iProc architecture Ray Jui 2014-12-04 21:43 ` Ray Jui 2014-12-04 21:43 ` Ray Jui 2014-12-04 21:43 ` [PATCH 1/4] clk: iproc: define Broadcom iProc clock binding Ray Jui 2014-12-04 21:43 ` Ray Jui 2014-12-04 21:43 ` Ray Jui 2014-12-04 21:43 ` [PATCH 2/4] clk: iproc: add initial common clock support Ray Jui 2014-12-04 21:43 ` Ray Jui 2014-12-04 21:43 ` Ray Jui 2014-12-06 22:20 ` Tim Kryger 2014-12-06 22:20 ` Tim Kryger 2014-12-06 22:20 ` Tim Kryger 2014-12-08 1:38 ` Ray Jui 2014-12-08 1:38 ` Ray Jui 2014-12-08 1:38 ` Ray Jui 2014-12-04 21:43 ` [PATCH 3/4] clk: cygnus: add clock support for Broadcom Cygnus Ray Jui 2014-12-04 21:43 ` Ray Jui 2014-12-04 21:43 ` Ray Jui 2014-12-04 21:43 ` [PATCH 4/4] ARM: dts: enable " Ray Jui 2014-12-04 21:43 ` Ray Jui 2014-12-04 21:43 ` Ray Jui 2014-12-04 21:56 ` [PATCH 0/4] Add pinctrl support to Broadcom Cygnus SoC Ray Jui 2014-12-04 21:56 ` Ray Jui 2014-12-04 21:56 ` Ray Jui 2014-12-04 21:56 ` [PATCH 1/4] pinctrl: Broadcom Cygnus pinctrl device tree binding Ray Jui 2014-12-04 21:56 ` Ray Jui 2014-12-04 21:56 ` Ray Jui 2014-12-04 22:16 ` Belisko Marek 2014-12-04 22:16 ` Belisko Marek 2014-12-04 22:35 ` Ray Jui 2014-12-04 22:35 ` Ray Jui 2014-12-04 22:35 ` Ray Jui 2014-12-04 21:56 ` [PATCH 2/4] pinctrl: cygnus: add initial pinctrl support Ray Jui 2014-12-04 21:56 ` Ray Jui 2014-12-04 21:56 ` Ray Jui 2014-12-04 21:56 ` [PATCH 3/4] ARM: mach-bcm: enable pinctrl support for Cygnus Ray Jui 2014-12-04 21:56 ` Ray Jui 2014-12-04 21:56 ` Ray Jui 2014-12-04 21:56 ` [PATCH 4/4] ARM: dts: enable pinctrl for Broadcom Cygnus Ray Jui 2014-12-04 21:56 ` Ray Jui 2014-12-04 21:56 ` Ray Jui 2014-12-05 19:51 ` [PATCH v2 0/4] Add pinctrl support to Broadcom Cygnus SoC Ray Jui 2014-12-05 19:51 ` Ray Jui 2014-12-05 19:51 ` Ray Jui [not found] ` <1417809069-26510-1-git-send-email-rjui-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> 2014-12-05 19:51 ` [PATCH v2 1/4] pinctrl: Broadcom Cygnus pinctrl device tree binding Ray Jui 2014-12-05 19:51 ` Ray Jui 2014-12-05 19:51 ` Ray Jui 2014-12-05 19:51 ` [PATCH v2 2/4] pinctrl: cygnus: add initial pinctrl support Ray Jui 2014-12-05 19:51 ` Ray Jui 2014-12-05 19:51 ` Ray Jui 2014-12-05 19:51 ` [PATCH v2 3/4] ARM: mach-bcm: enable pinctrl support for Cygnus Ray Jui 2014-12-05 19:51 ` Ray Jui 2014-12-05 19:51 ` Ray Jui 2014-12-05 19:51 ` [PATCH v2 4/4] ARM: dts: enable pinctrl for Broadcom Cygnus Ray Jui 2014-12-05 19:51 ` Ray Jui 2014-12-05 19:51 ` Ray Jui [not found] ` <Ray Jui <rjui-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> 2014-12-06 0:40 ` [PATCH 0/5] Add gpio support to Broadcom Cygnus SoC Ray Jui 2014-12-06 0:40 ` Ray Jui 2014-12-06 0:40 ` Ray Jui 2014-12-06 0:40 ` [PATCH 1/5] gpio: Cygnus: define Broadcom Cygnus GPIO binding Ray Jui 2014-12-06 0:40 ` Ray Jui 2014-12-06 0:40 ` Ray Jui 2015-01-13 7:57 ` Linus Walleij 2015-01-13 7:57 ` Linus Walleij 2015-01-13 7:57 ` Linus Walleij 2015-01-13 17:07 ` Ray Jui 2015-01-13 17:07 ` Ray Jui 2015-01-13 17:07 ` Ray Jui 2014-12-06 0:40 ` [PATCH 2/5] gpio: Cygnus: add GPIO driver Ray Jui 2014-12-06 0:40 ` Ray Jui 2014-12-06 0:40 ` Ray Jui [not found] ` <1417826408-1600-3-git-send-email-rjui-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> 2014-12-06 1:28 ` Joe Perches 2014-12-06 1:28 ` Joe Perches 2014-12-06 1:28 ` Joe Perches 2014-12-06 2:14 ` Ray Jui 2014-12-06 2:14 ` Ray Jui 2014-12-06 2:14 ` Ray Jui 2014-12-06 2:34 ` Joe Perches 2014-12-06 2:34 ` Joe Perches 2014-12-06 3:41 ` Ray Jui 2014-12-06 3:41 ` Ray Jui 2014-12-06 3:41 ` Ray Jui 2014-12-06 4:24 ` Joe Perches 2014-12-06 4:24 ` Joe Perches 2014-12-08 1:34 ` Ray Jui 2014-12-08 1:34 ` Ray Jui 2014-12-08 1:34 ` Ray Jui 2014-12-08 1:59 ` Ray Jui 2014-12-08 1:59 ` Ray Jui 2014-12-08 1:59 ` Ray Jui 2014-12-06 0:40 ` [PATCH 3/5] ARM: mach-bcm: Enable GPIO support for Cygnus Ray Jui 2014-12-06 0:40 ` Ray Jui 2014-12-06 0:40 ` Ray Jui 2014-12-06 0:40 ` [PATCH 4/5] ARM: dts: enable GPIO for Broadcom Cygnus Ray Jui 2014-12-06 0:40 ` Ray Jui 2014-12-06 0:40 ` Ray Jui 2014-12-06 0:40 ` [PATCH 5/5] MAINTAINERS: Entry for Cygnus GPIO driver Ray Jui 2014-12-06 0:40 ` Ray Jui 2014-12-06 0:40 ` Ray Jui 2014-12-16 2:18 ` [PATCH v6 0/3] Add gpio support to Broadcom Cygnus SoC Ray Jui 2014-12-16 2:18 ` Ray Jui 2014-12-16 2:18 ` Ray Jui 2014-12-16 2:18 ` [PATCH v6 1/3] gpio: Cygnus: define Broadcom Cygnus GPIO binding Ray Jui 2014-12-16 2:18 ` Ray Jui 2014-12-16 2:18 ` Ray Jui 2014-12-16 2:18 ` [PATCH v6 2/3] gpio: Cygnus: add GPIO driver Ray Jui 2014-12-16 2:18 ` Ray Jui 2014-12-16 2:18 ` Ray Jui 2015-01-13 8:53 ` Linus Walleij 2015-01-13 8:53 ` Linus Walleij 2015-01-13 8:53 ` Linus Walleij 2015-01-13 17:05 ` Ray Jui 2015-01-13 17:05 ` Ray Jui 2015-01-13 17:05 ` Ray Jui 2015-01-16 10:14 ` Linus Walleij 2015-01-16 10:14 ` Linus Walleij 2015-01-16 10:14 ` Linus Walleij 2015-01-17 0:11 ` Ray Jui 2015-01-17 0:11 ` Ray Jui 2015-01-17 0:11 ` Ray Jui 2015-01-20 9:53 ` Linus Walleij 2015-01-20 9:53 ` Linus Walleij 2015-01-20 9:53 ` Linus Walleij 2015-01-20 19:17 ` Ray Jui 2015-01-20 19:17 ` Ray Jui 2015-01-20 19:17 ` Ray Jui 2014-12-16 2:18 ` [PATCH v6 3/3] ARM: dts: enable GPIO for Broadcom Cygnus Ray Jui 2014-12-16 2:18 ` Ray Jui 2014-12-16 2:18 ` Ray Jui 2014-12-16 8:56 ` [PATCH v6 0/3] Add gpio support to Broadcom Cygnus SoC Arnd Bergmann 2014-12-16 8:56 ` Arnd Bergmann 2014-12-17 8:06 ` Alexandre Courbot 2014-12-17 8:06 ` Alexandre Courbot 2014-12-17 8:06 ` Alexandre Courbot 2015-02-04 2:09 ` [PATCH v4 0/4] Add pinctrl " Ray Jui 2015-02-04 2:09 ` Ray Jui 2015-02-04 2:09 ` Ray Jui 2015-02-04 2:09 ` [PATCH v4 1/4] pinctrl: bcm: consolidate Broadcom pinctrl drivers Ray Jui 2015-02-04 2:09 ` Ray Jui [not found] ` <1423015801-26967-2-git-send-email-rjui-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> 2015-03-04 9:07 ` Linus Walleij 2015-03-04 9:07 ` Linus Walleij 2015-03-04 9:07 ` Linus Walleij [not found] ` <CACRpkdaiM+mqGg43BT1Kr-CNi8+_U4KgZM4iZocv9+ovHL5hLQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2015-03-04 17:31 ` Ray Jui 2015-03-04 17:31 ` Ray Jui 2015-03-04 17:31 ` Ray Jui [not found] ` <1423015801-26967-1-git-send-email-rjui-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> 2015-02-04 2:09 ` [PATCH v4 2/4] pinctrl: Broadcom Cygnus pinctrl device tree binding Ray Jui 2015-02-04 2:09 ` Ray Jui 2015-02-04 2:09 ` Ray Jui 2015-02-04 2:10 ` [PATCH v4 3/4] pinctrl: cygnus: add initial IOMUX driver support Ray Jui 2015-02-04 2:10 ` Ray Jui 2015-02-04 2:10 ` Ray Jui 2015-02-04 2:10 ` [PATCH v4 4/4] ARM: dts: enable IOMUX for Broadcom Cygnus Ray Jui 2015-02-04 2:10 ` Ray Jui 2015-02-04 2:10 ` Ray Jui 2015-02-25 19:29 ` [PATCH v4 0/4] Add pinctrl support to Broadcom Cygnus SoC Dmitry Torokhov 2015-02-25 19:29 ` Dmitry Torokhov 2014-12-08 2:38 ` [PATCH v2 0/5] Add gpio " Ray Jui 2014-12-08 2:38 ` Ray Jui 2014-12-08 2:38 ` Ray Jui 2014-12-08 2:38 ` [PATCH v2 1/5] gpio: Cygnus: define Broadcom Cygnus GPIO binding Ray Jui 2014-12-08 2:38 ` Ray Jui 2014-12-08 2:38 ` Ray Jui 2014-12-08 11:22 ` Arnd Bergmann 2014-12-08 11:22 ` Arnd Bergmann 2014-12-08 16:55 ` Ray Jui 2014-12-08 16:55 ` Ray Jui 2014-12-08 16:55 ` Ray Jui 2014-12-08 17:11 ` Arnd Bergmann 2014-12-08 17:11 ` Arnd Bergmann 2014-12-08 2:38 ` [PATCH v2 2/5] gpio: Cygnus: add GPIO driver Ray Jui 2014-12-08 2:38 ` Ray Jui 2014-12-08 2:38 ` Ray Jui 2014-12-08 2:38 ` [PATCH v2 3/5] ARM: mach-bcm: Enable GPIO support for Cygnus Ray Jui 2014-12-08 2:38 ` Ray Jui 2014-12-08 2:38 ` Ray Jui 2014-12-08 2:38 ` [PATCH v2 4/5] ARM: dts: enable GPIO for Broadcom Cygnus Ray Jui 2014-12-08 2:38 ` Ray Jui 2014-12-08 2:38 ` Ray Jui 2014-12-08 2:38 ` [PATCH v2 5/5] MAINTAINERS: Entry for Cygnus GPIO driver Ray Jui 2014-12-08 2:38 ` Ray Jui 2014-12-08 2:38 ` Ray Jui 2014-12-08 18:47 ` [PATCH v3 0/5] Add gpio support to Broadcom Cygnus SoC Ray Jui 2014-12-08 18:47 ` Ray Jui 2014-12-08 18:47 ` Ray Jui 2014-12-08 18:47 ` [PATCH v2 " Ray Jui 2014-12-08 18:47 ` Ray Jui 2014-12-08 18:47 ` Ray Jui [not found] ` <1418064468-8512-2-git-send-email-rjui-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> 2014-12-08 18:48 ` Ray Jui 2014-12-08 18:48 ` Ray Jui 2014-12-08 18:48 ` Ray Jui 2014-12-08 18:47 ` [PATCH v3 1/5] gpio: Cygnus: define Broadcom Cygnus GPIO binding Ray Jui 2014-12-08 18:47 ` Ray Jui 2014-12-08 18:47 ` Ray Jui 2014-12-08 19:38 ` Arnd Bergmann 2014-12-08 19:38 ` Arnd Bergmann 2014-12-08 19:45 ` Ray Jui 2014-12-08 19:45 ` Ray Jui 2014-12-08 19:45 ` Ray Jui [not found] ` <1418064468-8512-1-git-send-email-rjui-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> 2014-12-08 18:47 ` [PATCH v3 2/5] gpio: Cygnus: add GPIO driver Ray Jui 2014-12-08 18:47 ` Ray Jui 2014-12-08 18:47 ` Ray Jui 2014-12-08 18:47 ` [PATCH v3 3/5] ARM: mach-bcm: Enable GPIO support for Cygnus Ray Jui 2014-12-08 18:47 ` Ray Jui 2014-12-08 18:47 ` Ray Jui 2014-12-08 18:47 ` [PATCH v3 4/5] ARM: dts: enable GPIO for Broadcom Cygnus Ray Jui 2014-12-08 18:47 ` Ray Jui 2014-12-08 18:47 ` Ray Jui 2014-12-08 18:47 ` [PATCH v3 5/5] MAINTAINERS: Entry for Cygnus GPIO driver Ray Jui 2014-12-08 18:47 ` Ray Jui 2014-12-08 18:47 ` Ray Jui 2014-12-08 20:41 ` [PATCH v4 0/5] Add gpio support to Broadcom Cygnus SoC Ray Jui 2014-12-08 20:41 ` Ray Jui 2014-12-08 20:41 ` Ray Jui 2014-12-08 20:41 ` [PATCH v4 1/5] gpio: Cygnus: define Broadcom Cygnus GPIO binding Ray Jui 2014-12-08 20:41 ` Ray Jui 2014-12-08 20:41 ` Ray Jui 2014-12-08 20:41 ` [PATCH v4 2/5] gpio: Cygnus: add GPIO driver Ray Jui 2014-12-08 20:41 ` Ray Jui 2014-12-08 20:41 ` Ray Jui 2014-12-10 10:34 ` Alexandre Courbot 2014-12-10 10:34 ` Alexandre Courbot 2014-12-10 10:34 ` Alexandre Courbot [not found] ` <CAAVeFuJ875fvEwPbnc-Eewsw4Rp7hLbv7nXWBb=OgvLwhQBVvQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2014-12-11 1:30 ` Ray Jui 2014-12-11 1:30 ` Ray Jui 2014-12-11 1:30 ` Ray Jui 2014-12-08 20:41 ` [PATCH v4 3/5] ARM: mach-bcm: Enable GPIO support for Cygnus Ray Jui 2014-12-08 20:41 ` Ray Jui 2014-12-08 20:41 ` Ray Jui 2014-12-08 20:41 ` [PATCH v4 4/5] ARM: dts: enable GPIO for Broadcom Cygnus Ray Jui 2014-12-08 20:41 ` Ray Jui 2014-12-08 20:41 ` Ray Jui 2014-12-08 20:41 ` [PATCH v4 5/5] MAINTAINERS: Entry for Cygnus GPIO driver Ray Jui 2014-12-08 20:41 ` Ray Jui 2014-12-08 20:41 ` Ray Jui 2014-12-10 0:04 ` [PATCH 0/4] Add PCIe support to Broadcom iProc Ray Jui 2014-12-10 0:04 ` Ray Jui 2014-12-10 0:04 ` Ray Jui 2014-12-10 0:04 ` [PATCH 1/4] pci: iProc: define Broadcom iProc PCIe binding Ray Jui 2014-12-10 0:04 ` Ray Jui 2014-12-10 0:04 ` Ray Jui 2014-12-10 10:30 ` Lucas Stach 2014-12-10 10:30 ` Lucas Stach 2014-12-11 1:37 ` Ray Jui 2014-12-11 1:37 ` Ray Jui 2014-12-11 1:37 ` Ray Jui 2014-12-10 0:04 ` [PATCH 2/4] PCI: iproc: Add Broadcom iProc PCIe driver Ray Jui 2014-12-10 0:04 ` Ray Jui 2014-12-10 0:04 ` Ray Jui 2014-12-10 11:31 ` Arnd Bergmann 2014-12-10 11:31 ` Arnd Bergmann 2014-12-10 16:46 ` Scott Branden 2014-12-10 16:46 ` Scott Branden 2014-12-10 16:46 ` Scott Branden 2014-12-10 18:46 ` Florian Fainelli 2014-12-10 18:46 ` Florian Fainelli 2014-12-10 18:46 ` Florian Fainelli 2014-12-10 18:46 ` Florian Fainelli 2014-12-10 20:26 ` Hauke Mehrtens 2014-12-10 20:26 ` Hauke Mehrtens 2014-12-10 20:26 ` Hauke Mehrtens 2014-12-10 20:40 ` Ray Jui 2014-12-10 20:40 ` Ray Jui 2014-12-10 20:40 ` Ray Jui 2014-12-10 20:40 ` Ray Jui 2014-12-11 9:44 ` Arend van Spriel 2014-12-11 9:44 ` Arend van Spriel 2014-12-10 0:04 ` [PATCH 3/4] ARM: mach-bcm: Enable PCIe support for iProc Ray Jui 2014-12-10 0:04 ` Ray Jui 2014-12-10 0:04 ` Ray Jui 2014-12-10 0:04 ` [PATCH 4/4] ARM: dts: enable PCIe for Broadcom Cygnus Ray Jui 2014-12-10 0:04 ` Ray Jui 2014-12-10 0:04 ` Ray Jui 2014-12-10 0:54 ` [PATCH 0/4] Add I2C support to Broadcom iProc Ray Jui 2014-12-10 0:54 ` Ray Jui 2014-12-10 0:54 ` Ray Jui 2014-12-10 0:54 ` [PATCH 1/4] i2c: iProc: define Broadcom iProc I2C binding Ray Jui 2014-12-10 0:54 ` Ray Jui 2014-12-10 0:54 ` Ray Jui 2014-12-10 1:27 ` Varka Bhadram 2014-12-10 1:27 ` Varka Bhadram 2014-12-10 1:35 ` Ray Jui 2014-12-10 1:35 ` Ray Jui 2014-12-10 1:35 ` Ray Jui 2014-12-10 3:12 ` Varka Bhadram 2014-12-10 3:27 ` Ray Jui 2014-12-10 3:27 ` Ray Jui 2014-12-10 3:27 ` Ray Jui 2014-12-10 0:54 ` [PATCH 2/4] i2c: iproc: Add Broadcom iProc I2C Driver Ray Jui 2014-12-10 0:54 ` Ray Jui 2014-12-10 0:54 ` Ray Jui 2014-12-10 1:33 ` Varka Bhadram 2014-12-10 1:33 ` Varka Bhadram 2014-12-10 1:41 ` Ray Jui 2014-12-10 1:41 ` Ray Jui 2014-12-10 1:41 ` Ray Jui 2014-12-10 3:21 ` Varka Bhadram 2014-12-10 3:28 ` Varka Bhadram 2014-12-10 3:31 ` Ray Jui 2014-12-10 3:31 ` Ray Jui 2014-12-10 3:31 ` Ray Jui 2014-12-10 0:54 ` [PATCH 3/4] ARM: mach-bcm: Enable I2C support for iProc Ray Jui 2014-12-10 0:54 ` Ray Jui 2014-12-10 0:54 ` Ray Jui 2014-12-10 0:54 ` [PATCH 4/4] ARM: dts: add I2C device nodes for Broadcom Cygnus Ray Jui 2014-12-10 0:54 ` Ray Jui 2014-12-10 0:54 ` Ray Jui 2014-12-10 2:18 ` [PATCH v2 0/4] Add I2C support to Broadcom iProc Ray Jui 2014-12-10 2:18 ` Ray Jui 2014-12-10 2:18 ` Ray Jui 2014-12-10 2:18 ` [PATCH v2 1/4] i2c: iProc: define Broadcom iProc I2C binding Ray Jui 2014-12-10 2:18 ` Ray Jui 2014-12-10 2:18 ` Ray Jui 2014-12-10 2:18 ` [PATCH v2 2/4] i2c: iproc: Add Broadcom iProc I2C Driver Ray Jui 2014-12-10 2:18 ` Ray Jui 2014-12-10 2:18 ` Ray Jui 2014-12-10 2:18 ` [PATCH v2 3/4] ARM: mach-bcm: Enable I2C support for iProc Ray Jui 2014-12-10 2:18 ` Ray Jui 2014-12-10 2:18 ` Ray Jui 2014-12-10 2:20 ` Florian Fainelli 2014-12-10 2:20 ` Florian Fainelli 2014-12-10 2:20 ` Florian Fainelli 2014-12-10 2:24 ` Ray Jui 2014-12-10 2:24 ` Ray Jui 2014-12-10 2:24 ` Ray Jui 2014-12-10 3:20 ` Florian Fainelli 2014-12-10 3:20 ` Florian Fainelli 2014-12-10 3:20 ` Florian Fainelli 2014-12-10 3:58 ` Ray Jui 2014-12-10 3:58 ` Ray Jui 2014-12-10 3:58 ` Ray Jui 2014-12-10 2:18 ` [PATCH v2 4/4] ARM: dts: add I2C device nodes for Broadcom Cygnus Ray Jui 2014-12-10 2:18 ` Ray Jui 2014-12-10 2:18 ` Ray Jui 2014-12-10 3:57 ` [PATCH v3 0/3] Add I2C support to Broadcom iProc Ray Jui 2014-12-10 3:57 ` Ray Jui 2014-12-10 3:57 ` Ray Jui 2014-12-10 3:57 ` [PATCH v3 1/3] i2c: iProc: define Broadcom iProc I2C binding Ray Jui 2014-12-10 3:57 ` Ray Jui 2014-12-10 3:57 ` Ray Jui 2014-12-10 3:57 ` [PATCH v3 2/3] i2c: iproc: Add Broadcom iProc I2C Driver Ray Jui 2014-12-10 3:57 ` Ray Jui 2014-12-10 3:57 ` Ray Jui 2015-01-13 22:50 ` Uwe Kleine-König 2015-01-13 22:50 ` Uwe Kleine-König 2015-01-13 22:50 ` Uwe Kleine-König 2015-01-14 2:14 ` Ray Jui 2015-01-14 2:14 ` Ray Jui 2015-01-14 2:14 ` Ray Jui 2015-01-14 7:51 ` Uwe Kleine-König 2015-01-14 7:51 ` Uwe Kleine-König 2015-01-14 20:05 ` Ray Jui 2015-01-14 20:05 ` Ray Jui 2015-01-14 20:05 ` Ray Jui 2015-01-15 11:59 ` Wolfram Sang 2015-01-15 11:59 ` Wolfram Sang 2015-01-15 11:59 ` Wolfram Sang 2015-01-16 22:51 ` Ray Jui 2015-01-16 22:51 ` Ray Jui 2015-01-16 22:51 ` Ray Jui 2014-12-10 3:57 ` [PATCH v3 3/3] ARM: dts: add I2C device nodes for Broadcom Cygnus Ray Jui 2014-12-10 3:57 ` Ray Jui 2014-12-10 3:57 ` Ray Jui [not found] ` <548F577E.7020207@broadcom.com> [not found] ` <548F577E.7020207-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> 2014-12-15 21:55 ` [PATCH v3 0/3] Add I2C support to Broadcom iProc Wolfram Sang 2014-12-16 0:12 ` Ray Jui 2014-12-12 0:05 ` [PATCH v5 0/3] Add gpio support to Broadcom Cygnus SoC Ray Jui 2014-12-12 0:05 ` Ray Jui 2014-12-12 0:05 ` Ray Jui 2014-12-12 0:05 ` [PATCH v5 1/3] gpio: Cygnus: define Broadcom Cygnus GPIO binding Ray Jui 2014-12-12 0:05 ` Ray Jui 2014-12-12 0:05 ` Ray Jui 2014-12-12 12:08 ` Arnd Bergmann 2014-12-12 12:08 ` Arnd Bergmann 2014-12-12 13:05 ` Alexandre Courbot 2014-12-12 13:05 ` Alexandre Courbot 2014-12-12 13:05 ` Alexandre Courbot 2014-12-12 15:28 ` Arnd Bergmann 2014-12-12 15:28 ` Arnd Bergmann 2014-12-12 15:28 ` Arnd Bergmann 2014-12-15 21:35 ` Ray Jui 2014-12-15 21:35 ` Ray Jui 2014-12-15 21:35 ` Ray Jui 2014-12-15 21:57 ` Arnd Bergmann 2014-12-15 21:57 ` Arnd Bergmann 2014-12-16 0:08 ` Ray Jui 2014-12-16 0:08 ` Ray Jui 2014-12-16 0:08 ` Ray Jui 2014-12-17 2:52 ` Alexandre Courbot 2014-12-17 2:52 ` Alexandre Courbot 2014-12-17 2:52 ` Alexandre Courbot 2015-01-13 8:01 ` Linus Walleij 2015-01-13 8:01 ` Linus Walleij 2015-01-13 8:01 ` Linus Walleij 2014-12-17 2:45 ` Alexandre Courbot 2014-12-17 2:45 ` Alexandre Courbot 2014-12-17 2:45 ` Alexandre Courbot 2014-12-17 10:26 ` Arnd Bergmann 2014-12-17 10:26 ` Arnd Bergmann 2014-12-17 10:26 ` Arnd Bergmann 2014-12-17 13:16 ` Alexandre Courbot 2014-12-17 13:16 ` Alexandre Courbot 2014-12-17 13:16 ` Alexandre Courbot 2014-12-17 10:44 ` Russell King - ARM Linux 2014-12-17 10:44 ` Russell King - ARM Linux 2014-12-17 10:44 ` Russell King - ARM Linux 2014-12-17 13:13 ` Alexandre Courbot 2014-12-17 13:13 ` Alexandre Courbot 2014-12-17 13:13 ` Alexandre Courbot 2015-01-13 8:06 ` Linus Walleij 2015-01-13 8:06 ` Linus Walleij 2015-01-13 8:06 ` Linus Walleij [not found] ` <CACRpkdZbGjNecrggrFr_18zjobXMBpkrSjBMAUfyfs2ZCebB0w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2015-01-13 11:41 ` Russell King - ARM Linux 2015-01-13 11:41 ` Russell King - ARM Linux 2015-01-13 11:41 ` Russell King - ARM Linux 2015-01-16 10:18 ` Linus Walleij 2015-01-16 10:18 ` Linus Walleij 2015-01-16 10:18 ` Linus Walleij 2014-12-12 17:17 ` Ray Jui 2014-12-12 17:17 ` Ray Jui 2014-12-12 17:17 ` Ray Jui 2014-12-12 0:05 ` [PATCH v5 2/3] gpio: Cygnus: add GPIO driver Ray Jui 2014-12-12 0:05 ` Ray Jui 2014-12-12 0:05 ` Ray Jui 2014-12-12 0:05 ` [PATCH v5 3/3] ARM: dts: enable GPIO for Broadcom Cygnus Ray Jui 2014-12-12 0:05 ` Ray Jui 2014-12-12 0:05 ` Ray Jui 2014-12-12 2:36 ` [PATCH v2 0/4] Add PCIe support to Broadcom iProc Ray Jui 2014-12-12 2:36 ` Ray Jui 2014-12-12 2:36 ` Ray Jui 2014-12-12 2:36 ` [PATCH v2 1/4] pci: iProc: define Broadcom iProc PCIe binding Ray Jui 2014-12-12 2:36 ` Ray Jui 2014-12-12 2:36 ` Ray Jui 2014-12-12 12:14 ` Arnd Bergmann 2014-12-12 12:14 ` Arnd Bergmann 2014-12-12 12:14 ` Arnd Bergmann 2014-12-12 16:53 ` Ray Jui 2014-12-12 16:53 ` Ray Jui 2014-12-12 16:53 ` Ray Jui 2014-12-12 17:14 ` Arnd Bergmann 2014-12-12 17:14 ` Arnd Bergmann 2014-12-13 10:05 ` Arend van Spriel 2014-12-13 10:05 ` Arend van Spriel 2014-12-13 10:05 ` Arend van Spriel 2014-12-13 19:46 ` Arnd Bergmann 2014-12-13 19:46 ` Arnd Bergmann 2014-12-14 9:48 ` Arend van Spriel 2014-12-14 9:48 ` Arend van Spriel 2014-12-14 16:29 ` Arnd Bergmann 2014-12-14 16:29 ` Arnd Bergmann 2014-12-14 16:29 ` Arnd Bergmann 2014-12-12 2:36 ` [PATCH v2 2/4] PCI: iproc: Add Broadcom iProc PCIe driver Ray Jui 2014-12-12 2:36 ` Ray Jui 2014-12-12 2:36 ` Ray Jui 2014-12-12 12:29 ` Arnd Bergmann 2014-12-12 12:29 ` Arnd Bergmann 2014-12-12 12:29 ` Arnd Bergmann 2014-12-12 17:08 ` Ray Jui 2014-12-12 17:08 ` Ray Jui 2014-12-12 17:08 ` Ray Jui 2014-12-12 17:21 ` Arnd Bergmann 2014-12-12 17:21 ` Arnd Bergmann 2014-12-15 19:16 ` Ray Jui 2014-12-15 19:16 ` Ray Jui 2014-12-15 19:16 ` Ray Jui 2014-12-15 21:37 ` Arnd Bergmann 2014-12-15 21:37 ` Arnd Bergmann 2014-12-16 0:28 ` Ray Jui 2014-12-16 0:28 ` Ray Jui 2014-12-16 0:28 ` Ray Jui 2014-12-12 2:36 ` [PATCH v2 3/4] ARM: mach-bcm: Enable PCIe support for iProc Ray Jui 2014-12-12 2:36 ` Ray Jui 2014-12-12 2:36 ` Ray Jui 2014-12-12 12:15 ` Arnd Bergmann 2014-12-12 12:15 ` Arnd Bergmann 2014-12-12 16:56 ` Ray Jui 2014-12-12 16:56 ` Ray Jui 2014-12-12 16:56 ` Ray Jui 2014-12-12 17:02 ` Arnd Bergmann 2014-12-12 17:02 ` Arnd Bergmann 2014-12-12 17:09 ` Ray Jui 2014-12-12 17:09 ` Ray Jui 2014-12-12 17:09 ` Ray Jui 2014-12-12 2:36 ` [PATCH v2 4/4] ARM: dts: enable PCIe for Broadcom Cygnus Ray Jui 2014-12-12 2:36 ` Ray Jui 2014-12-12 2:36 ` Ray Jui 2015-01-05 23:21 ` [PATCH v2 0/5] Add common clock support for Broadcom iProc architecture Ray Jui 2015-01-05 23:21 ` Ray Jui 2015-01-05 23:21 ` Ray Jui 2015-01-05 23:21 ` [PATCH v2 1/5] clk: iproc: define Broadcom iProc clock binding Ray Jui 2015-01-05 23:21 ` Ray Jui 2015-01-05 23:21 ` Ray Jui 2015-01-05 23:21 ` [PATCH v2 2/5] clk: iproc: add initial common clock support Ray Jui 2015-01-05 23:21 ` Ray Jui 2015-01-05 23:21 ` Ray Jui 2015-01-05 23:21 ` [PATCH v2 3/5] clk: Change bcm clocks build dependency Ray Jui 2015-01-05 23:21 ` Ray Jui 2015-01-05 23:21 ` Ray Jui 2015-01-05 23:21 ` [PATCH v2 4/5] clk: cygnus: add clock support for Broadcom Cygnus Ray Jui 2015-01-05 23:21 ` Ray Jui 2015-01-05 23:21 ` Ray Jui 2015-01-06 20:21 ` Arnd Bergmann 2015-01-06 20:21 ` Arnd Bergmann 2015-01-07 2:29 ` Ray Jui 2015-01-07 2:29 ` Ray Jui 2015-01-07 2:29 ` Ray Jui 2015-01-07 9:11 ` Arnd Bergmann 2015-01-07 9:11 ` Arnd Bergmann 2015-01-07 9:11 ` Arnd Bergmann 2015-01-07 17:33 ` Ray Jui 2015-01-07 17:33 ` Ray Jui 2015-01-07 17:33 ` Ray Jui 2015-01-05 23:21 ` [PATCH v2 5/5] ARM: dts: enable " Ray Jui 2015-01-05 23:21 ` Ray Jui 2015-01-05 23:21 ` Ray Jui 2015-01-07 19:22 ` [PATCH v3 0/5] Add common clock support for Broadcom iProc architecture Ray Jui 2015-01-07 19:22 ` Ray Jui 2015-01-07 19:22 ` Ray Jui 2015-01-07 19:22 ` [PATCH v3 1/5] clk: iproc: define Broadcom iProc clock binding Ray Jui 2015-01-07 19:22 ` Ray Jui 2015-01-07 19:22 ` Ray Jui 2015-01-07 19:22 ` [PATCH v3 2/5] clk: iproc: add initial common clock support Ray Jui 2015-01-07 19:22 ` Ray Jui 2015-01-07 19:22 ` Ray Jui 2015-01-07 19:22 ` [PATCH v3 3/5] clk: Change bcm clocks build dependency Ray Jui 2015-01-07 19:22 ` Ray Jui 2015-01-07 19:22 ` Ray Jui 2015-01-07 19:22 ` [PATCH v3 4/5] clk: cygnus: add clock support for Broadcom Cygnus Ray Jui 2015-01-07 19:22 ` Ray Jui 2015-01-07 19:22 ` Ray Jui 2015-01-07 19:22 ` [PATCH v3 5/5] ARM: dts: enable " Ray Jui 2015-01-07 19:22 ` Ray Jui 2015-01-07 19:22 ` Ray Jui 2015-01-07 19:26 ` [PATCH v3 0/5] Add common clock support for Broadcom iProc architecture Arnd Bergmann 2015-01-07 19:26 ` Arnd Bergmann 2015-01-14 22:23 ` [PATCH v4 0/3] Add I2C support to Broadcom iProc Ray Jui 2015-01-14 22:23 ` Ray Jui 2015-01-14 22:23 ` Ray Jui 2015-01-14 22:23 ` [PATCH v4 1/3] i2c: iProc: define Broadcom iProc I2C binding Ray Jui 2015-01-14 22:23 ` Ray Jui 2015-01-14 22:23 ` Ray Jui 2015-01-14 22:23 ` [PATCH v4 2/3] i2c: iproc: Add Broadcom iProc I2C Driver Ray Jui 2015-01-14 22:23 ` Ray Jui 2015-01-14 22:23 ` Ray Jui 2015-01-15 8:41 ` Uwe Kleine-König 2015-01-15 8:41 ` Uwe Kleine-König 2015-01-15 8:41 ` Uwe Kleine-König 2015-01-15 12:07 ` Wolfram Sang 2015-01-15 12:07 ` Wolfram Sang 2015-01-15 12:07 ` Wolfram Sang 2015-01-15 16:32 ` Uwe Kleine-König 2015-01-15 16:32 ` Uwe Kleine-König 2015-01-15 16:32 ` Uwe Kleine-König 2015-01-16 22:52 ` Ray Jui 2015-01-16 22:52 ` Ray Jui 2015-01-16 22:52 ` Ray Jui 2015-01-16 22:09 ` Ray Jui 2015-01-16 22:09 ` Ray Jui 2015-01-16 22:09 ` Ray Jui 2015-01-17 16:01 ` Uwe Kleine-König 2015-01-17 16:01 ` Uwe Kleine-König 2015-01-17 16:01 ` Uwe Kleine-König 2015-01-17 19:58 ` Ray Jui 2015-01-17 19:58 ` Ray Jui 2015-01-17 19:58 ` Ray Jui 2015-01-17 20:18 ` Uwe Kleine-König 2015-01-17 20:18 ` Uwe Kleine-König 2015-01-17 20:18 ` Uwe Kleine-König 2015-01-17 20:51 ` Ray Jui 2015-01-17 20:51 ` Ray Jui 2015-01-17 20:51 ` Ray Jui 2015-01-17 21:10 ` Uwe Kleine-König 2015-01-17 21:10 ` Uwe Kleine-König 2015-01-17 21:10 ` Uwe Kleine-König 2015-01-17 21:26 ` Ray Jui 2015-01-17 21:26 ` Ray Jui 2015-01-17 21:26 ` Ray Jui 2015-01-17 22:40 ` Russell King - ARM Linux 2015-01-17 22:40 ` Russell King - ARM Linux 2015-01-17 22:40 ` Russell King - ARM Linux 2015-01-18 0:30 ` Ray Jui 2015-01-18 0:30 ` Ray Jui 2015-01-18 0:30 ` Ray Jui 2015-01-19 19:28 ` Russell King - ARM Linux 2015-01-19 19:28 ` Russell King - ARM Linux 2015-01-19 21:25 ` Ray Jui 2015-01-19 21:25 ` Ray Jui 2015-01-19 21:25 ` Ray Jui 2015-01-14 22:23 ` [PATCH v4 3/3] ARM: dts: add I2C device nodes for Broadcom Cygnus Ray Jui 2015-01-14 22:23 ` Ray Jui 2015-01-14 22:23 ` Ray Jui 2015-01-15 8:44 ` Uwe Kleine-König 2015-01-15 8:44 ` Uwe Kleine-König 2015-01-15 8:44 ` Uwe Kleine-König 2015-01-16 19:24 ` Ray Jui 2015-01-16 19:24 ` Ray Jui 2015-01-16 19:24 ` Ray Jui 2015-01-16 19:48 ` Uwe Kleine-König 2015-01-16 19:48 ` Uwe Kleine-König 2015-01-16 19:48 ` Uwe Kleine-König 2015-01-16 23:18 ` Ray Jui 2015-01-16 23:18 ` Ray Jui 2015-01-16 23:18 ` Ray Jui 2015-01-16 23:42 ` [PATCH v5 0/3] Add I2C support to Broadcom iProc Ray Jui 2015-01-16 23:42 ` Ray Jui 2015-01-16 23:42 ` Ray Jui 2015-01-16 23:42 ` [PATCH v5 1/3] i2c: iProc: define Broadcom iProc I2C binding Ray Jui 2015-01-16 23:42 ` Ray Jui 2015-01-16 23:42 ` Ray Jui 2015-01-16 23:42 ` [PATCH v5 2/3] i2c: iproc: Add Broadcom iProc I2C Driver Ray Jui 2015-01-16 23:42 ` Ray Jui 2015-01-16 23:42 ` Ray Jui 2015-01-18 9:14 ` Arend van Spriel 2015-01-18 9:14 ` Arend van Spriel 2015-01-18 9:14 ` Arend van Spriel 2015-01-18 9:47 ` Uwe Kleine-König 2015-01-18 9:47 ` Uwe Kleine-König 2015-01-18 9:47 ` Uwe Kleine-König 2015-01-18 11:06 ` Wolfram Sang 2015-01-18 11:06 ` Wolfram Sang 2015-01-18 11:06 ` Wolfram Sang 2015-01-18 11:17 ` Uwe Kleine-König 2015-01-18 11:17 ` Uwe Kleine-König 2015-01-18 11:42 ` Wolfram Sang 2015-01-18 11:42 ` Wolfram Sang 2015-01-18 11:42 ` Wolfram Sang 2015-01-18 11:46 ` Arend van Spriel 2015-01-18 11:46 ` Arend van Spriel 2015-01-18 11:46 ` Arend van Spriel 2015-01-18 11:56 ` Uwe Kleine-König 2015-01-18 11:56 ` Uwe Kleine-König 2015-01-18 11:56 ` Uwe Kleine-König 2015-01-18 12:13 ` Arend van Spriel 2015-01-18 12:13 ` Arend van Spriel 2015-01-18 12:13 ` Arend van Spriel 2015-01-19 19:15 ` Ray Jui 2015-01-19 19:15 ` Ray Jui 2015-01-19 19:15 ` Ray Jui 2015-01-16 23:42 ` [PATCH v5 3/3] ARM: dts: add I2C device nodes for Broadcom Cygnus Ray Jui 2015-01-16 23:42 ` Ray Jui 2015-01-16 23:42 ` Ray Jui 2015-01-19 19:23 ` [PATCH v6 0/3] Add I2C support to Broadcom iProc Ray Jui 2015-01-19 19:23 ` Ray Jui 2015-01-19 19:23 ` Ray Jui 2015-01-19 19:23 ` [PATCH v6 1/3] i2c: iProc: define Broadcom iProc I2C binding Ray Jui 2015-01-19 19:23 ` Ray Jui 2015-01-19 19:23 ` Ray Jui 2015-01-19 19:23 ` [PATCH v6 2/3] i2c: iproc: Add Broadcom iProc I2C Driver Ray Jui 2015-01-19 19:23 ` Ray Jui 2015-01-19 19:23 ` Ray Jui 2015-01-19 19:44 ` Russell King - ARM Linux 2015-01-19 19:44 ` Russell King - ARM Linux 2015-01-19 19:44 ` Russell King - ARM Linux 2015-01-19 21:31 ` Ray Jui 2015-01-19 21:31 ` Ray Jui 2015-01-19 21:31 ` Ray Jui 2015-01-19 19:23 ` [PATCH v6 3/3] ARM: dts: add I2C device nodes for Broadcom Cygnus Ray Jui 2015-01-19 19:23 ` Ray Jui 2015-01-19 19:23 ` Ray Jui 2015-01-19 21:51 ` [PATCH v7 0/3] Add I2C support to Broadcom iProc Ray Jui 2015-01-19 21:51 ` Ray Jui 2015-01-19 21:51 ` Ray Jui 2015-01-19 21:51 ` [PATCH v7 1/3] i2c: iProc: define Broadcom iProc I2C binding Ray Jui 2015-01-19 21:51 ` Ray Jui 2015-01-19 21:51 ` Ray Jui 2015-01-19 21:51 ` [PATCH v7 2/3] i2c: iproc: Add Broadcom iProc I2C Driver Ray Jui 2015-01-19 21:51 ` Ray Jui 2015-01-19 21:51 ` Ray Jui 2015-02-06 22:31 ` [v7,2/3] " Kevin Cernekee 2015-02-06 22:31 ` Kevin Cernekee 2015-02-06 22:48 ` Dmitry Torokhov 2015-02-06 22:48 ` Dmitry Torokhov 2015-02-06 22:48 ` Dmitry Torokhov 2015-02-06 23:01 ` Kevin Cernekee 2015-02-06 23:01 ` Kevin Cernekee 2015-02-06 23:01 ` Kevin Cernekee 2015-02-07 0:54 ` Ray Jui 2015-02-07 0:54 ` Ray Jui 2015-02-07 0:54 ` Ray Jui 2015-01-19 21:51 ` [PATCH v7 3/3] ARM: dts: add I2C device nodes for Broadcom Cygnus Ray Jui 2015-01-19 21:51 ` Ray Jui 2015-01-19 21:51 ` Ray Jui 2015-02-03 2:01 ` [PATCH v3 0/4] Add pinctrl support to Broadcom Cygnus SoC Ray Jui 2015-02-03 2:01 ` Ray Jui 2015-02-03 2:01 ` Ray Jui 2015-02-03 2:01 ` [PATCH v3 1/4] pinctrl: bcm: consolidate Broadcom pinctrl drivers Ray Jui 2015-02-03 2:01 ` Ray Jui [not found] ` <1422928894-20716-1-git-send-email-rjui-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> 2015-02-03 2:01 ` [PATCH v3 2/4] pinctrl: Broadcom Cygnus pinctrl device tree binding Ray Jui 2015-02-03 2:01 ` Ray Jui 2015-02-03 2:01 ` Ray Jui 2015-02-03 2:01 ` [PATCH v3 3/4] pinctrl: cygnus: add initial IOMUX driver support Ray Jui 2015-02-03 2:01 ` Ray Jui 2015-02-03 2:01 ` Ray Jui 2015-02-03 17:40 ` Dmitry Torokhov 2015-02-03 17:40 ` Dmitry Torokhov 2015-02-03 19:29 ` Ray Jui 2015-02-03 19:29 ` Ray Jui 2015-02-03 19:29 ` Ray Jui 2015-02-03 20:00 ` Dmitry Torokhov 2015-02-03 20:00 ` Dmitry Torokhov 2015-02-03 20:16 ` Ray Jui 2015-02-03 20:16 ` Ray Jui 2015-02-03 20:16 ` Ray Jui 2015-02-03 2:01 ` [PATCH v3 4/4] ARM: dts: enable IOMUX for Broadcom Cygnus Ray Jui 2015-02-03 2:01 ` Ray Jui 2015-02-03 2:01 ` Ray Jui 2015-02-03 18:33 ` [PATCH v4 0/5] Add common clock support for Broadcom iProc architecture Ray Jui 2015-02-03 18:33 ` Ray Jui 2015-02-03 18:33 ` Ray Jui 2015-02-03 18:33 ` [PATCH v4 1/5] clk: iproc: define Broadcom iProc clock binding Ray Jui 2015-02-03 18:33 ` Ray Jui 2015-02-03 18:33 ` Ray Jui 2015-02-03 18:33 ` [PATCH v4 2/5] clk: iproc: add initial common clock support Ray Jui 2015-02-03 18:33 ` Ray Jui 2015-02-03 18:33 ` Ray Jui 2015-02-04 23:13 ` Stephen Boyd 2015-02-04 23:13 ` Stephen Boyd 2015-02-04 23:33 ` Ray Jui 2015-02-04 23:33 ` Ray Jui 2015-02-04 23:33 ` Ray Jui 2015-02-04 23:36 ` Stephen Boyd 2015-02-04 23:36 ` Stephen Boyd 2015-02-04 23:36 ` Stephen Boyd 2015-02-03 18:33 ` [PATCH v4 3/5] clk: Change bcm clocks build dependency Ray Jui 2015-02-03 18:33 ` Ray Jui 2015-02-03 18:33 ` Ray Jui 2015-02-03 18:33 ` [PATCH v4 4/5] clk: cygnus: add clock support for Broadcom Cygnus Ray Jui 2015-02-03 18:33 ` Ray Jui 2015-02-03 18:33 ` Ray Jui 2015-02-03 18:33 ` [PATCH v4 5/5] ARM: dts: enable " Ray Jui 2015-02-03 18:33 ` Ray Jui 2015-02-03 18:33 ` Ray Jui 2015-02-04 1:09 ` [PATCH v7 0/4] Add gpio/pinconf support to Broadcom Cygnus SoC Ray Jui 2015-02-04 1:09 ` Ray Jui 2015-02-04 1:09 ` Ray Jui [not found] ` <1423012148-22560-1-git-send-email-rjui-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> 2015-02-04 1:09 ` [PATCH v7 1/4] pinctrl: Cygnus: define Broadcom Cygnus GPIO/PINCONF binding Ray Jui 2015-02-04 1:09 ` Ray Jui 2015-02-04 1:09 ` Ray Jui 2015-02-04 1:09 ` [PATCH v7 2/4] pinctrl: cygnus: add gpio/pinconf driver Ray Jui 2015-02-04 1:09 ` Ray Jui 2015-02-04 1:09 ` Ray Jui 2015-02-04 1:41 ` Dmitry Torokhov [this message] 2015-02-04 1:41 ` Dmitry Torokhov 2015-02-04 2:19 ` Ray Jui 2015-02-04 2:19 ` Ray Jui 2015-02-04 2:19 ` Ray Jui 2015-02-04 1:09 ` [PATCH v7 3/4] ARM: dts: enable GPIO for Broadcom Cygnus Ray Jui 2015-02-04 1:09 ` Ray Jui 2015-02-04 1:09 ` Ray Jui 2015-02-04 1:09 ` [PATCH v7 4/4] ARM: dts: cygnus: enable GPIO based hook detection Ray Jui 2015-02-04 1:09 ` Ray Jui 2015-02-04 1:09 ` Ray Jui 2015-02-04 17:20 ` [PATCH v8 0/4] Add gpio/pinconf support to Broadcom Cygnus SoC Ray Jui 2015-02-04 17:20 ` Ray Jui 2015-02-04 17:20 ` Ray Jui 2015-02-04 17:21 ` [PATCH v8 1/4] pinctrl: Cygnus: define Broadcom Cygnus GPIO/PINCONF binding Ray Jui 2015-02-04 17:21 ` Ray Jui 2015-02-04 17:21 ` Ray Jui 2015-02-04 17:21 ` [PATCH v8 2/4] pinctrl: cygnus: add gpio/pinconf driver Ray Jui 2015-02-04 17:21 ` Ray Jui 2015-02-04 17:21 ` Ray Jui 2015-02-09 19:20 ` Dmitry Torokhov 2015-02-09 19:20 ` Dmitry Torokhov 2015-02-10 21:47 ` Ray Jui 2015-02-10 21:47 ` Ray Jui 2015-02-10 21:47 ` Ray Jui 2015-02-04 17:21 ` [PATCH v8 3/4] ARM: dts: enable GPIO for Broadcom Cygnus Ray Jui 2015-02-04 17:21 ` Ray Jui 2015-02-04 17:21 ` Ray Jui 2015-02-04 17:21 ` [PATCH v8 4/4] ARM: dts: cygnus: enable GPIO based hook detection Ray Jui 2015-02-04 17:21 ` Ray Jui 2015-02-04 17:21 ` Ray Jui 2015-02-05 0:54 ` [PATCH v5 0/6] Add common clock support for Broadcom iProc architecture Ray Jui 2015-02-05 0:54 ` Ray Jui 2015-02-05 0:54 ` Ray Jui 2015-02-05 0:55 ` [PATCH v5 1/6] clk: add of_clk_get_parent_rate function Ray Jui 2015-02-05 0:55 ` Ray Jui 2015-02-05 0:55 ` Ray Jui 2015-02-25 22:09 ` Stephen Boyd 2015-02-25 22:09 ` Stephen Boyd 2015-02-26 5:54 ` Sascha Hauer 2015-02-26 5:54 ` Sascha Hauer 2015-02-26 6:13 ` Ray Jui 2015-02-26 6:13 ` Ray Jui 2015-02-26 6:13 ` Ray Jui 2015-02-26 6:51 ` Sascha Hauer 2015-02-26 6:51 ` Sascha Hauer 2015-02-26 6:51 ` Sascha Hauer 2015-02-26 7:42 ` Ray Jui 2015-02-26 7:42 ` Ray Jui 2015-02-26 7:42 ` Ray Jui 2015-02-26 8:43 ` Sascha Hauer 2015-02-26 8:43 ` Sascha Hauer 2015-03-06 19:55 ` Mike Turquette 2015-03-06 19:55 ` Mike Turquette 2015-03-06 20:07 ` Ray Jui 2015-03-06 20:07 ` Ray Jui 2015-03-06 20:07 ` Ray Jui 2015-03-06 22:57 ` Mike Turquette 2015-03-06 22:57 ` Mike Turquette 2015-02-05 0:55 ` [PATCH v5 2/6] clk: iproc: define Broadcom iProc clock binding Ray Jui 2015-02-05 0:55 ` Ray Jui 2015-02-05 0:55 ` Ray Jui 2015-02-05 0:55 ` [PATCH v5 3/6] clk: iproc: add initial common clock support Ray Jui 2015-02-05 0:55 ` Ray Jui 2015-02-05 0:55 ` Ray Jui 2015-02-05 0:55 ` [PATCH v5 4/6] clk: Change bcm clocks build dependency Ray Jui 2015-02-05 0:55 ` Ray Jui 2015-02-05 0:55 ` Ray Jui 2015-02-05 0:55 ` [PATCH v5 5/6] clk: cygnus: add clock support for Broadcom Cygnus Ray Jui 2015-02-05 0:55 ` Ray Jui 2015-02-05 0:55 ` Ray Jui 2015-02-05 0:55 ` [PATCH v5 6/6] ARM: dts: enable " Ray Jui 2015-02-05 0:55 ` Ray Jui 2015-02-05 0:55 ` Ray Jui 2015-02-25 19:33 ` [PATCH v5 0/6] Add common clock support for Broadcom iProc architecture Dmitry Torokhov 2015-02-25 19:33 ` Dmitry Torokhov 2015-02-25 19:33 ` Dmitry Torokhov 2015-02-07 1:28 ` [PATCH v8 0/3] Add I2C support to Broadcom iProc Ray Jui 2015-02-07 1:28 ` Ray Jui 2015-02-07 1:28 ` Ray Jui 2015-02-07 1:28 ` [PATCH v8 1/3] i2c: iProc: define Broadcom iProc I2C binding Ray Jui 2015-02-07 1:28 ` Ray Jui 2015-02-07 1:28 ` Ray Jui 2015-02-07 1:28 ` [PATCH v8 2/3] i2c: iproc: Add Broadcom iProc I2C Driver Ray Jui 2015-02-07 1:28 ` Ray Jui 2015-02-07 1:28 ` Ray Jui 2015-02-07 17:50 ` Wolfram Sang 2015-02-07 17:50 ` Wolfram Sang 2015-02-07 17:50 ` Wolfram Sang 2015-02-08 5:08 ` Ray Jui 2015-02-08 5:08 ` Ray Jui 2015-02-08 5:08 ` Ray Jui 2015-02-08 11:03 ` Wolfram Sang 2015-02-08 11:03 ` Wolfram Sang 2015-02-08 18:10 ` Ray Jui 2015-02-08 18:10 ` Ray Jui 2015-02-09 10:03 ` Wolfram Sang 2015-02-09 10:03 ` Wolfram Sang 2015-02-09 10:03 ` Wolfram Sang 2015-02-07 1:28 ` [PATCH v8 3/3] ARM: dts: add I2C device nodes for Broadcom Cygnus Ray Jui 2015-02-07 1:28 ` Ray Jui 2015-02-07 1:28 ` Ray Jui 2015-02-08 5:25 ` [PATCH v9 0/3] Add I2C support to Broadcom iProc Ray Jui 2015-02-08 5:25 ` Ray Jui 2015-02-08 5:25 ` Ray Jui 2015-02-08 5:25 ` [PATCH v9 1/3] i2c: iProc: define Broadcom iProc I2C binding Ray Jui 2015-02-08 5:25 ` Ray Jui 2015-02-08 5:25 ` Ray Jui 2015-02-09 12:09 ` Wolfram Sang 2015-02-09 12:09 ` Wolfram Sang 2015-02-09 12:09 ` Wolfram Sang 2015-02-08 5:25 ` [PATCH v9 2/3] i2c: iproc: Add Broadcom iProc I2C Driver Ray Jui 2015-02-08 5:25 ` Ray Jui 2015-02-08 5:25 ` Ray Jui 2015-02-08 16:29 ` Wolfram Sang 2015-02-08 16:29 ` Wolfram Sang 2015-02-08 16:29 ` Wolfram Sang 2015-02-08 17:56 ` Ray Jui 2015-02-08 17:56 ` Ray Jui 2015-02-08 17:56 ` Ray Jui 2015-02-09 12:10 ` Wolfram Sang 2015-02-09 12:10 ` Wolfram Sang 2015-02-09 12:10 ` Wolfram Sang 2015-02-10 5:23 ` Ray Jui 2015-02-10 5:23 ` Ray Jui 2015-02-10 5:23 ` Ray Jui 2015-02-10 8:33 ` Wolfram Sang 2015-02-10 8:33 ` Wolfram Sang 2015-02-10 8:33 ` Wolfram Sang 2015-02-10 17:10 ` Ray Jui 2015-02-10 17:10 ` Ray Jui 2015-02-10 17:10 ` Ray Jui 2015-02-08 5:25 ` [PATCH v9 3/3] ARM: dts: add I2C device nodes for Broadcom Cygnus Ray Jui 2015-02-08 5:25 ` Ray Jui 2015-02-08 5:25 ` Ray Jui 2015-02-09 12:11 ` Wolfram Sang 2015-02-09 12:11 ` Wolfram Sang 2015-02-10 5:24 ` Ray Jui 2015-02-10 5:24 ` Ray Jui 2015-02-10 5:24 ` Ray Jui 2015-02-10 5:34 ` Florian Fainelli 2015-02-10 5:34 ` Florian Fainelli 2015-02-10 5:34 ` Florian Fainelli 2015-02-10 5:36 ` Ray Jui 2015-02-10 5:36 ` Ray Jui 2015-02-10 5:36 ` Ray Jui
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20150204014152.GD15969@dtor-ws \ --to=dtor@google.com \ --cc=anatol@google.com \ --cc=arnd@arndb.de \ --cc=bcm-kernel-feedback-list@broadcom.com \ --cc=bcm@fixthebug.org \ --cc=devicetree@vger.kernel.org \ --cc=f.fainelli@gmail.com \ --cc=galak@codeaurora.org \ --cc=gnurou@gmail.com \ --cc=grant.likely@linaro.org \ --cc=ijc+devicetree@hellion.org.uk \ --cc=joe@perches.com \ --cc=linus.walleij@linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-gpio@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux@arm.linux.org.uk \ --cc=mark.rutland@arm.com \ --cc=mporter@linaro.org \ --cc=pawel.moll@arm.com \ --cc=rjui@broadcom.com \ --cc=robh+dt@kernel.org \ --cc=sbranden@broadcom.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.