Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1395807

Re: [PATCH v7 2/3] gpio: mmio: add DT support for memory-mapped GPIOs

From Mark Rutland <mark.rutland@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH v7 2/3] gpio: mmio: add DT support for memory-mapped GPIOs
Date 2016-05-06 14:00 +0200
Message-ID <rvMAh-4gY-1@gated-at.bofh.it> (permalink)
References <rvLXz-3TZ-1@gated-at.bofh.it> <rvLXA-3TZ-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi,

On Fri, May 06, 2016 at 01:10:20PM +0200, Christian Lamparter wrote:
> +static int bgpio_basic_mmio_parse_dt(struct platform_device *pdev,
> +				     struct bgpio_pdata *pdata,
> +				     unsigned long *flags)
> +{
> +	struct device *dev = &pdev->dev;
> +	int err;
> +
> +	pdata->base = -1;
> +	/* If ngpio property is not specified, of_property_read_u32
> +	 * will return -EINVAL. In this case the number of GPIOs is
> +	 * automatically determined by the register width. Any
> +	 * other error of of_property_read_u32 is due bad data and
> +	 * needs to be dealt with.
> +	 */
> +	err = of_property_read_u32(dev->of_node, "ngpio", &pdata->ngpio);
> +	if (err && err != -EINVAL)
> +		return err;
> +
> +	if (of_device_is_big_endian(dev->of_node))
> +		*flags |= BGPIOF_BIG_ENDIAN_BYTE_ORDER;
> +
> +	if (of_property_read_bool(dev->of_node, "unreadable-reg-set"))
> +		*flags |= BGPIOF_UNREADABLE_REG_SET;
> +
> +	if (of_property_read_bool(dev->of_node, "unreadable-reg-dir"))
> +		*flags |= BGPIOF_UNREADABLE_REG_DIR;
> +
> +	if (of_property_read_bool(dev->of_node, "big-endian-byte-order"))
> +		*flags |= BGPIOF_BIG_ENDIAN;
> +
> +	if (of_property_read_bool(dev->of_node, "read-output-reg-set"))
> +		*flags |= BGPIOF_READ_OUTPUT_REG_SET;
> +
> +	if (of_property_read_bool(dev->of_node, "no-output"))
> +		*flags |= BGPIOF_NO_OUTPUT;
> +	return 0;
> +}

Other than no-output, none of these are in the wd,mbl-gpio binding.

Please remove them for now. We can add them as/when other users of this
binding appear and begin to need them.

Thanks,
Mark.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v7 0/3] gpio: add DT support for memory-mapped GPIOs Christian Lamparter <chunkeey@googlemail.com> - 2016-05-06 13:20 +0200
  [PATCH v7 2/3] gpio: mmio: add DT support for memory-mapped GPIOs Christian Lamparter <chunkeey@googlemail.com> - 2016-05-06 13:20 +0200
    Re: [PATCH v7 2/3] gpio: mmio: add DT support for memory-mapped GPIOs Andy Shevchenko <andy.shevchenko@gmail.com> - 2016-05-06 13:50 +0200
      Re: [PATCH v7 2/3] gpio: mmio: add DT support for memory-mapped GPIOs Christian Lamparter <chunkeey@googlemail.com> - 2016-05-06 14:30 +0200
    Re: [PATCH v7 2/3] gpio: mmio: add DT support for memory-mapped GPIOs Mark Rutland <mark.rutland@arm.com> - 2016-05-06 14:00 +0200
  [PATCH v7 1/3] gpio: dt-bindings: add wd,mbl-gpio bindings Christian Lamparter <chunkeey@googlemail.com> - 2016-05-06 13:20 +0200
  [PATCH v7 3/3] gpio: move clps711x, moxart, ts4800 and gpio-ge into gpio-mmio Christian Lamparter <chunkeey@googlemail.com> - 2016-05-06 13:20 +0200
    Re: [PATCH v7 3/3] gpio: move clps711x, moxart, ts4800 and gpio-ge  into gpio-mmio Andy Shevchenko <andy.shevchenko@gmail.com> - 2016-05-06 14:00 +0200
      Re: [PATCH v7 3/3] gpio: move clps711x, moxart, ts4800 and gpio-ge into gpio-mmio Christian Lamparter <chunkeey@googlemail.com> - 2016-05-06 15:10 +0200
        Re: [PATCH v7 3/3] gpio: move clps711x, moxart, ts4800 and gpio-ge  into gpio-mmio Andy Shevchenko <andy.shevchenko@gmail.com> - 2016-05-06 15:30 +0200

csiph-web