public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joel Selvaraj <joelselvaraj.oss@gmail.com>
To: Markuss Broks <markuss.broks@gmail.com>,
	Caleb Connolly <caleb@connolly.tech>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Henrik Rydberg <rydberg@bitmath.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Robert Jarzmik <robert.jarzmik@free.fr>,
	Jeff LaBundy <jeff@labundy.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Jean Delvare <jdelvare@suse.de>,
	Max Krummenacher <max.krummenacher@toradex.com>,
	Job Noorman <job@noorman.info>,
	Alistair Francis <alistair@alistair23.me>,
	Chris Morgan <macromorgan@hotmail.com>
Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	~postmarketos/upstreaming@lists.sr.ht,
	phone-devel@vger.kernel.org
Subject: Re: [PATCH 2/5] Input: add driver for Focaltech FTS touchscreen
Date: Sun, 9 Apr 2023 09:24:10 -0500	[thread overview]
Message-ID: <0f6e0854-5097-3abe-8e02-36cb7027bf61@gmail.com> (raw)
In-Reply-To: <f9c8e0d4-1d0c-cefc-866c-046d4d374576@gmail.com>

Hi Markuss,

On 09/04/23 08:32, Markuss Broks wrote:
> By that I meant doing something like the Zinitix driver[1] does. It has
> a struct data type for whatever you read from hardware, e.g.
> 
> struct point_coord {
>     __le16    x;
>     __le16    y;
> ...
> };
> 
> from that driver. That way you can cast the data read to that struct and
> have it look a bit nicer.

Understood. Thanks for the clarification. Jeff LaBundy explained it a
bit too. I have addressed all the other comments in this patch series in
my WIP v2. However, I am having quite the trouble casting the buffer to
a struct. The register layout is bit weird. It would have been easier if
they are sets of 8bits or 16bits values. Instead it seems to be split in
terms 4bits and 12bits or I don't know. I am a bit new to this and
having trouble handling endianess with these weird splits in the buffer.

Here is a hand drawn image of the buffer layout [1]. Let me know if you
or anyone have any thoughts on this. Wonder if it's worth the trouble :)

[1] https://imgur.com/a/4RYrB1G

> This is just a suggestion though, you have the final choice in what
> design you choose for your code :)

I am gonna try it a few more days and if I can't make it work in a
sensible way, I will probably go with the existing approach.

> - Markuss

Thanks,
Joel

  reply	other threads:[~2023-04-09 14:24 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-12  9:32 [PATCH 0/5] Add support for Focaltech FTS Touchscreen Joel Selvaraj
2023-03-12  9:32 ` [PATCH 1/5] dt-bindings: input: touchscreen: add bindings for focaltech,fts Joel Selvaraj
2023-03-12 20:47   ` Krzysztof Kozlowski
2023-03-13  0:21     ` Joel Selvaraj
2023-03-13  6:42       ` Krzysztof Kozlowski
2023-03-13  6:53         ` Joel Selvaraj
2023-03-14 14:10   ` Rob Herring
2023-03-12  9:32 ` [PATCH 2/5] Input: add driver for Focaltech FTS touchscreen Joel Selvaraj
2023-03-12 20:40   ` Markuss Broks
2023-03-12 22:21     ` Joel Selvaraj
2023-04-09 13:32       ` Markuss Broks
2023-04-09 14:24         ` Joel Selvaraj [this message]
2023-03-14  3:42   ` Jeff LaBundy
2023-03-14  4:33     ` Joel Selvaraj
2023-03-12  9:32 ` [PATCH 3/5] arm64: dts: qcom: sdm845-xiaomi-beryllium-common: add touchscreen related nodes Joel Selvaraj
2023-03-12  9:32 ` [PATCH 4/5] arm64: dts: qcom: sdm845-xiaomi-beryllium-ebbg: introduce support for fts touchscreen Joel Selvaraj
2023-03-12 20:48   ` Krzysztof Kozlowski
2023-03-12  9:32 ` [PATCH 5/5] arm64: dts: qcom: sdm845-shift-axolotl: update focaltech touchscreen properties Joel Selvaraj
2023-03-12 20:49   ` Krzysztof Kozlowski

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=0f6e0854-5097-3abe-8e02-36cb7027bf61@gmail.com \
    --to=joelselvaraj.oss@gmail.com \
    --cc=agross@kernel.org \
    --cc=alistair@alistair23.me \
    --cc=andersson@kernel.org \
    --cc=arnd@arndb.de \
    --cc=caleb@connolly.tech \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jdelvare@suse.de \
    --cc=jeff@labundy.com \
    --cc=job@noorman.info \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=macromorgan@hotmail.com \
    --cc=markuss.broks@gmail.com \
    --cc=max.krummenacher@toradex.com \
    --cc=neil.armstrong@linaro.org \
    --cc=phone-devel@vger.kernel.org \
    --cc=robert.jarzmik@free.fr \
    --cc=robh+dt@kernel.org \
    --cc=rydberg@bitmath.org \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /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