Linux FPGA development
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@amd.com>
To: Heiko Schocher <hs@nabladev.com>, linux-kernel@vger.kernel.org
Cc: linux-fpga@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Moritz Fischer <mdf@kernel.org>, Tom Rix <trix@redhat.com>,
	Xu Yilun <yilun.xu@intel.com>
Subject: Re: [PATCH v2] driver: fpga: xilinx-selectmap: add csi and rdwr support
Date: Wed, 22 Jul 2026 08:55:43 +0200	[thread overview]
Message-ID: <2758c5dc-91fa-44a0-986e-1258afc3dbd5@amd.com> (raw)
In-Reply-To: <20260721114258.3324794-1-hs@nabladev.com>



On 7/21/26 13:42, Heiko Schocher wrote:
> Add csi_b and rdwr pin support for the xilinx,selectmap driver.
> 
> In current driver the pins are configured from DTS and set to
> GPIOD_OUT_HIGH. This works in case you have one FPGA.
> 
> Extend this to really implement csi_b and rdwr pin function in
> driver, so it works with more than one FPGA.
> 
> Tested on AM625 based board with 2 FPGAs connected to GPMC.
> 
> Signed-off-by: Heiko Schocher <hs@nabladev.com>
> ---
> 
> Changes in v2:
> - add comments from Michal
>    - skip check if gpio descriptor variables csi_b/rdwr_b are valid,
>      as validate_desc() checks this in gpiod_set_value() call.
>    - initialize the gpio variables csi_b/rdwr_b immediately with
>      the return value from devm_gpiod_get_optional(), so we can
>      drop local gpio variable at all
> 
>   drivers/fpga/xilinx-selectmap.c | 23 ++++++++++++++++-------
>   1 file changed, 16 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/fpga/xilinx-selectmap.c b/drivers/fpga/xilinx-selectmap.c
> index d0cbb5fdfe3a..d5175f9430e4 100644
> --- a/drivers/fpga/xilinx-selectmap.c
> +++ b/drivers/fpga/xilinx-selectmap.c
> @@ -19,6 +19,8 @@
>   struct xilinx_selectmap_conf {
>   	struct xilinx_fpga_core core;
>   	void __iomem *base;
> +	struct gpio_desc *csi_b;
> +	struct gpio_desc *rdwr_b;
>   };
>   
>   #define to_xilinx_selectmap_conf(obj) \
> @@ -30,16 +32,21 @@ static int xilinx_selectmap_write(struct xilinx_fpga_core *core,
>   	struct xilinx_selectmap_conf *conf = to_xilinx_selectmap_conf(core);
>   	size_t i;
>   
> +	gpiod_set_value(conf->csi_b, GPIOD_OUT_HIGH);
> +	gpiod_set_value(conf->rdwr_b, GPIOD_OUT_HIGH);

I think GPIOD_OUT_HIGH/LOW is wrong in this context.
If you do "git grep gpiod_set_value" you will see that values are 0/1

Thanks,
Michal

  reply	other threads:[~2026-07-22  6:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-21 11:42 [PATCH v2] driver: fpga: xilinx-selectmap: add csi and rdwr support Heiko Schocher
2026-07-22  6:55 ` Michal Simek [this message]
2026-07-22 14:45   ` Heiko Schocher
2026-07-23  5:44     ` Michal Simek
2026-07-23  5:57       ` Heiko Schocher
2026-07-23  4:42 ` Xu Yilun
2026-07-23  4:47   ` Heiko Schocher

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=2758c5dc-91fa-44a0-986e-1258afc3dbd5@amd.com \
    --to=michal.simek@amd.com \
    --cc=hs@nabladev.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-fpga@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mdf@kernel.org \
    --cc=trix@redhat.com \
    --cc=yilun.xu@intel.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