From: Greg KH <gregkh@linuxfoundation.org>
To: "Metehan Günen" <metehangnen@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
linux-gpio@vger.kernel.org
Subject: Re: [PATCH 1/4] include/uapi/linux: add gxfp_ioctl.h for GXFP5130 fingerprint sensor
Date: Sat, 18 Jul 2026 11:07:47 +0200 [thread overview]
Message-ID: <2026071801-headdress-gab-348e@gregkh> (raw)
In-Reply-To: <20260718081431.25456-2-metehangnen@gmail.com>
On Sat, Jul 18, 2026 at 11:14:28AM +0300, Metehan Günen wrote:
> Define the userspace ABI for the Goodix GXFP5130 eSPI fingerprint sensor
> driver:
>
> - struct gxfp_tap_hdr: header prepended to every read(2) record, carries
> payload length, MP protocol type and a ktime_get_ns() timestamp.
> - struct gxfp_tx_pkt_hdr: header that userspace prepends to write(2)
> payloads so the driver can wrap them in the eSPI frame format.
> - GXFP_IOCTL_FLUSH_RXQ: flush the kernel-side RX record queue.
>
> Signed-off-by: Metehan Günen <metehangnen@gmail.com>
> ---
> include/uapi/linux/gxfp_ioctl.h | 43 +++++++++++++++++++++++++++++++++
> 1 file changed, 43 insertions(+)
> create mode 100644 include/uapi/linux/gxfp_ioctl.h
>
> diff --git a/include/uapi/linux/gxfp_ioctl.h b/include/uapi/linux/gxfp_ioctl.h
> new file mode 100644
> index 000000000..c9c6c2d48
> --- /dev/null
> +++ b/include/uapi/linux/gxfp_ioctl.h
> @@ -0,0 +1,43 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#ifndef __UAPI_GXFP_IOCTL_H
> +#define __UAPI_GXFP_IOCTL_H
> +
> +#include <linux/types.h>
> +#include <linux/ioctl.h>
> +
> +#define GXFP_IOCTL_MAGIC 'G'
> +
> +/*
> + * 4-byte MP header + payload must fit GXFP_TX_BUFFER_SIZE(512).
> + */
> +#define GXFP_IOCTL_TX_PAYLOAD_MAX 508u
> +
> +/* Maximum protocol payload bytes exported via read(2) records. */
> +#define GXFP_IOCTL_TAP_PAYLOAD_MAX (128u * 1024u)
> +
> +/*
> + * Stream tap (read/poll) record header.
> + * Followed by `len` bytes of protocol payload.
> + */
> +struct gxfp_tap_hdr {
> + __u32 len; /* protocol payload bytes */
> + __u32 type; /* MP type */
> + __u32 _rsvd0;
C variables do not start with _, this isn't rust :)
And are you checking this for 0?
> + __u64 ts_ns; /* ktime_get_ns() */
> + __u8 head16[16]; /* first 16 bytes of payload */
> +};
> +
> +/*
> + * write(2) packet header.
> + * Userspace writes: [gxfp_tx_pkt_hdr][payload bytes]
> + */
> +struct gxfp_tx_pkt_hdr {
> + __u8 mp_flags;
> + __u8 _pad0;
Are you checking this for 0?
> + __u16 payload_len;
> + __u32 flags;
No definition of what these flags are?
thanks,
greg k-h
next prev parent reply other threads:[~2026-07-18 9:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-18 8:14 [PATCH 0/4] drivers/misc: add Goodix GXFP5130 eSPI fingerprint sensor driver Metehan Günen
2026-07-18 8:14 ` [PATCH 1/4] include/uapi/linux: add gxfp_ioctl.h for GXFP5130 fingerprint sensor Metehan Günen
2026-07-18 9:07 ` Greg KH [this message]
2026-07-18 9:08 ` Greg KH
2026-07-18 8:14 ` [PATCH 2/4] drivers/misc: add Goodix GXFP5130 eSPI fingerprint sensor driver Metehan Günen
2026-07-18 9:09 ` Greg KH
2026-07-18 9:12 ` Greg KH
2026-07-18 8:14 ` [PATCH 3/4] Documentation/misc-devices: add gxfp5130.rst Metehan Günen
2026-07-18 9:06 ` Greg KH
2026-07-18 8:14 ` [PATCH 4/4] MAINTAINERS: add entry for GXFP5130 fingerprint sensor driver Metehan Günen
2026-07-18 9:06 ` Greg KH
2026-07-18 9:05 ` [PATCH 0/4] drivers/misc: add Goodix GXFP5130 eSPI " Greg KH
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=2026071801-headdress-gab-348e@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=metehangnen@gmail.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