From: Maxime Ripard <mripard@kernel.org>
To: Sandor Yu <Sandor.yu@nxp.com>
Cc: dmitry.baryshkov@linaro.org, andrzej.hajda@intel.com,
neil.armstrong@linaro.org, Laurent.pinchart@ideasonboard.com,
jonas@kwiboo.se, jernej.skrabec@gmail.com, airlied@gmail.com,
daniel@ffwll.ch, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org,
s.hauer@pengutronix.de, festevam@gmail.com, vkoul@kernel.org,
dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org,
kernel@pengutronix.de, linux-imx@nxp.com, oliver.brown@nxp.com,
alexander.stein@ew.tq-group.com, sam@ravnborg.org
Subject: Re: [PATCH v20 5/9] drm: bridge: Cadence: Add MHDP8501 DP/HDMI driver
Date: Tue, 17 Dec 2024 09:06:37 +0100 [thread overview]
Message-ID: <20241217-judicious-stereotyped-centipede-5ddb27@houat> (raw)
In-Reply-To: <fbd12029fab1f60e2ba4fad75ef650298a59cb15.1734340233.git.Sandor.yu@nxp.com>
[-- Attachment #1: Type: text/plain, Size: 1152 bytes --]
Hi,
On Tue, Dec 17, 2024 at 02:51:47PM +0800, Sandor Yu wrote:
> +static ssize_t firmware_version_show(struct device *dev,
> + struct device_attribute *attr, char *buf);
> +static struct device_attribute firmware_version = __ATTR_RO(firmware_version);
> +
> +ssize_t firmware_version_show(struct device *dev,
> + struct device_attribute *attr, char *buf)
> +{
> + struct cdns_mhdp8501_device *mhdp = dev_get_drvdata(dev);
> +
> + u32 version = readl(mhdp->base.regs + VER_L) | readl(mhdp->base.regs + VER_H) << 8;
> + u32 lib_version = readl(mhdp->base.regs + VER_LIB_L_ADDR) |
> + readl(mhdp->base.regs + VER_LIB_H_ADDR) << 8;
> +
> + return sprintf(buf, "FW version %d, Lib version %d\n", version, lib_version);
> +}
> +
> +static void cdns_mhdp8501_create_device_files(struct cdns_mhdp8501_device *mhdp)
> +{
> + if (device_create_file(mhdp->dev, &firmware_version)) {
> + DRM_ERROR("Unable to create firmware_version sysfs\n");
> + device_remove_file(mhdp->dev, &firmware_version);
> + }
> +}
sysfs files are part of the uABI, and need to be stable and documented.
For these kind of things, you should use debugfs.
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 273 bytes --]
next prev parent reply other threads:[~2024-12-17 8:08 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-17 6:51 [PATCH v20 0/8] Initial support Cadence MHDP8501(HDMI/DP) for i.MX8MQ Sandor Yu
2024-12-17 6:51 ` [PATCH v20 1/9] soc: cadence: Create helper functions for Cadence MHDP Sandor Yu
2024-12-17 11:07 ` Dmitry Baryshkov
2024-12-25 7:56 ` [EXT] " Sandor Yu
2024-12-17 6:51 ` [PATCH v20 2/9] drm: bridge: cadence: Update mhdp8546 mailbox access functions Sandor Yu
2024-12-17 11:07 ` Dmitry Baryshkov
2024-12-17 6:51 ` [PATCH v20 3/9] phy: Add HDMI configuration options Sandor Yu
2024-12-17 6:51 ` [PATCH v20 4/9] dt-bindings: display: bridge: Add Cadence MHDP8501 Sandor Yu
2024-12-18 9:15 ` Krzysztof Kozlowski
2024-12-17 6:51 ` [PATCH v20 5/9] drm: bridge: Cadence: Add MHDP8501 DP/HDMI driver Sandor Yu
2024-12-17 8:06 ` Maxime Ripard [this message]
2024-12-25 7:56 ` [EXT] " Sandor Yu
2024-12-17 11:47 ` Dmitry Baryshkov
2024-12-25 7:57 ` [EXT] " Sandor Yu
2024-12-26 20:58 ` Dmitry Baryshkov
2024-12-30 8:05 ` Sandor Yu
2024-12-30 13:53 ` Dmitry Baryshkov
2024-12-17 6:51 ` [PATCH v20 6/9] dt-bindings: phy: Add Freescale iMX8MQ DP and HDMI PHY Sandor Yu
2024-12-17 6:51 ` [PATCH v20 7/9] phy: freescale: Add DisplayPort/HDMI Combo-PHY driver for i.MX8MQ Sandor Yu
2024-12-17 6:51 ` [PATCH v20 8/9] arm64: dts: imx8mq: Add DCSS + HDMI/DP display pipeline Sandor Yu
2024-12-17 6:51 ` [PATCH v20 9/9] arm64: dts: imx8mq: tqma8mq-mba8mx: Enable HDMI support Sandor Yu
2025-01-07 7:29 ` [PATCH v20 0/8] Initial support Cadence MHDP8501(HDMI/DP) for i.MX8MQ Alexander Stein
2025-01-07 14:42 ` [EXT] " Sandor Yu
2025-06-07 13:54 ` Rudi Heitbaum
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=20241217-judicious-stereotyped-centipede-5ddb27@houat \
--to=mripard@kernel.org \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=Sandor.yu@nxp.com \
--cc=airlied@gmail.com \
--cc=alexander.stein@ew.tq-group.com \
--cc=andrzej.hajda@intel.com \
--cc=daniel@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=festevam@gmail.com \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=kernel@pengutronix.de \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=neil.armstrong@linaro.org \
--cc=oliver.brown@nxp.com \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=sam@ravnborg.org \
--cc=shawnguo@kernel.org \
--cc=vkoul@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