Linux-GPIO Archive on
 help / color / Atom feed
From: Bartosz Golaszewski <>
To: Rodrigo Alencar <>
Cc: linux-gpio <>,
	LKML <>,
	Linus Walleij <>,
	Rodrigo Alencar <>
Subject: Re: [PATCH] gpio: gpio-max730x: bring gpiochip_add_data after port config
Date: Fri, 22 May 2020 17:02:19 +0200
Message-ID: <> (raw)
In-Reply-To: <>

czw., 14 maj 2020 o 15:00 Rodrigo Alencar
<> napisał(a):
> gpiochip_add_data being called before might cause premature calls of
> the gpiochip operations before the port_config values are initialized,
> which would possibily write zeros to port gonfiguration registers,
> an operation not allowed. For example, if there are gpio-hog nodes
> in a device-tree, the sequence of function calls are performed
> gpiochip_add_data
> of_gpiochip_add
> of_gpiochip_scan_gpios
> of_gpiochip_add_hog
> gpiod_hog
> gpiochip_request_own_desc
> gpiod_configure_flags
> gpiod_direction_output/gpiod_direction_input
> which would call later the gpiochip operation direction_output or
> direction_input prior the port_config[] initialization.
> Moreover, gpiochip_get_data is replaced by the container_of macro
> inside the gpiochip operations, which would allow the calling of
> max7301_direction_input prior to gpiochip_add_data
> Signed-off-by: Rodrigo Alencar <>

Applied with some tweaks to the commit message.


      reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-14 13:00 Rodrigo Alencar
2020-05-22 15:02 ` Bartosz Golaszewski [this message]

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-GPIO Archive on

Archives are clonable:
	git clone --mirror linux-gpio/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-gpio linux-gpio/ \
	public-inbox-index linux-gpio

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone