All of lore.kernel.org
 help / color / mirror / Atom feed
From: andrew@lunn.ch (Andrew Lunn)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 3/7] drivers: gpio: Add support for GPIOs over Moxtet bus
Date: Thu, 9 Aug 2018 04:57:48 +0200	[thread overview]
Message-ID: <20180809025748.GD6884@lunn.ch> (raw)
In-Reply-To: <20180809022037.12001-4-marek.behun@nic.cz>

> +++ b/Documentation/devicetree/bindings/gpio/gpio-moxtet.txt
> @@ -0,0 +1,31 @@
> +Turris Mox Moxtet GPIO expander
> +
> +Required properties:
> + - compatible		: Should be "cznic,moxtet-gpio".
> + - gpio-controller	: Marks the device node as a GPIO controller.
> + - #gpio-cells		: Should be two. For consumer use see gpio.txt.
> + - moxtet,input-mask	: Bitmask. Those bits which correspond to input GPIOs
> +			  when read from Moxtet bus should be set here.
> +			  For example if bit 0 and bit 3 are input GPIO bits,
> +			  this should be set to 0x9.
> +			  Since there are only 4 input bits, 0xf is max value.
> + - moxtet,output-mask	: Bitmask. Those bits which correspond to output GPIOs
> +			  when written to Moxtet bus should be set here.
> +			  For example if bit 1 and bit 6 are output GPIO bits,
> +			  this should be set to 0x41.
> +			  Since there are at most 8 output bits, 0xff is max
> +			  value.

Lets see what Rob says, but i don't know if it should be so generic.

The SFP module probably has GPO's for tx-disable and rate-select, and
GPI for mod-def0, LOS. So you can have a compatible for this, and have
the bit masks associated to the compatible string. Don't put the masks
in the device tree.

   Andrew

  parent reply	other threads:[~2018-08-09  2:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-09  2:20 [PATCH v2 0/7] Add support for the Turris Mox router Marek Behún
2018-08-09  2:20 ` [PATCH v2 1/7] pinctrl: armada-37xx: Correct mpp definitions Marek Behún
2018-08-09  2:20 ` [PATCH v2 2/7] drivers: mfd: Add support for Moxtet bus Marek Behún
2018-08-09  2:20 ` [PATCH v2 3/7] drivers: gpio: Add support for GPIOs over " Marek Behún
2018-08-09  2:49   ` Andrew Lunn
2018-08-09  2:57   ` Andrew Lunn [this message]
2018-08-09  2:20 ` [PATCH v2 4/7] watchdog: Add support for Armada 37xx CPU watchdog Marek Behún
2018-08-10  8:53   ` Miquel Raynal
2018-08-09  2:20 ` [PATCH v2 5/7] arm64: dts: marvell: armada-37xx: add nodes to support watchdog Marek Behún
2018-08-10  9:02   ` Miquel Raynal
2018-08-09  2:20 ` [PATCH v2 6/7] net: mvneta: Don't use GRO on Armada 3720 Marek Behún
2018-08-09  2:20 ` [PATCH v2 7/7] ARM64: dts: marvell: Add DTS file for Turris Mox Marek Behún

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=20180809025748.GD6884@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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: link
Be 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.