From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Cc: Luca Weiss <luca.weiss@fairphone.com>,
Griffin Kroah-Hartman <griffin.kroah@fairphone.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
linux-input@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH v2 2/3] Input: aw86938 - add driver for Awinic AW86938
Date: Mon, 2 Feb 2026 03:04:07 -0800 [thread overview]
Message-ID: <aYCCv6nI2QkvD8rb@google.com> (raw)
In-Reply-To: <34fa533c-b9ab-4025-b9ad-4041837e790c@oss.qualcomm.com>
On Mon, Feb 02, 2026 at 11:19:36AM +0100, Konrad Dybcio wrote:
> On 2/2/26 11:14 AM, Luca Weiss wrote:
> > Hi Konrad,
> >
> > On Mon Feb 2, 2026 at 11:12 AM CET, Konrad Dybcio wrote:
> >> On 2/1/26 2:49 AM, Dmitry Torokhov wrote:
> >>> Hi Griffin,
> >>>
> >>> On Wed, Jan 28, 2026 at 04:51:14PM +0100, Griffin Kroah-Hartman wrote:
> >>>> @@ -717,9 +746,19 @@ static int aw86927_detect(struct aw86927_data *haptics)
> >>>>
> >>>> chip_id = be16_to_cpu(read_buf);
> >>>>
> >>>> - if (chip_id != AW86927_CHIPID) {
> >>>> - dev_err(haptics->dev, "Unexpected CHIPID value 0x%x\n", chip_id);
> >>>> - return -ENODEV;
> >>>> + switch (haptics->model) {
> >>>> + case AW86927:
> >>>> + if (chip_id != AW86927_CHIPID) {
> >>>> + dev_err(haptics->dev, "Unexpected CHIPID value 0x%x\n", chip_id);
> >>>> + return -ENODEV;
> >>>> + }
> >>>
> >>> If we are able to query chip ID why do we need to have separate
> >>> compatibles? I would define chip data structure with differences between
> >>> variants and assign and use it instead of having separate compatible.
> >>
> >> dt-bindings guidelines explicitly call for this, a chipid comparison
> >> then works as a safety net
> >
> > Are you saying, that
> >
> > 1. we should enforce dt-bindings == CHIP_ID (what's currently done)
>
> This
No. If there is a compatible chip with different ID (for whatever reason
- maybe there is additional functionality that either board does not
need or the driver does not implement) we absolutely should not refuse
to bind the driver.
Hint: this thing is called _compatible_ for a reason.
>
> >
> > or
> >
> > 2. we should have both compatibles with no handling based on compatible,
> > but only use CHIP_ID at runtime to change behavior
>
> This is spaghetti
I really do not understand the aversion of DT maintainers to generic
compatibles. We see this in I2C HID where we keep adding compatibles
for what could be described via device properties.
Thanks.
--
Dmitry
next prev parent reply other threads:[~2026-02-02 11:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-28 15:51 [PATCH v2 0/3] Add support for Awinic AW86938 haptic driver Griffin Kroah-Hartman
2026-01-28 15:51 ` [PATCH v2 1/3] dt-bindings: input: awinic,aw86927: Add Awinic AW86938 Griffin Kroah-Hartman
2026-02-05 13:14 ` Krzysztof Kozlowski
2026-01-28 15:51 ` [PATCH v2 2/3] Input: aw86938 - add driver for " Griffin Kroah-Hartman
2026-01-31 3:44 ` kernel test robot
2026-02-01 1:49 ` Dmitry Torokhov
2026-02-02 10:12 ` Konrad Dybcio
2026-02-02 10:14 ` Luca Weiss
2026-02-02 10:19 ` Konrad Dybcio
2026-02-02 11:04 ` Dmitry Torokhov [this message]
2026-02-02 15:11 ` Konrad Dybcio
2026-02-03 9:49 ` Dmitry Torokhov
2026-02-03 11:39 ` Konrad Dybcio
2026-02-05 13:13 ` Krzysztof Kozlowski
2026-01-28 15:51 ` [PATCH v2 3/3] arm64: dts: qcom: milos-fairphone-fp6: Add vibrator support Griffin Kroah-Hartman
2026-01-28 16:06 ` Dmitry Baryshkov
2026-01-29 10:18 ` Konrad Dybcio
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=aYCCv6nI2QkvD8rb@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=griffin.kroah@fairphone.com \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.weiss@fairphone.com \
--cc=robh@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