mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "André Draszik" <andre.draszik@linaro.org>
To: Lukas Timmermann <lukas@timmermann.space>,
	Lukas Timmermann <foss@timmermann.space>
Cc: Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Andi Shyti <andi.shyti@kernel.org>,
	Peter Griffin	 <peter.griffin@linaro.org>,
	Tudor Ambarus <tudor.ambarus@linaro.org>,
	Alim Akhtar <alim.akhtar@samsung.com>,
	linux-input@vger.kernel.org, devicetree@vger.kernel.org,
	 linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	 linux-samsung-soc@vger.kernel.org,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>
Subject: Re: [PATCH v2 2/7] Input: s6sy761 - split into core and I2C modules
Date: Thu, 03 Dec 2026 10:28:38 +0000	[thread overview]
Message-ID: <9b9d07921a05c8520fc53552f7c59ed6f7d8c2ac.camel@linaro.org> (raw)
In-Reply-To: <65f2dbe8-b582-4e84-bced-7fe02bb56938@timmermann.space>

Hi Lukas,

On Wed, 2026-12-02 at 19:15 +0100, Lukas Timmermann wrote:
> At first, I tried to do this patch with regmap as I thought it would be 
> cleaner. But the touchscreen isn't really register based but works on 
> single commands. As far as I understood it, regmap has features like 
> caching, bitwise operations and handles IRQs in conjunction with 
> registers.

REGCACHE_NONE is the default, and custom framed SPI protocols already use
devm_regmap_init() with custom  .read/.write callbacks, e.g.
drivers/input/touchscreen/goodix_berlin_spi.c paired with
devm_regmap_init_i2c() in drivers/input/touchscreen/goodix_berlin_i2c.c

> So on second thought I kept the transport code and just did 
> the split.
> 
> But I have to say I'm still learning when it comes to kernel 
> development, so any advice is always welcome. :-)

Regmap is great, as you get tracing and locking and debugfs for free
and it's a nice abstraction and you should be able to get rid of the
manual I2C transfer code in this driver.

It looks doable - you could do something like regmap + a separate
cmd(dev, u8) callback (like drivers/input/touchscreen/tsc200[45].c) to
allow for the 0-byte payloads (SENSE_ON|OFF) and custom SPI .read/.write
for the framing (like drivers/input/touchscreen/goodix_berlin_spi.c)

That would reuse devm_regmap_init_i2c() and regmap locking/tracing for all
data transfers (except the 0-byte payload).



Cheers,
Andre'

  reply	other threads:[~2026-12-03 10:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-28 13:51 [PATCH v2 0/7] Input: s6sy761 - add SPI support for the S6SY791 Lukas Timmermann
2026-11-28 13:51 ` [PATCH v2 1/7] dt-bindings: input: touchscreen: samsung,s6sy761: Add S6SY791 and reset GPIO Lukas Timmermann
2026-11-28 13:51 ` [PATCH v2 2/7] Input: s6sy761 - split into core and I2C modules Lukas Timmermann
2026-11-30  4:12   ` Dmitry Torokhov
2026-11-30  9:57     ` André Draszik
2026-12-02 18:15       ` Lukas Timmermann
2026-12-03 10:28         ` André Draszik [this message]
2026-11-28 13:51 ` [PATCH v2 3/7] Input: s6sy761 - add reset GPIO support Lukas Timmermann
2026-11-28 13:51 ` [PATCH v2 4/7] Input: s6sy761 - add SPI support for S6SY791 Lukas Timmermann
2026-11-28 13:51 ` [PATCH v2 5/7] arm64: dts: exynos: gs101-pixel-common: add labels for touchscreen supplies Lukas Timmermann
2026-11-28 13:51 ` [PATCH v2 6/7] arm64: dts: exynos: gs101-raven: add S6SY791 touchscreen Lukas Timmermann
2026-11-28 13:51 ` [PATCH v2 7/7] MAINTAINERS: add entry for Samsung S6SY761 touchscreen driver Lukas Timmermann

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=9b9d07921a05c8520fc53552f7c59ed6f7d8c2ac.camel@linaro.org \
    --to=andre.draszik@linaro.org \
    --cc=alim.akhtar@samsung.com \
    --cc=andi.shyti@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=foss@timmermann.space \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=lukas@timmermann.space \
    --cc=peter.griffin@linaro.org \
    --cc=robh@kernel.org \
    --cc=tudor.ambarus@linaro.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

all inboxes | Powered by JetHome®