From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Vignesh Raghavendra <vigneshr@ti.com>,
Tudor Ambarus <tudor.ambarus@microchip.com>,
Richard Weinberger <richard@nod.at>,
Boris Brezillon <bbrezillon@kernel.org>,
linux-kernel@vger.kernel.org,
Ludovic Desroches <ludovic.desroches@microchip.com>,
linux-mtd@lists.infradead.org,
Miquel Raynal <miquel.raynal@bootlin.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] mtd: rawnand: atmel: switch to using devm_fwnode_gpiod_get()
Date: Fri, 3 Jan 2020 10:07:04 +0100 [thread overview]
Message-ID: <20200103090704.GG3040@piout.net> (raw)
In-Reply-To: <20200103012238.GA3648@dtor-ws>
Hi,
On 02/01/2020 17:22:38-0800, Dmitry Torokhov wrote:
> devm_fwnode_get_index_gpiod_from_child() is going away as the name is
> too unwieldy, let's switch to using the new devm_fwnode_gpiod_get().
>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
> drivers/mtd/nand/raw/atmel/nand-controller.c | 20 ++++++++++----------
> 1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/mtd/nand/raw/atmel/nand-controller.c b/drivers/mtd/nand/raw/atmel/nand-controller.c
> index 8d6be90a6fe8a..849bd5f16492d 100644
> --- a/drivers/mtd/nand/raw/atmel/nand-controller.c
> +++ b/drivers/mtd/nand/raw/atmel/nand-controller.c
> @@ -1578,9 +1578,8 @@ static struct atmel_nand *atmel_nand_create(struct atmel_nand_controller *nc,
>
> nand->numcs = numcs;
>
> - gpio = devm_fwnode_get_index_gpiod_from_child(nc->dev, "det", 0,
> - &np->fwnode, GPIOD_IN,
> - "nand-det");
> + gpio = devm_fwnode_gpiod_get(nc->dev, of_fwnode_hanlde(np),
Shouldn't that be of_fwnode_handle(np)?
> + "det", GPIOD_IN, "nand-det");
> if (IS_ERR(gpio) && PTR_ERR(gpio) != -ENOENT) {
> dev_err(nc->dev,
> "Failed to get detect gpio (err = %ld)\n",
> @@ -1624,9 +1623,10 @@ static struct atmel_nand *atmel_nand_create(struct atmel_nand_controller *nc,
> nand->cs[i].rb.type = ATMEL_NAND_NATIVE_RB;
> nand->cs[i].rb.id = val;
> } else {
> - gpio = devm_fwnode_get_index_gpiod_from_child(nc->dev,
> - "rb", i, &np->fwnode,
> - GPIOD_IN, "nand-rb");
> + gpio = devm_fwnode_gpiod_get_index(nc->dev,
> + of_fwnode_handle(np),
> + "rb", i, GPIOD_IN,
> + "nand-rb");
> if (IS_ERR(gpio) && PTR_ERR(gpio) != -ENOENT) {
> dev_err(nc->dev,
> "Failed to get R/B gpio (err = %ld)\n",
> @@ -1640,10 +1640,10 @@ static struct atmel_nand *atmel_nand_create(struct atmel_nand_controller *nc,
> }
> }
>
> - gpio = devm_fwnode_get_index_gpiod_from_child(nc->dev, "cs",
> - i, &np->fwnode,
> - GPIOD_OUT_HIGH,
> - "nand-cs");
> + gpio = devm_fwnode_gpiod_get_index(nc->dev,
> + of_fwnode_handle(np),
> + "cs", i, GPIOD_OUT_HIGH,
> + "nand-cs");
> if (IS_ERR(gpio) && PTR_ERR(gpio) != -ENOENT) {
> dev_err(nc->dev,
> "Failed to get CS gpio (err = %ld)\n",
> --
> 2.24.1.735.g03f4e72817-goog
>
>
> --
> Dmitry
--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-01-03 9:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-03 1:22 [PATCH] mtd: rawnand: atmel: switch to using devm_fwnode_gpiod_get() Dmitry Torokhov
2020-01-03 9:07 ` Alexandre Belloni [this message]
2020-01-03 18:25 ` Dmitry Torokhov
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=20200103090704.GG3040@piout.net \
--to=alexandre.belloni@bootlin.com \
--cc=bbrezillon@kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=ludovic.desroches@microchip.com \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=tudor.ambarus@microchip.com \
--cc=vigneshr@ti.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).