From: Greg KH <gregkh@linuxfoundation.org>
To: Gerhard Engleder <gerhard@engleder-embedded.com>
Cc: linux-i2c@vger.kernel.org, andi.shyti@kernel.org, arnd@arndb.de,
Gerhard Engleder <eg@keba.com>
Subject: Re: [PATCH 2/2] misc: keba: Add basic KEBA CP500 system FPGA support
Date: Sun, 2 Jun 2024 09:19:10 +0200 [thread overview]
Message-ID: <2024060203-impeding-curing-e6cd@gregkh> (raw)
In-Reply-To: <20240601192846.68146-3-gerhard@engleder-embedded.com>
On Sat, Jun 01, 2024 at 09:28:46PM +0200, Gerhard Engleder wrote:
> From: Gerhard Engleder <eg@keba.com>
>
> The KEBA CP500 system FPGA is a PCIe device, which consists of multiple
> IP cores. Every IP core has its own platform driver. The cp500 driver
> registers a platform device for each device and the corresponding
> drivers are loaded by the Linux driver infrastructure.
Please use the aux bus code for this, not the platform driver code.
That's what the aux bus is explicitly for, platform devices are NOT
meant to hang off of a PCIe device at all.
> Currently 3 variants of this device exists. Every variant has its own
> PCI device ID, which is used to determine the list of available IP
> cores. In this first version only the platform device for the I2C
> controller is registered.
>
> Besides the platform device registration some other basic functions of
> the FPGA are implemented; e.g, FPGA version sysfs file, keep FPGA
> configuration on reset sysfs file, error message for errors on the
> internal AXI bus of the FPGA.
>
> Signed-off-by: Gerhard Engleder <eg@keba.com>
> ---
> drivers/misc/Kconfig | 1 +
> drivers/misc/Makefile | 1 +
> drivers/misc/keba/Kconfig | 12 +
> drivers/misc/keba/Makefile | 3 +
> drivers/misc/keba/cp500.c | 433 +++++++++++++++++++++++++++++++++++++
> 5 files changed, 450 insertions(+)
> create mode 100644 drivers/misc/keba/Kconfig
> create mode 100644 drivers/misc/keba/Makefile
> create mode 100644 drivers/misc/keba/cp500.c
You create sysfs files for this driver, yet there is no
Documentation/ABI/ entries for it? Please do so in your next version of
this series.
> +static ssize_t keep_cfg_show(struct device *dev, struct device_attribute *attr,
> + char *buf)
> +{
> + struct cp500 *cp500 = dev_get_drvdata(dev);
> + unsigned long keep_cfg = 1;
> +
> + /* FPGA configuration stream is kept during reset when RECONFIG bit is
> + * zero
> + */
> + if (ioread8(cp500->system_startup_addr + CP500_RECONFIG_REG) &
> + CP500_RECFG_REQ)
> + keep_cfg = 0;
> +
> + return sprintf(buf, "%lu\n", keep_cfg);
sysfs_emit() for all sysfs show functions please.
thanks,
greg k-h
next prev parent reply other threads:[~2024-06-02 7:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-01 19:28 [PATCH 0/2] I2C controller support for KEBA PLCs Gerhard Engleder
2024-06-01 19:28 ` [PATCH 1/2] i2c: keba: Add KEBA I2C controller support Gerhard Engleder
2024-06-01 22:52 ` kernel test robot
2024-06-01 23:45 ` kernel test robot
2024-06-02 21:41 ` kernel test robot
2024-06-03 22:37 ` Andi Shyti
2024-06-04 19:06 ` Gerhard Engleder
2024-06-03 23:00 ` kernel test robot
2024-06-01 19:28 ` [PATCH 2/2] misc: keba: Add basic KEBA CP500 system FPGA support Gerhard Engleder
2024-06-02 7:19 ` Greg KH [this message]
2024-06-02 18:59 ` Gerhard Engleder
2024-06-02 23:37 ` kernel test robot
2024-06-04 5:13 ` kernel test robot
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=2024060203-impeding-curing-e6cd@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=andi.shyti@kernel.org \
--cc=arnd@arndb.de \
--cc=eg@keba.com \
--cc=gerhard@engleder-embedded.com \
--cc=linux-i2c@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox